openrisc: Refactor or32_early_setup()
authorGeert Uytterhoeven <geert@linux-m68k.org>
Tue, 12 Nov 2013 19:42:23 +0000 (20:42 +0100)
committerJonas Bonn <jonas@southpole.se>
Fri, 15 Nov 2013 10:03:51 +0000 (11:03 +0100)
  - Change fdt pointer (passed from head.S) from unsigned int to void *,
    which allows to kill a cast, and makes it compatible with __dtb_start.
  - Use pr_info(),
  - Extract common part.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux@lists.openrisc.net
Signed-off-by: Jonas Bonn <jonas@southpole.se>
arch/openrisc/kernel/setup.c

index 89c497813bab8a5fd40cbd25803698d97f955a68..7d205be459134b2c083dfb4bb2911528220ac52d 100644 (file)
@@ -210,15 +210,15 @@ void __init setup_cpuinfo(void)
  * Falls back on built-in device tree in case null pointer is passed.
  */
 
-void __init or32_early_setup(unsigned int fdt)
+void __init or32_early_setup(void *fdt)
 {
-       if (fdt) {
-               early_init_devtree((void*) fdt);
-               printk(KERN_INFO "FDT at 0x%08x\n", fdt);
-       } else {
-               early_init_devtree(__dtb_start);
-               printk(KERN_INFO "Compiled-in FDT at %p\n", __dtb_start);
+       if (fdt)
+               pr_info("FDT at %p\n", fdt);
+       else {
+               fdt = __dtb_start;
+               pr_info("Compiled-in FDT at %p\n", fdt);
        }
+       early_init_devtree(fdt);
 }
 
 static int __init openrisc_device_probe(void)