Linux 2.6.25.3
[linux/fpc-iii.git] / include / asm-arm / plat-s3c24xx / pm.h
blobcc623667e48a4585a11145a50ec40e1207239a42
1 /* linux/include/asm-arm/plat-s3c24xx/pm.h
3 * Copyright (c) 2004 Simtec Electronics
4 * Written by Ben Dooks, <ben@simtec.co.uk>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
11 /* s3c2410_pm_init
13 * called from board at initialisation time to setup the power
14 * management
17 #ifdef CONFIG_PM
19 extern __init int s3c2410_pm_init(void);
21 #else
23 static inline int s3c2410_pm_init(void)
25 return 0;
27 #endif
29 /* configuration for the IRQ mask over sleep */
30 extern unsigned long s3c_irqwake_intmask;
31 extern unsigned long s3c_irqwake_eintmask;
33 /* IRQ masks for IRQs allowed to go to sleep (see irq.c) */
34 extern unsigned long s3c_irqwake_intallow;
35 extern unsigned long s3c_irqwake_eintallow;
37 /* per-cpu sleep functions */
39 extern void (*pm_cpu_prep)(void);
40 extern void (*pm_cpu_sleep)(void);
42 /* Flags for PM Control */
44 extern unsigned long s3c_pm_flags;
46 /* from sleep.S */
48 extern int s3c2410_cpu_save(unsigned long *saveblk);
49 extern void s3c2410_cpu_suspend(void);
50 extern void s3c2410_cpu_resume(void);
52 extern unsigned long s3c2410_sleep_save_phys;
54 /* sleep save info */
56 struct sleep_save {
57 void __iomem *reg;
58 unsigned long val;
61 #define SAVE_ITEM(x) \
62 { .reg = (x) }
64 extern void s3c2410_pm_do_save(struct sleep_save *ptr, int count);
65 extern void s3c2410_pm_do_restore(struct sleep_save *ptr, int count);
67 #ifdef CONFIG_PM
68 extern int s3c24xx_irq_suspend(struct sys_device *dev, pm_message_t state);
69 extern int s3c24xx_irq_resume(struct sys_device *dev);
70 #else
71 #define s3c24xx_irq_suspend NULL
72 #define s3c24xx_irq_resume NULL
73 #endif