/* linux/arch/arm/plat-s3c/pm.c * * Copyright 2008 Openmoko, Inc. * Copyright 2004-2008 Simtec Electronics * Ben Dooks * http://armlinux.simtec.co.uk/ * * S3C common power management (suspend to ram) support. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include #include #include #include #include #include #include #include #include #ifdef CONFIG_SAMSUNG_ATAGS #include #ifndef CONFIG_ARCH_EXYNOS #include #include #endif #include #endif #include #include #include /* for external use */ unsigned long s3c_pm_flags; /* The IRQ ext-int code goes here, it is too small to currently bother * with its own file. */ unsigned long s3c_irqwake_intmask = 0xffffffffL; unsigned long s3c_irqwake_eintmask = 0xffffffffL; int s3c_irqext_wake(struct irq_data *data, unsigned int state) { unsigned long bit = 1L << IRQ_EINT_BIT(data->irq); if (!(s3c_irqwake_eintallow & bit)) return -ENOENT; printk(KERN_INFO "wake %s for irq %d\n", state ? "enabled" : "disabled", data->irq); if (!state) s3c_irqwake_eintmask |= bit; else s3c_irqwake_eintmask &= ~bit; return 0; } /* s3c2410_pm_show_resume_irqs * * print any IRQs asserted at resume time (ie, we woke from) */ static void __maybe_unused s3c_pm_show_resume_irqs(int start, unsigned long which, unsigned long mask) { int i; which &= ~mask; for (i = 0; i <= 31; i++) { if (which & (1L<