Skip to content

Commit

Permalink
Merge pull request zephyrproject-rtos#33 from whisperai/lars/fix_spi_…
Browse files Browse the repository at this point in the history
…nor_dpd

Lars/fix spi nor dpd
  • Loading branch information
larson-whisper authored Dec 13, 2022
2 parents acbb960 + 9d4a52c commit 7874da5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/flash/spi_nor.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ static int spi_nor_write_protection_set(const struct device *dev,
return ret;
}

#if defined(CONFIG_FLASH_JESD216_API)
#if defined(CONFIG_FLASH_JESD216_API) || defined(CONFIG_SPI_NOR_SFDP_RUNTIME)

static int spi_nor_sfdp_read(const struct device *dev, off_t addr,
void *dest, size_t size)
Expand Down Expand Up @@ -880,7 +880,7 @@ static int spi_nor_process_sfdp(const struct device *dev)
} u;
const struct jesd216_sfdp_header *hp = &u.sfdp;

rc = read_sfdp(dev, 0, u.raw, sizeof(u.raw));
rc = spi_nor_sfdp_read(dev, 0, u.raw, sizeof(u.raw));
if (rc != 0) {
LOG_ERR("SFDP read failed: %d", rc);
return rc;
Expand Down Expand Up @@ -913,7 +913,7 @@ static int spi_nor_process_sfdp(const struct device *dev)
} u;
const struct jesd216_bfp *bfp = &u.bfp;

rc = read_sfdp(dev, jesd216_param_addr(php), u.dw, sizeof(u.dw));
rc = spi_nor_sfdp_read(dev, jesd216_param_addr(php), u.dw, sizeof(u.dw));
if (rc == 0) {
rc = spi_nor_process_bfp(dev, php, bfp);
}
Expand Down

0 comments on commit 7874da5

Please sign in to comment.