[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f3f08b1037c9e0e06598e093bb53d5e743aabfb5.1711048433.git.daniel@makrotopia.org>
Date: Thu, 21 Mar 2024 19:35:43 +0000
From: Daniel Golle <daniel@...rotopia.org>
To: Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Ulf Hansson <ulf.hansson@...aro.org>, Jens Axboe <axboe@...nel.dk>,
Daniel Golle <daniel@...rotopia.org>,
Dave Chinner <dchinner@...hat.com>, Jan Kara <jack@...e.cz>,
Thomas Weißschuh <linux@...ssschuh.net>,
Damien Le Moal <dlemoal@...nel.org>,
Li Lingfeng <lilingfeng3@...wei.com>,
Christian Brauner <brauner@...nel.org>,
Christian Heusel <christian@...sel.eu>,
Min Li <min15.li@...sung.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Avri Altman <avri.altman@....com>, Hannes Reinecke <hare@...e.de>,
Christian Loehle <CLoehle@...erstone.com>,
Bean Huo <beanhuo@...ron.com>, Yeqi Fu <asuk4.q@...il.com>,
Victor Shih <victor.shih@...esyslogic.com.tw>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Dominique Martinet <dominique.martinet@...ark-techno.com>,
"Ricardo B. Marliere" <ricardo@...liere.net>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mmc@...r.kernel.org, linux-block@...r.kernel.org
Subject: [PATCH 7/8] mmc: block: set fwnode of disk devices
Set fwnode of disk devices to 'block', 'boot0' and 'boot1' subnodes of
the mmc-card. This is done in preparation for having the eMMC act as
NVMEM provider.
Signed-off-by: Daniel Golle <daniel@...rotopia.org>
---
drivers/mmc/core/block.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index 64a3492e8002f..5b7dfd4a21fa5 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -2463,6 +2463,7 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,
int area_type,
unsigned int part_type)
{
+ struct fwnode_handle *fwnode;
struct mmc_blk_data *md;
int devidx, ret;
char cap_str[10];
@@ -2559,6 +2560,12 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,
blk_queue_write_cache(md->queue.queue, cache_enabled, fua_enabled);
+ fwnode = device_get_named_child_node(subname ? md->parent->parent :
+ md->parent,
+ subname ? subname : "block");
+ if (fwnode)
+ device_set_node(disk_to_dev(md->disk), fwnode);
+
string_get_size((u64)size, 512, STRING_UNITS_2,
cap_str, sizeof(cap_str));
pr_info("%s: %s %s %s%s\n",
--
2.44.0
Powered by blists - more mailing lists