2019-04-06 21:08:09 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2019-02-21 23:02:16 +08:00
|
|
|
config FLASH_NRF_FORCE_ALT
|
|
|
|
bool
|
|
|
|
depends on SOC_COMPATIBLE_NRF
|
|
|
|
help
|
|
|
|
This option can be enabled to force an alternative implementation
|
|
|
|
of the flash driver.
|
|
|
|
|
2020-01-20 23:54:34 +08:00
|
|
|
menuconfig SOC_FLASH_NRF
|
2019-02-15 21:45:52 +08:00
|
|
|
bool "Nordic Semiconductor nRF flash driver"
|
|
|
|
depends on SOC_FAMILY_NRF
|
kconfig: Replace some single-symbol 'if's with 'depends on'
I think people might be reading differences into 'if' and 'depends on'
that aren't there, like maybe 'if' being needed to "hide" a symbol,
while 'depends on' just adds a dependency.
There are no differences between 'if' and 'depends on'. 'if' is just a
shorthand for 'depends on'. They work the same when it comes to creating
implicit menus too.
The way symbols get "hidden" is through their dependencies not being
satisfied ('if'/'depends on' get copied up as a dependency on the
prompt).
Since 'if' and 'depends on' are the same, an 'if' with just a single
symbol in it can be replaced with a 'depends on'. IMO, it's best to
avoid 'if' there as a style choice too, because it confuses people into
thinking there's deep Kconfig magic going on that requires 'if'.
Going for 'depends on' can also remove some nested 'if's, which
generates nicer symbol information and docs, because nested 'if's really
are so simple/dumb that they just add the dependencies from both 'if's
to all symbols within.
Replace a bunch of single-symbol 'if's with 'depends on' to despam the
Kconfig files a bit and make it clearer how things work. Also do some
other minor related dependency refactoring.
The replacement isn't complete. Will fix up the rest later. Splitting it
a bit to make it more manageable.
(Everything above is true for choices, menus, and comments as well.)
Detected by tweaking the Kconfiglib parsing code. It's impossible to
detect after parsing, because 'if' turns into 'depends on'.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-08 10:45:50 +08:00
|
|
|
depends on !FLASH_NRF_FORCE_ALT
|
2019-02-15 21:45:52 +08:00
|
|
|
select FLASH_HAS_PAGE_LAYOUT
|
|
|
|
select FLASH_HAS_DRIVER_ENABLED
|
2019-04-01 23:26:05 +08:00
|
|
|
select NRFX_NVMC
|
2019-11-04 22:49:21 +08:00
|
|
|
select MPU_ALLOW_FLASH_WRITE if ARM_MPU
|
2019-02-21 22:53:29 +08:00
|
|
|
default y
|
2019-02-15 21:45:52 +08:00
|
|
|
help
|
|
|
|
Enables Nordic Semiconductor nRF flash driver.
|
|
|
|
|
kconfig: Replace some single-symbol 'if's with 'depends on'
I think people might be reading differences into 'if' and 'depends on'
that aren't there, like maybe 'if' being needed to "hide" a symbol,
while 'depends on' just adds a dependency.
There are no differences between 'if' and 'depends on'. 'if' is just a
shorthand for 'depends on'. They work the same when it comes to creating
implicit menus too.
The way symbols get "hidden" is through their dependencies not being
satisfied ('if'/'depends on' get copied up as a dependency on the
prompt).
Since 'if' and 'depends on' are the same, an 'if' with just a single
symbol in it can be replaced with a 'depends on'. IMO, it's best to
avoid 'if' there as a style choice too, because it confuses people into
thinking there's deep Kconfig magic going on that requires 'if'.
Going for 'depends on' can also remove some nested 'if's, which
generates nicer symbol information and docs, because nested 'if's really
are so simple/dumb that they just add the dependencies from both 'if's
to all symbols within.
Replace a bunch of single-symbol 'if's with 'depends on' to despam the
Kconfig files a bit and make it clearer how things work. Also do some
other minor related dependency refactoring.
The replacement isn't complete. Will fix up the rest later. Splitting it
a bit to make it more manageable.
(Everything above is true for choices, menus, and comments as well.)
Detected by tweaking the Kconfiglib parsing code. It's impossible to
detect after parsing, because 'if' turns into 'depends on'.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-08 10:45:50 +08:00
|
|
|
if SOC_FLASH_NRF
|
|
|
|
|
2020-09-17 21:06:57 +08:00
|
|
|
choice SOC_FLASH_NRF_RADIO_SYNC_CHOICE
|
2020-07-19 00:08:33 +08:00
|
|
|
prompt "Nordic nRFx flash driver synchronization"
|
2020-09-17 22:06:26 +08:00
|
|
|
default SOC_FLASH_NRF_RADIO_SYNC_TICKER if BT_LL_SW_SPLIT
|
2020-07-19 00:08:33 +08:00
|
|
|
default SOC_FLASH_NRF_RADIO_SYNC_NONE
|
|
|
|
help
|
|
|
|
synchronization between flash memory driver and radio.
|
|
|
|
|
2020-09-17 21:44:37 +08:00
|
|
|
config SOC_FLASH_NRF_RADIO_SYNC_TICKER
|
2019-02-15 21:45:52 +08:00
|
|
|
bool "Nordic nRFx flash driver synchronized with radio"
|
2020-09-17 22:06:26 +08:00
|
|
|
depends on BT_LL_SW_SPLIT
|
2019-02-15 21:45:52 +08:00
|
|
|
help
|
2020-07-19 00:08:33 +08:00
|
|
|
Enable synchronization between flash memory driver and radio using
|
|
|
|
BLE LL controller ticker API.
|
|
|
|
|
|
|
|
config SOC_FLASH_NRF_RADIO_SYNC_NONE
|
|
|
|
bool "none"
|
|
|
|
help
|
|
|
|
disable synchronization between flash memory driver and radio.
|
|
|
|
endchoice
|
2019-02-15 21:45:52 +08:00
|
|
|
|
2020-03-11 18:46:48 +08:00
|
|
|
config SOC_FLASH_NRF_PARTIAL_ERASE
|
|
|
|
bool "Nordic nRFx flash driver partial erase"
|
|
|
|
depends on HAS_HW_NRF_NVMC_PE
|
|
|
|
help
|
|
|
|
Enable partial erase feature. Partial erase is performed in time
|
|
|
|
slices instead of blocking MCU, for the time it is needed to
|
|
|
|
complete operation over given area.
|
|
|
|
This allows interrupting flash erase between operations
|
|
|
|
to perform other task by MCU.
|
|
|
|
This feature may also be used for better syncing flash erase
|
2020-09-17 21:44:37 +08:00
|
|
|
operations, when compiled with SOC_FLASH_NRF_RADIO_SYNC_TICKER,
|
2020-03-11 18:46:48 +08:00
|
|
|
with Bluetooth.
|
|
|
|
|
|
|
|
config SOC_FLASH_NRF_PARTIAL_ERASE_MS
|
|
|
|
int "Partial erase timeout in MS"
|
|
|
|
depends on SOC_FLASH_NRF_PARTIAL_ERASE
|
|
|
|
default 3
|
|
|
|
help
|
|
|
|
This is maximum time, in ms, that NVMC will use to erase part
|
|
|
|
of Flash, before stopping to let CPU resume operation.
|
|
|
|
Minimal timeout is 2ms maximum should not exceed half of
|
|
|
|
FLASH_PAGE_ERASE_MAX_TIME_US im ms.
|
|
|
|
|
2019-02-15 21:45:52 +08:00
|
|
|
config SOC_FLASH_NRF_UICR
|
|
|
|
bool "Access to UICR"
|
kconfig: Replace some single-symbol 'if's with 'depends on'
I think people might be reading differences into 'if' and 'depends on'
that aren't there, like maybe 'if' being needed to "hide" a symbol,
while 'depends on' just adds a dependency.
There are no differences between 'if' and 'depends on'. 'if' is just a
shorthand for 'depends on'. They work the same when it comes to creating
implicit menus too.
The way symbols get "hidden" is through their dependencies not being
satisfied ('if'/'depends on' get copied up as a dependency on the
prompt).
Since 'if' and 'depends on' are the same, an 'if' with just a single
symbol in it can be replaced with a 'depends on'. IMO, it's best to
avoid 'if' there as a style choice too, because it confuses people into
thinking there's deep Kconfig magic going on that requires 'if'.
Going for 'depends on' can also remove some nested 'if's, which
generates nicer symbol information and docs, because nested 'if's really
are so simple/dumb that they just add the dependencies from both 'if's
to all symbols within.
Replace a bunch of single-symbol 'if's with 'depends on' to despam the
Kconfig files a bit and make it clearer how things work. Also do some
other minor related dependency refactoring.
The replacement isn't complete. Will fix up the rest later. Splitting it
a bit to make it more manageable.
(Everything above is true for choices, menus, and comments as well.)
Detected by tweaking the Kconfiglib parsing code. It's impossible to
detect after parsing, because 'if' turns into 'depends on'.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-08 10:45:50 +08:00
|
|
|
depends on !TRUSTED_EXECUTION_NONSECURE
|
2019-02-15 21:45:52 +08:00
|
|
|
help
|
|
|
|
Enable operations on UICR. Once enabled UICR are written or read as
|
|
|
|
ordinary flash memory. Erase is possible for whole UICR at once.
|
2019-02-21 23:02:16 +08:00
|
|
|
|
2019-10-24 20:12:52 +08:00
|
|
|
config SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS
|
|
|
|
bool "8-bit write block size emulation"
|
|
|
|
help
|
|
|
|
When this option is enabled writing chunks less than minimal write
|
|
|
|
block size parameter (imposed by manufacturer) is possible but operation
|
|
|
|
is more complex and requires basic user knowledge about NVMC controller.
|
|
|
|
|
kconfig: Replace some single-symbol 'if's with 'depends on'
I think people might be reading differences into 'if' and 'depends on'
that aren't there, like maybe 'if' being needed to "hide" a symbol,
while 'depends on' just adds a dependency.
There are no differences between 'if' and 'depends on'. 'if' is just a
shorthand for 'depends on'. They work the same when it comes to creating
implicit menus too.
The way symbols get "hidden" is through their dependencies not being
satisfied ('if'/'depends on' get copied up as a dependency on the
prompt).
Since 'if' and 'depends on' are the same, an 'if' with just a single
symbol in it can be replaced with a 'depends on'. IMO, it's best to
avoid 'if' there as a style choice too, because it confuses people into
thinking there's deep Kconfig magic going on that requires 'if'.
Going for 'depends on' can also remove some nested 'if's, which
generates nicer symbol information and docs, because nested 'if's really
are so simple/dumb that they just add the dependencies from both 'if's
to all symbols within.
Replace a bunch of single-symbol 'if's with 'depends on' to despam the
Kconfig files a bit and make it clearer how things work. Also do some
other minor related dependency refactoring.
The replacement isn't complete. Will fix up the rest later. Splitting it
a bit to make it more manageable.
(Everything above is true for choices, menus, and comments as well.)
Detected by tweaking the Kconfiglib parsing code. It's impossible to
detect after parsing, because 'if' turns into 'depends on'.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-08 10:45:50 +08:00
|
|
|
endif # SOC_FLASH_NRF
|