aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/irq.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-06-22 23:21:22 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-06-24 02:15:36 -0400
commit25c7581bcdd11cf9b82a8ef062a10bea310cc9e9 (patch)
treec88f4ee5e91fa7921ff13627f373e1bfbcec8b81 /arch/sparc64/kernel/irq.c
parent44bdef5e8f2e64ba5974b587989a829d57126bad (diff)
[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.c18
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 @@
34#include <asm/iommu.h> 34#include <asm/iommu.h>
35#include <asm/upa.h> 35#include <asm/upa.h>
36#include <asm/oplib.h> 36#include <asm/oplib.h>
37#include <asm/prom.h>
37#include <asm/timer.h> 38#include <asm/timer.h>
38#include <asm/smp.h> 39#include <asm/smp.h>
39#include <asm/starfire.h> 40#include <asm/starfire.h>
@@ -635,23 +636,30 @@ static u64 prom_limit0, prom_limit1;
635 636
636static void map_prom_timers(void) 637static void map_prom_timers(void)
637{ 638{
638 unsigned int addr[3]; 639 struct device_node *dp;
640 unsigned int *addr;
639 int tnode, err; 641 int tnode, err;
640 642
641 /* PROM timer node hangs out in the top level of device siblings... */ 643 /* PROM timer node hangs out in the top level of device siblings... */
642 tnode = prom_finddevice("/counter-timer"); 644 dp = of_find_node_by_path("/");
645 dp = dp->child;
646 while (dp) {
647 if (!strcmp(dp->name, "counter-timer"))
648 break;
649 dp = dp->sibling;
650 }
643 651
644 /* Assume if node is not present, PROM uses different tick mechanism 652 /* Assume if node is not present, PROM uses different tick mechanism
645 * which we should not care about. 653 * which we should not care about.
646 */ 654 */
647 if (tnode == 0 || tnode == -1) { 655 if (!dp) {
648 prom_timers = (struct sun5_timer *) 0; 656 prom_timers = (struct sun5_timer *) 0;
649 return; 657 return;
650 } 658 }
651 659
652 /* If PROM is really using this, it must be mapped by him. */ 660 /* If PROM is really using this, it must be mapped by him. */
653 err = prom_getproperty(tnode, "address", (char *)addr, sizeof(addr)); 661 addr = of_get_property(dp, "address", NULL);
654 if (err == -1) { 662 if (!addr) {
655 prom_printf("PROM does not have timer mapped, trying to continue.\n"); 663 prom_printf("PROM does not have timer mapped, trying to continue.\n");
656 prom_timers = (struct sun5_timer *) 0; 664 prom_timers = (struct sun5_timer *) 0;
657 return; 665 return;