[coreboot-gerrit] Patch set updated for coreboot: drivers/spi: be sure to call spi_init() before spi_flash_probe()

Aaron Durbin (adurbin@chromium.org) gerrit at coreboot.org
Tue Aug 23 15:16:45 CEST 2016


Aaron Durbin (adurbin at chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16297

-gerrit

commit f37de1eb4cd3f821e5b355f02f3b17887ec4d00f
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Mon Aug 22 17:41:13 2016 -0500

    drivers/spi: be sure to call spi_init() before spi_flash_probe()
    
    It's necessary to call spi_init() prior to calling spi_flash_probe()
    such that the SPI drivers can do any work required prior to performing
    SPI transactions.  It could be argued that the drivers should handle
    such situations, however the SPI API implementations seem to assume the
    callers ensured spi_init() was called before any SPI transactions.
    
    This fixes systems that failed to boot introduced by [1]. Issue tracked
    in https://ticket.coreboot.org/issues/67.
    
    [1] I2aa75f88409309e3f9b9bd79b52d27c0061139c8
        https://review.coreboot.org/16200
    
    BUG=chrome-os-partner:56151
    
    Change-Id: I2d8d5ac685833521f1efe212b07a4b61ba0d9bc3
    Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
 src/drivers/spi/boot_device_rw_nommap.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/drivers/spi/boot_device_rw_nommap.c b/src/drivers/spi/boot_device_rw_nommap.c
index 2a9f19f..bf15e99 100644
--- a/src/drivers/spi/boot_device_rw_nommap.c
+++ b/src/drivers/spi/boot_device_rw_nommap.c
@@ -78,6 +78,9 @@ void boot_device_init(void)
 	if (car_get_var(sfg) != NULL)
 		return;
 
+	/* Ensure any necessary setup is performed by the drivers. */
+	spi_init();
+
 	car_set_var(sfg, spi_flash_probe(bus, cs));
 }
 



More information about the coreboot-gerrit mailing list