Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f506daf authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Kukjin Kim
Browse files

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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarKukjin Kim <kgene@kernel.org>
parent ea8d33ad
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -39,14 +39,14 @@ config CPU_S3C2412
	bool "SAMSUNG S3C2412"
	select CPU_ARM926T
	select S3C2412_COMMON_CLK
	select S3C2412_PM if PM
	select S3C2412_PM if PM_SLEEP
	help
	  Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line

config CPU_S3C2416
	bool "SAMSUNG S3C2416/S3C2450"
	select CPU_ARM926T
	select S3C2416_PM if PM
	select S3C2416_PM if PM_SLEEP
	select S3C2443_COMMON_CLK
	help
	  Support for the S3C2416 SoC from the S3C24XX line
@@ -55,7 +55,7 @@ config CPU_S3C2440
	bool "SAMSUNG S3C2440"
	select CPU_ARM920T
	select S3C2410_COMMON_CLK
	select S3C2410_PM if PM
	select S3C2410_PM if PM_SLEEP
	help
	  Support for S3C2440 Samsung Mobile CPU based systems.

@@ -63,7 +63,7 @@ config CPU_S3C2442
	bool "SAMSUNG S3C2442"
	select CPU_ARM920T
	select S3C2410_COMMON_CLK
	select S3C2410_PM if PM
	select S3C2410_PM if PM_SLEEP
	help
	  Support for S3C2442 Samsung Mobile CPU based systems.

+2 −1
Original line number Diff line number Diff line
@@ -32,7 +32,8 @@ obj-$(CONFIG_CPU_S3C2443) += s3c2443.o

# PM

obj-$(CONFIG_PM)		+= pm.o irq-pm.o sleep.o
obj-$(CONFIG_PM)		+= pm.o
obj-$(CONFIG_PM_SLEEP)		+= irq-pm.o sleep.o

# common code

+2 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@

#include "s3c2412-power.h"

#ifdef CONFIG_PM_SLEEP
extern void s3c2412_sleep_enter(void);

static int s3c2416_cpu_suspend(unsigned long arg)
@@ -70,7 +71,7 @@ static __init int s3c2416_pm_init(void)
}

arch_initcall(s3c2416_pm_init);

#endif

static void s3c2416_pm_resume(void)
{
+4 −2
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@

#define PFX "s3c24xx-pm: "

#ifdef CONFIG_PM_SLEEP
static struct sleep_save core_save[] = {
	/* we restore the timings here, with the proviso that the board
	 * brings the system up in an slower, or equal frequency setting
@@ -67,6 +68,7 @@ static struct sleep_save core_save[] = {
	SAVE_ITEM(S3C2410_BANKCON4),
	SAVE_ITEM(S3C2410_BANKCON5),
};
#endif

/* s3c_pm_check_resume_pin
 *
@@ -121,7 +123,7 @@ void s3c_pm_configure_extint(void)
	}
}


#ifdef CONFIG_PM_SLEEP
void s3c_pm_restore_core(void)
{
	s3c_pm_do_restore_core(core_save, ARRAY_SIZE(core_save));
@@ -131,4 +133,4 @@ void s3c_pm_save_core(void)
{
	s3c_pm_do_save(core_save, ARRAY_SIZE(core_save));
}
#endif
+1 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ int __init s3c2410_init(void)
{
	printk("S3C2410: Initialising architecture\n");

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
	register_syscore_ops(&s3c2410_pm_syscore_ops);
	register_syscore_ops(&s3c24xx_irq_syscore_ops);
#endif
Loading