aboutsummaryrefslogtreecommitdiff
path: root/arch/ppc64
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2005-09-23 15:00:20 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2005-09-23 15:00:20 +1000
commit3ab42407fe0628c7880b21eff057566390865319 (patch)
tree2e5f9aa35cf7603a4298f2940d9ec53b588ca6b3 /arch/ppc64
parent4762713a93fa8706c31b0897c1340e7dc282d8fb (diff)
ppc64 iSeries: Move memory setup into iSeries device tree
This patch adds the required nodes to the iSeries device tree to allow early_init_devtree() to do the lmb setup for us. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'arch/ppc64')
-rw-r--r--arch/ppc64/kernel/iSeries_setup.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c
index 27faf4f0967..639f400d6b0 100644
--- a/arch/ppc64/kernel/iSeries_setup.c
+++ b/arch/ppc64/kernel/iSeries_setup.c
@@ -376,11 +376,6 @@ static void __init iSeries_init_early(void)
}
}
- lmb_init();
- lmb_add(0, systemcfg->physicalMemorySize);
- lmb_analyze();
- lmb_reserve(0, __pa(klimit));
-
/* Initialize machine-dependency vectors */
#ifdef CONFIG_SMP
smp_init_iSeries();
@@ -1039,9 +1034,24 @@ void dt_prop_empty(struct iseries_flat_dt *dt, char *name)
void build_flat_dt(struct iseries_flat_dt *dt)
{
+ u64 tmp[2];
+
dt_init(dt);
dt_start_node(dt, "");
+
+ dt_prop_u32(dt, "#address-cells", 2);
+ dt_prop_u32(dt, "#size-cells", 2);
+
+ /* /memory */
+ dt_start_node(dt, "memory@0");
+ dt_prop_str(dt, "name", "memory");
+ dt_prop_str(dt, "device_type", "memory");
+ tmp[0] = 0;
+ tmp[1] = systemcfg->physicalMemorySize;
+ dt_prop_u64_list(dt, "reg", tmp, 2);
+ dt_end_node(dt);
+
dt_end_node(dt);
dt_push_u32(dt, OF_DT_END);