From 85749d24bcf90440b10394312e5b1c96d1a62cdb Mon Sep 17 00:00:00 2001 From: Wu Zhangjin Date: Thu, 2 Jul 2009 23:26:45 +0800 Subject: MIPS: Loongson: Split common loongson source code out To share common loongson source code between all of the loongson-based machines. there is a need to split it out of the fuloong-2e/ directory. at the same time, other according tuning is needed. the machine-specific parts are defined as macros in relative header file, pci.h, mem.h, machine.h. Signed-off-by: Wu Zhangjin Signed-off-by: Ralf Baechle --- arch/mips/loongson/fuloong-2e/reset.c | 37 ++++++++--------------------------- 1 file changed, 8 insertions(+), 29 deletions(-) (limited to 'arch/mips/loongson/fuloong-2e/reset.c') diff --git a/arch/mips/loongson/fuloong-2e/reset.c b/arch/mips/loongson/fuloong-2e/reset.c index c21299af7f64..677fe186db95 100644 --- a/arch/mips/loongson/fuloong-2e/reset.c +++ b/arch/mips/loongson/fuloong-2e/reset.c @@ -1,44 +1,23 @@ -/* +/* Board-specific reboot/shutdown routines + * Copyright (c) 2009 Philippe Vachon + * + * Copyright (C) 2009 Lemote Inc. & Insititute of Computing Technology + * Author: Wu Zhangjin, wuzj@lemote.com + * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. - * - * Copyright (C) 2007 Lemote, Inc. & Institute of Computing Technology - * Author: Fuxin Zhang, zhangfx@lemote.com - * Copyright (C) 2009 Lemote, Inc. & Institute of Computing Technology - * Author: Zhangjin Wu, wuzj@lemote.com */ -#include -#include - -#include #include -static void loongson2e_restart(char *command) +void mach_prepare_reboot(void) { - /* do preparation for reboot */ BONITO_BONGENCFG &= ~(1 << 2); BONITO_BONGENCFG |= (1 << 2); - - /* reboot via jumping to boot base address */ - ((void (*)(void))ioremap_nocache(BONITO_BOOT_BASE, 4)) (); } -static void loongson2e_halt(void) +void mach_prepare_shutdown(void) { - while (1) - ; } - -static int __init mips_reboot_setup(void) -{ - _machine_restart = loongson2e_restart; - _machine_halt = loongson2e_halt; - pm_power_off = loongson2e_halt; - - return 0; -} - -arch_initcall(mips_reboot_setup); -- cgit v1.2.3