4 * ADM5120 specific reset routines
6 * Copyright (C) ADMtek Incorporated.
7 * Copyright (C) 2005 Jeroen Vreeken (pe1rxq@amsat.org)
8 * Copyright (C) 2007 Gabor Juhos <juhosg@freemail.hu>
9 * Copyright (C) 2007 OpenWrt.org
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the
23 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA.
28 #include <linux/types.h>
29 #include <linux/kernel.h>
30 #include <linux/init.h>
32 #include <asm/bootinfo.h>
33 #include <asm/addrspace.h>
35 #include <asm/mach-adm5120/adm5120_info.h>
36 #include <asm/mach-adm5120/adm5120_defs.h>
37 #include <asm/mach-adm5120/adm5120_switch.h>
39 #define ADM5120_SOFTRESET 0x12000004
41 void (*adm5120_board_reset
)(void);
43 void adm5120_restart(char *command
)
45 /* TODO: stop switch before reset */
47 if (adm5120_board_reset
)
48 adm5120_board_reset();
50 *(u32
*)KSEG1ADDR(ADM5120_SOFTRESET
)=1;
53 void adm5120_halt(void)
55 printk(KERN_NOTICE
"\n** You can safely turn off the power\n");
59 void adm5120_power_off(void)
This page took 0.053159 seconds and 5 git commands to generate.