[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240410232211.438277-3-samuel.holland@sifive.com>
Date: Wed, 10 Apr 2024 16:22:04 -0700
From: Samuel Holland <samuel.holland@...ive.com>
To: Conor Dooley <conor@...nel.org>,
linux-riscv@...ts.infradead.org
Cc: Samuel Holland <samuel.holland@...ive.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/4] cache: sifive_ccache: Use of_iomap() helper
This simplifies the code with no functional change.
Signed-off-by: Samuel Holland <samuel.holland@...ive.com>
---
drivers/cache/sifive_ccache.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/cache/sifive_ccache.c b/drivers/cache/sifive_ccache.c
index 6874b72ec59d..9833e9f6f36c 100644
--- a/drivers/cache/sifive_ccache.c
+++ b/drivers/cache/sifive_ccache.c
@@ -288,7 +288,6 @@ static struct platform_driver sifive_ccache_driver = {
static int __init sifive_ccache_init(void)
{
struct device_node *np;
- struct resource res;
const struct of_device_id *match;
unsigned long quirks __maybe_unused;
int rc;
@@ -299,12 +298,7 @@ static int __init sifive_ccache_init(void)
quirks = (uintptr_t)match->data;
- if (of_address_to_resource(np, 0, &res)) {
- rc = -ENODEV;
- goto err_node_put;
- }
-
- ccache_base = ioremap(res.start, resource_size(&res));
+ ccache_base = of_iomap(np, 0);
if (!ccache_base) {
rc = -ENOMEM;
goto err_node_put;
--
2.44.0
Powered by blists - more mailing lists