diff options
author | Heiko Stuebner <heiko@sntech.de> | 2013-01-29 13:25:22 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2013-02-03 18:52:39 -0500 |
commit | d8fdec168542971f6ffbf0883c8be2e9bbb22ca6 (patch) | |
tree | 93220f10f43ce2ab28ace67e3628554f0e07661f | |
parent | 1f629b7a3ced8e73784a9ae3b0d9039496878f18 (diff) |
ARM: S3C24XX: Move irq syscore-ops to irq-pm
With this the definition of s3c24xx_irq_syscore_ops can also move to
common.h from plat/pm.h and the definitions of s3c24xx_irq_suspend
and s3c24xx_irq_resume are also not necessary anymore in plat/pm.h
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
-rw-r--r-- | arch/arm/mach-s3c24xx/common.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/irq-pm.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/s3c2410.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/s3c2412.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/s3c2416.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/s3c2440.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/s3c2442.c | 4 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/irq.c | 6 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/pm.h | 6 |
9 files changed, 24 insertions, 19 deletions
diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c24xx/common.h index c2f596e7bc2d..ed6276fcaa3b 100644 --- a/arch/arm/mach-s3c24xx/common.h +++ b/arch/arm/mach-s3c24xx/common.h | |||
@@ -15,4 +15,6 @@ | |||
15 | void s3c2410_restart(char mode, const char *cmd); | 15 | void s3c2410_restart(char mode, const char *cmd); |
16 | void s3c244x_restart(char mode, const char *cmd); | 16 | void s3c244x_restart(char mode, const char *cmd); |
17 | 17 | ||
18 | extern struct syscore_ops s3c24xx_irq_syscore_ops; | ||
19 | |||
18 | #endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */ | 20 | #endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */ |
diff --git a/arch/arm/mach-s3c24xx/irq-pm.c b/arch/arm/mach-s3c24xx/irq-pm.c index 0efb2e2848c8..d48126d9fbaf 100644 --- a/arch/arm/mach-s3c24xx/irq-pm.c +++ b/arch/arm/mach-s3c24xx/irq-pm.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/irq.h> | 17 | #include <linux/irq.h> |
18 | #include <linux/syscore_ops.h> | ||
18 | 19 | ||
19 | #include <plat/cpu.h> | 20 | #include <plat/cpu.h> |
20 | #include <plat/pm.h> | 21 | #include <plat/pm.h> |
@@ -64,7 +65,7 @@ static unsigned long save_extint[3]; | |||
64 | static unsigned long save_eintflt[4]; | 65 | static unsigned long save_eintflt[4]; |
65 | static unsigned long save_eintmask; | 66 | static unsigned long save_eintmask; |
66 | 67 | ||
67 | int s3c24xx_irq_suspend(void) | 68 | static int s3c24xx_irq_suspend(void) |
68 | { | 69 | { |
69 | unsigned int i; | 70 | unsigned int i; |
70 | 71 | ||
@@ -80,7 +81,7 @@ int s3c24xx_irq_suspend(void) | |||
80 | return 0; | 81 | return 0; |
81 | } | 82 | } |
82 | 83 | ||
83 | void s3c24xx_irq_resume(void) | 84 | static void s3c24xx_irq_resume(void) |
84 | { | 85 | { |
85 | unsigned int i; | 86 | unsigned int i; |
86 | 87 | ||
@@ -93,3 +94,8 @@ void s3c24xx_irq_resume(void) | |||
93 | s3c_pm_do_restore(irq_save, ARRAY_SIZE(irq_save)); | 94 | s3c_pm_do_restore(irq_save, ARRAY_SIZE(irq_save)); |
94 | __raw_writel(save_eintmask, S3C24XX_EINTMASK); | 95 | __raw_writel(save_eintmask, S3C24XX_EINTMASK); |
95 | } | 96 | } |
97 | |||
98 | struct syscore_ops s3c24xx_irq_syscore_ops = { | ||
99 | .suspend = s3c24xx_irq_suspend, | ||
100 | .resume = s3c24xx_irq_resume, | ||
101 | }; | ||
diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c index a3c5cb086ee2..9ebef95da721 100644 --- a/arch/arm/mach-s3c24xx/s3c2410.c +++ b/arch/arm/mach-s3c24xx/s3c2410.c | |||
@@ -49,6 +49,8 @@ | |||
49 | #include <plat/gpio-cfg.h> | 49 | #include <plat/gpio-cfg.h> |
50 | #include <plat/gpio-cfg-helpers.h> | 50 | #include <plat/gpio-cfg-helpers.h> |
51 | 51 | ||
52 | #include "common.h" | ||
53 | |||
52 | /* Initial IO mappings */ | 54 | /* Initial IO mappings */ |
53 | 55 | ||
54 | static struct map_desc s3c2410_iodesc[] __initdata = { | 56 | static struct map_desc s3c2410_iodesc[] __initdata = { |
@@ -182,8 +184,8 @@ int __init s3c2410_init(void) | |||
182 | 184 | ||
183 | #ifdef CONFIG_PM | 185 | #ifdef CONFIG_PM |
184 | register_syscore_ops(&s3c2410_pm_syscore_ops); | 186 | register_syscore_ops(&s3c2410_pm_syscore_ops); |
185 | #endif | ||
186 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 187 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
188 | #endif | ||
187 | 189 | ||
188 | return device_register(&s3c2410_dev); | 190 | return device_register(&s3c2410_dev); |
189 | } | 191 | } |
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c index c511a225f07a..ec0b31818c51 100644 --- a/arch/arm/mach-s3c24xx/s3c2412.c +++ b/arch/arm/mach-s3c24xx/s3c2412.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <plat/regs-spi.h> | 47 | #include <plat/regs-spi.h> |
48 | #include <plat/s3c2412.h> | 48 | #include <plat/s3c2412.h> |
49 | 49 | ||
50 | #include "common.h" | ||
50 | #include "regs-dsc.h" | 51 | #include "regs-dsc.h" |
51 | 52 | ||
52 | #define S3C2412_SWRST (S3C24XX_VA_CLKPWR + 0x30) | 53 | #define S3C2412_SWRST (S3C24XX_VA_CLKPWR + 0x30) |
@@ -245,8 +246,8 @@ int __init s3c2412_init(void) | |||
245 | 246 | ||
246 | #ifdef CONFIG_PM | 247 | #ifdef CONFIG_PM |
247 | register_syscore_ops(&s3c2412_pm_syscore_ops); | 248 | register_syscore_ops(&s3c2412_pm_syscore_ops); |
248 | #endif | ||
249 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 249 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
250 | #endif | ||
250 | 251 | ||
251 | return device_register(&s3c2412_dev); | 252 | return device_register(&s3c2412_dev); |
252 | } | 253 | } |
diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c index 77ee0b732237..e30476db0295 100644 --- a/arch/arm/mach-s3c24xx/s3c2416.c +++ b/arch/arm/mach-s3c24xx/s3c2416.c | |||
@@ -63,6 +63,8 @@ | |||
63 | #include <plat/rtc-core.h> | 63 | #include <plat/rtc-core.h> |
64 | #include <plat/spi-core.h> | 64 | #include <plat/spi-core.h> |
65 | 65 | ||
66 | #include "common.h" | ||
67 | |||
66 | static struct map_desc s3c2416_iodesc[] __initdata = { | 68 | static struct map_desc s3c2416_iodesc[] __initdata = { |
67 | IODESC_ENT(WATCHDOG), | 69 | IODESC_ENT(WATCHDOG), |
68 | IODESC_ENT(CLKPWR), | 70 | IODESC_ENT(CLKPWR), |
@@ -105,9 +107,9 @@ int __init s3c2416_init(void) | |||
105 | 107 | ||
106 | #ifdef CONFIG_PM | 108 | #ifdef CONFIG_PM |
107 | register_syscore_ops(&s3c2416_pm_syscore_ops); | 109 | register_syscore_ops(&s3c2416_pm_syscore_ops); |
108 | #endif | ||
109 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 110 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
110 | register_syscore_ops(&s3c2416_irq_syscore_ops); | 111 | register_syscore_ops(&s3c2416_irq_syscore_ops); |
112 | #endif | ||
111 | 113 | ||
112 | return device_register(&s3c2416_dev); | 114 | return device_register(&s3c2416_dev); |
113 | } | 115 | } |
diff --git a/arch/arm/mach-s3c24xx/s3c2440.c b/arch/arm/mach-s3c24xx/s3c2440.c index 2b3dddb49af7..559e394e8989 100644 --- a/arch/arm/mach-s3c24xx/s3c2440.c +++ b/arch/arm/mach-s3c24xx/s3c2440.c | |||
@@ -40,6 +40,8 @@ | |||
40 | #include <plat/gpio-cfg.h> | 40 | #include <plat/gpio-cfg.h> |
41 | #include <plat/gpio-cfg-helpers.h> | 41 | #include <plat/gpio-cfg-helpers.h> |
42 | 42 | ||
43 | #include "common.h" | ||
44 | |||
43 | static struct device s3c2440_dev = { | 45 | static struct device s3c2440_dev = { |
44 | .bus = &s3c2440_subsys, | 46 | .bus = &s3c2440_subsys, |
45 | }; | 47 | }; |
@@ -57,9 +59,9 @@ int __init s3c2440_init(void) | |||
57 | 59 | ||
58 | #ifdef CONFIG_PM | 60 | #ifdef CONFIG_PM |
59 | register_syscore_ops(&s3c2410_pm_syscore_ops); | 61 | register_syscore_ops(&s3c2410_pm_syscore_ops); |
62 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | ||
60 | #endif | 63 | #endif |
61 | register_syscore_ops(&s3c244x_pm_syscore_ops); | 64 | register_syscore_ops(&s3c244x_pm_syscore_ops); |
62 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | ||
63 | 65 | ||
64 | /* register our system device for everything else */ | 66 | /* register our system device for everything else */ |
65 | 67 | ||
diff --git a/arch/arm/mach-s3c24xx/s3c2442.c b/arch/arm/mach-s3c24xx/s3c2442.c index 22cb7c94a8c8..f732826c2359 100644 --- a/arch/arm/mach-s3c24xx/s3c2442.c +++ b/arch/arm/mach-s3c24xx/s3c2442.c | |||
@@ -51,6 +51,8 @@ | |||
51 | #include <plat/gpio-cfg.h> | 51 | #include <plat/gpio-cfg.h> |
52 | #include <plat/gpio-cfg-helpers.h> | 52 | #include <plat/gpio-cfg-helpers.h> |
53 | 53 | ||
54 | #include "common.h" | ||
55 | |||
54 | /* S3C2442 extended clock support */ | 56 | /* S3C2442 extended clock support */ |
55 | 57 | ||
56 | static unsigned long s3c2442_camif_upll_round(struct clk *clk, | 58 | static unsigned long s3c2442_camif_upll_round(struct clk *clk, |
@@ -172,9 +174,9 @@ int __init s3c2442_init(void) | |||
172 | 174 | ||
173 | #ifdef CONFIG_PM | 175 | #ifdef CONFIG_PM |
174 | register_syscore_ops(&s3c2410_pm_syscore_ops); | 176 | register_syscore_ops(&s3c2410_pm_syscore_ops); |
177 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | ||
175 | #endif | 178 | #endif |
176 | register_syscore_ops(&s3c244x_pm_syscore_ops); | 179 | register_syscore_ops(&s3c244x_pm_syscore_ops); |
177 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | ||
178 | 180 | ||
179 | return device_register(&s3c2442_dev); | 181 | return device_register(&s3c2442_dev); |
180 | } | 182 | } |
diff --git a/arch/arm/plat-s3c24xx/irq.c b/arch/arm/plat-s3c24xx/irq.c index cdf1e92646c1..259d0e4a532f 100644 --- a/arch/arm/plat-s3c24xx/irq.c +++ b/arch/arm/plat-s3c24xx/irq.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/ioport.h> | 25 | #include <linux/ioport.h> |
26 | #include <linux/device.h> | 26 | #include <linux/device.h> |
27 | #include <linux/syscore_ops.h> | ||
28 | #include <linux/irqdomain.h> | 27 | #include <linux/irqdomain.h> |
29 | 28 | ||
30 | #include <asm/mach/irq.h> | 29 | #include <asm/mach/irq.h> |
@@ -627,8 +626,3 @@ void __init s3c24xx_init_irq(void) | |||
627 | s3c24xx_init_intc(NULL, &init_subint[0], main_intc, 0x4a000018); | 626 | s3c24xx_init_intc(NULL, &init_subint[0], main_intc, 0x4a000018); |
628 | s3c24xx_init_intc(NULL, &init_eint[0], main_intc, 0x560000a4); | 627 | s3c24xx_init_intc(NULL, &init_eint[0], main_intc, 0x560000a4); |
629 | } | 628 | } |
630 | |||
631 | struct syscore_ops s3c24xx_irq_syscore_ops = { | ||
632 | .suspend = s3c24xx_irq_suspend, | ||
633 | .resume = s3c24xx_irq_resume, | ||
634 | }; | ||
diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h index 887a0c954379..f6fcadeee969 100644 --- a/arch/arm/plat-samsung/include/plat/pm.h +++ b/arch/arm/plat-samsung/include/plat/pm.h | |||
@@ -109,17 +109,11 @@ extern void s3c_pm_do_restore_core(struct sleep_save *ptr, int count); | |||
109 | #ifdef CONFIG_PM | 109 | #ifdef CONFIG_PM |
110 | extern int s3c_irq_wake(struct irq_data *data, unsigned int state); | 110 | extern int s3c_irq_wake(struct irq_data *data, unsigned int state); |
111 | extern int s3c_irqext_wake(struct irq_data *data, unsigned int state); | 111 | extern int s3c_irqext_wake(struct irq_data *data, unsigned int state); |
112 | extern int s3c24xx_irq_suspend(void); | ||
113 | extern void s3c24xx_irq_resume(void); | ||
114 | #else | 112 | #else |
115 | #define s3c_irq_wake NULL | 113 | #define s3c_irq_wake NULL |
116 | #define s3c_irqext_wake NULL | 114 | #define s3c_irqext_wake NULL |
117 | #define s3c24xx_irq_suspend NULL | ||
118 | #define s3c24xx_irq_resume NULL | ||
119 | #endif | 115 | #endif |
120 | 116 | ||
121 | extern struct syscore_ops s3c24xx_irq_syscore_ops; | ||
122 | |||
123 | /* PM debug functions */ | 117 | /* PM debug functions */ |
124 | 118 | ||
125 | #ifdef CONFIG_SAMSUNG_PM_DEBUG | 119 | #ifdef CONFIG_SAMSUNG_PM_DEBUG |