aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/spitz.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/spitz.c')
-rw-r--r--arch/arm/mach-pxa/spitz.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 19b372df544a..eb9937f6f5cd 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -20,6 +20,7 @@
20#include <linux/fs.h> 20#include <linux/fs.h>
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/mmc/host.h> 22#include <linux/mmc/host.h>
23#include <linux/pm.h>
23 24
24#include <asm/setup.h> 25#include <asm/setup.h>
25#include <asm/memory.h> 26#include <asm/memory.h>
@@ -27,6 +28,7 @@
27#include <asm/hardware.h> 28#include <asm/hardware.h>
28#include <asm/irq.h> 29#include <asm/irq.h>
29#include <asm/io.h> 30#include <asm/io.h>
31#include <asm/system.h>
30 32
31#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
32#include <asm/mach/map.h> 34#include <asm/mach/map.h>
@@ -371,6 +373,7 @@ static int spitz_ohci_init(struct device *dev)
371static struct pxaohci_platform_data spitz_ohci_platform_data = { 373static struct pxaohci_platform_data spitz_ohci_platform_data = {
372 .port_mode = PMM_NPS_MODE, 374 .port_mode = PMM_NPS_MODE,
373 .init = spitz_ohci_init, 375 .init = spitz_ohci_init,
376 .power_budget = 150,
374}; 377};
375 378
376 379
@@ -431,8 +434,31 @@ static struct platform_device *devices[] __initdata = {
431 &spitzled_device, 434 &spitzled_device,
432}; 435};
433 436
437static void spitz_poweroff(void)
438{
439 RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
440
441 pxa_gpio_mode(SPITZ_GPIO_ON_RESET | GPIO_OUT);
442 GPSR(SPITZ_GPIO_ON_RESET) = GPIO_bit(SPITZ_GPIO_ON_RESET);
443
444 mdelay(1000);
445 arm_machine_restart('h');
446}
447
448static void spitz_restart(char mode)
449{
450 /* Bootloader magic for a reboot */
451 if((MSC0 & 0xffff0000) == 0x7ff00000)
452 MSC0 = (MSC0 & 0xffff) | 0x7ee00000;
453
454 spitz_poweroff();
455}
456
434static void __init common_init(void) 457static void __init common_init(void)
435{ 458{
459 pm_power_off = spitz_poweroff;
460 arm_pm_restart = spitz_restart;
461
436 PMCR = 0x00; 462 PMCR = 0x00;
437 463
438 /* setup sleep mode values */ 464 /* setup sleep mode values */