diff options
Diffstat (limited to 'arch/mips/txx9/generic/setup.c')
-rw-r--r-- | arch/mips/txx9/generic/setup.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c index 4fbd7baa7037..82272e85a042 100644 --- a/arch/mips/txx9/generic/setup.c +++ b/arch/mips/txx9/generic/setup.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <asm/bootinfo.h> | 23 | #include <asm/bootinfo.h> |
24 | #include <asm/time.h> | 24 | #include <asm/time.h> |
25 | #include <asm/reboot.h> | ||
25 | #include <asm/txx9/generic.h> | 26 | #include <asm/txx9/generic.h> |
26 | #include <asm/txx9/pci.h> | 27 | #include <asm/txx9/pci.h> |
27 | #ifdef CONFIG_CPU_TX49XX | 28 | #ifdef CONFIG_CPU_TX49XX |
@@ -188,6 +189,25 @@ char * __init prom_getcmdline(void) | |||
188 | return &(arcs_cmdline[0]); | 189 | return &(arcs_cmdline[0]); |
189 | } | 190 | } |
190 | 191 | ||
192 | static void __noreturn txx9_machine_halt(void) | ||
193 | { | ||
194 | local_irq_disable(); | ||
195 | clear_c0_status(ST0_IM); | ||
196 | while (1) { | ||
197 | if (cpu_wait) { | ||
198 | (*cpu_wait)(); | ||
199 | if (cpu_has_counter) { | ||
200 | /* | ||
201 | * Clear counter interrupt while it | ||
202 | * breaks WAIT instruction even if | ||
203 | * masked. | ||
204 | */ | ||
205 | write_c0_compare(0); | ||
206 | } | ||
207 | } | ||
208 | } | ||
209 | } | ||
210 | |||
191 | /* wrappers */ | 211 | /* wrappers */ |
192 | void __init plat_mem_setup(void) | 212 | void __init plat_mem_setup(void) |
193 | { | 213 | { |
@@ -195,6 +215,12 @@ void __init plat_mem_setup(void) | |||
195 | ioport_resource.end = ~0UL; /* no limit */ | 215 | ioport_resource.end = ~0UL; /* no limit */ |
196 | iomem_resource.start = 0; | 216 | iomem_resource.start = 0; |
197 | iomem_resource.end = ~0UL; /* no limit */ | 217 | iomem_resource.end = ~0UL; /* no limit */ |
218 | |||
219 | /* fallback restart/halt routines */ | ||
220 | _machine_restart = (void (*)(char *))txx9_machine_halt; | ||
221 | _machine_halt = txx9_machine_halt; | ||
222 | pm_power_off = txx9_machine_halt; | ||
223 | |||
198 | #ifdef CONFIG_PCI | 224 | #ifdef CONFIG_PCI |
199 | pcibios_plat_setup = txx9_pcibios_setup; | 225 | pcibios_plat_setup = txx9_pcibios_setup; |
200 | #endif | 226 | #endif |