diff options
author | Rob Herring <robh@kernel.org> | 2023-03-30 01:03:36 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-04-04 15:11:03 +0300 |
commit | 2500763dd3db37fad94d9b506907c59c2f5e97c6 (patch) | |
tree | a4cd9241b504c57d5011764311a00c8062461f98 /arch/powerpc/platforms/embedded6xx/holly.c | |
parent | 83a8fe569ef84d6eefcb99420a731cb87508f004 (diff) | |
download | linux-2500763dd3db37fad94d9b506907c59c2f5e97c6.tar.xz |
powerpc: Use of_address_to_resource()
Replace open coded reading of "reg" or of_get_address()/
of_translate_address() calls with a single call to
of_address_to_resource().
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230329220337.141295-1-robh@kernel.org
Diffstat (limited to 'arch/powerpc/platforms/embedded6xx/holly.c')
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/holly.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c index a167ee88fbf9..02ff260ae1ee 100644 --- a/arch/powerpc/platforms/embedded6xx/holly.c +++ b/arch/powerpc/platforms/embedded6xx/holly.c @@ -205,16 +205,15 @@ static void __noreturn holly_restart(char *cmd) __be32 __iomem *ocn_bar1 = NULL; unsigned long bar; struct device_node *bridge = NULL; - const void *prop; - int size; + struct resource res; phys_addr_t addr = 0xc0000000; local_irq_disable(); bridge = of_find_node_by_type(NULL, "tsi-bridge"); if (bridge) { - prop = of_get_property(bridge, "reg", &size); - addr = of_translate_address(bridge, prop); + of_address_to_resource(bridge, 0, &res); + addr = res.start; of_node_put(bridge); } addr += (TSI108_PB_OFFSET + 0x414); |