Skip to contentSkip to conversation

ARM: samsung: randconfig build fixes

PATCH New Arnd Bergmann 5 participants 17 messages Feb 12, 2015 – Mar 4, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover ARM: samsung: randconfig build fixes

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(-)
Signature · 1 line
2.1.0.rc2
#1 lore raw

PATCH 1/9 ARM: s3c64xx: add I2C dependencies where needed

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.

Cc Kukjin Kim <[email protected]>
Cc Tomasz Figa <[email protected]>
Cc Ben Dooks <[email protected]>
---
 arch/arm/mach-s3c64xx/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/mach-s3c64xx/Kconfig +3 -1
index 26ca2427e53d..eff95e950d81 100644
@@ -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
Signature · 1 line
2.1.0.rc2
#2 lore raw

PATCH 2/9 ARM: s3c64xx: fix building without CONFIG_PM_SLEEP

In reply to Arnd Bergmann

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'

---
 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(-)
arch/arm/mach-s3c64xx/Makefile +2 -1
index 12f67b61ca5f..17f4b07ec763 100644
@@ -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
arch/arm/mach-s3c64xx/pm.c +2 -0
index aaf7bea4032f..75b14e756383 100644
@@ -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
arch/arm/plat-samsung/include/plat/pm.h +1 -1
index e17d871b934c..e5a046dc22f5 100644
@@ -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);
Signature · 1 line
2.1.0.rc2
#3 lore raw

PATCH 3/9 ARM: s3c64xx: fix __initdata section mismatch

In reply to Arnd Bergmann

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.

---
 arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-s3c64xx/mach-smdk6410.c +1 -1
index 661eb662d051..b7447a92276e 100644
@@ -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"),
 };
Signature · 1 line
2.1.0.rc2
#4 lore raw

PATCH 4/9 ARM: s3c24xx: use SAMSUNG_WAKEMASK for s3c2416

In reply to Arnd Bergmann

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.

---
 arch/arm/mach-s3c24xx/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-s3c24xx/Kconfig +1 -0
index 79c49ff77f6e..389173690716 100644
@@ -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
 
Signature · 1 line
2.1.0.rc2
#5 lore raw

PATCH 5/9 ARM: s3c24xx: fix building without PM_SLEEP

In reply to Arnd Bergmann

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.

---
 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(-)
arch/arm/mach-s3c24xx/Kconfig +4 -4
index 389173690716..a6d3b5bcc4c2 100644
@@ -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.
 
arch/arm/mach-s3c24xx/Makefile +2 -1
index b40a22fe082a..05920c8a5764 100644
@@ -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
 
arch/arm/mach-s3c24xx/pm-s3c2416.c +2 -1
index 44923895f558..c0e328e37bd6 100644
@@ -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)
 {
arch/arm/mach-s3c24xx/pm.c +4 -2
index b19256ec8d40..5d510bca0844 100644
@@ -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
arch/arm/mach-s3c24xx/s3c2410.c +1 -1
index 2a6985a4a0ff..5061d66ca10c 100644
@@ -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
arch/arm/mach-s3c24xx/s3c2412.c +1 -1
index ecf2c77ab88b..64a13605cfc3 100644
@@ -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
arch/arm/mach-s3c24xx/s3c2416.c +1 -1
index bfd4da86deb8..3f8ca2a3ef17 100644
@@ -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);
arch/arm/mach-s3c24xx/s3c2440.c +2 -2
index 03d379f1fc52..eb733555fab5 100644
@@ -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 */
 
arch/arm/mach-s3c24xx/s3c2442.c +2 -2
index 7b043349f1c8..893998ede022 100644
@@ -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);
 }
arch/arm/mach-s3c24xx/s3c244x.c +2 -5
index 177f97802745..b14119585dc7 100644
@@ -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
arch/arm/plat-samsung/include/plat/pm.h +10 -2
index e5a046dc22f5..7f415ce74591 100644
@@ -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
Signature · 1 line
2.1.0.rc2
#6 lore raw

PATCH 6/9 ARM: s3c24xx: fix header file inclusions

In reply to Arnd Bergmann

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.

---
 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(-)
