coreboot/src/drivers
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
..
ams drivers/ams: Set default values in Kconfig 2015-11-22 01:39:44 +01:00
aspeed UPSTREAM: Remove extra newlines from the end of all coreboot files. 2016-08-04 23:36:56 -07:00
ati/ragexl UPSTREAM: src/drivers: Add required space before opening parenthesis '(' 2016-09-04 19:36:54 -07:00
dec/21143 kbuild: Allow drivers to fit src/drivers/[X]/[Y]/ scheme 2016-04-19 18:34:18 +02:00
elog UPSTREAM: drivers/elog: use region_device for NV storage 2016-08-22 00:11:48 -07:00
emulation/qemu drivers/emulation: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:37:08 +02:00
generic UPSTREAM: drivers/regulator: Add driver for handling GPIO-based fixed regulator 2016-12-19 09:55:05 -08:00
gic arm64: Remove cpu intialization through device-tree 2015-11-07 03:29:35 +01:00
i2c UPSTREAM: drivers/i2c/generic: Allow mainboards to export reset and enable GPIOs 2016-12-19 09:54:25 -08:00
ics/954309 drivers/ics: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:36:43 +02:00
intel UPSTREAM: drivers/intel/gma: Use scaling to simplify fb config 2016-12-21 03:12:59 -08:00
ipmi UPSTREAM: src/drivers: Add required space before opening parenthesis '(' 2016-09-04 19:36:54 -07:00
lenovo UPSTREAM: Remove extra newlines from the end of all coreboot files. 2016-08-04 23:36:56 -07:00
maxim drivers/aspeed: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:36:17 +02:00
net UPSTREAM: drivers/r8168: Read default MAC address from CBFS 2016-12-08 22:46:52 -08:00
parade ps8640: disable mipi mcs 2016-08-22 05:03:30 -07:00
pc80 UPSTREAM: drivers/pc80/tpm: Set default TPM acpi path if unset 2016-12-19 09:54:39 -08:00
ricoh/rce822 UPSTREAM: buildsystem: Drop explicit (k)config.h includes 2016-12-09 03:29:54 -08:00
siemens/nc_fpga UPSTREAM: siemens/nc_fpga: Add driver for Siemens NC FPGA 2016-07-07 01:09:51 -07:00
sil/3114 drivers/sil: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:36:05 +02:00
spi UPSTREAM: drivers/spi: fix flash writes at page boundaries 2016-12-21 03:13:11 -08:00
ti drivers/ti: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:34:36 +02:00
uart UPSTREAM: Kconfig: Prefix hex defaults with 0x 2016-10-04 00:31:40 -07:00
usb UPSTREAM: drivers/usb: Add option for baudrate of FT232H UART 2016-11-21 11:54:11 -08:00
xgi UPSTREAM: Add newlines at the end of all coreboot files 2016-08-05 11:45:17 -07:00
xpowers/axp209 UPSTREAM: Remove non-ascii & unprintable characters 2016-08-05 11:45:20 -07:00