linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: reserved_mem: Add missing IORESOURCE_MEM flag on resources
@ 2025-08-20 19:28 Rob Herring (Arm)
  2025-08-20 20:51 ` Saravana Kannan
  2025-08-21  6:39 ` Iuliana Prodan
  0 siblings, 2 replies; 3+ messages in thread
From: Rob Herring (Arm) @ 2025-08-20 19:28 UTC (permalink / raw)
  To: Patrice CHOTARD, Saravana Kannan, Arnaud Pouliquen, Daniel Baluta
  Cc: Iuliana Prodan, Daniel Baluta, devicetree, linux-kernel

Commit f4fcfdda2fd8 ('of: reserved_mem: Add functions to parse
"memory-region"') failed to set IORESOURCE_MEM flag on the resources.
The result is functions such as devm_ioremap_resource_wc() will fail.
Add the missing flag.

Fixes: f4fcfdda2fd8 ('of: reserved_mem: Add functions to parse "memory-region"')
Reported-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reported-by: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 drivers/of/of_reserved_mem.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 77016c0cc296..d3b7c4ae429c 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -771,6 +771,7 @@ int of_reserved_mem_region_to_resource(const struct device_node *np,
 		return -EINVAL;
 
 	resource_set_range(res, rmem->base, rmem->size);
+	res->flags = IORESOURCE_MEM;
 	res->name = rmem->name;
 	return 0;
 }
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-21  6:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-20 19:28 [PATCH] of: reserved_mem: Add missing IORESOURCE_MEM flag on resources Rob Herring (Arm)
2025-08-20 20:51 ` Saravana Kannan
2025-08-21  6:39 ` Iuliana Prodan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).