summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-27 17:31:09 -0500
committerMichael Ellerman <mpe@ellerman.id.au>2023-04-04 22:11:03 +1000
commit83a8fe569ef84d6eefcb99420a731cb87508f004 (patch)
treeabdd723e6bde3e986c006b3738ad567a39c4a6be /arch/powerpc
parentde8d11bc6ec412a498acf795911c8597ae37d4e7 (diff)
downloadlinux-stable-83a8fe569ef84d6eefcb99420a731cb87508f004.tar.gz
linux-stable-83a8fe569ef84d6eefcb99420a731cb87508f004.tar.bz2
linux-stable-83a8fe569ef84d6eefcb99420a731cb87508f004.zip
powerpc/usbgecko: Use of_iomap()
Replace of_get_property()+of_translate_address()+ioremap() with a call to of_iomap() which does all those steps. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230327223109.820381-1-robh@kernel.org
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/embedded6xx/usbgecko_udbg.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/arch/powerpc/platforms/embedded6xx/usbgecko_udbg.c b/arch/powerpc/platforms/embedded6xx/usbgecko_udbg.c
index e02bdabf358c..221577f32b01 100644
--- a/arch/powerpc/platforms/embedded6xx/usbgecko_udbg.c
+++ b/arch/powerpc/platforms/embedded6xx/usbgecko_udbg.c
@@ -193,24 +193,6 @@ static int ug_udbg_getc_poll(void)
}
/*
- * Retrieves and prepares the virtual address needed to access the hardware.
- */
-static void __iomem *__init ug_udbg_setup_exi_io_base(struct device_node *np)
-{
- void __iomem *exi_io_base = NULL;
- phys_addr_t paddr;
- const unsigned int *reg;
-
- reg = of_get_property(np, "reg", NULL);
- if (reg) {
- paddr = of_translate_address(np, reg);
- if (paddr)
- exi_io_base = ioremap(paddr, reg[1]);
- }
- return exi_io_base;
-}
-
-/*
* Checks if a USB Gecko adapter is inserted in any memory card slot.
*/
static void __iomem *__init ug_udbg_probe(void __iomem *exi_io_base)
@@ -246,7 +228,7 @@ void __init ug_udbg_init(void)
goto out;
}
- exi_io_base = ug_udbg_setup_exi_io_base(np);
+ exi_io_base = of_iomap(np, 0);
if (!exi_io_base) {
udbg_printf("%s: failed to setup EXI io base\n", __func__);
goto done;