Skip to content

Commit

Permalink
[nrf fromtree] drivers: qspi: added operation timeout
Browse files Browse the repository at this point in the history
Added Kconfig assignment of qspi timeout.
Per nrfx v3.2 addition of qspi timeout in config
struct.

Signed-off-by: Kelly Helmut Lord <[email protected]>
(cherry picked from commit abafe9b)
  • Loading branch information
hlord2000 authored and cvinayak committed Feb 7, 2024
1 parent df133be commit 41e3492
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/flash/Kconfig.nordic_qspi_nor
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,13 @@ config NORDIC_QSPI_NOR_XIP
QSPI NOR flash chip is executed until the driver has been setup.
This will also disable power management for the QSPI NOR flash chip.

config NORDIC_QSPI_NOR_TIMEOUT_MS
int "Timeout for QSPI operations (ms)"
default 500
help
The QSPI peripheral operation timeout in milliseconds.
Primarily intended for long running operations such as
a flash sector erase. The 500 ms default allows for
most typical NOR flash chips to erase a sector.

endif # NORDIC_QSPI_NOR
1 change: 1 addition & 0 deletions drivers/flash/nrf_qspi_nor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1386,6 +1386,7 @@ static const struct qspi_nor_config qspi_nor_dev_config = {
.sck_delay = DT_INST_PROP(0, sck_delay),
.spi_mode = INST_0_SPI_MODE,
},
.nrfx_cfg.timeout = CONFIG_NORDIC_QSPI_NOR_TIMEOUT_MS,

.size = INST_0_BYTES,
.id = DT_INST_PROP(0, jedec_id),
Expand Down

0 comments on commit 41e3492

Please sign in to comment.