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. BUG=None BRANCH=None TEST=None 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: Kysti Mlkki <kyosti.malkki@gmail.com> Change-Id: I93e24a5a717adcee45a017c164bd960f4592ad50 Reviewed-on: https://chromium-review.googlesource.com/422949 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> |
||
|---|---|---|
| .. | ||
| ams | ||
| aspeed | ||
| ati/ragexl | ||
| dec/21143 | ||
| elog | ||
| emulation/qemu | ||
| generic | ||
| gic | ||
| i2c | ||
| ics/954309 | ||
| intel | ||
| ipmi | ||
| lenovo | ||
| maxim | ||
| net | ||
| parade | ||
| pc80 | ||
| ricoh/rce822 | ||
| siemens/nc_fpga | ||
| sil/3114 | ||
| spi | ||
| ti | ||
| uart | ||
| usb | ||
| xgi | ||
| xpowers/axp209 | ||