Skip to content

mtd: improve block2mtd + airoha parser

Christian Marangi linux-devicetree linux-mmc linux-mtd linux-nvme lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest7 patches 16 repliesIn review
  2. v36 patches 9 repliesSuperseded
  3. v26 patches 3 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v16 patches1 replySuperseded

Changes in v4 from the cover letter

- Add additional patch for ofpart kmod with of_update_property not exported

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7dt-bindings: nvme: Document nvme-card compatibleDocumentation/devicetree/bindings/nvme/nvme-card.yaml+78 -00 replies
2/7nvme: assign of_node to nvme devicedrivers/nvme/host/core.c+4 -05 replies
3/7dt-bindings: mmc: add property for partitions node in mmc-card nodeDocumentation/devicetree/bindings/mmc/mmc-card.yaml+40 -07 replies
4/7block2mtd: attach device OF node to MTD devicedrivers/mtd/devices/block2mtd.c+12 -00 replies
5/7of: also export of_update_propertydrivers/of/base.c+1 -00 replies
6/7dt-bindings: mtd: Add Documentation for Airoha fixed-partitionsDocumentation/devicetree/bindings/mtd/partitions/airoha,fixed-partitions.yaml Documentation/devicetree/bindings/mtd/partitions/partitions.yaml+81 -00 replies
7/7mtd: parser: add support for Airoha parserdrivers/mtd/parsers/Kconfig drivers/mtd/parsers/Makefile drivers/mtd/parsers/ofpart_airoha.c +2 more+92 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/7] mtd: improve block2mtd + airoha parser

This small series handle 2 problems.

It does try to ""standardize"" the usage of block2mtd module with MTD OF nodes.

It is very easy to add support for MTD parser by just adding an OF node to the mtd created for block2mtd.

This apply only if the root block is used for block2mtd to allow scenario where the full eMMC or an NVME is used for MTD and it doesn't have any partition table.

To also support NVME, similar to how it's done with eMMC, we introduce a subnode to the NVME controller that needs to have the "nvme-card" compatible where a dev can define fixed-paritions for MTD parser usage.

This series also add support for the Airoha partition table where the last partition is always ART and is placed at the end of the flash.

This require dynamic calculation of the offset as some dedicated driver for bad block management might be used that reserve some space at the end of the flash for block accounting.

New aarch64 Airoha SoC make use of this partition table and use block2mtd for eMMC to treat them as MTD with custom bad block management and block tracking.

Changes v4:
- Add additional patch for ofpart kmod with of_update_property not exported
Changes v3:
- Fix compilation error for missing slab.h header
- Add compatible to partitions.yaml
Changes v2:
- Fix typo in DT patch
- Fix compilation error for non-OF platform
- Fix compilation error due to recent changes in block2mtd module

Christian Marangi (7):
dt-bindings: nvme: Document nvme-card compatible
nvme: assign of_node to nvme device
dt-bindings: mmc: add property for partitions node in mmc-card node
block2mtd: attach device OF node to MTD device
of: also export of_update_property
dt-bindings: mtd: Add Documentation for Airoha fixed-partitions
mtd: parser: add support for Airoha parser

 .../devicetree/bindings/mmc/mmc-card.yaml     | 40 ++++++++++
 .../partitions/airoha,fixed-partitions.yaml   | 80 +++++++++++++++++++
 .../bindings/mtd/partitions/partitions.yaml   |  1 +
 .../devicetree/bindings/nvme/nvme-card.yaml   | 78 ++++++++++++++++++
 drivers/mtd/devices/block2mtd.c               | 12 +++
 drivers/mtd/parsers/Kconfig                   | 10 +++
 drivers/mtd/parsers/Makefile                  |  1 +
 drivers/mtd/parsers/ofpart_airoha.c           | 57 +++++++++++++
 drivers/mtd/parsers/ofpart_airoha.h           | 18 +++++
 drivers/mtd/parsers/ofpart_core.c             |  6 ++
 drivers/nvme/host/core.c                      |  4 +
 drivers/of/base.c                             |  1 +
 12 files changed, 308 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/partitions/airoha,fixed-partitions.yaml
 create mode 100644 Documentation/devicetree/bindings/nvme/nvme-card.yaml
 create mode 100644 drivers/mtd/parsers/ofpart_airoha.c
 create mode 100644 drivers/mtd/parsers/ofpart_airoha.h
Signature · 1 line
2.45.2