linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] ARM: samsung: randconfig build fixes
@ 2015-02-12 19:35 Arnd Bergmann
  2015-02-12 19:35 ` [PATCH 1/9] ARM: s3c64xx: add I2C dependencies where needed Arnd Bergmann
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Arnd Bergmann @ 2015-02-12 19:35 UTC (permalink / raw)
  To: linux-arm-kernel

This is a set of mostly trivial build fixes for bugs I have encountered
in random configurations. I'm sending them separate from the other
platforms since we have a lot of them for the various samsung platforms
here.

Kukjin, please pick them up into a fixes branch for 3.20 or send
an Ack so we can apply them directly.

Let me know if anything looks wrong with some of the patches.

Thanks,

	Arnd

Arnd Bergmann (9):
  ARM: s3c64xx: add I2C dependencies where needed
  ARM: s3c64xx: fix building without CONFIG_PM_SLEEP
  ARM: s3c64xx: fix __initdata section mismatch
  ARM: s3c24xx: use SAMSUNG_WAKEMASK for s3c2416
  ARM: s3c24xx: fix building without PM_SLEEP
  ARM: s3c24xx: fix header file inclusions
  ARM: s3c24xx: avoid a Kconfig warning
  ARM: EXYNOS: suspend requires regulator access
  ARM: EXYNOS: make exynos 4210 cpuidle build without SMP

 arch/arm/mach-exynos/Kconfig                 |  1 +
 arch/arm/mach-exynos/pm.c                    | 19 +++++++++++++++----
 arch/arm/mach-s3c24xx/Kconfig                | 19 ++++++++++---------
 arch/arm/mach-s3c24xx/Makefile               |  3 ++-
 arch/arm/mach-s3c24xx/include/mach/pm-core.h | 24 ++++++++++++++++++++++--
 arch/arm/mach-s3c24xx/pm-s3c2416.c           |  3 ++-
 arch/arm/mach-s3c24xx/pm.c                   |  6 ++++--
 arch/arm/mach-s3c24xx/s3c2410.c              |  2 +-
 arch/arm/mach-s3c24xx/s3c2412.c              |  2 +-
 arch/arm/mach-s3c24xx/s3c2416.c              |  2 +-
 arch/arm/mach-s3c24xx/s3c2440.c              |  4 ++--
 arch/arm/mach-s3c24xx/s3c2442.c              |  4 ++--
 arch/arm/mach-s3c24xx/s3c244x.c              |  7 ++-----
 arch/arm/mach-s3c64xx/Kconfig                |  4 +++-
 arch/arm/mach-s3c64xx/Makefile               |  3 ++-
 arch/arm/mach-s3c64xx/mach-smdk6410.c        |  2 +-
 arch/arm/mach-s3c64xx/pm.c                   |  2 ++
 arch/arm/plat-samsung/include/plat/pm.h      | 14 +++++++++++---
 arch/arm/plat-samsung/pm-debug.c             |  1 +
 arch/arm/plat-samsung/pm.c                   | 20 --------------------
 20 files changed, 85 insertions(+), 57 deletions(-)

-- 
2.1.0.rc2

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/9] ARM: s3c64xx: add I2C dependencies where needed
  2015-02-12 19:35 [PATCH 0/9] ARM: samsung: randconfig build fixes Arnd Bergmann
@ 2015-02-12 19:35 ` Arnd Bergmann
  2015-02-12 19:35 ` [PATCH 2/9] ARM: s3c64xx: fix building without CONFIG_PM_SLEEP Arnd Bergmann
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2015-02-12 19:35 UTC (permalink / raw)
  To: linux-arm-kernel

The SMDK6410_WM1190_EV1 and SMDK6410_WM1192_EV1 add-on
cards select MFD_WM*_I2C, but they ignore the fact that I2C
may be compiled as a loadable module.

This patch adds a dependency on I2C, which means we avoid
the build errors, but can end up in a case where the options
are hidden from the user when I2C is turned off.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Ben Dooks <ben-linux@fluff.org>
---
 arch/arm/mach-s3c64xx/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index 26ca2427e53d..eff95e950d81 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -189,6 +189,7 @@ endchoice
 config SMDK6410_WM1190_EV1
 	bool "Support Wolfson Microelectronics 1190-EV1 PMIC card"
 	depends on MACH_SMDK6410
+	depends on I2C=y
 	select MFD_WM8350_I2C
 	select REGULATOR
 	select REGULATOR_WM8350
@@ -203,6 +204,7 @@ config SMDK6410_WM1190_EV1
 config SMDK6410_WM1192_EV1
 	bool "Support Wolfson Microelectronics 1192-EV1 PMIC card"
 	depends on MACH_SMDK6410
+	depends on I2C=y
 	select MFD_WM831X
 	select MFD_WM831X_I2C
 	select REGULATOR
@@ -269,8 +271,8 @@ config MACH_SMARTQ7
 
 config MACH_WLF_CRAGG_6410
 	bool "Wolfson Cragganmore 6410"
+	depends on I2C=y
 	select CPU_S3C6410
-	select I2C
 	select LEDS_GPIO_REGISTER
 	select S3C64XX_DEV_SPI0
 	select S3C64XX_SETUP_FB_24BPP
-- 
2.1.0.rc2

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/9] ARM: s3c64xx: fix building without CONFIG_PM_SLEEP
  2015-02-12 19:35 [PATCH 0/9] ARM: samsung: randconfig build fixes Arnd Bergmann
  2015-02-12 19:35 ` [PATCH 1/9] ARM: s3c64xx: add I2C dependencies where needed Arnd Bergmann
@ 2015-02-12 19:35 ` Arnd Bergmann
  2015-02-12 19:35 ` [PATCH 3/9] ARM: s3c64xx: fix __initdata section mismatch Arnd Bergmann
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2015-02-12 19:35 UTC (permalink / raw)
  To: linux-arm-kernel

arch/arm/mach-s3c64xx/built-in.o: In function `s3c_pm_restore_core':
:(.text+0x5d0): undefined reference to `s3c_pm_do_restore_core'
:(.text+0x5d4): undefined reference to `s3c_pm_do_restore'
arch/arm/mach-s3c64xx/built-in.o: In function `s3c_pm_save_core':
:(.text+0x60c): undefined reference to `s3c_pm_do_save'
arch/arm/mach-s3c64xx/built-in.o: In function `s3c64xx_irq_pm_resume':
:(.text+0x670): undefined reference to `s3c_pm_do_restore'
arch/arm/mach-s3c64xx/built-in.o: In function `s3c64xx_irq_pm_suspend':
:(.text+0x6d8): undefined reference to `s3c_pm_do_save'
arch/arm/mach-s3c64xx/built-in.o: In function `s3c_cpu_resume':
:(.text+0x71c): undefined reference to `cpu_resume'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c64xx/Makefile          | 3 ++-
 arch/arm/mach-s3c64xx/pm.c              | 2 ++
 arch/arm/plat-samsung/include/plat/pm.h | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile
index 12f67b61ca5f..17f4b07ec763 100644
--- a/arch/arm/mach-s3c64xx/Makefile
+++ b/arch/arm/mach-s3c64xx/Makefile
@@ -16,7 +16,8 @@ obj-$(CONFIG_CPU_S3C6410)	+= s3c6410.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
 obj-$(CONFIG_CPU_IDLE)		+= cpuidle.o
 
 # DMA support
diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c
index aaf7bea4032f..75b14e756383 100644
--- a/arch/arm/mach-s3c64xx/pm.c
+++ b/arch/arm/mach-s3c64xx/pm.c
@@ -194,6 +194,7 @@ void s3c_pm_debug_smdkled(u32 set, u32 clear)
 }
 #endif
 
+#ifdef CONFIG_PM_SLEEP
 static struct sleep_save core_save[] = {
 	SAVE_ITEM(S3C64XX_MEM0DRVCON),
 	SAVE_ITEM(S3C64XX_MEM1DRVCON),
@@ -238,6 +239,7 @@ void s3c_pm_save_core(void)
 	s3c_pm_do_save(misc_save, ARRAY_SIZE(misc_save));
 	s3c_pm_do_save(core_save, ARRAY_SIZE(core_save));
 }
+#endif
 
 /* since both s3c6400 and s3c6410 share the same sleep pm calls, we
  * put the per-cpu code in here until any new cpu comes along and changes
diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h
index e17d871b934c..e5a046dc22f5 100644
--- a/arch/arm/plat-samsung/include/plat/pm.h
+++ b/arch/arm/plat-samsung/include/plat/pm.h
@@ -58,7 +58,7 @@ extern unsigned long s3c_pm_flags;
 
 extern int s3c2410_cpu_suspend(unsigned long);
 
-#ifdef CONFIG_SAMSUNG_PM
+#ifdef CONFIG_PM_SLEEP
 extern int s3c_irq_wake(struct irq_data *data, unsigned int state);
 extern int s3c_irqext_wake(struct irq_data *data, unsigned int state);
 extern void s3c_cpu_resume(void);
-- 
2.1.0.rc2

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/9] ARM: s3c64xx: fix __initdata section mismatch
  2015-02-12 19:35 [PATCH 0/9] ARM: samsung: randconfig build fixes Arnd Bergmann
  2015-02-12 19:35 ` [PATCH 1/9] ARM: s3c64xx: add I2C dependencies where needed Arnd Bergmann
  2015-02-12 19:35 ` [PATCH 2/9] ARM: s3c64xx: fix building without CONFIG_PM_SLEEP Arnd Bergmann
@ 2015-02-12 19:35 ` Arnd Bergmann
  2015-02-12 19:35 ` [PATCH 4/9] ARM: s3c24xx: use SAMSUNG_WAKEMASK for s3c2416 Arnd Bergmann
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2015-02-12 19:35 UTC (permalink / raw)
  To: linux-arm-kernel

smdk6410_b_pwr_5v_data is marked as __initdata, but referenced
from a structure that is not:

WARNING: arch/arm/mach-s3c64xx/built-in.o(.data+0x4c5c): Section mismatch in reference from the variable smdk6410_b_pwr_5v_data to the (unknown reference) .init.data:(unknown)

This removes the annotation to avoid an invalid pointer access
when the regulator driver accesses this variable.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index 661eb662d051..b7447a92276e 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -209,7 +209,7 @@ static struct platform_device smdk6410_smsc911x = {
 };
 
 #ifdef CONFIG_REGULATOR
-static struct regulator_consumer_supply smdk6410_b_pwr_5v_consumers[] __initdata = {
+static struct regulator_consumer_supply smdk6410_b_pwr_5v_consumers[] = {
 	REGULATOR_SUPPLY("PVDD", "0-001b"),
 	REGULATOR_SUPPLY("AVDD", "0-001b"),
 };
-- 
2.1.0.rc2

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 4/9] ARM: s3c24xx: use SAMSUNG_WAKEMASK for s3c2416
  2015-02-12 19:35 [PATCH 0/9] ARM: samsung: randconfig build fixes Arnd Bergmann
                   ` (2 preceding siblings ...)
  2015-02-12 19:35 ` [PATCH 3/9] ARM: s3c64xx: fix __initdata section mismatch Arnd Bergmann
@ 2015-02-12 19:35 ` Arnd Bergmann
  2015-02-12 19:35 ` [PATCH 5/9] ARM: s3c24xx: fix building without PM_SLEEP Arnd Bergmann
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2015-02-12 19:35 UTC (permalink / raw)
  To: linux-arm-kernel

Both s3c2412 and s3c2416 use the s3c2412_pm_prepare code, which
depends on the common wakemask code, but only s3c2412 currently
selects the code, leading to a build error for an s3c2416-only
kernel.

arch/arm/mach-s3c24xx/built-in.o: In function `s3c2412_pm_prepare':
:(.text+0x240): undefined reference to `samsung_sync_wakemask'
arch/arm/mach-s3c24xx/built-in.o:(.data+0xeb0): undefined reference to `s3c2412_subsys'

