Commit graph

22 commits

Author SHA1 Message Date
Dominik Ermel 25138ff99c storeage/stream_flash: Cache write_block_size to ctx on init
The commit caches write_block_size and erase_value to stream flash
context, at init, to avoid calling Flash API multiple times
to get these values at various stages of code exectuion,
at run-time.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-05-29 07:35:19 +02:00
Mateusz Michalek 5919163b48 include: storage: flash_map: _NODE macros
adds size, offset and divice access macros that are
operating with nodes as an argumet.

Signed-off-by: Mateusz Michalek <mateusz.michalek@nordicsemi.no>
2024-05-16 16:21:34 +02:00
Dominik Ermel 68be1711c8 storage/stream_flash: Document write flush as mandatory
There is no need to make this optional just inform user that
this has to be called to complete write of buffers.
The commit also adds info that there should be no more write
attempts done with use of "flushed", as it may return write
errors anyway.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-25 09:53:57 +00:00
Dominik Ermel d52a7ef31a tests: subsys: settings: Increase stack size
Fixes #62324

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-03-26 17:34:25 -04:00
Ederson de Souza 28d08ada28 include/zephyr: Add 'version' and 'since' tag to groups
Based on information from doc/develop/api/overview.rst, add current
version for some groups representing APIs, following the following
table:

  - Experimental:   0.1.0
  - Unstable:       0.8.0
  - Stable:         1.0.0

Also based on doc/develop/api/overview.rst, add 'since' tag to the
groups.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-03-19 13:13:45 +01:00
Dominik Ermel 4521c8ec2b storage/flash_map: Retire macros deprecated in release 3.2
The commit removes macros:
 - FLASH_AREA_LABEL_EXISTS()
 - FLASH_AREA_LABEL_STR()
 - FLASH_AREA_ID()
 - FLASH_AREA_OFFSET()
 - FLASH_AREA_SIZE()

That have been marked deprecated in release 3.2, by commit:
 54db76b4cd storage/flash_map: Deprecate FLASH_AREA_ macros

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-01-31 09:08:12 -06:00
Tomasz Bursztyka ba02d85c74 doc/nvme: NVMe mandates dword-aligned buffer addresses
In Zephyr, this is let to the disk access API user. There is nothing the
driver can do about it.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-09-22 09:23:18 +02:00
Gerard Marull-Paretas 721f829e01 doc: doxygen: add some OS services to os_services group
- Crypto
- Retention
- Settings
- Storage
- Memory management
- Heap management
- Flash access
- Coredump
- Timing
- Thread analyzer

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-06-05 20:21:09 -04:00
Riccardo Paolo Bestetti 5db08ca3d8 doc: flash: fix direction for flash_area_write src parameter
Change the `src` parameter direction from 'out' to 'in' for the
flash_area_write function, since the src data buffer is the data source
for the flash write and thus an input parameter

Fixes #57996

Signed-off-by: Riccardo Paolo Bestetti <pbl@bestov.io>
2023-05-17 19:54:51 +02:00
Maurits Fassaert 42507c69c2 storage: flash_map list partition labels
Add the labels from the device tree fixed flash partitions
as a column to the flash_map list shell command.

Signed-off-by: Maurits Fassaert <maurits.fassaert@sensorfy.ai>
2023-05-05 10:02:19 +02:00
Nicolas VINCENT ac254d1163 doc: flash: Fix typo
the off argument of flash_area_write is used to *write*

Signed-off-by: Nicolas VINCENT <nicolas.vincent@vossloh.com>
2023-04-24 13:35:07 +02:00
Dominik Ermel 68408bbcd0 storage/flash_area: Remove unused field fa_device_id
The field has never been populated and was used by shell
and MCUboot. MCUboot Zephyr code has been changed some
time ago and no longer uses the field, flash_map shell
also no longer uses it, so it can be removed now.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-12-27 13:24:55 +01:00
Dominik Ermel 54db76b4cd storage/flash_map: Deprecate FLASH_AREA_ macros
FLASH_AREA_ macros and usage of label property to identify
fixed-partitions, for purpose of usage with flash map API,
has been deprecated and now FIXED_PARTITION_ macros
should be used with DTS node labels.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-30 07:44:49 -05:00
Anas Nashif 163b99e755 doc: doxyegen: readd data structure api group
Re-add parent groups for data-structures.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-09-07 10:36:25 +02:00
Dominik Ermel 1b29f056b9 storage/flash_map: Macros for accessing fixed-partitions
The commit adds FIXED_PARTITION_* macros that take DTS node,
in contrary to FLASH_AREA_* macros that take label property,
to access properties of fixed-partition compatible DTS partition
definitions.
There is FIXED_PARTITION_NODE macro provided for translating
DTS labels to nodes.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-09-06 09:56:37 +02:00
Kumar Gala de894f8aab dts: Replace DT_LABEL(node) with DT_PROP(node, label)
Toward deprecated DT_LABEL() macro, replace the handful of cases
that use DT_LABEL(node) with DT_PROP(node, label).

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-19 06:49:50 -05:00
Kumar Gala b4aea5a91d storage: flash_map: use DT_LABEL macro
Change code to use DT_LABEL macro so its more obvious what is going on.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-17 16:43:31 -05:00
Jordan Yates 4543f82c12 storage: flash_map: remove device_get_binding
Remove all usage of `device_get_binding` in the subsys by directly
storing the `const struct device*` in the `struct flash_area`.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-07-02 16:04:16 +02:00
Dominik Ermel 194340b1a2 storage/flash_map: Fix typos in flash_area_open documentation
Fixed typos.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-06-13 11:28:18 -05:00
Dominik Ermel aa5d20aaef storage/flash_map: Return -ENODEV from flash_area_open
The commit adds check, to flash_area_open, whether there is any
device driver attached and returns -ENODEV if there isn't any.
This works around a problem where flash_area_open succeeds but
consecutive read/write causes crash.
It is enough to check the condition, and return error, here as
the flash_area_open has to precede, and be checked for success,
any read/write operations.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-06-05 14:28:58 +02:00
Gerard Marull-Paretas fb9b3bcd93 include: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all includes within
include directory to the new prefix <zephyr/...>. Note that the
conversion has been scripted, refer to zephyrproject-rtos#45388 for more
details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 20:03:00 +02:00
Yuval Peress 53ef68d459 include: Prefix includes to use a scope
Move include paths and add new target_include_directories to support
backwards compatibility:
* /include -> /include/zephyr
  example: <irq.h> -> <zephyr/irq.h>

Issue #41543

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-08 19:03:32 +02:00