diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-06-22 20:21:22 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-23 23:15:36 -0700 |
commit | 25c7581bcdd11cf9b82a8ef062a10bea310cc9e9 (patch) | |
tree | c88f4ee5e91fa7921ff13627f373e1bfbcec8b81 /arch/sparc64/kernel/irq.c | |
parent | 44bdef5e8f2e64ba5974b587989a829d57126bad (diff) | |
download | lwn-25c7581bcdd11cf9b82a8ef062a10bea310cc9e9.tar.gz lwn-25c7581bcdd11cf9b82a8ef062a10bea310cc9e9.zip |
[SPARC64]: Kill off some more prom_getproperty() remnants.
The remaining ones occur before we have imported the
device tree.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/irq.c')
-rw-r--r-- | arch/sparc64/kernel/irq.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index a8c9dc8d1958..2d00ccffc55b 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c @@ -34,6 +34,7 @@ #include <asm/iommu.h> #include <asm/upa.h> #include <asm/oplib.h> +#include <asm/prom.h> #include <asm/timer.h> #include <asm/smp.h> #include <asm/starfire.h> @@ -635,23 +636,30 @@ static u64 prom_limit0, prom_limit1; static void map_prom_timers(void) { - unsigned int addr[3]; + struct device_node *dp; + unsigned int *addr; int tnode, err; /* PROM timer node hangs out in the top level of device siblings... */ - tnode = prom_finddevice("/counter-timer"); + dp = of_find_node_by_path("/"); + dp = dp->child; + while (dp) { + if (!strcmp(dp->name, "counter-timer")) + break; + dp = dp->sibling; + } /* Assume if node is not present, PROM uses different tick mechanism * which we should not care about. */ - if (tnode == 0 || tnode == -1) { + if (!dp) { prom_timers = (struct sun5_timer *) 0; return; } /* If PROM is really using this, it must be mapped by him. */ - err = prom_getproperty(tnode, "address", (char *)addr, sizeof(addr)); - if (err == -1) { + addr = of_get_property(dp, "address", NULL); + if (!addr) { prom_printf("PROM does not have timer mapped, trying to continue.\n"); prom_timers = (struct sun5_timer *) 0; return; |