2024-06-14 16:35:10 +00:00
|
|
|
From ef3e38fec26901b71975d7e810a2df6b8bd54a8e Mon Sep 17 00:00:00 2001
|
2024-01-03 11:57:28 +00:00
|
|
|
From: Daniel Golle <daniel@makrotopia.org>
|
2024-06-14 16:35:10 +00:00
|
|
|
Date: Thu, 30 May 2024 03:15:36 +0100
|
|
|
|
Subject: [PATCH 8/9] mmc: block: set fwnode of disk devices
|
2024-01-03 11:57:28 +00:00
|
|
|
|
|
|
|
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@makrotopia.org>
|
|
|
|
---
|
2024-06-14 16:35:10 +00:00
|
|
|
drivers/mmc/core/block.c | 7 +++++++
|
|
|
|
1 file changed, 7 insertions(+)
|
2024-01-03 11:57:28 +00:00
|
|
|
|
|
|
|
--- a/drivers/mmc/core/block.c
|
|
|
|
+++ b/drivers/mmc/core/block.c
|
2024-06-14 16:35:10 +00:00
|
|
|
@@ -2463,6 +2463,7 @@ static struct mmc_blk_data *mmc_blk_allo
|
2024-01-03 11:57:28 +00:00
|
|
|
int area_type,
|
|
|
|
unsigned int part_type)
|
|
|
|
{
|
|
|
|
+ struct fwnode_handle *fwnode;
|
|
|
|
struct mmc_blk_data *md;
|
|
|
|
int devidx, ret;
|
|
|
|
char cap_str[10];
|
2024-06-14 16:35:10 +00:00
|
|
|
@@ -2559,6 +2560,12 @@ static struct mmc_blk_data *mmc_blk_allo
|
2024-01-03 11:57:28 +00:00
|
|
|
|
|
|
|
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)
|
2024-06-14 16:35:10 +00:00
|
|
|
+ device_set_node(disk_to_dev(md->disk), fwnode);
|
2024-01-03 11:57:28 +00:00
|
|
|
+
|
|
|
|
string_get_size((u64)size, 512, STRING_UNITS_2,
|
|
|
|
cap_str, sizeof(cap_str));
|
2024-01-03 18:02:00 +00:00
|
|
|
pr_info("%s: %s %s %s%s\n",
|