mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-05-21 05:38:00 +00:00
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>
23 lines
755 B
Diff
23 lines
755 B
Diff
From caac69565748349a3e532130a891e18dd5c36c5e Mon Sep 17 00:00:00 2001
|
|
From: Daniel Golle <daniel@makrotopia.org>
|
|
Date: Thu, 20 Jul 2023 17:36:44 +0100
|
|
Subject: [PATCH 8/8] mmc: block: set GENHD_FL_NVMEM
|
|
|
|
Set flag to consider MMC block devices as NVMEM providers.
|
|
|
|
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
---
|
|
drivers/mmc/core/block.c | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
--- a/drivers/mmc/core/block.c
|
|
+++ b/drivers/mmc/core/block.c
|
|
@@ -2644,6 +2644,7 @@ static struct mmc_blk_data *mmc_blk_allo
|
|
md->disk->major = MMC_BLOCK_MAJOR;
|
|
md->disk->minors = perdev_minors;
|
|
md->disk->first_minor = devidx * perdev_minors;
|
|
+ md->disk->flags = GENHD_FL_NVMEM;
|
|
md->disk->fops = &mmc_bdops;
|
|
md->disk->private_data = md;
|
|
md->parent = parent;
|