[PATCH 11/19] ppc64: Move memory setup into iSeries device tree
Michael Ellerman
michael at ellerman.id.au
Tue Jul 26 18:58:41 EST 2005
This patch adds the required nodes to the iSeries device tree to allow
early_init_devtree() to do the lmb setup for us.
---
arch/ppc64/kernel/iSeries_setup.c | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
Index: work/arch/ppc64/kernel/iSeries_setup.c
===================================================================
--- work.orig/arch/ppc64/kernel/iSeries_setup.c
+++ work/arch/ppc64/kernel/iSeries_setup.c
@@ -374,11 +374,6 @@ static void __init iSeries_init_early(vo
}
}
- lmb_init();
- lmb_add(0, systemcfg->physicalMemorySize);
- lmb_analyze();
- lmb_reserve(0, __pa(klimit));
-
/* Initialize machine-dependency vectors */
#ifdef CONFIG_SMP
smp_init_iSeries();
@@ -1063,9 +1058,24 @@ void dt_prop_empty(struct iseries_flat_d
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 at 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);
More information about the Linuxppc64-dev
mailing list