coreboot/src
Dan Ehrenberg a5aac76ac6 drivers/spi: Pass flash parameters from coreboot to payload
A payload may want to run erase operations on SPI NOR flash without
re-probing the device to get its properties. This patch passes up
three properties of flash to achieve that:
- The size of the flash device
- The sector size, i.e., the granularity of erase
- The command used for erase
The patch sends the parameters through coreboot and then libpayload.
The patch also includes a minor refactoring of the flash erase code.
Parameters are sent up for just one flash device. If multiple SPI
flash devices are probed, the second one will "win" and its
parameters will be sent up to the payload.

TEST=Observed parameters to be passed up to depthcharge through
libpayload and be used to correctly initialize flash and do an erase.
TEST=Winbond and Gigadevices spi flash drivers compile with the changes;
others don't, for seemingly unrelated reasons.
BRANCH=none
BUG=chromium:446377

Change-Id: Ib8be86494b5a3d1cfe1d23d3492e3b5cba5f99c6
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 988c8c68bbfcdfa69d497ea5f806567bc80f8126
Original-Change-Id: Ie2b3a7f5b6e016d212f4f9bac3fabd80daf2ce72
Original-Signed-off-by: Dan Ehrenberg <dehrenberg@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/239570
Original-Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: http://review.coreboot.org/9726
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-04-17 09:21:07 +02:00
..
arch arm: allow custom stage entry code 2015-04-17 09:20:46 +02:00
console Add console wrapper for UART driver 2015-04-14 21:25:34 +02:00
cpu CBFS: Automate ROM image layout and remove hardcoded offsets 2015-04-14 09:01:27 +02:00
device cbfs: correct types used for accessing files 2015-04-01 22:51:10 +02:00
drivers drivers/spi: Pass flash parameters from coreboot to payload 2015-04-17 09:21:07 +02:00
ec chromeec: Fix printf formatting warning 2015-04-14 09:01:03 +02:00
include drivers/spi: Pass flash parameters from coreboot to payload 2015-04-17 09:21:07 +02:00
lib drivers/spi: Pass flash parameters from coreboot to payload 2015-04-17 09:21:07 +02:00
mainboard urara: add board id information for urara board 2015-04-17 09:20:59 +02:00
northbridge northbridge/amd/agesa/familyXY: Make NULL device op explicit 2015-04-09 19:34:22 +02:00
soc bg4cd: define custom romstage entry 2015-04-17 09:20:50 +02:00
southbridge southbridge/intel/fsp_rangeley/ : Spellcheck + Formatting 2015-04-10 17:57:11 +02:00
superio kconfig: drop intermittend forwarder files 2015-04-07 17:40:28 +02:00
vendorcode timestamps: You can never have enough of them! 2015-04-14 09:03:40 +02:00
Kconfig Kconfig: Fix incorrect CONFIG_STACK_SIZE values for X86 and ARM64 2015-04-15 00:22:13 +02:00