coreboot-kgpe-d16/src/drivers/spi
Aaron Durbin 41f6690239 drivers/spi: fix flash writes at page boundaries
There was an assumption that all SPI controllers could
consume a full page of data to write. However, that
assumption doesn't hold when spi_crop_chunk() indicates
sizes smaller than page size. If the requested offset isn't
page aligned from the start then writes will fail corrupting
data since a page boundary isn't honored.

The spansion driver needed quite a bit more work to honor
the spi_crop_chunk() result. It now mimics the other
driver's code. Also, needed to add spi_crop_chunk() to
marvell/bg4cd SoC to make google/cosmos build. SPI obviously
doesn't work on that platform, but it fixes the build error.

Change-Id: I93e24a5a717adcee45a017c164bd960f4592ad50
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/17910
Tested-by: build bot (Jenkins)
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2016-12-19 22:34:52 +01:00
..
tpm tpm2: handle failures more gracefully 2016-12-16 16:13:22 +01:00
adesto.c drivers/spi: fix flash writes at page boundaries 2016-12-19 22:34:52 +01:00
amic.c spi_flash: Make a deep copy of spi_slave structure 2016-12-06 07:17:28 +01:00
atmel.c drivers/spi: fix flash writes at page boundaries 2016-12-19 22:34:52 +01:00
boot_device_rw_nommap.c drivers/spi: provide a mechanism to obtain the SPI flash boot device 2016-12-08 16:11:01 +01:00
cbfs_spi.c spi: Clean up SPI flash driver interface 2016-11-22 17:32:09 +01:00
eon.c drivers/spi: fix flash writes at page boundaries 2016-12-19 22:34:52 +01:00
gigadevice.c drivers/spi: fix flash writes at page boundaries 2016-12-19 22:34:52 +01:00
Kconfig spi: Clean up SPI flash driver interface 2016-11-22 17:32:09 +01:00
macronix.c drivers/spi: fix flash writes at page boundaries 2016-12-19 22:34:52 +01:00
Makefile.inc spi: Define and use spi_ctrlr structure 2016-12-05 03:29:04 +01:00
spansion.c drivers/spi: fix flash writes at page boundaries 2016-12-19 22:34:52 +01:00
spi-generic.c spi: Clean up SPI driver interface 2016-12-07 20:19:07 +01:00
spi_flash.c spi_flash: Make a deep copy of spi_slave structure 2016-12-06 07:17:28 +01:00
spi_flash_internal.h spi_flash: Make a deep copy of spi_slave structure 2016-12-06 07:17:28 +01:00
spiconsole.c spi: Clean up SPI flash driver interface 2016-11-22 17:32:09 +01:00
sst.c drivers/spi: fix flash writes at page boundaries 2016-12-19 22:34:52 +01:00
stmicro.c drivers/spi: fix flash writes at page boundaries 2016-12-19 22:34:52 +01:00
winbond.c drivers/spi: fix flash writes at page boundaries 2016-12-19 22:34:52 +01:00