0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2025-05-22 14:17:55 +00:00
Files
openwrt/target/linux/generic/pending-6.12/451-block-partitions-of-assign-Device-Tree-node-to-parti.patch
Daniel Golle fa0f130764 generic: 6.12: update block NVMEM driver
Update block NVMEM driver based on backported OF partition support.

Note the different MMC card DT binding compared to the previous
downstream solution: Instead of having a 'partitions' subnode inside
a 'block' node, the 'partitions' node now resides directly under the
node representing the card.

In order to make references to the 'boot0' or 'boot1' hw partitions
you will have to define 'partitions-boot0' or 'partitions-boot1', and
move the NVMEM layout into a partition (you may, of course, use
'fixed-partitions' for that, and cover the whole device, if needed).

See also https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/mmc/mmc-card.yaml?h=v6.13

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-05-07 04:44:46 +01:00

26 lines
909 B
Diff

From 5d265996597a6b0d654bbeda1bc3bae197061de7 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Mon, 7 Oct 2024 23:43:32 +0100
Subject: [PATCH 2/8] block: partitions: of: assign Device Tree node to
partition
Assign partition of_node so other drivers are able to identify a
partition by its Device Tree node.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
block/partitions/of.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/block/partitions/of.c
+++ b/block/partitions/of.c
@@ -48,7 +48,7 @@ static void add_of_partition(struct pars
u64 offset = of_read_number(reg, a_cells) / SECTOR_SIZE;
u64 size = of_read_number(reg + a_cells, s_cells) / SECTOR_SIZE;
- put_partition(state, slot, offset, size);
+ of_put_partition(state, slot, offset, size, np);
if (of_property_read_bool(np, "read-only"))
state->parts[slot].flags |= ADDPART_FLAG_READONLY;