Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Introduce explicit_erase capability in the Flash API to support memory devices that may not require erase #67687

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
360ded6
drivers/flash: Add explicit_erase property
de-nordic Sep 1, 2023
f5ce9a9
tests/drivers/flash: Make code dependent on explicit_erase
de-nordic Sep 1, 2023
323ce2f
drivers/flash: Add flash_fill() and flash_flatten()
de-nordic Mar 7, 2024
ec05357
drivers/flash_simulator: Add support for RAM type write
de-nordic Mar 6, 2024
c824b31
tests/flash_simulator: Test scenario for flash_flatten()
de-nordic Mar 7, 2024
72cefb3
storage/flash_map: Add flash_area_flatten
de-nordic Mar 7, 2024
27d7406
drivers/flash/nrf: Add explicit_erase capability
de-nordic Jan 16, 2024
9ff176d
drivers/flash/nrf_rram: Set explicit erase capability to false
de-nordic Feb 26, 2024
7addd22
drivers/flash/nrf_mram: Set explicit earse capability to false
de-nordic Mar 11, 2024
14e4b31
drivers/flash: Add explict erase capability with proper values
de-nordic Feb 2, 2024
bd1852c
drivers/flash/Ambiq: Set false to explict_erase capability
de-nordic Feb 2, 2024
be450ed
samples/soc_flash_nrf: Adjust for non-Flash SoC devices
de-nordic Feb 5, 2024
c6b1408
flash/spi_nor: Add explicit_erase capability
de-nordic Feb 5, 2024
3e0ea42
drivers: flashdisk: Remove erase for devices that do not require it
de-nordic Feb 5, 2024
af6bd25
drivers: nrf_qspi_nor: Set explicit erase capability
de-nordic Feb 8, 2024
5a30b21
fs/nvs: Switch to use flash_flatten instead of flash_erase
de-nordic Feb 8, 2024
cba681a
fs: fcb: Replace flash_area_erase with flash_area_flatten
de-nordic Mar 1, 2024
d47a707
storage/stream_flash: Support for no explicit_erase devices
de-nordic Mar 1, 2024
55f7233
tests/storage/stream_flash: Support for no explicit_erase devices
de-nordic Mar 1, 2024
152dec8
tests/settings: Move from flash_area_erase to flash_area_flatten
de-nordic Mar 9, 2024
33197f1
tests/fs: Replace flash_area_erase with flash_area_flatten
de-nordic Mar 9, 2024
887e350
mgmt/mcumgr: Replace use of flash_area_erase with flash_area_flatten
de-nordic Mar 9, 2024
881f581
tests: Bluetooth: Mesh: Use flash_area_flatten for erase
de-nordic Mar 9, 2024
79457af
tests/dfu: Replace flash_area_erase with flash_area_flatten
de-nordic Mar 9, 2024
a9d7484
dfu/mcuboot: Use flash_area_flatten instead of flash_area_erase
de-nordic Mar 9, 2024
8289538
samples/fs/littlefs: Use flash_area_flatten to wipe storage
de-nordic Mar 9, 2024
41e668b
samples/usb/imass: Use flash_area_flatten to wipe storage
de-nordic Mar 9, 2024
a114f1f
Bluetooth: Mesh: Switch erase to flash_area_flatten
de-nordic Mar 9, 2024
2fea3a4
fs/littlefs: Use flash_area_flatten in lfs_api_erase
de-nordic Mar 9, 2024
10059ca
storage/settings: Replace flash_area_erase with flash_area_flatten
de-nordic Mar 9, 2024
4d80fc6
debug/coredump/flash_backend: Switch to flash_area_flatten
de-nordic Mar 9, 2024
bc90ae0
testsuite: qemu: Incorrect selection of FLASH_HAS_PAGE_LAYOUT
de-nordic Mar 30, 2024
5abe280
drivers: flash: Remove erase from Nuvoton numaker series RMC
de-nordic Mar 30, 2024
5aa6009
drivers: flash: shell: Add support for devices without erase
de-nordic Mar 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 43 additions & 9 deletions drivers/disk/flashdisk.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016 Intel Corporation.
* Copyright (c) 2022-2023 Nordic Semiconductor ASA
* Copyright (c) 2022-2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand All @@ -19,6 +19,17 @@
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(flashdisk, CONFIG_FLASHDISK_LOG_LEVEL);

#if IS_ENABLED(CONFIG_FLASH_HAS_EXPLICIT_ERASE) && \
IS_ENABLED(CONFIG_FLASH_HAS_NO_EXPLICIT_ERASE)
#define DISK_ON_EXPLICIT_ERASE(fd) ((fd)->erase_required)
#define DISK_EXPLICIT_ERASE_RUNTIME_CHECK
#elif IS_ENABLED(CONFIG_FLASH_HAS_EXPLICIT_ERASE)
#define DISK_ON_EXPLICIT_ERASE(fd) (true)
#else
/* Assumed IS_ENABLED(CONFIG_FLASH_HAS_NO_EXPLICIT_ERASE) */
#define DISK_ON_EXPLICIT_ERASE(fd) (false)
#endif

struct flashdisk_data {
struct disk_info info;
struct k_mutex lock;
Expand All @@ -32,11 +43,21 @@ struct flashdisk_data {
off_t cached_addr;
bool cache_valid;
bool cache_dirty;
#if defined(DISK_EXPLICIT_ERASE_RUNTIME_CHECK)
bool erase_required;
#endif
};

#define GET_SIZE_TO_BOUNDARY(start, block_size) \
(block_size - (start & (block_size - 1)))

/*
* The default block size is used for devices not requiring erase.
* It defaults to 512 as this is most widely used sector size
* on storage devices.
*/
#define DEFAULT_BLOCK_SIZE 512

Comment on lines +54 to +60
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must be obtained from flash API (flash/other-memory-device driver), regardless of whether erasure is required or not. Simplifying/not-change the code below to just:

