Skip to content

Commit

Permalink
[nrf fromtree] drivers/flash/nrf_mram: Set no explicit erase capabili…
Browse files Browse the repository at this point in the history
…ty to true

NRF MRAM does not require erase prior to re-programming already
written area.

Signed-off-by: Dominik Ermel <[email protected]>
(cherry picked from commit 0e970c8)
  • Loading branch information
de-nordic authored and rghaddab committed Oct 1, 2024
1 parent 622512e commit 3386bf7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/flash/Kconfig.nrf_mram
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ config SOC_FLASH_NRF_MRAM
depends on DT_HAS_NORDIC_MRAM_ENABLED
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_NO_EXPLICIT_ERASE
imply MPU_ALLOW_FLASH_WRITE if ARM_MPU
help
Enables Nordic Semiconductor flash driver for MRAM in direct write mode.
Expand Down
3 changes: 3 additions & 0 deletions drivers/flash/soc_flash_nrf_mram.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ static const struct flash_parameters *nrf_mram_get_parameters(const struct devic
static const struct flash_parameters parameters = {
.write_block_size = WRITE_BLOCK_SIZE,
.erase_value = ERASE_VALUE,
.caps = {
.no_explicit_erase = true,
},
};

return &parameters;
Expand Down

0 comments on commit 3386bf7

Please sign in to comment.