arch/arm/mach-s3c24xx/include/mach/pm-core.h +22 -2
index 2eef7e6f7675..69459dbbdcad 100644
@@ -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)
 {
arch/arm/plat-samsung/pm-debug.c +1 -0
index 39609601f407..64e15da33b42 100644
@@ -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) {}
arch/arm/plat-samsung/pm.c +0 -20
index f8c0f9797dcf..82777c649774 100644
@@ -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);
 
Signature · 1 line
2.1.0.rc2
#7 lore raw

PATCH 7/9 ARM: s3c24xx: avoid a Kconfig warning

In reply to Arnd Bergmann

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.

---
 arch/arm/mach-s3c24xx/Kconfig | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm/mach-s3c24xx/Kconfig +5 -5
index a6d3b5bcc4c2..23bec3a85b22 100644
@@ -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
Signature · 1 line
2.1.0.rc2
maintainer
#8 lore raw

cover ARM: samsung: randconfig build fixes

In reply to Arnd Bergmann
Quoted 9 lines · Arnd Bergmann

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 ;)

Quoted 1 line

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

Quoted 34 lines

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(-)

--

maintainer
#9 lore raw

cover ARM: samsung: randconfig build fixes

Quoted 14 lines · Kukjin Kim
Quoted 9 lines · Arnd Bergmann

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 ;)

Quoted 19 lines
Quoted 1 line

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

Quoted 10 lines

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

#10 lore raw

cover ARM: samsung: randconfig build fixes

Quoted 35 lines · On Tuesday 03 March 2015 04:50:23 Kukjin Kim wrote:
Quoted 14 lines · Kukjin Kim
Quoted 9 lines · Arnd Bergmann

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

Quoted 19 lines
Quoted 1 line

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

Quoted 10 lines

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

Quoted 4 lines

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

#11 lore raw

PATCH 8/9 ARM: EXYNOS: suspend requires regulator access

In reply to Arnd Bergmann

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.

---
 arch/arm/mach-exynos/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-exynos/Kconfig +1 -0
index 603820e5aba7..f4bd06370ad8 100644
@@ -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
Signature · 1 line
2.1.0.rc2
#12 lore raw

PATCH 8/9 ARM: EXYNOS: suspend requires regulator access

Hello Arnd,

Quoted 8 lines · Arnd Bergmann

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'

Quoted 4 lines

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

The patch looks good to me.

Best regards,
Javier

#13 lore raw

PATCH 8/9 ARM: EXYNOS: suspend requires regulator access

In reply to Arnd Bergmann

W dniu poniedzia?ek, 2 marca 2015 Arnd Bergmann <[email protected]> napisa?(a):

Quoted 9 lines

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'

Quoted 4 lines

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

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

Quoted 26 lines

---
?arch/arm/mach-exynos/Kconfig | 1 +
?1 file changed, 1 insertion(+)

arch/arm/mach-exynos/Kconfig +0 -0
index 603820e5aba7..f4bd06370ad8 100644
@@ -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

#14 lore raw

PATCH 8/9 ARM: EXYNOS: suspend requires regulator access

Quoted 13 lines · On Wednesday 04 March 2015 20:44:07 Krzysztof Koz?owski wrote:

W dniu poniedzia?ek, 2 marca 2015 Arnd Bergmann <[email protected]> napisa?(a):

Quoted 12 lines

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.

Quoted 9 lines
Quoted 1 line

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

#15 lore raw

PATCH 9/9 ARM: EXYNOS: make exynos 4210 cpuidle build without SMP

In reply to Arnd Bergmann

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));
---
 arch/arm/mach-exynos/pm.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
arch/arm/mach-exynos/pm.c +15 -4
index e6209dadc00d..a91aefaee31d 100644
@@ -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)
Signature · 1 line
2.1.0.rc2
#16 lore raw

PATCH 9/9 ARM: EXYNOS: make exynos 4210 cpuidle build without SMP

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

Quoted 71 lines · Arnd Bergmann

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));
---
 arch/arm/mach-exynos/pm.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
arch/arm/mach-exynos/pm.c +8 -4
index e6209dadc00d..a91aefaee31d 100644
@@ -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;

arch/arm/mach-exynos/pm.c cpu1_aborted: · line 305

Quoted 10 lines
arch/arm/mach-exynos/pm.c +7 -0
+
+	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