diff options
Diffstat (limited to 'arch/mips/alchemy/mtx-1/board_setup.c')
| -rw-r--r-- | arch/mips/alchemy/mtx-1/board_setup.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/mips/alchemy/mtx-1/board_setup.c b/arch/mips/alchemy/mtx-1/board_setup.c index 13577eec8b44..e2838c6185d3 100644 --- a/arch/mips/alchemy/mtx-1/board_setup.c +++ b/arch/mips/alchemy/mtx-1/board_setup.c | |||
| @@ -31,7 +31,9 @@ | |||
| 31 | #include <linux/gpio.h> | 31 | #include <linux/gpio.h> |
| 32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
| 33 | #include <linux/interrupt.h> | 33 | #include <linux/interrupt.h> |
| 34 | #include <linux/pm.h> | ||
| 34 | 35 | ||
| 36 | #include <asm/reboot.h> | ||
| 35 | #include <asm/mach-au1x00/au1000.h> | 37 | #include <asm/mach-au1x00/au1000.h> |
| 36 | 38 | ||
| 37 | #include <prom.h> | 39 | #include <prom.h> |
| @@ -50,12 +52,19 @@ char irq_tab_alchemy[][5] __initdata = { | |||
| 50 | extern int (*board_pci_idsel)(unsigned int devsel, int assert); | 52 | extern int (*board_pci_idsel)(unsigned int devsel, int assert); |
| 51 | int mtx1_pci_idsel(unsigned int devsel, int assert); | 53 | int mtx1_pci_idsel(unsigned int devsel, int assert); |
| 52 | 54 | ||
| 53 | void board_reset(void) | 55 | static void mtx1_reset(char *c) |
| 54 | { | 56 | { |
| 55 | /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */ | 57 | /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */ |
| 56 | au_writel(0x00000000, 0xAE00001C); | 58 | au_writel(0x00000000, 0xAE00001C); |
| 57 | } | 59 | } |
| 58 | 60 | ||
| 61 | static void mtx1_power_off(void) | ||
| 62 | { | ||
| 63 | printk(KERN_ALERT "It's now safe to remove power\n"); | ||
| 64 | while (1) | ||
| 65 | asm volatile (".set mips3 ; wait ; .set mips1"); | ||
| 66 | } | ||
| 67 | |||
| 59 | void __init board_setup(void) | 68 | void __init board_setup(void) |
| 60 | { | 69 | { |
| 61 | #ifdef CONFIG_SERIAL_8250_CONSOLE | 70 | #ifdef CONFIG_SERIAL_8250_CONSOLE |
| @@ -98,6 +107,10 @@ void __init board_setup(void) | |||
| 98 | alchemy_gpio_direction_output(211, 1); /* green on */ | 107 | alchemy_gpio_direction_output(211, 1); /* green on */ |
| 99 | alchemy_gpio_direction_output(212, 0); /* red off */ | 108 | alchemy_gpio_direction_output(212, 0); /* red off */ |
| 100 | 109 | ||
| 110 | pm_power_off = mtx1_power_off; | ||
| 111 | _machine_halt = mtx1_power_off; | ||
| 112 | _machine_restart = mtx1_reset; | ||
| 113 | |||
| 101 | printk(KERN_INFO "4G Systems MTX-1 Board\n"); | 114 | printk(KERN_INFO "4G Systems MTX-1 Board\n"); |
| 102 | } | 115 | } |
| 103 | 116 | ||
