Commit 5f66c615 authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

[PATCH] ppc64: linux,rtas* fixes

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: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0e0ae575
......@@ -701,9 +701,9 @@ static void __init prom_instantiate_rtas(void)
{
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(void)
}
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(void)
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);
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment