From 1c3086a6036f9908c8c09c823c5ad1718eac7ce0 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Fri, 3 Jan 2020 15:58:11 -0700 Subject: drivers/spi/spi_flash: explicitly handle STMicro deep power state In order to provide more consistent probing in future refactorings, pull out the release from deep sleep path in STMicro's SPI flash probing function. Call that function explicitly when RDID doesn't return anything at all. The old STMicro parts, even if supporting RDID, won't decode that instruction while in a deep power down state. Instead of re-issuing RDID after the successful wake assume the id fixup is valid. Change-Id: I46c47abcfb1376c1c3ce772f6f232857b8c54202 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/c/coreboot/+/38167 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/drivers/spi/spi_flash_internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/drivers/spi/spi_flash_internal.h') diff --git a/src/drivers/spi/spi_flash_internal.h b/src/drivers/spi/spi_flash_internal.h index f99c90ed36..58172ce929 100644 --- a/src/drivers/spi/spi_flash_internal.h +++ b/src/drivers/spi/spi_flash_internal.h @@ -81,6 +81,8 @@ int spi_flash_probe_sst(const struct spi_slave *spi, u8 *idcode, struct spi_flash *flash); int spi_flash_probe_stmicro(const struct spi_slave *spi, u8 *idcode, struct spi_flash *flash); +/* Release from deep sleep an provide alternative rdid information. */ +int stmicro_release_deep_sleep_identify(const struct spi_slave *spi, u8 *idcode); int spi_flash_probe_winbond(const struct spi_slave *spi, u8 *idcode, struct spi_flash *flash); int spi_flash_probe_gigadevice(const struct spi_slave *spi, u8 *idcode, -- cgit v1.2.3