coreboot/src/soc
Aaron Durbin 4ae76619d8 UPSTREAM: 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.

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>
2016-12-21 03:13:11 -08:00
..
broadcom/cygnus UPSTREAM: spi: Define and use spi_ctrlr structure 2016-12-08 12:30:16 -08:00
dmp/vortex86ex UPSTREAM: src/soc: Capitalize CPU, ACPI, RAM and ROM 2016-08-04 23:37:59 -07:00
imgtec/pistachio UPSTREAM: spi: Define and use spi_ctrlr structure 2016-12-08 12:30:16 -08:00
intel UPSTREAM: soc/intel/common: provide option to invalide MRC cache on recovery 2016-12-16 07:51:38 -08:00
lowrisc/lowrisc UPSTREAM: soc/lowrisc: Place CBMEM at top of autodetected RAM 2016-12-08 12:30:55 -08:00
marvell UPSTREAM: drivers/spi: fix flash writes at page boundaries 2016-12-21 03:13:11 -08:00
mediatek/mt8173 mediatek/mt8173: Check the right set of bits in USB controller 2016-12-15 22:25:35 -08:00
nvidia UPSTREAM: spi: Define and use spi_ctrlr structure 2016-12-08 12:30:16 -08:00
qualcomm UPSTREAM: spi: Define and use spi_ctrlr structure 2016-12-08 12:30:16 -08:00
rdc/r8610 rdc/r8610: Move to src/soc 2016-05-05 20:08:58 +02:00
rockchip rockchip/common: Loosen I2C frequency target requirements 2016-12-17 02:01:09 -08:00
samsung UPSTREAM: samsung/exynos5420: Fix test for src < 0 2016-12-16 15:42:11 -08:00
ucb/riscv UPSTREAM: soc/ucb/riscv: Place CBMEM at top of autodetected RAM 2016-12-08 12:30:48 -08:00