From dfcc60c385c70ca2d003d0f1ff543bbc74e60adc Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Wed, 14 Dec 2016 12:32:35 -0600 Subject: soc/intel/apollolake: don't probe flash manually Rely on boot_device_spi_flash() to provide the spi_flash object. There's no need to duplicate the probing logic. BUG=chrome-os-partner:56151 BRANCH=reef Change-Id: I91900a3dfad7ba92cbd3b0ace77b08db04cff0b6 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/17867 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/soc/intel/apollolake/romstage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/soc/intel/apollolake/romstage.c b/src/soc/intel/apollolake/romstage.c index 8c2a1a330a..97be0f6213 100644 --- a/src/soc/intel/apollolake/romstage.c +++ b/src/soc/intel/apollolake/romstage.c @@ -318,9 +318,9 @@ void mainboard_save_dimm_info(void) int get_sw_write_protect_state(void) { uint8_t status; - struct spi_flash *flash; + const struct spi_flash *flash; - flash = spi_flash_probe(CONFIG_BOOT_DEVICE_SPI_FLASH_BUS, 0); + flash = boot_device_spi_flash(); if (!flash) return 0; -- cgit v1.2.3