summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/time.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-06-22 19:53:24 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2006-06-23 23:15:32 -0700
commitcecc4e9222c4e2bca59834750e493eea6be97613 (patch)
tree9fd177ac904e4ef091c0322ae9f105210d42916d /arch/sparc64/kernel/time.c
parent9c10a58ed634d98114c5717e2da761d8a63f2cd4 (diff)
downloadblackbird-op-linux-cecc4e9222c4e2bca59834750e493eea6be97613.tar.gz
blackbird-op-linux-cecc4e9222c4e2bca59834750e493eea6be97613.zip
[SPARC64]: Convert central bus layer 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.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index d072b8632ccd..348b82035561 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -796,26 +796,26 @@ static void __init clock_assign_clk_reg(struct linux_prom_registers *clk_reg,
static int __init clock_probe_central(void)
{
- struct linux_prom_registers clk_reg[2];
- char model[64];
- int node;
+ struct linux_prom_registers clk_reg[2], *pr;
+ struct device_node *dp;
+ char *model;
if (!central_bus)
return 0;
/* Get Central FHC's prom node. */
- node = central_bus->child->prom_node;
+ dp = central_bus->child->prom_node;
/* Then get the first child device below it. */
- node = prom_getchild(node);
+ dp = dp->child;
- while (node) {
- prom_getstring(node, "model", model, sizeof(model));
- if (!clock_model_matches(model))
+ while (dp) {
+ model = of_get_property(dp, "model", NULL);
+ if (!model || !clock_model_matches(model))
goto next_sibling;
- prom_getproperty(node, "reg", (char *)clk_reg,
- sizeof(clk_reg));
+ pr = of_get_property(dp, "reg", NULL);
+ memcpy(clk_reg, pr, sizeof(clk_reg));
apply_fhc_ranges(central_bus->child, clk_reg, 1);
apply_central_ranges(central_bus, clk_reg, 1);
@@ -824,7 +824,7 @@ static int __init clock_probe_central(void)
return 1;
next_sibling:
- node = prom_getsibling(node);
+ dp = dp->sibling;
}
return 0;
OpenPOWER on IntegriCloud