From 38c9fb743f0d6e9dd8ee45e3e6247bc7d147c4de Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 15 Sep 2009 15:00:02 +0200 Subject: [PATCH] MIPS: Fulong: Convert reset initialization to initcall. Signed-off-by: Ralf Baechle --- arch/mips/include/asm/mips-boards/generic.h | 2 -- arch/mips/lemote/lm2e/reset.c | 7 ++++++- arch/mips/lemote/lm2e/setup.c | 3 --- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/mips/include/asm/mips-boards/generic.h b/arch/mips/include/asm/mips-boards/generic.h index c0da1a881e3..46c08563e53 100644 --- a/arch/mips/include/asm/mips-boards/generic.h +++ b/arch/mips/include/asm/mips-boards/generic.h @@ -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 diff --git a/arch/mips/lemote/lm2e/reset.c b/arch/mips/lemote/lm2e/reset.c index 099387a3827..2e64bf6929e 100644 --- a/arch/mips/lemote/lm2e/reset.c +++ b/arch/mips/lemote/lm2e/reset.c @@ -7,6 +7,7 @@ * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology * Author: Fuxin Zhang, zhangfx@lemote.com */ +#include #include #include @@ -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); diff --git a/arch/mips/lemote/lm2e/setup.c b/arch/mips/lemote/lm2e/setup.c index ebd6ceaef2f..79dae630611 100644 --- a/arch/mips/lemote/lm2e/setup.c +++ b/arch/mips/lemote/lm2e/setup.c @@ -41,8 +41,6 @@ #include #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; -- 2.20.1