
From: Anton Blanchard <anton@samba.org>

Move the linux,rtas* properties into the /rtas node and make them 32bit.  Use
rtas-size and avoid duplicating it in linux,rtas-size.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/ppc64/kernel/prom_init.c |   15 +++++++--------
 25-akpm/arch/ppc64/kernel/rtas.c      |    8 ++++----
 2 files changed, 11 insertions(+), 12 deletions(-)

diff -puN arch/ppc64/kernel/prom_init.c~ppc64-linuxrtas-fixes arch/ppc64/kernel/prom_init.c
--- 25/arch/ppc64/kernel/prom_init.c~ppc64-linuxrtas-fixes	Fri Nov 19 14:28:59 2004
+++ 25-akpm/arch/ppc64/kernel/prom_init.c	Fri Nov 19 14:28:59 2004
@@ -701,9 +701,9 @@ static void __init prom_instantiate_rtas
 {
 	unsigned long offset = reloc_offset();
 	struct prom_t *_prom = PTRRELOC(&prom);
-	phandle prom_rtas;
-	u64 base, entry = 0;
-        u32 size = 0;
+	phandle prom_rtas, rtas_node;
+	u32 base, entry = 0;
+	u32 size = 0;
 
 	prom_debug("prom_instantiate_rtas: start...\n");
 
@@ -723,12 +723,12 @@ static void __init prom_instantiate_rtas
 	}
 	prom_printf("instantiating rtas at 0x%x", base);
 
-	prom_rtas = call_prom("open", 1, 1, ADDR("/rtas"));
+	rtas_node = call_prom("open", 1, 1, ADDR("/rtas"));
 	prom_printf("...");
 
 	if (call_prom("call-method", 3, 2,
 		      ADDR("instantiate-rtas"),
-		      prom_rtas, base) != PROM_ERROR) {
+		      rtas_node, base) != PROM_ERROR) {
 		entry = (long)_prom->args.rets[1];
 	}
 	if (entry == 0) {
@@ -739,9 +739,8 @@ static void __init prom_instantiate_rtas
 
 	reserve_mem(base, size);
 
-	prom_setprop(_prom->chosen, "linux,rtas-base", &base, sizeof(base));
-	prom_setprop(_prom->chosen, "linux,rtas-entry", &entry, sizeof(entry));
-	prom_setprop(_prom->chosen, "linux,rtas-size", &size, sizeof(size));
+	prom_setprop(prom_rtas, "linux,rtas-base", &base, sizeof(base));
+	prom_setprop(prom_rtas, "linux,rtas-entry", &entry, sizeof(entry));
 
 	prom_debug("rtas base     = 0x%x\n", base);
 	prom_debug("rtas entry    = 0x%x\n", entry);
diff -puN arch/ppc64/kernel/rtas.c~ppc64-linuxrtas-fixes arch/ppc64/kernel/rtas.c
--- 25/arch/ppc64/kernel/rtas.c~ppc64-linuxrtas-fixes	Fri Nov 19 14:28:59 2004
+++ 25-akpm/arch/ppc64/kernel/rtas.c	Fri Nov 19 14:28:59 2004
@@ -572,15 +572,15 @@ void __init rtas_initialize(void)
 	 */
 	rtas.dev = of_find_node_by_name(NULL, "rtas");
 	if (rtas.dev) {
-		u64 *basep, *entryp;
+		u32 *basep, *entryp;
 		u32 *sizep;
 
-		basep = (u64 *)get_property(of_chosen, "linux,rtas-base", NULL);
-		sizep = (u32 *)get_property(of_chosen, "linux,rtas-size", NULL);
+		basep = (u32 *)get_property(rtas.dev, "linux,rtas-base", NULL);
+		sizep = (u32 *)get_property(rtas.dev, "rtas-size", NULL);
 		if (basep != NULL && sizep != NULL) {
 			rtas.base = *basep;
 			rtas.size = *sizep;
-			entryp = (u64 *)get_property(of_chosen, "linux,rtas-entry", NULL);
+			entryp = (u32 *)get_property(rtas.dev, "linux,rtas-entry", NULL);
 			if (entryp == NULL) /* Ugh */
 				rtas.entry = rtas.base;
 			else
_
