coreboot/src/drivers
Vadim Bendebury 4f064fdca5 spi: support controllers with limited transfer size capabilities
Some SPI controllers (like Imgtec Pistachio), have a hard limit on SPI
read and write transactions. Limiting transfer size in the wrapper
allows to provide the API user with unlimited transfer size
transactions.

The tranfer size limitation is added to the spi_slave structure, which
is set up by the controller driver. The value of zero in this field
means 'unlimited transfer size'. It will work with existion drivers,
as they all either keep structures in the bss segment, or initialize
them to all zeros.

This patch addresses the problem for reads only, as coreboot is not
expected to require to write long chunks into SPI devices.

BRANCH=none
BUG=chrome-os-partner:32441, chrome-os-partner:31438
TEST=set transfer size limit to artificially low value (4K) and
     observed proper operation on both Pistachio and ipq8086: both
     Storm and Urara booted through romstage and ramstage.

Change-Id: I9df24f302edc872bed991ea450c0af33a1c0ff7b
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/232239
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-12-03 05:03:05 +00:00
..
ams rtc: Add an RTC driver for the AS3722 PMIC. 2014-05-02 23:58:52 +00:00
ati Get rid of drivers class 2012-11-27 22:00:49 +01:00
dec GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
elog elog: Fix typecast issues related to 64-bit compilation. 2014-11-13 23:25:19 +00:00
emulation Get rid of drivers class 2012-11-27 22:00:49 +01:00
generic BACKPORT: x86 I/O APIC: Make functions io_apic_{read,write}() public 2014-04-23 02:44:28 +00:00
gic drivers: add GIC support 2014-09-17 01:23:56 +00:00
i2c tpm: allow 0 as valid i2c bus number 2014-10-29 22:24:07 +00:00
ics Get rid of drivers class 2012-11-27 22:00:49 +01:00
intel broadwell_fsp: Add intel FSP "driver" from coreboot.org 2014-11-19 04:10:00 +00:00
ipmi Get rid of drivers class 2012-11-27 22:00:49 +01:00
maxim i2c: Replace the i2c API. 2014-04-10 06:05:01 +00:00
oxford Rename cpu/x86/car.h to arch/early_variables.h 2013-07-30 13:40:23 -07:00
parade i2c: Replace the i2c API. 2014-04-10 06:05:01 +00:00
pc80 tpm: Remove error message for unknown resource type 2014-11-24 17:27:54 +00:00
realtek GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
sil Get rid of drivers class 2012-11-27 22:00:49 +01:00
spi spi: support controllers with limited transfer size capabilities 2014-12-03 05:03:05 +00:00
ti rtc: Add an RTC driver for the TI TPS65913 PMIC. 2014-11-13 23:25:26 +00:00
trident Get rid of drivers class 2012-11-27 22:00:49 +01:00
Kconfig drivers: add GIC support 2014-09-17 01:23:56 +00:00
Makefile.inc drivers: add GIC support 2014-09-17 01:23:56 +00:00