]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/prom.c
[PATCH] powerpc: Parse crashkernel= parameter in first kernel
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / prom.c
index 9aac77ca3167ba9247f1dd218f78d4928f01d5cf..fddc9c13bff50b3328e215ab2e8fe83d6d21a004 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/initrd.h>
 #include <linux/bitops.h>
 #include <linux/module.h>
+#include <linux/kexec.h>
 
 #include <asm/prom.h>
 #include <asm/rtas.h>
@@ -1198,6 +1199,16 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
        }
 #endif /* CONFIG_PPC_RTAS */
 
+#ifdef CONFIG_KEXEC
+       lprop = (u64*)of_get_flat_dt_prop(node, "linux,crashkernel-base", NULL);
+       if (lprop)
+               crashk_res.start = *lprop;
+
+       lprop = (u64*)of_get_flat_dt_prop(node, "linux,crashkernel-size", NULL);
+       if (lprop)
+               crashk_res.end = crashk_res.start + *lprop - 1;
+#endif
+
        /* break now */
        return 1;
 }