Commit 1fe054e7 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Kukjin Kim

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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarKukjin Kim <kgene@kernel.org>
parent 4f506daf
...@@ -10,6 +10,11 @@ ...@@ -10,6 +10,11 @@
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#include <linux/delay.h>
#include <linux/io.h>
#include "regs-clock.h"
#include "regs-irq.h"
static inline void s3c_pm_debug_init_uart(void) static inline void s3c_pm_debug_init_uart(void)
{ {
...@@ -42,8 +47,23 @@ static inline void s3c_pm_arch_stop_clocks(void) ...@@ -42,8 +47,23 @@ static inline void s3c_pm_arch_stop_clocks(void)
__raw_writel(0x00, S3C2410_CLKCON); /* turn off clocks over sleep */ __raw_writel(0x00, S3C2410_CLKCON); /* turn off clocks over sleep */
} }
static void s3c_pm_show_resume_irqs(int start, unsigned long which, /* s3c2410_pm_show_resume_irqs
unsigned long mask); *
* print any IRQs asserted at resume time (ie, we woke from)
*/
static inline void s3c_pm_show_resume_irqs(int start, unsigned long which,
unsigned long mask)
{
int i;
which &= ~mask;
for (i = 0; i <= 31; i++) {
if (which & (1L<<i)) {
S3C_PMDBG("IRQ %d asserted at resume\n", start+i);
}
}
}
static inline void s3c_pm_arch_show_resume_irqs(void) static inline void s3c_pm_arch_show_resume_irqs(void)
{ {
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <plat/pm-common.h> #include <plat/pm-common.h>
#ifdef CONFIG_SAMSUNG_ATAGS #ifdef CONFIG_SAMSUNG_ATAGS
#include <plat/pm.h>
#include <mach/pm-core.h> #include <mach/pm-core.h>
#else #else
static inline void s3c_pm_debug_init_uart(void) {} static inline void s3c_pm_debug_init_uart(void) {}
......
...@@ -65,26 +65,6 @@ int s3c_irqext_wake(struct irq_data *data, unsigned int state) ...@@ -65,26 +65,6 @@ int s3c_irqext_wake(struct irq_data *data, unsigned int state)
return 0; return 0;
} }
/* s3c2410_pm_show_resume_irqs
*
* print any IRQs asserted at resume time (ie, we woke from)
*/
static void __maybe_unused s3c_pm_show_resume_irqs(int start,
unsigned long which,
unsigned long mask)
{
int i;
which &= ~mask;
for (i = 0; i <= 31; i++) {
if (which & (1L<<i)) {
S3C_PMDBG("IRQ %d asserted at resume\n", start+i);
}
}
}
void (*pm_cpu_prep)(void); void (*pm_cpu_prep)(void);
int (*pm_cpu_sleep)(unsigned long); int (*pm_cpu_sleep)(unsigned long);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment