240 lines
7.0 KiB
Plaintext
240 lines
7.0 KiB
Plaintext
# Flash driver configuration options
|
|
|
|
# Copyright (c) 2016 Intel Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
#
|
|
# Flash driver
|
|
#
|
|
config FLASH_HAS_DRIVER_ENABLED
|
|
bool
|
|
help
|
|
This option is enabled when any flash driver is enabled.
|
|
|
|
config FLASH_HAS_EX_OP
|
|
bool
|
|
help
|
|
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.
|
|
When your driver sets this option you also need to set
|
|
no_explicit_erase capability in your drivers flash_parameters.
|
|
|
|
config FLASH_HAS_PAGE_LAYOUT
|
|
bool
|
|
help
|
|
This option is enabled when the SoC flash driver supports
|
|
retrieving the layout of flash memory pages.
|
|
|
|
config FLASH_JESD216
|
|
bool
|
|
help
|
|
Selected by drivers that support JESD216-compatible flash
|
|
devices to enable building a common support module.
|
|
|
|
menuconfig FLASH
|
|
bool "Flash drivers"
|
|
help
|
|
Enable support for the flash hardware.
|
|
|
|
if FLASH
|
|
|
|
module = FLASH
|
|
module-str = flash
|
|
source "subsys/logging/Kconfig.template.log_config"
|
|
|
|
config FLASH_JESD216_API
|
|
bool "Provide API to read JESD216 flash parameters"
|
|
depends on FLASH_JESD216
|
|
help
|
|
This option extends the Zephyr flash API with the ability
|
|
to access the Serial Flash Discoverable Parameter section
|
|
allowing runtime determination of serial flash parameters
|
|
for flash drivers that expose this capability.
|
|
|
|
config FLASH_SHELL
|
|
bool "Flash shell"
|
|
depends on SHELL && FLASH_PAGE_LAYOUT
|
|
select MPU_ALLOW_FLASH_WRITE if ARM_MPU
|
|
help
|
|
Enable the flash shell with flash related commands such as test,
|
|
write, read and erase.
|
|
|
|
if FLASH_SHELL
|
|
|
|
config FLASH_SHELL_TEST_COMMANDS
|
|
bool "Flash read/write/erase test commands"
|
|
select CBPRINTF_FP_SUPPORT
|
|
help
|
|
Enable additional flash shell commands for performing
|
|
read/write/erase tests with speed output.
|
|
|
|
config FLASH_SHELL_BUFFER_SIZE
|
|
hex "Flash shell buffer size"
|
|
default 0x4000 if FLASH_SHELL_TEST_COMMANDS
|
|
default 0x1000
|
|
range 0x400 0x1000000
|
|
help
|
|
Size of the buffer used for flash commands, will determine the
|
|
maximum size that can be used with a read/write test.
|
|
|
|
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"
|
|
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
|
|
default n
|
|
help
|
|
Enables flash extended operations API. It can be used to perform
|
|
non-standard operations e.g. manipulating flash protection.
|
|
|
|
config FLASH_INIT_PRIORITY
|
|
int "Flash init priority"
|
|
default KERNEL_INIT_PRIORITY_DEVICE
|
|
help
|
|
Flash driver device initialization priority. This initialization
|
|
priority is used unless the driver implementation has its own
|
|
initialization priority
|
|
|
|
source "drivers/flash/Kconfig.b91"
|
|
|
|
source "drivers/flash/Kconfig.cc13xx_cc26xx"
|
|
|
|
source "drivers/flash/Kconfig.at45"
|
|
|
|
source "drivers/flash/Kconfig.esp32"
|
|
|
|
source "drivers/flash/Kconfig.it8xxx2"
|
|
|
|
source "drivers/flash/Kconfig.nrf"
|
|
|
|
source "drivers/flash/Kconfig.lpc"
|
|
|
|
source "drivers/flash/Kconfig.mcux"
|
|
|
|
source "drivers/flash/Kconfig.nios2_qspi"
|
|
|
|
source "drivers/flash/Kconfig.npcx_fiu"
|
|
|
|
source "drivers/flash/Kconfig.gecko"
|
|
|
|
source "drivers/flash/Kconfig.nor"
|
|
|
|
source "drivers/flash/Kconfig.rpi_pico"
|
|
|
|
source "drivers/flash/Kconfig.stm32"
|
|
|
|
source "drivers/flash/Kconfig.stm32_qspi"
|
|
|
|
source "drivers/flash/Kconfig.stm32_ospi"
|
|
|
|
source "drivers/flash/Kconfig.stm32_xspi"
|
|
|
|
source "drivers/flash/Kconfig.sam0"
|
|
|
|
source "drivers/flash/Kconfig.sam"
|
|
|
|
source "drivers/flash/Kconfig.simulator"
|
|
|
|
source "drivers/flash/Kconfig.rv32m1"
|
|
|
|
source "drivers/flash/Kconfig.nordic_qspi_nor"
|
|
|
|
source "drivers/flash/Kconfig.smartbond"
|
|
|
|
source "drivers/flash/Kconfig.cadence_qspi_nor"
|
|
|
|
source "drivers/flash/Kconfig.gd32"
|
|
|
|
source "drivers/flash/Kconfig.xmc4xxx"
|
|
|
|
source "drivers/flash/Kconfig.ifx_cat1"
|
|
source "drivers/flash/Kconfig.cadence_nand"
|
|
|
|
source "drivers/flash/Kconfig.numaker"
|
|
|
|
source "drivers/flash/Kconfig.nxp_s32"
|
|
|
|
source "drivers/flash/Kconfig.andes"
|
|
|
|
source "drivers/flash/Kconfig.ambiq"
|
|
|
|
source "drivers/flash/Kconfig.nrf_rram"
|
|
|
|
source "drivers/flash/Kconfig.nrf_mram"
|
|
|
|
source "drivers/flash/Kconfig.numaker_rmc"
|
|
|
|
endif # FLASH
|