dt-bindings: mtd: partitions: Export special values
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 5 repliesIn review
- v11 patch 3 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | dt-bindings: mtd: partitions: Export special valuesMAINTAINERS include/ | +17 | 0 replies | |
| 2/2 | dt-bindings: mtd: partitions: Document special valuesDocumentation/ | +30 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/2] dt-bindings: mtd: partitions: Export special values
There are special "offset" and "size" values defined and documented in linux/mtd/partitions.h:
/* consume as much as possible, leaving size after the end of partition. */
#define MTDPART_OFS_RETAIN (uint64_t)(-3)
/* the partition will start at the next erase block. */
#define MTDPART_OFS_NXTBLK (uint64_t)(-2)
/* the partition will start where the previous one ended. */
#define MTDPART_OFS_APPEND (uint64_t)(-1)
(Though not explicitly, they are compared against variables in uint64_t in drivers/mtd/mtdpart.c, so they had better be considered as such.)
/* the partition will extend to the end of the master MTD device. */
#define MTDPART_SIZ_FULL (0)
These special values could be used to define partitions automatically fitting to the size of the master MTD device at runtime.
However, these values used not to be exported to dt-bindings, thus seldom used before, since they might have been only used in numeric form, such as "(-1) (-3)" for MTDPART_OFS_RETAIN.
Now, they are exported in dt-bindings/mtd/partitions.h as 32-bit cell values, so 2-cell addressed should be defined to use special offset values, such as "MTDPART_OFS_SPECIAL MTDPART_OFS_RETAIN" for MTDPART_OFS_RETAIN in linux/mtd/partitions.h. An example is added to fixed-partitions.yaml.
Edward Chow (2):
dt-bindings: mtd: partitions: Export special values
dt-bindings: mtd: partitions: Document special values
.../mtd/partitions/fixed-partitions.yaml | 30 +++++++++++++++++++ MAINTAINERS | 2 ++ include/dt-bindings/mtd/partitions.h | 15 ++++++++++ 3 files changed, 47 insertions(+) create mode 100644 include/dt-bindings/mtd/partitions.h
--
2.42.0