This adds the missing select.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index 79c49ff77f6e..389173690716 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -362,6 +362,7 @@ if CPU_S3C2416
 config S3C2416_PM
 	bool
 	select S3C2412_PM_SLEEP
+	select SAMSUNG_WAKEMASK
 	help
 	  Internal config node to apply S3C2416 power management
 
-- 
2.1.0.rc2

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 5/9] ARM: s3c24xx: fix building without PM_SLEEP
  2015-02-12 19:35 [PATCH 0/9] ARM: samsung: randconfig build fixes Arnd Bergmann
                   ` (3 preceding siblings ...)
  2015-02-12 19:35 ` [PATCH 4/9] ARM: s3c24xx: use SAMSUNG_WAKEMASK for s3c2416 Arnd Bergmann
@ 2015-02-12 19:35 ` Arnd Bergmann
  2015-02-12 19:35 ` [PATCH 6/9] ARM: s3c24xx: fix header file inclusions Arnd Bergmann
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2015-02-12 19:35 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 arch/arm/mach-s3c24xx/Kconfig           |  8 ++++----
 arch/arm/mach-s3c24xx/Makefile          |  3 ++-
 arch/arm/mach-s3c24xx/pm-s3c2416.c      |  3 ++-
 arch/arm/mach-s3c24xx/pm.c              |  6 ++++--
 arch/arm/mach-s3c24xx/s3c2410.c         |  2 +-
 arch/arm/mach-s3c24xx/s3c2412.c         |  2 +-
 arch/arm/mach-s3c24xx/s3c2416.c         |  2 +-
 arch/arm/mach-s3c24xx/s3c2440.c         |  4 ++--
 arch/arm/mach-s3c24xx/s3c2442.c         |  4 ++--
 arch/arm/mach-s3c24xx/s3c244x.c         |  7 ++-----
 arch/arm/plat-samsung/include/plat/pm.h | 12 ++++++++++--
 11 files changed, 31 insertions(+), 22 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
 	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.
 
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
 
 # 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
 
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 @@
 
 #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)
 {
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 @@
 
 #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
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)
 {
 	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
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)
 {
 	printk("S3C2412: Initialising architecture\n");
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 	register_syscore_ops(&s3c2412_pm_syscore_ops);
 	register_syscore_ops(&s3c24xx_irq_syscore_ops);
 #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)
 	s3c_adc_setname("s3c2416-adc");
 	s3c_rtc_setname("s3c2416-rtc");
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 	register_syscore_ops(&s3c2416_pm_syscore_ops);
 	register_syscore_ops(&s3c24xx_irq_syscore_ops);
 	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)
 
 	/* register suspend/resume handlers */
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 	register_syscore_ops(&s3c2410_pm_syscore_ops);
 	register_syscore_ops(&s3c24xx_irq_syscore_ops);
-#endif
 	register_syscore_ops(&s3c244x_pm_syscore_ops);
+#endif
 
 	/* register our system device for everything else */
 
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)
 {
 	printk("S3C2442: 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
 	register_syscore_ops(&s3c244x_pm_syscore_ops);
+#endif
 
 	return device_register(&s3c2442_dev);
 }
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)
 core_initcall(s3c2442_core_init);
 
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static struct sleep_save s3c244x_sleep[] = {
 	SAVE_ITEM(S3C2440_DSC0),
 	SAVE_ITEM(S3C2440_DSC1),
@@ -127,12 +127,9 @@ static void s3c244x_resume(void)
 {
 	s3c_pm_do_restore(s3c244x_sleep, ARRAY_SIZE(s3c244x_sleep));
 }
-#else
-#define s3c244x_suspend NULL
-#define s3c244x_resume  NULL
-#endif
 
 struct syscore_ops s3c244x_pm_syscore_ops = {
 	.suspend	= s3c244x_suspend,
 	.resume		= s3c244x_resume,
 };
+#endif
diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h
index e5a046dc22f5..7f415ce74591 100644
--- a/arch/arm/plat-samsung/include/plat/pm.h
+++ b/arch/arm/plat-samsung/include/plat/pm.h
@@ -43,7 +43,11 @@ extern unsigned long s3c_irqwake_eintmask;
 
 /* IRQ masks for IRQs allowed to go to sleep (see irq.c) */
 extern unsigned long s3c_irqwake_intallow;
+#ifdef CONFIG_PM_SLEEP
 extern unsigned long s3c_irqwake_eintallow;
+#else
+#define s3c_irqwake_eintallow 0
+#endif
 
 /* per-cpu sleep functions */
 
@@ -60,14 +64,18 @@ extern int s3c2410_cpu_suspend(unsigned long);
 
 #ifdef CONFIG_PM_SLEEP
 extern int s3c_irq_wake(struct irq_data *data, unsigned int state);
-extern int s3c_irqext_wake(struct irq_data *data, unsigned int state);
 extern void s3c_cpu_resume(void);
 #else
 #define s3c_irq_wake NULL
-#define s3c_irqext_wake NULL
 #define s3c_cpu_resume NULL
 #endif
 
+#ifdef CONFIG_SAMSUNG_PM
+extern int s3c_irqext_wake(struct irq_data *data, unsigned int state);
+#else
+#define s3c_irqext_wake NULL
+#endif
+
 #ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK
 /**
  * s3c_pm_debug_smdkled() - Debug PM suspend/resume via SMDK Board LEDs
-- 
2.1.0.rc2

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 6/9] ARM: s3c24xx: fix header file inclusions
  2015-02-12 19:35 [PATCH 0/9] ARM: samsung: randconfig build fixes Arnd Bergmann
                   ` (4 preceding siblings ...)
  2015-02-12 19:35 ` [PATCH 5/9] ARM: s3c24xx: fix building without PM_SLEEP Arnd Bergmann
@ 2015-02-12 19:35 ` Arnd Bergmann
  2015-02-12 19:35 ` [PATCH 7/9] ARM: s3c24xx: avoid a Kconfig warning Arnd Bergmann
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2015-02-12 19:35 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 arch/arm/mach-s3c24xx/include/mach/pm-core.h | 24 ++++++++++++++++++++++--
 arch/arm/plat-samsung/pm-debug.c             |  1 +
 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 @@
  * it under the terms of the GNU General Public License version 2 as
  * 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)
 {
@@ -42,8 +47,23 @@ static inline void s3c_pm_arch_stop_clocks(void)
 	__raw_writel(0x00, S3C2410_CLKCON);  /* turn off clocks over sleep */
 }
 
-static void s3c_pm_show_resume_irqs(int start, unsigned long which,
-				    unsigned long mask);
+/* s3c2410_pm_show_resume_irqs
+ *
+ * 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@resume\n", start+i);
+		}
+	}
+}
 
 static inline void s3c_pm_arch_show_resume_irqs(void)
 {
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 @@
 #include <plat/pm-common.h>
 
 #ifdef CONFIG_SAMSUNG_ATAGS
+#include <plat/pm.h>
 #include <mach/pm-core.h>
 #else
 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)
 	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@resume\n", start+i);
-		}
-	}
-}
-
-
 void (*pm_cpu_prep)(void);
 int (*pm_cpu_sleep)(unsigned long);
 
-- 
2.1.0.rc2

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 7/9] ARM: s3c24xx: avoid a Kconfig warning
  2015-02-12 19:35 [PATCH 0/9] ARM: samsung: randconfig build fixes Arnd Bergmann
                   ` (5 preceding siblings ...)
  2015-02-12 19:35 ` [PATCH 6/9] ARM: s3c24xx: fix header file inclusions Arnd Bergmann
@ 2015-02-12 19:35 ` Arnd Bergmann
  2015-02-18  0:21 ` [PATCH 0/9] ARM: samsung: randconfig build fixes Kukjin Kim
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2015-02-12 19:35 UTC (permalink / raw)
  To: linux-arm-kernel

The PM_H1940 symbol is used by two platforms: RX3715 and RX1950. However,
it is hidden inside of the the CPU_S3C2410 conditional, which is only
set by one of them, so we get a lot of randconfig warnings like

warning: (MACH_RX3715 && MACH_RX1950) selects PM_H1940 which has unmet direct dependencies (ARCH_S3C24XX && CPU_S3C2410)

This moves it outside of the conditional to remove the warnings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-s3c24xx/Kconfig | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index a6d3b5bcc4c2..23bec3a85b22 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -228,11 +228,6 @@ config H1940BT
 	  This is a simple driver that is able to control
 	  the state of built in bluetooth chip on h1940.
 
-config PM_H1940
-	bool
-	help
-	  Internal node for H1940 and related PM
-
 config MACH_N30
 	bool "Acer N30 family"
 	select S3C_DEV_NAND
@@ -585,6 +580,11 @@ config MACH_SMDK2443
 
 endif	# CPU_S3C2443
 
+config PM_H1940
+	bool
+	help
+	  Internal node for H1940 and related PM
+
 endmenu	# SAMSUNG S3C24XX SoCs Support
 
 endif	# ARCH_S3C24XX
-- 
2.1.0.rc2

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 0/9] ARM: samsung: randconfig build fixes
  2015-02-12 19:35 [PATCH 0/9] ARM: samsung: randconfig build fixes Arnd Bergmann
                   ` (6 preceding siblings ...)
  2015-02-12 19:35 ` [PATCH 7/9] ARM: s3c24xx: avoid a Kconfig warning Arnd Bergmann
@ 2015-02-18  0:21 ` Kukjin Kim
  2015-03-02 19:50   ` Kukjin Kim
  2015-03-02 21:28 ` [PATCH 8/9] ARM: EXYNOS: suspend requires regulator access Arnd Bergmann
  2015-03-02 21:29 ` [PATCH 9/9] ARM: EXYNOS: make exynos 4210 cpuidle build without SMP Arnd Bergmann
  9 siblings, 1 reply; 17+ messages in thread
From: Kukjin Kim @ 2015-02-18  0:21 UTC (permalink / raw)
  To: linux-arm-kernel

Arnd Bergmann wrote:
> 
> This is a set of mostly trivial build fixes for bugs I have encountered
> in random configurations. I'm sending them separate from the other
> platforms since we have a lot of them for the various samsung platforms
> here.
> 
> Kukjin, please pick them up into a fixes branch for 3.20 or send
> an Ack so we can apply them directly.
> 
Sure, I will create a branch for them in this week. IMO, would be better if I
could make a non-critical fixes branch for v3.20 in Samsung tree for further
other Samsung stuff for v3.20 ;)

> Let me know if anything looks wrong with some of the patches.

OK, if anything I'll let you know.

Thanks for your pointing out.
Happy new year again! (Actually it's the Lunar New Year holidays now)

- Kukjin

> Arnd Bergmann (9):
>   ARM: s3c64xx: add I2C dependencies where needed
>   ARM: s3c64xx: fix building without CONFIG_PM_SLEEP
>   ARM: s3c64xx: fix __initdata section mismatch
>   ARM: s3c24xx: use SAMSUNG_WAKEMASK for s3c2416
>   ARM: s3c24xx: fix building without PM_SLEEP
>   ARM: s3c24xx: fix header file inclusions
>   ARM: s3c24xx: avoid a Kconfig warning
>   ARM: EXYNOS: suspend requires regulator access
>   ARM: EXYNOS: make exynos 4210 cpuidle build without SMP
> 
>  arch/arm/mach-exynos/Kconfig                 |  1 +
>  arch/arm/mach-exynos/pm.c                    | 19 +++++++++++++++----
>  arch/arm/mach-s3c24xx/Kconfig                | 19 ++++++++++---------
>  arch/arm/mach-s3c24xx/Makefile               |  3 ++-
>  arch/arm/mach-s3c24xx/include/mach/pm-core.h | 24 ++++++++++++++++++++++--
>  arch/arm/mach-s3c24xx/pm-s3c2416.c           |  3 ++-
>  arch/arm/mach-s3c24xx/pm.c                   |  6 ++++--
>  arch/arm/mach-s3c24xx/s3c2410.c              |  2 +-
>  arch/arm/mach-s3c24xx/s3c2412.c              |  2 +-
>  arch/arm/mach-s3c24xx/s3c2416.c              |  2 +-
>  arch/arm/mach-s3c24xx/s3c2440.c              |  4 ++--
>  arch/arm/mach-s3c24xx/s3c2442.c              |  4 ++--
>  arch/arm/mach-s3c24xx/s3c244x.c              |  7 ++-----
>  arch/arm/mach-s3c64xx/Kconfig                |  4 +++-
>  arch/arm/mach-s3c64xx/Makefile               |  3 ++-
>  arch/arm/mach-s3c64xx/mach-smdk6410.c        |  2 +-
>  arch/arm/mach-s3c64xx/pm.c                   |  2 ++
>  arch/arm/plat-samsung/include/plat/pm.h      | 14 +++++++++++---
>  arch/arm/plat-samsung/pm-debug.c             |  1 +
>  arch/arm/plat-samsung/pm.c                   | 20 --------------------
>  20 files changed, 85 insertions(+), 57 deletions(-)
> 
> --

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 0/9] ARM: samsung: randconfig build fixes
  2015-02-18  0:21 ` [PATCH 0/9] ARM: samsung: randconfig build fixes Kukjin Kim
@ 2015-03-02 19:50   ` Kukjin Kim
  2015-03-02 21:28     ` Arnd Bergmann
  0 siblings, 1 reply; 17+ messages in thread
From: Kukjin Kim @ 2015-03-02 19:50 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/18/15 09:21, Kukjin Kim wrote:
> Arnd Bergmann wrote:
>>
>> This is a set of mostly trivial build fixes for bugs I have encountered
>> in random configurations. I'm sending them separate from the other
>> platforms since we have a lot of them for the various samsung platforms
>> here.
>>
>> Kukjin, please pick them up into a fixes branch for 3.20 or send
>> an Ack so we can apply them directly.
>>
> Sure, I will create a branch for them in this week. IMO, would be better if I
> could make a non-critical fixes branch for v3.20 in Samsung tree for further
> other Samsung stuff for v3.20 ;)
> 
>> Let me know if anything looks wrong with some of the patches.
> 
> OK, if anything I'll let you know.
> 
> Thanks for your pointing out.
> Happy new year again! (Actually it's the Lunar New Year holidays now)
> 
> - Kukjin
> 
>> Arnd Bergmann (9):
>>   ARM: s3c64xx: add I2C dependencies where needed
>>   ARM: s3c64xx: fix building without CONFIG_PM_SLEEP
>>   ARM: s3c64xx: fix __initdata section mismatch
>>   ARM: s3c24xx: use SAMSUNG_WAKEMASK for s3c2416
>>   ARM: s3c24xx: fix building without PM_SLEEP
>>   ARM: s3c24xx: fix header file inclusions
>>   ARM: s3c24xx: avoid a Kconfig warning
>>   ARM: EXYNOS: suspend requires regulator access
>>   ARM: EXYNOS: make exynos 4210 cpuidle build without SMP

Arnd,

BTW, I can't see exynos related patches in my mailbox, I don't know the
reason...can you please re-send it?

Thanks,
Kukjin

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 0/9] ARM: samsung: randconfig build fixes
  2015-03-02 19:50   ` Kukjin Kim
@ 2015-03-02 21:28     ` Arnd Bergmann
  0 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2015-03-02 21:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 03 March 2015 04:50:23 Kukjin Kim wrote:
> On 02/18/15 09:21, Kukjin Kim wrote:
> > Arnd Bergmann wrote:
> >>
> >> This is a set of mostly trivial build fixes for bugs I have encountered
> >> in random configurations. I'm sending them separate from the other
> >> platforms since we have a lot of them for the various samsung platforms
> >> here.
> >>
> >> Kukjin, please pick them up into a fixes branch for 3.20 or send
> >> an Ack so we can apply them directly.
> >>
> > Sure, I will create a branch for them in this week. IMO, would be better if I
> > could make a non-critical fixes branch for v3.20 in Samsung tree for further
> > other Samsung stuff for v3.20 
> > 
> >> Let me know if anything looks wrong with some of the patches.
> > 
> > OK, if anything I'll let you know.
> > 
> > Thanks for your pointing out.
> > Happy new year again! (Actually it's the Lunar New Year holidays now)
> > 
> > - Kukjin
> > 
> >> Arnd Bergmann (9):
> >>   ARM: s3c64xx: add I2C dependencies where needed
> >>   ARM: s3c64xx: fix building without CONFIG_PM_SLEEP
> >>   ARM: s3c64xx: fix __initdata section mismatch
> >>   ARM: s3c24xx: use SAMSUNG_WAKEMASK for s3c2416
> >>   ARM: s3c24xx: fix building without PM_SLEEP
> >>   ARM: s3c24xx: fix header file inclusions
> >>   ARM: s3c24xx: avoid a Kconfig warning
> >>   ARM: EXYNOS: suspend requires regulator access
> >>   ARM: EXYNOS: make exynos 4210 cpuidle build without SMP
> 
> Arnd,
> 
> BTW, I can't see exynos related patches in my mailbox, I don't know the
> reason...can you please re-send it?

Thanks for letting me know. It was a problem on my side with git-send-email
when sending them out. I'll send them using my normal mail client now.

	Arnd

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 8/9] ARM: EXYNOS: suspend requires regulator access
  2015-02-12 19:35 [PATCH 0/9] ARM: samsung: randconfig build fixes Arnd Bergmann
                   ` (7 preceding siblings ...)
  2015-02-18  0:21 ` [PATCH 0/9] ARM: samsung: randconfig build fixes Kukjin Kim
@ 2015-03-02 21:28 ` Arnd Bergmann
  2015-03-03  7:29   ` Javier Martinez Canillas
  2015-03-04 19:44   ` Krzysztof Kozłowski
  2015-03-02 21:29 ` [PATCH 9/9] ARM: EXYNOS: make exynos 4210 cpuidle build without SMP Arnd Bergmann
  9 siblings, 2 replies; 17+ messages in thread
From: Arnd Bergmann @ 2015-03-02 21:28 UTC (permalink / raw)
  To: linux-arm-kernel

Building an exynos kernel without regulators but with suspend enabled results
in a link error:

arch/arm/mach-exynos/built-in.o: In function `exynos_suspend_finish':
arch/arm/mach-exynos/suspend.c:532: undefined reference to `regulator_suspend_finish'
arch/arm/mach-exynos/built-in.o: In function `exynos_suspend_prepare':
arch/arm/mach-exynos/suspend.c:515: undefined reference to `regulator_suspend_prepare'

This adds an appropriate 'select' statement in Kconfig to ensure the symbols
are available.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-exynos/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 603820e5aba7..f4bd06370ad8 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -22,6 +22,7 @@ menuconfig ARCH_EXYNOS
 	select PINCTRL
 	select PINCTRL_EXYNOS
 	select PM_GENERIC_DOMAINS if PM
+	select REGULATOR if PM_SLEEP
 	select S5P_DEV_MFC
 	select SRAM
 	select MFD_SYSCON
-- 
2.1.0.rc2

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 9/9] ARM: EXYNOS: make exynos 4210 cpuidle build without SMP
  2015-02-12 19:35 [PATCH 0/9] ARM: samsung: randconfig build fixes Arnd Bergmann
                   ` (8 preceding siblings ...)
  2015-03-02 21:28 ` [PATCH 8/9] ARM: EXYNOS: suspend requires regulator access Arnd Bergmann
@ 2015-03-02 21:29 ` Arnd Bergmann
  2015-03-03 12:35   ` Bartlomiej Zolnierkiewicz
  9 siblings, 1 reply; 17+ messages in thread
From: Arnd Bergmann @ 2015-03-02 21:29 UTC (permalink / raw)
  To: linux-arm-kernel

arch/arm/mach-exynos/pm.c: In function 'exynos_cpu0_enter_aftr':
arch/arm/mach-exynos/pm.c:246:4: error: implicit declaration of function 'arch_send_wakeup_ipi_mask' [-Werror=implicit-function-declaration]
    arch_send_wakeup_ipi_mask(cpumask_of(1));

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-exynos/pm.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index e6209dadc00d..a91aefaee31d 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -187,6 +187,7 @@ static int exynos_cpu0_enter_aftr(void)
 {
 	int ret = -1;
 
+#ifdef CONFIG_SMP
 	/*
 	 * If the other cpu is powered on, we have to power it off, because
 	 * the AFTR state won't work otherwise
@@ -216,10 +217,12 @@ static int exynos_cpu0_enter_aftr(void)
 			cpu_relax();
 		}
 	}
+#endif
 
 	exynos_enter_aftr();
 	ret = 0;
 
+#ifdef CONFIG_SMP
 abort:
 	if (cpu_online(1)) {
 		/*
@@ -246,11 +249,12 @@ abort:
 			arch_send_wakeup_ipi_mask(cpumask_of(1));
 		}
 	}
+#endif
 
 	return ret;
 }
 
-static int exynos_wfi_finisher(unsigned long flags)
+static int __maybe_unused exynos_wfi_finisher(unsigned long flags)
 {
 	cpu_do_idle();
 
@@ -260,7 +264,7 @@ static int exynos_wfi_finisher(unsigned long flags)
 static int exynos_cpu1_powerdown(void)
 {
 	int ret = -1;
-
+#ifdef CONFIG_SMP
 	/*
 	 * Idle sequence for cpu1
 	 */
@@ -282,13 +286,20 @@ cpu1_aborted:
 	 * Notify cpu 0 that cpu 1 is awake
 	 */
 	atomic_set(&cpu1_wakeup, 1);
-
+#endif
 	return ret;
 }
 
 static void exynos_pre_enter_aftr(void)
 {
-	__raw_writel(virt_to_phys(exynos_cpu_resume), cpu_boot_reg_base());
+	void *reg_base;
+
+	if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1)
+		reg_base = pmu_base_addr + S5P_INFORM5;
+	else
+		reg_base = sysram_base_addr;
+
+	__raw_writel(virt_to_phys(exynos_cpu_resume), reg_base);
 }
 
 static void exynos_post_enter_aftr(void)
-- 
2.1.0.rc2

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 8/9] ARM: EXYNOS: suspend requires regulator access
  2015-03-02 21:28 ` [PATCH 8/9] ARM: EXYNOS: suspend requires regulator access Arnd Bergmann
@ 2015-03-03  7:29   ` Javier Martinez Canillas
  2015-03-04 19:44   ` Krzysztof Kozłowski
  1 sibling, 0 replies; 17+ messages in thread
From: Javier Martinez Canillas @ 2015-03-03  7:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Arnd,

On Mon, Mar 2, 2015 at 10:28 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> Building an exynos kernel without regulators but with suspend enabled results
> in a link error:
>
> arch/arm/mach-exynos/built-in.o: In function `exynos_suspend_finish':
> arch/arm/mach-exynos/suspend.c:532: undefined reference to `regulator_suspend_finish'
> arch/arm/mach-exynos/built-in.o: In function `exynos_suspend_prepare':
> arch/arm/mach-exynos/suspend.c:515: undefined reference to `regulator_suspend_prepare'
>
> This adds an appropriate 'select' statement in Kconfig to ensure the symbols
> are available.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

The patch looks good to me.

Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>

Best regards,
Javier

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 9/9] ARM: EXYNOS: make exynos 4210 cpuidle build without SMP
  2015-03-02 21:29 ` [PATCH 9/9] ARM: EXYNOS: make exynos 4210 cpuidle build without SMP Arnd Bergmann
@ 2015-03-03 12:35   ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 17+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2015-03-03 12:35 UTC (permalink / raw)
  To: linux-arm-kernel


Hi,

Have you seen my patch from 4th February?

	https://lkml.org/lkml/2015/2/4/521

I think that it is cleaner as it doesn't add new ifdefs,
results in less code being compiled for UP and doesn't
open-code cpu_boot_reg_base().  It has also been tested
on Exynos4210 Origen board.

PS Please cc: me and Daniel on Exynos cpuidle changes
(MAINTAINERS file contains a relevant entry).

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

On Monday, March 02, 2015 10:29:42 PM Arnd Bergmann wrote:
> arch/arm/mach-exynos/pm.c: In function 'exynos_cpu0_enter_aftr':
> arch/arm/mach-exynos/pm.c:246:4: error: implicit declaration of function 'arch_send_wakeup_ipi_mask' [-Werror=implicit-function-declaration]
>     arch_send_wakeup_ipi_mask(cpumask_of(1));
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-exynos/pm.c | 19 +++++++++++++++----
>  1 file changed, 15 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
> index e6209dadc00d..a91aefaee31d 100644
> --- a/arch/arm/mach-exynos/pm.c
> +++ b/arch/arm/mach-exynos/pm.c
> @@ -187,6 +187,7 @@ static int exynos_cpu0_enter_aftr(void)
>  {
>  	int ret = -1;
>  
> +#ifdef CONFIG_SMP
>  	/*
>  	 * If the other cpu is powered on, we have to power it off, because
>  	 * the AFTR state won't work otherwise
> @@ -216,10 +217,12 @@ static int exynos_cpu0_enter_aftr(void)
>  			cpu_relax();
>  		}
>  	}
> +#endif
>  
>  	exynos_enter_aftr();
>  	ret = 0;
>  
> +#ifdef CONFIG_SMP
>  abort:
>  	if (cpu_online(1)) {
>  		/*
> @@ -246,11 +249,12 @@ abort:
>  			arch_send_wakeup_ipi_mask(cpumask_of(1));
>  		}
>  	}
> +#endif
>  
>  	return ret;
>  }
>  
> -static int exynos_wfi_finisher(unsigned long flags)
> +static int __maybe_unused exynos_wfi_finisher(unsigned long flags)
>  {
>  	cpu_do_idle();
>  
> @@ -260,7 +264,7 @@ static int exynos_wfi_finisher(unsigned long flags)
>  static int exynos_cpu1_powerdown(void)
>  {
>  	int ret = -1;
> -
> +#ifdef CONFIG_SMP
>  	/*
>  	 * Idle sequence for cpu1
>  	 */
> @@ -282,13 +286,20 @@ cpu1_aborted:
>  	 * Notify cpu 0 that cpu 1 is awake
>  	 */
>  	atomic_set(&cpu1_wakeup, 1);
> -
> +#endif
>  	return ret;
>  }
>  
>  static void exynos_pre_enter_aftr(void)
>  {
> -	__raw_writel(virt_to_phys(exynos_cpu_resume), cpu_boot_reg_base());
> +	void *reg_base;
> +
> +	if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1)
> +		reg_base = pmu_base_addr + S5P_INFORM5;
> +	else
> +		reg_base = sysram_base_addr;
> +
> +	__raw_writel(virt_to_phys(exynos_cpu_resume), reg_base);
>  }
>  
>  static void exynos_post_enter_aftr(void)
> 
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 8/9] ARM: EXYNOS: suspend requires regulator access
  2015-03-02 21:28 ` [PATCH 8/9] ARM: EXYNOS: suspend requires regulator access Arnd Bergmann
  2015-03-03  7:29   ` Javier Martinez Canillas
@ 2015-03-04 19:44   ` Krzysztof Kozłowski
  2015-03-04 21:14     ` Arnd Bergmann
  1 sibling, 1 reply; 17+ messages in thread
From: Krzysztof Kozłowski @ 2015-03-04 19:44 UTC (permalink / raw)
  To: linux-arm-kernel

W dniu poniedzia?ek, 2 marca 2015 Arnd Bergmann <arnd@arndb.de> napisa?(a):
>
> Building an exynos kernel without regulators but with suspend enabled results
> in a link error:
>
> arch/arm/mach-exynos/built-in.o: In function `exynos_suspend_finish':
> arch/arm/mach-exynos/suspend.c:532: undefined reference to `regulator_suspend_finish'
> arch/arm/mach-exynos/built-in.o: In function `exynos_suspend_prepare':
> arch/arm/mach-exynos/suspend.c:515: undefined reference to `regulator_suspend_prepare'
>
> This adds an appropriate 'select' statement in Kconfig to ensure the symbols
> are available.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>


Isn't this fixed already by:?https://lkml.org/lkml/2015/2/4/119
(applied by Mark Brown)?

I can't test it now (I am out of office) but issue looks quite similar.

Best regards,
Krzysztof

>
> ---
> ?arch/arm/mach-exynos/Kconfig | 1 +
> ?1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
> index 603820e5aba7..f4bd06370ad8 100644
> --- a/arch/arm/mach-exynos/Kconfig
> +++ b/arch/arm/mach-exynos/Kconfig
> @@ -22,6 +22,7 @@ menuconfig ARCH_EXYNOS
> ? ? ? ? select PINCTRL
> ? ? ? ? select PINCTRL_EXYNOS
> ? ? ? ? select PM_GENERIC_DOMAINS if PM
> +? ? ? ?select REGULATOR if PM_SLEEP
> ? ? ? ? select S5P_DEV_MFC
> ? ? ? ? select SRAM
> ? ? ? ? select MFD_SYSCON
> --
> 2.1.0.rc2
>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 8/9] ARM: EXYNOS: suspend requires regulator access
  2015-03-04 19:44   ` Krzysztof Kozłowski
@ 2015-03-04 21:14     ` Arnd Bergmann
  0 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2015-03-04 21:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 04 March 2015 20:44:07 Krzysztof Koz?owski wrote:
> W dniu poniedzia?ek, 2 marca 2015 Arnd Bergmann <arnd@arndb.de> napisa?(a):
> >
> > Building an exynos kernel without regulators but with suspend enabled results
> > in a link error:
> >
> > arch/arm/mach-exynos/built-in.o: In function `exynos_suspend_finish':
> > arch/arm/mach-exynos/suspend.c:532: undefined reference to `regulator_suspend_finish'
> > arch/arm/mach-exynos/built-in.o: In function `exynos_suspend_prepare':
> > arch/arm/mach-exynos/suspend.c:515: undefined reference to `regulator_suspend_prepare'
> >
> > This adds an appropriate 'select' statement in Kconfig to ensure the symbols
> > are available.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> 
> Isn't this fixed already by: https://lkml.org/lkml/2015/2/4/119
> (applied by Mark Brown)?
> 
> I can't test it now (I am out of office) but issue looks quite similar.
> 
> 

Yes, that is probably right.

Thanks,

	Arnd

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-03-04 21:14 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-12 19:35 [PATCH 0/9] ARM: samsung: randconfig build fixes Arnd Bergmann
2015-02-12 19:35 ` [PATCH 1/9] ARM: s3c64xx: add I2C dependencies where needed Arnd Bergmann
2015-02-12 19:35 ` [PATCH 2/9] ARM: s3c64xx: fix building without CONFIG_PM_SLEEP Arnd Bergmann
2015-02-12 19:35 ` [PATCH 3/9] ARM: s3c64xx: fix __initdata section mismatch Arnd Bergmann
2015-02-12 19:35 ` [PATCH 4/9] ARM: s3c24xx: use SAMSUNG_WAKEMASK for s3c2416 Arnd Bergmann
2015-02-12 19:35 ` [PATCH 5/9] ARM: s3c24xx: fix building without PM_SLEEP Arnd Bergmann
2015-02-12 19:35 ` [PATCH 6/9] ARM: s3c24xx: fix header file inclusions Arnd Bergmann
2015-02-12 19:35 ` [PATCH 7/9] ARM: s3c24xx: avoid a Kconfig warning Arnd Bergmann
2015-02-18  0:21 ` [PATCH 0/9] ARM: samsung: randconfig build fixes Kukjin Kim
2015-03-02 19:50   ` Kukjin Kim
2015-03-02 21:28     ` Arnd Bergmann
2015-03-02 21:28 ` [PATCH 8/9] ARM: EXYNOS: suspend requires regulator access Arnd Bergmann
2015-03-03  7:29   ` Javier Martinez Canillas
2015-03-04 19:44   ` Krzysztof Kozłowski
2015-03-04 21:14     ` Arnd Bergmann
2015-03-02 21:29 ` [PATCH 9/9] ARM: EXYNOS: make exynos 4210 cpuidle build without SMP Arnd Bergmann
2015-03-03 12:35   ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).