diff options
author | Arnd Bergmann <arnd@arndb.de> | 2015-02-26 15:50:22 -0500 |
---|---|---|
committer | Kukjin Kim <kgene@kernel.org> | 2015-02-26 15:50:22 -0500 |
commit | 4f506daf0e6c094d2f28253d4044e9adc9461142 (patch) | |
tree | ae16b7f261fefeb3e2022469e74715bea0da6557 /arch/arm/mach-s3c24xx | |
parent | ea8d33ad32f9670fe55c99478e666805efc6452b (diff) |
ARM: S3C24XX: fix building without PM_SLEEP
We get lots of link errors based on the assumption that
any s3c24xx kernel would enable CONFIG_PM_SLEEP if it
enables CONFIG_PM. This tries to clean that up.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
Diffstat (limited to 'arch/arm/mach-s3c24xx')
-rw-r--r-- | arch/arm/mach-s3c24xx/Kconfig | 8 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/pm-s3c2416.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/pm.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/s3c2410.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/s3c2412.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c24xx/s3c2416.c | 2 | ||||
-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/mach-s3c24xx/s3c244x.c | 7 |
10 files changed, 21 insertions, 20 deletions
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig index 389173690716..a6d3b5bcc4c2 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig | |||
@@ -39,14 +39,14 @@ config CPU_S3C2412 | |||
39 | bool "SAMSUNG S3C2412" | 39 | bool "SAMSUNG S3C2412" |
40 | select CPU_ARM926T | 40 | select CPU_ARM926T |
41 | select S3C2412_COMMON_CLK | 41 | select S3C2412_COMMON_CLK |
42 | select S3C2412_PM if PM | 42 | select S3C2412_PM if PM_SLEEP |
43 | help | 43 | help |
44 | Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line | 44 | Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line |
45 | 45 | ||
46 | config CPU_S3C2416 | 46 | config CPU_S3C2416 |
47 | bool "SAMSUNG S3C2416/S3C2450" | 47 | bool "SAMSUNG S3C2416/S3C2450" |
48 | select CPU_ARM926T | 48 | select CPU_ARM926T |
49 | select S3C2416_PM if PM | 49 | select S3C2416_PM if PM_SLEEP |
50 | select S3C2443_COMMON_CLK | 50 | select S3C2443_COMMON_CLK |
51 | help | 51 | help |
52 | Support for the S3C2416 SoC from the S3C24XX line | 52 | Support for the S3C2416 SoC from the S3C24XX line |
@@ -55,7 +55,7 @@ config CPU_S3C2440 | |||
55 | bool "SAMSUNG S3C2440" | 55 | bool "SAMSUNG S3C2440" |
56 | select CPU_ARM920T | 56 | select CPU_ARM920T |
57 | select S3C2410_COMMON_CLK | 57 | select S3C2410_COMMON_CLK |
58 | select S3C2410_PM if PM | 58 | select S3C2410_PM if PM_SLEEP |
59 | help | 59 | help |
60 | Support for S3C2440 Samsung Mobile CPU based systems. | 60 | Support for S3C2440 Samsung Mobile CPU based systems. |
61 | 61 | ||
@@ -63,7 +63,7 @@ config CPU_S3C2442 | |||
63 | bool "SAMSUNG S3C2442" | 63 | bool "SAMSUNG S3C2442" |
64 | select CPU_ARM920T | 64 | select CPU_ARM920T |
65 | select S3C2410_COMMON_CLK | 65 | select S3C2410_COMMON_CLK |
66 | select S3C2410_PM if PM | 66 | select S3C2410_PM if PM_SLEEP |
67 | help | 67 | help |
68 | Support for S3C2442 Samsung Mobile CPU based systems. | 68 | Support for S3C2442 Samsung Mobile CPU based systems. |
69 | 69 | ||
diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile index b40a22fe082a..05920c8a5764 100644 --- a/arch/arm/mach-s3c24xx/Makefile +++ b/arch/arm/mach-s3c24xx/Makefile | |||
@@ -32,7 +32,8 @@ obj-$(CONFIG_CPU_S3C2443) += s3c2443.o | |||
32 | 32 | ||
33 | # PM | 33 | # PM |
34 | 34 | ||
35 | obj-$(CONFIG_PM) += pm.o irq-pm.o sleep.o | 35 | obj-$(CONFIG_PM) += pm.o |
36 | obj-$(CONFIG_PM_SLEEP) += irq-pm.o sleep.o | ||
36 | 37 | ||
37 | # common code | 38 | # common code |
38 | 39 | ||
diff --git a/arch/arm/mach-s3c24xx/pm-s3c2416.c b/arch/arm/mach-s3c24xx/pm-s3c2416.c index 44923895f558..c0e328e37bd6 100644 --- a/arch/arm/mach-s3c24xx/pm-s3c2416.c +++ b/arch/arm/mach-s3c24xx/pm-s3c2416.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include "s3c2412-power.h" | 24 | #include "s3c2412-power.h" |
25 | 25 | ||
26 | #ifdef CONFIG_PM_SLEEP | ||
26 | extern void s3c2412_sleep_enter(void); | 27 | extern void s3c2412_sleep_enter(void); |
27 | 28 | ||
28 | static int s3c2416_cpu_suspend(unsigned long arg) | 29 | static int s3c2416_cpu_suspend(unsigned long arg) |
@@ -70,7 +71,7 @@ static __init int s3c2416_pm_init(void) | |||
70 | } | 71 | } |
71 | 72 | ||
72 | arch_initcall(s3c2416_pm_init); | 73 | arch_initcall(s3c2416_pm_init); |
73 | 74 | #endif | |
74 | 75 | ||
75 | static void s3c2416_pm_resume(void) | 76 | static void s3c2416_pm_resume(void) |
76 | { | 77 | { |
diff --git a/arch/arm/mach-s3c24xx/pm.c b/arch/arm/mach-s3c24xx/pm.c index b19256ec8d40..5d510bca0844 100644 --- a/arch/arm/mach-s3c24xx/pm.c +++ b/arch/arm/mach-s3c24xx/pm.c | |||
@@ -50,6 +50,7 @@ | |||
50 | 50 | ||
51 | #define PFX "s3c24xx-pm: " | 51 | #define PFX "s3c24xx-pm: " |
52 | 52 | ||
53 | #ifdef CONFIG_PM_SLEEP | ||
53 | static struct sleep_save core_save[] = { | 54 | static struct sleep_save core_save[] = { |
54 | /* we restore the timings here, with the proviso that the board | 55 | /* we restore the timings here, with the proviso that the board |
55 | * brings the system up in an slower, or equal frequency setting | 56 | * brings the system up in an slower, or equal frequency setting |
@@ -67,6 +68,7 @@ static struct sleep_save core_save[] = { | |||
67 | SAVE_ITEM(S3C2410_BANKCON4), | 68 | SAVE_ITEM(S3C2410_BANKCON4), |
68 | SAVE_ITEM(S3C2410_BANKCON5), | 69 | SAVE_ITEM(S3C2410_BANKCON5), |
69 | }; | 70 | }; |
71 | #endif | ||
70 | 72 | ||
71 | /* s3c_pm_check_resume_pin | 73 | /* s3c_pm_check_resume_pin |
72 | * | 74 | * |
@@ -121,7 +123,7 @@ void s3c_pm_configure_extint(void) | |||
121 | } | 123 | } |
122 | } | 124 | } |
123 | 125 | ||
124 | 126 | #ifdef CONFIG_PM_SLEEP | |
125 | void s3c_pm_restore_core(void) | 127 | void s3c_pm_restore_core(void) |
126 | { | 128 | { |
127 | s3c_pm_do_restore_core(core_save, ARRAY_SIZE(core_save)); | 129 | s3c_pm_do_restore_core(core_save, ARRAY_SIZE(core_save)); |
@@ -131,4 +133,4 @@ void s3c_pm_save_core(void) | |||
131 | { | 133 | { |
132 | s3c_pm_do_save(core_save, ARRAY_SIZE(core_save)); | 134 | s3c_pm_do_save(core_save, ARRAY_SIZE(core_save)); |
133 | } | 135 | } |
134 | 136 | #endif | |
diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c index 2a6985a4a0ff..5061d66ca10c 100644 --- a/arch/arm/mach-s3c24xx/s3c2410.c +++ b/arch/arm/mach-s3c24xx/s3c2410.c | |||
@@ -121,7 +121,7 @@ int __init s3c2410_init(void) | |||
121 | { | 121 | { |
122 | printk("S3C2410: Initialising architecture\n"); | 122 | printk("S3C2410: Initialising architecture\n"); |
123 | 123 | ||
124 | #ifdef CONFIG_PM | 124 | #ifdef CONFIG_PM_SLEEP |
125 | register_syscore_ops(&s3c2410_pm_syscore_ops); | 125 | register_syscore_ops(&s3c2410_pm_syscore_ops); |
126 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 126 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
127 | #endif | 127 | #endif |
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c index ecf2c77ab88b..64a13605cfc3 100644 --- a/arch/arm/mach-s3c24xx/s3c2412.c +++ b/arch/arm/mach-s3c24xx/s3c2412.c | |||
@@ -172,7 +172,7 @@ int __init s3c2412_init(void) | |||
172 | { | 172 | { |
173 | printk("S3C2412: Initialising architecture\n"); | 173 | printk("S3C2412: Initialising architecture\n"); |
174 | 174 | ||
175 | #ifdef CONFIG_PM | 175 | #ifdef CONFIG_PM_SLEEP |
176 | register_syscore_ops(&s3c2412_pm_syscore_ops); | 176 | register_syscore_ops(&s3c2412_pm_syscore_ops); |
177 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 177 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
178 | #endif | 178 | #endif |
diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c index bfd4da86deb8..3f8ca2a3ef17 100644 --- a/arch/arm/mach-s3c24xx/s3c2416.c +++ b/arch/arm/mach-s3c24xx/s3c2416.c | |||
@@ -98,7 +98,7 @@ int __init s3c2416_init(void) | |||
98 | s3c_adc_setname("s3c2416-adc"); | 98 | s3c_adc_setname("s3c2416-adc"); |
99 | s3c_rtc_setname("s3c2416-rtc"); | 99 | s3c_rtc_setname("s3c2416-rtc"); |
100 | 100 | ||
101 | #ifdef CONFIG_PM | 101 | #ifdef CONFIG_PM_SLEEP |
102 | register_syscore_ops(&s3c2416_pm_syscore_ops); | 102 | register_syscore_ops(&s3c2416_pm_syscore_ops); |
103 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 103 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
104 | register_syscore_ops(&s3c2416_irq_syscore_ops); | 104 | register_syscore_ops(&s3c2416_irq_syscore_ops); |
diff --git a/arch/arm/mach-s3c24xx/s3c2440.c b/arch/arm/mach-s3c24xx/s3c2440.c index 03d379f1fc52..eb733555fab5 100644 --- a/arch/arm/mach-s3c24xx/s3c2440.c +++ b/arch/arm/mach-s3c24xx/s3c2440.c | |||
@@ -57,11 +57,11 @@ int __init s3c2440_init(void) | |||
57 | 57 | ||
58 | /* register suspend/resume handlers */ | 58 | /* register suspend/resume handlers */ |
59 | 59 | ||
60 | #ifdef CONFIG_PM | 60 | #ifdef CONFIG_PM_SLEEP |
61 | register_syscore_ops(&s3c2410_pm_syscore_ops); | 61 | register_syscore_ops(&s3c2410_pm_syscore_ops); |
62 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 62 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
63 | #endif | ||
64 | register_syscore_ops(&s3c244x_pm_syscore_ops); | 63 | register_syscore_ops(&s3c244x_pm_syscore_ops); |
64 | #endif | ||
65 | 65 | ||
66 | /* register our system device for everything else */ | 66 | /* register our system device for everything else */ |
67 | 67 | ||
diff --git a/arch/arm/mach-s3c24xx/s3c2442.c b/arch/arm/mach-s3c24xx/s3c2442.c index 7b043349f1c8..893998ede022 100644 --- a/arch/arm/mach-s3c24xx/s3c2442.c +++ b/arch/arm/mach-s3c24xx/s3c2442.c | |||
@@ -60,11 +60,11 @@ int __init s3c2442_init(void) | |||
60 | { | 60 | { |
61 | printk("S3C2442: Initialising architecture\n"); | 61 | printk("S3C2442: Initialising architecture\n"); |
62 | 62 | ||
63 | #ifdef CONFIG_PM | 63 | #ifdef CONFIG_PM_SLEEP |
64 | register_syscore_ops(&s3c2410_pm_syscore_ops); | 64 | register_syscore_ops(&s3c2410_pm_syscore_ops); |
65 | register_syscore_ops(&s3c24xx_irq_syscore_ops); | 65 | register_syscore_ops(&s3c24xx_irq_syscore_ops); |
66 | #endif | ||
67 | register_syscore_ops(&s3c244x_pm_syscore_ops); | 66 | register_syscore_ops(&s3c244x_pm_syscore_ops); |
67 | #endif | ||
68 | 68 | ||
69 | return device_register(&s3c2442_dev); | 69 | return device_register(&s3c2442_dev); |
70 | } | 70 | } |
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c index 177f97802745..b14119585dc7 100644 --- a/arch/arm/mach-s3c24xx/s3c244x.c +++ b/arch/arm/mach-s3c24xx/s3c244x.c | |||
@@ -108,7 +108,7 @@ static int __init s3c2442_core_init(void) | |||
108 | core_initcall(s3c2442_core_init); | 108 | core_initcall(s3c2442_core_init); |
109 | 109 | ||
110 | 110 | ||
111 | #ifdef CONFIG_PM | 111 | #ifdef CONFIG_PM_SLEEP |
112 | static struct sleep_save s3c244x_sleep[] = { | 112 | static struct sleep_save s3c244x_sleep[] = { |
113 | SAVE_ITEM(S3C2440_DSC0), | 113 | SAVE_ITEM(S3C2440_DSC0), |
114 | SAVE_ITEM(S3C2440_DSC1), | 114 | SAVE_ITEM(S3C2440_DSC1), |
@@ -127,12 +127,9 @@ static void s3c244x_resume(void) | |||
127 | { | 127 | { |
128 | s3c_pm_do_restore(s3c244x_sleep, ARRAY_SIZE(s3c244x_sleep)); | 128 | s3c_pm_do_restore(s3c244x_sleep, ARRAY_SIZE(s3c244x_sleep)); |
129 | } | 129 | } |
130 | #else | ||
131 | #define s3c244x_suspend NULL | ||
132 | #define s3c244x_resume NULL | ||
133 | #endif | ||
134 | 130 | ||
135 | struct syscore_ops s3c244x_pm_syscore_ops = { | 131 | struct syscore_ops s3c244x_pm_syscore_ops = { |
136 | .suspend = s3c244x_suspend, | 132 | .suspend = s3c244x_suspend, |
137 | .resume = s3c244x_resume, | 133 | .resume = s3c244x_resume, |
138 | }; | 134 | }; |
135 | #endif | ||