MIPS: Fulong: Convert reset initialization to initcall.
authorRalf Baechle <ralf@linux-mips.org>
Tue, 15 Sep 2009 13:00:02 +0000 (15:00 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 17 Sep 2009 18:07:43 +0000 (20:07 +0200)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/mips-boards/generic.h
arch/mips/lemote/lm2e/reset.c
arch/mips/lemote/lm2e/setup.c

index c0da1a8..46c0856 100644 (file)
@@ -87,8 +87,6 @@
 
 extern int mips_revision_sconid;
 
-extern void mips_reboot_setup(void);
-
 #ifdef CONFIG_PCI
 extern void mips_pcibios_init(void);
 #else
index 099387a..2e64bf6 100644 (file)
@@ -7,6 +7,7 @@
  * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology
  * Author: Fuxin Zhang, zhangfx@lemote.com
  */
+#include <linux/init.h>
 #include <linux/pm.h>
 
 #include <asm/reboot.h>
@@ -33,9 +34,13 @@ static void loongson2e_power_off(void)
        loongson2e_halt();
 }
 
-void mips_reboot_setup(void)
+static int __init mips_reboot_setup(void)
 {
        _machine_restart = loongson2e_restart;
        _machine_halt = loongson2e_halt;
        pm_power_off = loongson2e_power_off;
+
+       return 0;
 }
+
+arch_initcall(mips_reboot_setup);
index ebd6cea..79dae63 100644 (file)
@@ -41,8 +41,6 @@
 #include <linux/screen_info.h>
 #endif
 
-extern void mips_reboot_setup(void);
-
 unsigned long cpu_clock_freq;
 unsigned long bus_clock;
 unsigned int memsize;
@@ -77,7 +75,6 @@ void __init plat_mem_setup(void)
 {
        set_io_port_base((unsigned long)ioremap(LOONGSON2E_IO_PORT_BASE,
                                IO_SPACE_LIMIT - LOONGSON2E_PCI_IO_START + 1));
-       mips_reboot_setup();
 
        __wbflush = wbflush_loongson2e;