aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/prom.c23
-rw-r--r--arch/powerpc/kernel/rtas.c22
-rw-r--r--include/asm-powerpc/rtas.h3
3 files changed, 30 insertions, 18 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index efed4bc2b454..ce02c056ac3f 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -1125,24 +1125,6 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
1125 tce_alloc_end = *lprop; 1125 tce_alloc_end = *lprop;
1126#endif 1126#endif
1127 1127
1128#ifdef CONFIG_PPC_RTAS
1129 /* To help early debugging via the front panel, we retrieve a minimal
1130 * set of RTAS infos now if available
1131 */
1132 {
1133 u64 *basep, *entryp, *sizep;
1134
1135 basep = of_get_flat_dt_prop(node, "linux,rtas-base", NULL);
1136 entryp = of_get_flat_dt_prop(node, "linux,rtas-entry", NULL);
1137 sizep = of_get_flat_dt_prop(node, "linux,rtas-size", NULL);
1138 if (basep && entryp && sizep) {
1139 rtas.base = *basep;
1140 rtas.entry = *entryp;
1141 rtas.size = *sizep;
1142 }
1143 }
1144#endif /* CONFIG_PPC_RTAS */
1145
1146#ifdef CONFIG_KEXEC 1128#ifdef CONFIG_KEXEC
1147 lprop = (u64*)of_get_flat_dt_prop(node, "linux,crashkernel-base", NULL); 1129 lprop = (u64*)of_get_flat_dt_prop(node, "linux,crashkernel-base", NULL);
1148 if (lprop) 1130 if (lprop)
@@ -1327,6 +1309,11 @@ void __init early_init_devtree(void *params)
1327 /* Setup flat device-tree pointer */ 1309 /* Setup flat device-tree pointer */
1328 initial_boot_params = params; 1310 initial_boot_params = params;
1329 1311
1312#ifdef CONFIG_PPC_RTAS
1313 /* Some machines might need RTAS info for debugging, grab it now. */
1314 of_scan_flat_dt(early_init_dt_scan_rtas, NULL);
1315#endif
1316
1330 /* Retrieve various informations from the /chosen node of the 1317 /* Retrieve various informations from the /chosen node of the
1331 * device-tree, including the platform type, initrd location and 1318 * device-tree, including the platform type, initrd location and
1332 * size, TCE reserve, and more ... 1319 * size, TCE reserve, and more ...
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}
diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h
index 02e213e3d69f..a33c6acffa61 100644
--- a/include/asm-powerpc/rtas.h
+++ b/include/asm-powerpc/rtas.h
@@ -181,6 +181,9 @@ extern int rtas_set_rtc_time(struct rtc_time *rtc_time);
181extern unsigned int rtas_busy_delay_time(int status); 181extern unsigned int rtas_busy_delay_time(int status);
182extern unsigned int rtas_busy_delay(int status); 182extern unsigned int rtas_busy_delay(int status);
183 183
184extern int early_init_dt_scan_rtas(unsigned long node,
185 const char *uname, int depth, void *data);
186
184extern void pSeries_log_error(char *buf, unsigned int err_type, int fatal); 187extern void pSeries_log_error(char *buf, unsigned int err_type, int fatal);
185 188
186/* Error types logged. */ 189/* Error types logged. */