drivers: flash: spi_nor: exit DPD in all cases

Exit DPD on init in all cases, even when `CONFIG_SPI_NOR_IDLE_IN_DPD` is
not enabled.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
Jordan Yates 2023-06-22 17:05:48 +10:00 committed by Carles Cufí
commit b0db69d622

View file

@ -1148,6 +1148,13 @@ static int spi_nor_configure(const struct device *dev)
* Exit DPD and wait until flash is ready.
*/
acquire_device(dev);
rc = exit_dpd(dev);
if (rc < 0) {
LOG_ERR("Failed to exit DPD (%d)", rc);
return -ENODEV;
}
rc = spi_nor_rdsr(dev);
if (rc > 0 && (rc & SPI_NOR_WIP_BIT)) {
LOG_WRN("Waiting until flash is ready");