diff options
Diffstat (limited to 'src/soc/intel')
-rw-r--r-- | src/soc/intel/apollolake/spi.c | 3 | ||||
-rw-r--r-- | src/soc/intel/skylake/flash_controller.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/soc/intel/apollolake/spi.c b/src/soc/intel/apollolake/spi.c index 8992fa55ca..f9c17cdc2a 100644 --- a/src/soc/intel/apollolake/spi.c +++ b/src/soc/intel/apollolake/spi.c @@ -352,7 +352,8 @@ struct spi_flash *spi_flash_programmer_probe(struct spi_slave *spi, int force) flash_bits = read_spi_sfdp_param(ctx, 0x04); flash->size = (flash_bits >> 3) + 1; - flash->spi = spi; + memcpy(&flash->spi, spi, sizeof(*spi)); + flash->name = "Apollolake hardware sequencer"; /* Can erase both 4 KiB and 64 KiB chunks. Declare the smaller size. */ diff --git a/src/soc/intel/skylake/flash_controller.c b/src/soc/intel/skylake/flash_controller.c index e0ac93da03..994aec6b5d 100644 --- a/src/soc/intel/skylake/flash_controller.c +++ b/src/soc/intel/skylake/flash_controller.c @@ -191,7 +191,7 @@ int pch_hwseq_erase(const struct spi_flash *flash, u32 offset, size_t len) len, start); out: - spi_release_bus(flash->spi); + spi_release_bus(&flash->spi); return ret; } @@ -335,7 +335,7 @@ struct spi_flash *spi_flash_programmer_probe(struct spi_slave *spi, int force) /* Ensure writes can take place to the flash. */ spi_init(); - flash->spi = spi; + memcpy(&flash->spi, spi, sizeof(*spi)); flash->name = "Opaque HW-sequencing"; flash->internal_write = pch_hwseq_write; |