diff options
author | Arnd Bergmann <arnd@arndb.de> | 2015-02-26 15:50:23 -0500 |
---|---|---|
committer | Kukjin Kim <kgene@kernel.org> | 2015-02-26 15:50:23 -0500 |
commit | 1fe054e71a895c682f1cd36071ff3fd0c7bc9cff (patch) | |
tree | 13716a35f470eb23ea340e6dd9ae135b2c20f0d0 | |
parent | 4f506daf0e6c094d2f28253d4044e9adc9461142 (diff) |
ARM: S3C24XX: fix header file inclusions
The pm-core.h file does not include all the necessary headers,
and has a static declaration for a function that is not
defined in the same file, causing SAMSUNG_PM_DEBUG to
break on s3c24xx:
arch/arm/mach-s3c24xx/include/mach/pm-core.h:50:91: warning: 's3c_pm_show_resume_irqs' used but never defined
arch/arm/mach-s3c24xx/include/mach/pm-core.h: In function 's3c_pm_debug_init_uart':
arch/arm/mach-s3c24xx/include/mach/pm-core.h:16:34: error: 'S3C2410_CLKCON' undeclared (first use in this function)
unsigned long tmp = __raw_readl(S3C2410_CLKCON);
^
This moves the code around slightly to avoid the errors.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
-rw-r--r-- | arch/arm/mach-s3c24xx/include/mach/pm-core.h | 24 | ||||
-rw-r--r-- | arch/arm/plat-samsung/pm-debug.c | 1 | ||||
-rw-r--r-- | arch/arm/plat-samsung/pm.c | 20 |
3 files changed, 23 insertions, 22 deletions
diff --git a/arch/arm/mach-s3c24xx/include/mach/pm-core.h b/arch/arm/mach-s3c24xx/include/mach/pm-core.h index 2eef7e6f7675..69459dbbdcad 100644 --- a/arch/arm/mach-s3c24xx/include/mach/pm-core.h +++ b/arch/arm/mach-s3c24xx/include/mach/pm-core.h | |||
@@ -10,6 +10,11 @@ | |||
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | #include <linux/delay.h> | ||
14 | #include <linux/io.h> | ||
15 | |||
16 | #include "regs-clock.h" | ||
17 | #include "regs-irq.h" | ||
13 | 18 | ||
14 | static inline void s3c_pm_debug_init_uart(void) | 19 | static inline void s3c_pm_debug_init_uart(void) |
15 | { | 20 | { |
@@ -42,8 +47,23 @@ static inline void s3c_pm_arch_stop_clocks(void) | |||
42 | __raw_writel(0x00, S3C2410_CLKCON); /* turn off clocks over sleep */ | 47 | __raw_writel(0x00, S3C2410_CLKCON); /* turn off clocks over sleep */ |
43 | } | 48 | } |
44 | 49 | ||
45 | static void s3c_pm_show_resume_irqs(int start, unsigned long which, | 50 | /* s3c2410_pm_show_resume_irqs |
46 | unsigned long mask); | 51 | * |
52 | * print any IRQs asserted at resume time (ie, we woke from) | ||
53 | */ | ||
54 | static inline void s3c_pm_show_resume_irqs(int start, unsigned long which, | ||
55 | unsigned long mask) | ||
56 | { | ||
57 | int i; | ||
58 | |||
59 | which &= ~mask; | ||
60 | |||
61 | for (i = 0; i <= 31; i++) { | ||
62 | if (which & (1L<<i)) { | ||
63 | S3C_PMDBG("IRQ %d asserted at resume\n", start+i); | ||
64 | } | ||
65 | } | ||
66 | } | ||
47 | 67 | ||
48 | static inline void s3c_pm_arch_show_resume_irqs(void) | 68 | static inline void s3c_pm_arch_show_resume_irqs(void) |
49 | { | 69 | { |
diff --git a/arch/arm/plat-samsung/pm-debug.c b/arch/arm/plat-samsung/pm-debug.c index 39609601f407..64e15da33b42 100644 --- a/arch/arm/plat-samsung/pm-debug.c +++ b/arch/arm/plat-samsung/pm-debug.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <plat/pm-common.h> | 23 | #include <plat/pm-common.h> |
24 | 24 | ||
25 | #ifdef CONFIG_SAMSUNG_ATAGS | 25 | #ifdef CONFIG_SAMSUNG_ATAGS |
26 | #include <plat/pm.h> | ||
26 | #include <mach/pm-core.h> | 27 | #include <mach/pm-core.h> |
27 | #else | 28 | #else |
28 | static inline void s3c_pm_debug_init_uart(void) {} | 29 | static inline void s3c_pm_debug_init_uart(void) {} |
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index f8c0f9797dcf..82777c649774 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c | |||
@@ -65,26 +65,6 @@ int s3c_irqext_wake(struct irq_data *data, unsigned int state) | |||
65 | return 0; | 65 | return 0; |
66 | } | 66 | } |
67 | 67 | ||
68 | /* s3c2410_pm_show_resume_irqs | ||
69 | * | ||
70 | * print any IRQs asserted at resume time (ie, we woke from) | ||
71 | */ | ||
72 | static void __maybe_unused s3c_pm_show_resume_irqs(int start, | ||
73 | unsigned long which, | ||
74 | unsigned long mask) | ||
75 | { | ||
76 | int i; | ||
77 | |||
78 | which &= ~mask; | ||
79 | |||
80 | for (i = 0; i <= 31; i++) { | ||
81 | if (which & (1L<<i)) { | ||
82 | S3C_PMDBG("IRQ %d asserted at resume\n", start+i); | ||
83 | } | ||
84 | } | ||
85 | } | ||
86 | |||
87 | |||
88 | void (*pm_cpu_prep)(void); | 68 | void (*pm_cpu_prep)(void); |
89 | int (*pm_cpu_sleep)(unsigned long); | 69 | int (*pm_cpu_sleep)(unsigned long); |
90 | 70 | ||