UPSTREAM: 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 BRANCH=None TEST=None Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/16297 Tested-by: build bot (Jenkins) Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@googlemail.com> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com> Change-Id: I2d8d5ac685833521f1efe212b07a4b61ba0d9bc3 Reviewed-on: https://chromium-review.googlesource.com/374121 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
ed5c75619b
commit
77a2315f6b
1 changed files with 3 additions and 0 deletions
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue