aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/rtas.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2006-06-23 04:20:13 -0400
committerPaul Mackerras <paulus@samba.org>2006-06-27 21:59:48 -0400
commit458148c00b97864a27ecf528a1d45a8e5ebd9bbc (patch)
treecd32ceb1cddc32e501a1aeebd0f0f88dbdd950a5 /arch/powerpc/kernel/rtas.c
parentab3ab74d9b6b3920be70f502b40cb3f7f08d23fa (diff)
[POWERPC] Setup RTAS values earlier, to enable rtas_call() earlier
Althought RTAS is instantiated when we enter the kernel, we can't actually call into it until we know its entry point address. Currently we grab that in rtas_initialize(), however that's quite late in the boot sequence. To enable rtas_call() earlier, we can grab the RTAS entry etc. values while we're scanning the flattened device tree. There's existing code to retrieve the values from /chosen, however we don't store them there anymore, so remove that code. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/rtas.c')
-rw-r--r--arch/powerpc/kernel/rtas.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index b6aed765966a..061d8afd246e 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -801,3 +801,25 @@ void __init rtas_initialize(void)
801 rtas_last_error_token = rtas_token("rtas-last-error"); 801 rtas_last_error_token = rtas_token("rtas-last-error");
802#endif 802#endif
803} 803}
804
805int __init early_init_dt_scan_rtas(unsigned long node,
806 const char *uname, int depth, void *data)
807{
808 u32 *basep, *entryp, *sizep;
809
810 if (depth != 1 || strcmp(uname, "rtas") != 0)
811 return 0;
812
813 basep = of_get_flat_dt_prop(node, "linux,rtas-base", NULL);
814 entryp = of_get_flat_dt_prop(node, "linux,rtas-entry", NULL);
815 sizep = of_get_flat_dt_prop(node, "rtas-size", NULL);
816
817 if (basep && entryp && sizep) {
818 rtas.base = *basep;
819 rtas.entry = *entryp;
820 rtas.size = *sizep;
821 }
822
823 /* break now */
824 return 1;
825}