aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc64/kernel/time.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-06-21 23:34:02 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2006-06-23 23:15:17 -0700
commit07f8e5f358a0b7240f1dad6b3819f2fd1103f159 (patch)
tree5976cc05de92f27a9cc12a3db31ced5311ac3769 /arch/sparc64/kernel/time.c
parent6d307724cb6a6b8466cad4fdf13d8a409bc2433f (diff)
[SPARC64]: Convert cpu_find_by_*() interface to in-kernel PROM device tree.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/time.c')
-rw-r--r--arch/sparc64/kernel/time.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index 0f00a99927e..aa5438a4fd5 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -48,6 +48,7 @@
#include <asm/sections.h>
#include <asm/cpudata.h>
#include <asm/uaccess.h>
+#include <asm/prom.h>
DEFINE_SPINLOCK(mostek_lock);
DEFINE_SPINLOCK(rtc_lock);
@@ -983,12 +984,14 @@ try_isa_clock:
/* This is gets the master TICK_INT timer going. */
static unsigned long sparc64_init_timers(void)
{
+ struct device_node *dp;
+ struct property *prop;
unsigned long clock;
- int node;
#ifdef CONFIG_SMP
extern void smp_tick_init(void);
#endif
+ dp = of_find_node_by_path("/");
if (tlb_type == spitfire) {
unsigned long ver, manuf, impl;
@@ -999,18 +1002,17 @@ static unsigned long sparc64_init_timers(void)
if (manuf == 0x17 && impl == 0x13) {
/* Hummingbird, aka Ultra-IIe */
tick_ops = &hbtick_operations;
- node = prom_root_node;
- clock = prom_getint(node, "stick-frequency");
+ prop = of_find_property(dp, "stick-frequency", NULL);
} else {
tick_ops = &tick_operations;
- cpu_find_by_instance(0, &node, NULL);
- clock = prom_getint(node, "clock-frequency");
+ cpu_find_by_instance(0, &dp, NULL);
+ prop = of_find_property(dp, "clock-frequency", NULL);
}
} else {
tick_ops = &stick_operations;
- node = prom_root_node;
- clock = prom_getint(node, "stick-frequency");
+ prop = of_find_property(dp, "stick-frequency", NULL);
}
+ clock = *(unsigned int *) prop->value;
timer_tick_offset = clock / HZ;
#ifdef CONFIG_SMP