	rc = flash_get_page_info_by_offs(ctx->info.dev, ctx->offset, &page);
	if (rc != 0) {
		LOG_ERR("Error %d while getting page info", rc);
		return rc;
	}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this could use the sector-size from dts when used on devices that do not require an erase (can overwrite).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may have no such information as paging, for devices that do not require erase you actually may have entire layout support disabled.
"Bigger" operating systems also have to make assumptions for devices that do not seem to be block devices, for example FreeBSD uses system wide definition of S_BLKSIZE, defined in sys/stat.h, set to 512, and that is what for example tmp_fs uses.
Disk Access has been provided to support ELM FAT driver from the beginning, so it is historically provided to support file systems that have not been directly designed for embedded, so we can probably make the same assumption as big systems do.

static int disk_flash_access_status(struct disk_info *disk)
{
LOG_DBG("status : %s", disk->dev ? "okay" : "no media");
Expand All @@ -53,14 +74,25 @@ static int flashdisk_init_runtime(struct flashdisk_data *ctx,
int rc;
struct flash_pages_info page;
off_t offset;
#if defined(DISK_EXPLICIT_ERASE_RUNTIME_CHECK)
const struct flash_parameters *params;

rc = flash_get_page_info_by_offs(ctx->info.dev, ctx->offset, &page);
if (rc < 0) {
LOG_ERR("Error %d while getting page info", rc);
return rc;
params = flash_get_parameters(ctx->info.dev);
ctx->erase_required = params->caps.explicit_erase;
#endif

if (DISK_ON_EXPLICIT_ERASE(ctx)) {
rc = flash_get_page_info_by_offs(ctx->info.dev, ctx->offset, &page);
if (rc < 0) {
LOG_ERR("Error %d while getting page info", rc);
return rc;
}

ctx->page_size = page.size;
} else {
ctx->page_size = DEFAULT_BLOCK_SIZE;
}

ctx->page_size = page.size;
LOG_INF("Initialize device %s", ctx->info.name);
LOG_INF("offset %lx, sector size %zu, page size %zu, volume size %zu",
(long)ctx->offset, ctx->sector_size, ctx->page_size, ctx->size);
Expand All @@ -71,7 +103,7 @@ static int flashdisk_init_runtime(struct flashdisk_data *ctx,
return 0;
}

if (IS_ENABLED(CONFIG_FLASHDISK_VERIFY_PAGE_LAYOUT)) {
if (DISK_ON_EXPLICIT_ERASE(ctx)) {
if (ctx->offset != page.start_offset) {
LOG_ERR("Disk %s does not start at page boundary",
ctx->info.name);
Expand Down Expand Up @@ -213,8 +245,10 @@ static int flashdisk_cache_commit(struct flashdisk_data *ctx)
return 0;
}

if (flash_erase(ctx->info.dev, ctx->cached_addr, ctx->page_size) < 0) {
return -EIO;
if (DISK_ON_EXPLICIT_ERASE(ctx)) {
if (flash_erase(ctx->info.dev, ctx->cached_addr, ctx->page_size) < 0) {
return -EIO;
}
}

/* write data to flash */
Expand Down
2 changes: 2 additions & 0 deletions drivers/flash/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_library_sources(flash_util.c)

zephyr_syscall_header_ifdef(
CONFIG_FLASH_SIMULATOR
${ZEPHYR_BASE}/include/zephyr/drivers/flash/flash_simulator.h
Expand Down
72 changes: 70 additions & 2 deletions drivers/flash/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,62 @@ config FLASH_HAS_EX_OP
This option is selected by drivers that support flash extended
operations.

config FLASH_HAS_EXPLICIT_ERASE
bool
help
Device has does not do erase-on-write (erase-on-program, auto-erase
on write) and requires explicit erase procedure to be programmed
with random value, in place where it has already been programmed with
some other value, as program can only change bits from erased-value
to the opposite.
All pure Flash devices are evolution of EEPROM where erase has
been separated from write, EEPROM has erase-on-write, giving
it advantage of higher write speeds at a cost of larger erase block.
Note that explicit-erase capability does not warrants that
write without erase is not allowed, taking the above restrictions,
it only states that write of a random information will require
erase.
Erase is usually performed in pages, as we have chosen to name
the unit in Zephyr, that may have different naming in device
specifications, like pages, sectors or blocks, and may vary
in size, depending how they are named by vendor.
This option should be selected by drivers that serve
devices with such characteristic and is used and may be
used by users to provide paths in code that only serve
such devices, and could be optimized-out by compiler in
case where there is no such device in a system.

config FLASH_HAS_NO_EXPLICIT_ERASE
bool
help
Device does not require explicit erase before programming
a new random value at any location that has been previously
programmed with some other value.
Note that the device may have erase-on-write (auto-erase),
as for example in EEPROM devices, but may also have no erase
at all.
A device driver may still provide erase callback,
especially if it is able to perform erase to accelerate
further writes or is able to fill the area requested for
erase, with single value, faster than consecutive writes
that would be used to emulate erase.
This option should be selected by drivers that serve
devices with such characteristic and is used and may be
used by users to provide paths in code that only serve
such devices, and could be optimized-out by compiler in
case where there is no such device in a system.
This option should be selected for any device that
can change storage bits, by write, from any value to opposite
value at any time.

if FLASH_HAS_EXPLICIT_ERASE

config FLASH_HAS_PAGE_LAYOUT
bool
help
This option is enabled when the SoC flash driver supports
retrieving the layout of flash memory pages.
endif

config FLASH_JESD216
bool
Expand Down Expand Up @@ -77,13 +128,30 @@ config FLASH_SHELL_BUFFER_SIZE

endif # FLASH_SHELL

config FLASH_FILL_BUFFER_SIZE
int "Buffer size of flash_fill funciton"
default 32
help
Size of a buffer used by flash_fill function to fill a device with
specific value; this buffer is allocated on stack.
The buffer is needed as most devices have write-block alignment
requirements that which imposes minimal size of data, which can
be written to a device, and alignment of write offset.
Even if device does not have such requirement, filling device by
single bytes is not efficient.
Value selected here should be multiply of the largest write-block-size
among all the memory devices used in system.

if FLASH_HAS_PAGE_LAYOUT

config FLASH_PAGE_LAYOUT
bool "API for retrieving the layout of pages"
depends on FLASH_HAS_PAGE_LAYOUT
default y
default FLASH_HAS_PAGE_LAYOUT
help
Enables API for retrieving the layout of flash memory pages.

endif

config FLASH_EX_OP_ENABLED
bool "API for extended flash operations"
depends on FLASH_HAS_EX_OP
Expand Down
2 changes: 1 addition & 1 deletion drivers/flash/Kconfig.ambiq
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ config FLASH_AMBIQ
default y
depends on DT_HAS_AMBIQ_FLASH_CONTROLLER_ENABLED
select AMBIQ_HAL
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_NO_EXPLICIT_ERASE
help
Enables Ambiq flash driver on MRAM.
1 change: 1 addition & 0 deletions drivers/flash/Kconfig.andes
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ menuconfig FLASH_ANDES_QSPI
select FLASH_HAS_PAGE_LAYOUT
select FLASH_JESD216
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_EXPLICIT_ERASE
depends on !SPI_NOR
help
Enable driver for Andes QSPI
Expand Down
1 change: 1 addition & 0 deletions drivers/flash/Kconfig.at45
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ menuconfig SPI_FLASH_AT45
depends on DT_HAS_ATMEL_AT45_ENABLED
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_EXPLICIT_ERASE
select SPI
help
This driver can handle several instances of AT45 family chips that
Expand Down
1 change: 1 addition & 0 deletions drivers/flash/Kconfig.b91
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ config SOC_FLASH_TELINK_B91
depends on DT_HAS_TELINK_B91_FLASH_CONTROLLER_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_EXPLICIT_ERASE
help
Enables Telink B91 flash driver.
1 change: 1 addition & 0 deletions drivers/flash/Kconfig.cadence_nand
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ config FLASH_CDNS_NAND
depends on DT_HAS_CDNS_NAND_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_EXPLICIT_ERASE
help
Enable Cadence NAND support.

Expand Down
1 change: 1 addition & 0 deletions drivers/flash/Kconfig.cadence_qspi_nor
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ config FLASH_CAD_QSPI_NOR
depends on DT_HAS_CDNS_QSPI_NOR_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_EXPLICIT_ERASE
help
Enable Cadence QSPI-NOR support.

Expand Down
1 change: 1 addition & 0 deletions drivers/flash/Kconfig.cc13xx_cc26xx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ config SOC_FLASH_CC13XX_CC26XX
depends on DT_HAS_TI_CC13XX_CC26XX_FLASH_CONTROLLER_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_EXPLICIT_ERASE
select MPU_ALLOW_FLASH_WRITE if ARM_MPU
help
Enables TI SimpleLink CC13xx/CC26xx flash controller driver.
1 change: 1 addition & 0 deletions drivers/flash/Kconfig.esp32
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ config SOC_FLASH_ESP32
depends on DT_HAS_ESPRESSIF_ESP32_FLASH_CONTROLLER_ENABLED
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_EXPLICIT_ERASE
help
Enable ESP32 internal flash driver.

Expand Down
1 change: 1 addition & 0 deletions drivers/flash/Kconfig.gd32
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ config SOC_FLASH_GD32
depends on (GD32_NV_FLASH_V1 || GD32_NV_FLASH_V2 || GD32_NV_FLASH_V3)
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_EXPLICIT_ERASE
select MPU_ALLOW_FLASH_WRITE if ARM_MPU
help
Enable the GigaDevice GD32 flash driver.
Expand Down
1 change: 1 addition & 0 deletions drivers/flash/Kconfig.gecko
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ config SOC_FLASH_GECKO
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select SOC_GECKO_MSC
select FLASH_HAS_EXPLICIT_ERASE
select MPU_ALLOW_FLASH_WRITE if ARM_MPU
help
Enable Silicon Labs Gecko series internal flash driver.
1 change: 1 addition & 0 deletions drivers/flash/Kconfig.ifx_cat1
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ config FLASH_INFINEON_CAT1
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
select USE_INFINEON_FLASH
select FLASH_HAS_EXPLICIT_ERASE
help
Enable the Flash driver for Infineon CAT1 family.

Expand Down
1 change: 1 addition & 0 deletions drivers/flash/Kconfig.it8xxx2
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ config SOC_FLASH_ITE_IT8XXX2
select SOC_IT8XXX2_USE_ILM
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_EXPLICIT_ERASE
select HAS_FLASH_LOAD_OFFSET
help
The flash driver includes support for read, write and
Expand Down
1 change: 1 addition & 0 deletions drivers/flash/Kconfig.lpc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ config SOC_FLASH_LPC
DT_HAS_NXP_IAP_FMC54_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_EXPLICIT_ERASE
help
Enables the LPC IAP flash shim driver.
WARNING: This driver will disable the system interrupts for
Expand Down
4 changes: 4 additions & 0 deletions drivers/flash/Kconfig.mcux
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ config SOC_FLASH_MCUX
DT_HAS_NXP_IAP_MSF1_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_EXPLICIT_ERASE
select MPU_ALLOW_FLASH_WRITE if ARM_MPU
help
Enables the MCUX flash shim driver.
Expand Down Expand Up @@ -41,6 +42,7 @@ config FLASH_MCUX_FLEXSPI_NOR
depends on DT_HAS_NXP_IMX_FLEXSPI_NOR_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_EXPLICIT_ERASE
select FLASH_JESD216
select MEMC
select MEMC_MCUX_FLEXSPI
Expand All @@ -51,6 +53,7 @@ config FLASH_MCUX_FLEXSPI_MX25UM51345G
depends on DT_HAS_NXP_IMX_FLEXSPI_MX25UM51345G_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_EXPLICIT_ERASE
select MEMC
select MEMC_MCUX_FLEXSPI

Expand All @@ -60,6 +63,7 @@ config FLASH_MCUX_FLEXSPI_HYPERFLASH
depends on DT_HAS_NXP_IMX_FLEXSPI_HYPERFLASH_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_EXPLICIT_ERASE
select MEMC
select MEMC_MCUX_FLEXSPI

Expand Down
1 change: 1 addition & 0 deletions drivers/flash/Kconfig.nios2_qspi
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ config SOC_FLASH_NIOS2_QSPI
depends on HAS_ALTERA_HAL
depends on DT_HAS_ALTR_NIOS2_QSPI_NOR_ENABLED
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_EXPLICIT_ERASE
help
Enables the Nios-II QSPI flash driver.
3 changes: 3 additions & 0 deletions drivers/flash/Kconfig.nor
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Copyright (c) 2018 Savoir-Faire Linux.
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: Apache-2.0

menuconfig SPI_NOR
bool "SPI NOR Flash"
default y
depends on DT_HAS_JEDEC_SPI_NOR_ENABLED
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_EXPLICIT_ERASE
select FLASH_HAS_PAGE_LAYOUT
select FLASH_JESD216
select FLASH_HAS_EX_OP
Expand Down
1 change: 1 addition & 0 deletions drivers/flash/Kconfig.nordic_qspi_nor
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ menuconfig NORDIC_QSPI_NOR
default y
depends on DT_HAS_NORDIC_QSPI_NOR_ENABLED
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_EXPLICIT_ERASE
select NRFX_QSPI
select FLASH_JESD216
select PINCTRL
Expand Down
1 change: 1 addition & 0 deletions drivers/flash/Kconfig.npcx_fiu
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ config FLASH_NPCX_FIU_NOR
depends on FLASH_NPCX_FIU_QSPI
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_EXPLICIT_ERASE
select FLASH_JESD216
select FLASH_HAS_EX_OP
help
Expand Down
1 change: 1 addition & 0 deletions drivers/flash/Kconfig.nrf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ menuconfig SOC_FLASH_NRF
depends on !FLASH_NRF_FORCE_ALT
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_EXPLICIT_ERASE
select NRFX_NVMC
select MPU_ALLOW_FLASH_WRITE if ARM_MPU
help
Expand Down
2 changes: 1 addition & 1 deletion drivers/flash/Kconfig.nrf_mram
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ config SOC_FLASH_NRF_MRAM
default y
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
Loading
Loading