0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2025-05-21 05:38:00 +00:00
Files
openwrt/target/linux/generic/pending-6.12/455-block-add-new-genhd-flag-GENHD_FL_NVMEM.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

30 lines
917 B
Diff

From 2b28bf485b283991eea9f00c5831c1c39c73991f Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Thu, 21 Mar 2024 19:33:49 +0000
Subject: [PATCH 6/8] block: add new genhd flag GENHD_FL_NVMEM
Add new flag to destinguish block devices which may act as an NVMEM
provider.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
include/linux/blkdev.h | 2 ++
1 file changed, 2 insertions(+)
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -82,11 +82,13 @@ struct partition_meta_info {
* ``GENHD_FL_NO_PART``: partition support is disabled. The kernel will not
* scan for partitions from add_disk, and users can't add partitions manually.
*
+ * ``GENHD_FL_NVMEM``: the block device should be considered as NVMEM provider.
*/
enum {
GENHD_FL_REMOVABLE = 1 << 0,
GENHD_FL_HIDDEN = 1 << 1,
GENHD_FL_NO_PART = 1 << 2,
+ GENHD_FL_NVMEM = 1 << 3,
};
enum {