ARM: S3C24XX: fix building without PM_SLEEP
[deliverable/linux.git] / arch / arm / plat-samsung / include / plat / pm.h
CommitLineData
c116c1d7 1/* arch/arm/plat-samsung/include/plat/pm.h
1da177e4
LT
2 *
3 * Copyright (c) 2004 Simtec Electronics
6419711a 4 * http://armlinux.simtec.co.uk/
1da177e4
LT
5 * Written by Ben Dooks, <ben@simtec.co.uk>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10*/
11
4e59c25d 12/* s3c_pm_init
1da177e4
LT
13 *
14 * called from board at initialisation time to setup the power
15 * management
16*/
17
72551f6c 18#include <plat/pm-common.h>
f5aeffb7 19
4a858cfc 20struct device;
a09e2b21 21
89693016 22#ifdef CONFIG_SAMSUNG_PM
1da177e4 23
4e59c25d 24extern __init int s3c_pm_init(void);
c656c306 25extern __init int s3c64xx_pm_init(void);
1da177e4
LT
26
27#else
28
4e59c25d 29static inline int s3c_pm_init(void)
1da177e4
LT
30{
31 return 0;
32}
c656c306
MB
33
34static inline int s3c64xx_pm_init(void)
35{
36 return 0;
37}
1da177e4
LT
38#endif
39
40/* configuration for the IRQ mask over sleep */
41extern unsigned long s3c_irqwake_intmask;
42extern unsigned long s3c_irqwake_eintmask;
43
44/* IRQ masks for IRQs allowed to go to sleep (see irq.c) */
45extern unsigned long s3c_irqwake_intallow;
4f506daf 46#ifdef CONFIG_PM_SLEEP
1da177e4 47extern unsigned long s3c_irqwake_eintallow;
4f506daf
AB
48#else
49#define s3c_irqwake_eintallow 0
50#endif
1da177e4 51
0033a2f0
BD
52/* per-cpu sleep functions */
53
54extern void (*pm_cpu_prep)(void);
29cb3cd2 55extern int (*pm_cpu_sleep)(unsigned long);
0033a2f0 56
1da177e4
LT
57/* Flags for PM Control */
58
59extern unsigned long s3c_pm_flags;
60
61/* from sleep.S */
62
29cb3cd2 63extern int s3c2410_cpu_suspend(unsigned long);
1da177e4 64
484c213b 65#ifdef CONFIG_PM_SLEEP
3445513c 66extern int s3c_irq_wake(struct irq_data *data, unsigned int state);
89693016 67extern void s3c_cpu_resume(void);
1e582fc7 68#else
3445513c 69#define s3c_irq_wake NULL
89693016 70#define s3c_cpu_resume NULL
1e582fc7 71#endif
6419711a 72
4f506daf
AB
73#ifdef CONFIG_SAMSUNG_PM
74extern int s3c_irqext_wake(struct irq_data *data, unsigned int state);
75#else
76#define s3c_irqext_wake NULL
77#endif
78
bd117bd1
BD
79#ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK
80/**
81 * s3c_pm_debug_smdkled() - Debug PM suspend/resume via SMDK Board LEDs
82 * @set: set bits for the state of the LEDs
83 * @clear: clear bits for the state of the LEDs.
84 */
85extern void s3c_pm_debug_smdkled(u32 set, u32 clear);
86
87#else
88static inline void s3c_pm_debug_smdkled(u32 set, u32 clear) { }
89#endif /* CONFIG_S3C_PM_DEBUG_LED_SMDK */
90
2261e0e6
BD
91/**
92 * s3c_pm_configure_extint() - ensure pins are correctly set for IRQ
93 *
94 * Setup all the necessary GPIO pins for waking the system on external
95 * interrupt.
96 */
97extern void s3c_pm_configure_extint(void);
98
880cf071 99#ifdef CONFIG_GPIO_SAMSUNG
2261e0e6 100/**
782d8a3c 101 * samsung_pm_restore_gpios() - restore the state of the gpios after sleep.
2261e0e6
BD
102 *
103 * Restore the state of the GPIO pins after sleep, which may involve ensuring
104 * that we do not glitch the state of the pins from that the bootloader's
105 * resume code has done.
106*/
782d8a3c 107extern void samsung_pm_restore_gpios(void);
2261e0e6
BD
108
109/**
782d8a3c 110 * samsung_pm_save_gpios() - save the state of the GPIOs for restoring after sleep.
2261e0e6 111 *
782d8a3c 112 * Save the GPIO states for resotration on resume. See samsung_pm_restore_gpios().
2261e0e6 113 */
782d8a3c 114extern void samsung_pm_save_gpios(void);
880cf071
TF
115#else
116static inline void samsung_pm_restore_gpios(void) {}
117static inline void samsung_pm_save_gpios(void) {}
118#endif
2261e0e6
BD
119
120extern void s3c_pm_save_core(void);
121extern void s3c_pm_restore_core(void);
This page took 0.933562 seconds and 5 git commands to generate.