public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: syscon: Use of_io_request_and_map() for IO mapping
@ 2023-03-20 15:23 Loic Poulain
  2023-03-30 11:42 ` Lee Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Loic Poulain @ 2023-03-20 15:23 UTC (permalink / raw)
  To: lee, arnd; +Cc: linux-kernel, Loic Poulain

Use of_io_request_and_map() instead of of_iomap() so that the
region is reserved and protected, i.e reported in /proc/iomem
and not accessible from user side (CONFIG_IO_STRICT_DEVMEM).

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
---
 drivers/mfd/syscon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index bdb2ce7ff03b..7e6d4edda118 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -60,7 +60,7 @@ static struct syscon *of_syscon_register(struct device_node *np, bool check_clk)
 		goto err_map;
 	}
 
-	base = of_iomap(np, 0);
+	base = of_io_request_and_map(np, 0, NULL);
 	if (!base) {
 		ret = -ENOMEM;
 		goto err_map;
-- 
2.34.1


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

end of thread, other threads:[~2023-03-31 15:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-20 15:23 [PATCH] mfd: syscon: Use of_io_request_and_map() for IO mapping Loic Poulain
2023-03-30 11:42 ` Lee Jones
2023-03-30 12:45   ` Arnd Bergmann
2023-03-30 13:22     ` Loic Poulain
2023-03-31 13:06       ` Arnd Bergmann
2023-03-31 15:52         ` Loic Poulain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox