-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
de-nordic
wants to merge
34
commits into
zephyrproject-rtos:main
from
de-nordic:no-erase-spi-nor-flash
Closed
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 f5ce9a9
tests/drivers/flash: Make code dependent on explicit_erase
de-nordic 323ce2f
drivers/flash: Add flash_fill() and flash_flatten()
de-nordic ec05357
drivers/flash_simulator: Add support for RAM type write
de-nordic c824b31
tests/flash_simulator: Test scenario for flash_flatten()
de-nordic 72cefb3
storage/flash_map: Add flash_area_flatten
de-nordic 27d7406
drivers/flash/nrf: Add explicit_erase capability
de-nordic 9ff176d
drivers/flash/nrf_rram: Set explicit erase capability to false
de-nordic 7addd22
drivers/flash/nrf_mram: Set explicit earse capability to false
de-nordic 14e4b31
drivers/flash: Add explict erase capability with proper values
de-nordic bd1852c
drivers/flash/Ambiq: Set false to explict_erase capability
de-nordic be450ed
samples/soc_flash_nrf: Adjust for non-Flash SoC devices
de-nordic c6b1408
flash/spi_nor: Add explicit_erase capability
de-nordic 3e0ea42
drivers: flashdisk: Remove erase for devices that do not require it
de-nordic af6bd25
drivers: nrf_qspi_nor: Set explicit erase capability
de-nordic 5a30b21
fs/nvs: Switch to use flash_flatten instead of flash_erase
de-nordic cba681a
fs: fcb: Replace flash_area_erase with flash_area_flatten
de-nordic d47a707
storage/stream_flash: Support for no explicit_erase devices
de-nordic 55f7233
tests/storage/stream_flash: Support for no explicit_erase devices
de-nordic 152dec8
tests/settings: Move from flash_area_erase to flash_area_flatten
de-nordic 33197f1
tests/fs: Replace flash_area_erase with flash_area_flatten
de-nordic 887e350
mgmt/mcumgr: Replace use of flash_area_erase with flash_area_flatten
de-nordic 881f581
tests: Bluetooth: Mesh: Use flash_area_flatten for erase
de-nordic 79457af
tests/dfu: Replace flash_area_erase with flash_area_flatten
de-nordic a9d7484
dfu/mcuboot: Use flash_area_flatten instead of flash_area_erase
de-nordic 8289538
samples/fs/littlefs: Use flash_area_flatten to wipe storage
de-nordic 41e668b
samples/usb/imass: Use flash_area_flatten to wipe storage
de-nordic a114f1f
Bluetooth: Mesh: Switch erase to flash_area_flatten
de-nordic 2fea3a4
fs/littlefs: Use flash_area_flatten in lfs_api_erase
de-nordic 10059ca
storage/settings: Replace flash_area_erase with flash_area_flatten
de-nordic 4d80fc6
debug/coredump/flash_backend: Switch to flash_area_flatten
de-nordic bc90ae0
testsuite: qemu: Incorrect selection of FLASH_HAS_PAGE_LAYOUT
de-nordic 5abe280
drivers: flash: Remove erase from Nuvoton numaker series RMC
de-nordic 5aa6009
drivers: flash: shell: Add support for devices without erase
de-nordic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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:
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.