diff options
author | David Hendricks <dhendrix@chromium.org> | 2014-04-14 14:57:36 -0700 |
---|---|---|
committer | Marc Jones <marc.jones@se-eng.com> | 2014-12-15 23:58:34 +0100 |
commit | c94702481b39709e244dd492256fa3b96d651537 (patch) | |
tree | d5da3443d0ec81d356c598053e5053cf89184414 /src/drivers/elog/elog.c | |
parent | 2339a3030bc8c8884b1ed28c1e52d94c113a4f1d (diff) | |
download | coreboot-c94702481b39709e244dd492256fa3b96d651537.tar.xz |
elog: Probe for SPI flash on bus indicated by Kconfig variable
This replaces a hard-coded bus number of 0 with a Kconfig variable,
CONFIG_BOOT_MEDIA_SPI_BUS. This removes an assumption made for x86
where this value is always 0 and makes it easy to add support for
other platforms where the bus number for the backing SPI flash is
more arbitrary.
BUG=none
BRANCH=none
TEST=tested on Nyan (bus=4) and Link (bus=0)
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Original-Change-Id: I1e878a1628af7f4ccc2f39a70b2190192767e536
Original-Reviewed-on: https://chromium-review.googlesource.com/194854
Original-Tested-by: David Hendricks <dhendrix@chromium.org>
Original-Reviewed-by: Gabe Black <gabeblack@chromium.org>
Original-Commit-Queue: David Hendricks <dhendrix@chromium.org>
(cherry picked from commit 371c6c14d8d4b98004eebce7049a88a219682bc4)
Signed-off-by: Marc Jones <marc.jones@se-eng.com>
Change-Id: Ie105b4654e028098f2137c96e4309b8d85f096df
Reviewed-on: http://review.coreboot.org/7753
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/drivers/elog/elog.c')
-rw-r--r-- | src/drivers/elog/elog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/elog/elog.c b/src/drivers/elog/elog.c index 227bd82af6..059b089bb8 100644 --- a/src/drivers/elog/elog.c +++ b/src/drivers/elog/elog.c @@ -548,7 +548,7 @@ int elog_init(void) /* Prepare SPI */ spi_init(); - elog_spi = spi_flash_probe(0, 0); + elog_spi = spi_flash_probe(CONFIG_BOOT_MEDIA_SPI_BUS, 0); if (!elog_spi) { printk(BIOS_ERR, "ELOG: Unable to find SPI flash\n"); return -1; |