From 371c6c14d8d4b98004eebce7049a88a219682bc4 Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Mon, 14 Apr 2014 14:57:36 -0700 Subject: [PATCH] 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 Change-Id: I1e878a1628af7f4ccc2f39a70b2190192767e536 Reviewed-on: https://chromium-review.googlesource.com/194854 Tested-by: David Hendricks Reviewed-by: Gabe Black Commit-Queue: David Hendricks --- src/drivers/elog/elog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/elog/elog.c b/src/drivers/elog/elog.c index 7c282d1d1f..604a6e6a6e 100644 --- a/src/drivers/elog/elog.c +++ b/src/drivers/elog/elog.c @@ -547,7 +547,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;