Skip to content

Commit 904181a

Browse files
Xinyang Tancarlescufi
authored andcommitted
drivers: flash: spi_nor: fix driver initialization error
Fix the issue that the initialization will fail when both CONFIG_SPI_NOR_SFDP_RUNTIME and CONFIG_SPI_NOR_IDLE_IN_DPD are enabled. The cause of this problem is simply calling the wrong function. Fixes #33015 Signed-off-by: Xinyang Tan <[email protected]>
1 parent 6de54e0 commit 904181a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/flash/spi_nor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ static int spi_nor_process_sfdp(const struct device *dev)
877877
} u;
878878
const struct jesd216_sfdp_header *hp = &u.sfdp;
879879

880-
rc = read_sfdp(dev, 0, u.raw, sizeof(u.raw));
880+
rc = spi_nor_sfdp_read(dev, 0, u.raw, sizeof(u.raw));
881881
if (rc != 0) {
882882
LOG_ERR("SFDP read failed: %d", rc);
883883
return rc;
@@ -910,7 +910,7 @@ static int spi_nor_process_sfdp(const struct device *dev)
910910
} u;
911911
const struct jesd216_bfp *bfp = &u.bfp;
912912

913-
rc = read_sfdp(dev, jesd216_param_addr(php), u.dw, sizeof(u.dw));
913+
rc = spi_nor_sfdp_read(dev, jesd216_param_addr(php), u.dw, sizeof(u.dw));
914914
if (rc == 0) {
915915
rc = spi_nor_process_bfp(dev, php, bfp);
916916
}

0 commit comments

Comments
 (0)