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:
parent
ec44816ae7
commit
b0db69d622
1 changed files with 7 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue