aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/irq.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-24 17:48:24 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-24 17:48:24 -0400
commitb9d8be7828e974f076717f0da608d052440fe192 (patch)
treed4bc4d3e13f816a76b1a02bde922ee7ad0dbdbd9 /arch/sparc64/kernel/irq.c
parentd02f40e81e003be6ddba5c176f2e40ea290c3729 (diff)
parent1812fd40725c13cf050c29791a6dd35d593eb8d8 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: (40 commits) [SPARC64]: Update defconfig. [SPARC64]: Make auxio a real driver. [PARPORT] sunbpp: Convert to new SBUS device framework. [Documentation]: Update probing info in sbus_drivers.txt [SCSI] qlogicpti: Convert to new SBUS device framework. [SCSI] esp: Fix bug in esp_remove_common. [NET] sunhme: Kill useless loop over sdevs in quattro_sbus_find(). [NET] myri_sbus: Kill unused next_module struct member. [NET] myri_sbus: Convert to new SBUS device layer. [NET] sunqe: Convert to new SBUS driver layer. [NET] sunbmac: Convert over to new SBUS device framework. [NET] sunlance: Convert to new SBUS driver framework. [NET] sunhme: Convert to new SBUS driver framework. [NET] sunhme: Kill __sparc__ and __sparc_v9__ ifdefs. [SCSI] sparc: Port esp to new SBUS driver layer. [SOUND] sparc: Port amd7930 to new SBUS device layer. [SBUS]: Rewrite and plug into of_device framework. [SPARC]: Port of_device layer and make ebus use it. [SPARC]: Port sparc64 in-kernel device tree code to sparc32. [SPARC64]: Add of_device layer and make ebus/isa use it. ...
Diffstat (limited to 'arch/sparc64/kernel/irq.c')
-rw-r--r--arch/sparc64/kernel/irq.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index a8c9dc8d1958..31e0fbb0d82c 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,29 @@ 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;
639 int tnode, err; 640 unsigned int *addr;
640 641
641 /* PROM timer node hangs out in the top level of device siblings... */ 642 /* PROM timer node hangs out in the top level of device siblings... */
642 tnode = prom_finddevice("/counter-timer"); 643 dp = of_find_node_by_path("/");
644 dp = dp->child;
645 while (dp) {
646 if (!strcmp(dp->name, "counter-timer"))
647 break;
648 dp = dp->sibling;
649 }
643 650
644 /* Assume if node is not present, PROM uses different tick mechanism 651 /* Assume if node is not present, PROM uses different tick mechanism
645 * which we should not care about. 652 * which we should not care about.
646 */ 653 */
647 if (tnode == 0 || tnode == -1) { 654 if (!dp) {
648 prom_timers = (struct sun5_timer *) 0; 655 prom_timers = (struct sun5_timer *) 0;
649 return; 656 return;
650 } 657 }
651 658
652 /* If PROM is really using this, it must be mapped by him. */ 659 /* If PROM is really using this, it must be mapped by him. */
653 err = prom_getproperty(tnode, "address", (char *)addr, sizeof(addr)); 660 addr = of_get_property(dp, "address", NULL);
654 if (err == -1) { 661 if (!addr) {
655 prom_printf("PROM does not have timer mapped, trying to continue.\n"); 662 prom_printf("PROM does not have timer mapped, trying to continue.\n");
656 prom_timers = (struct sun5_timer *) 0; 663 prom_timers = (struct sun5_timer *) 0;
657 return; 664 return;