diff -urN linux-2.6.18/arch/arm/mach-s3c2410/Kconfig linux-2.6.18-m5900/arch/arm/mach-s3c2410/Kconfig --- linux-2.6.18/arch/arm/mach-s3c2410/Kconfig 2006-09-22 12:08:30.000000000 -0400 +++ linux-2.6.18-m5900/arch/arm/mach-s3c2410/Kconfig 2006-09-22 09:54:20.000000000 -0400 @@ -263,7 +263,7 @@ config PM_SIMTEC bool - depends on PM && (ARCH_BAST || MACH_VR1000) + depends on PM && (ARCH_BAST || MACH_VR1000 || MACH_AML_M5900) default y config S3C2410_LOWLEVEL_UART_PORT diff -urN linux-2.6.18/arch/arm/mach-s3c2410/mach-amlm5900.c linux-2.6.18-m5900/arch/arm/mach-s3c2410/mach-amlm5900.c --- linux-2.6.18/arch/arm/mach-s3c2410/mach-amlm5900.c 2006-09-22 12:08:30.000000000 -0400 +++ linux-2.6.18-m5900/arch/arm/mach-s3c2410/mach-amlm5900.c 2006-09-22 12:02:11.000000000 -0400 @@ -225,6 +225,35 @@ }; #endif +#ifdef CONFIG_PM +static irqreturn_t +amlm5900_wake_interrupt(int irq, void *ignored, struct pt_regs *regs) +{ + return IRQ_HANDLED; +} +#endif + +void __init amlm5900_init_irq(void) +{ +#ifdef CONFIG_PM + int ret = 0; + + /* share the IRQ in case someone wants to use the + * button for more than wakeup from system sleep. + */ + ret = request_irq(IRQ_EINT9, &amlm5900_wake_interrupt, + IRQF_TRIGGER_HIGH, "amlm5900_wakeup", + &amlm5900_wake_interrupt); + if (ret != 0) { + printk(KERN_ERR "AML-M5900: no wakeup irq, %d?\n", ret); + } else + enable_irq_wake(IRQ_EINT9); +#endif + + s3c24xx_init_irq(); + +} + static void __init amlm5900_init(void) { @@ -239,7 +268,7 @@ .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, .boot_params = S3C2410_SDRAM_PA + 0x100, .map_io = amlm5900_map_io, - .init_irq = s3c24xx_init_irq, + .init_irq = amlm5900_init_irq, .init_machine = amlm5900_init, .timer = &s3c24xx_timer, MACHINE_END diff -urN linux-2.6.18/arch/arm/mach-s3c2410/pm-simtec.c linux-2.6.18-m5900/arch/arm/mach-s3c2410/pm-simtec.c --- linux-2.6.18/arch/arm/mach-s3c2410/pm-simtec.c 2006-09-19 23:42:06.000000000 -0400 +++ linux-2.6.18-m5900/arch/arm/mach-s3c2410/pm-simtec.c 2006-09-22 10:02:08.000000000 -0400 @@ -49,7 +49,8 @@ /* check which machine we are running on */ if (!machine_is_bast() && !machine_is_vr1000() && - !machine_is_anubis() && !machine_is_osiris()) + !machine_is_anubis() && !machine_is_osiris() && + !machine_is_aml_m5900()) return 0; printk(KERN_INFO "Simtec Board Power Manangement" COPYRIGHT "\n");