[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240804114108.1893-1-ansuelsmth@gmail.com>
Date: Sun, 4 Aug 2024 13:41:00 +0200
From: Christian Marangi <ansuelsmth@...il.com>
To: Ulf Hansson <ulf.hansson@...aro.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Joern Engel <joern@...ybastard.org>,
Keith Busch <kbusch@...nel.org>,
Jens Axboe <axboe@...nel.dk>,
Christoph Hellwig <hch@....de>,
Sagi Grimberg <sagi@...mberg.me>,
Christian Marangi <ansuelsmth@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
linux-mmc@...r.kernel.org,
devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-mtd@...ts.infradead.org,
linux-nvme@...ts.infradead.org
Subject: [PATCH 0/6] 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.
Christian Marangi (6):
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
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 +++++++++++++++++++
.../devicetree/bindings/nvme/nvme-card.yaml | 78 ++++++++++++++++++
drivers/mtd/devices/block2mtd.c | 11 +++
drivers/mtd/parsers/Kconfig | 10 +++
drivers/mtd/parsers/Makefile | 1 +
drivers/mtd/parsers/ofpart_airoha.c | 56 +++++++++++++
drivers/mtd/parsers/ofpart_airoha.h | 18 +++++
drivers/mtd/parsers/ofpart_core.c | 6 ++
drivers/nvme/host/core.c | 3 +
10 files changed, 303 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
--
2.45.2
Powered by blists - more mailing lists