From 261592e6b804c288d2010e98ee100548dbe91c06 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 27 Feb 2015 05:50:21 +0900 Subject: 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. Signed-off-by: Arnd Bergmann Cc: Kukjin Kim Cc: Tomasz Figa Cc: Ben Dooks Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c64xx/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-s3c64xx') 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 -- cgit v1.2.3 From 484c213b106c2b9188744666693d57bb9fd5affe Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 27 Feb 2015 05:50:22 +0900 Subject: ARM: S3C64XX: fix building without CONFIG_PM_SLEEP 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 Signed-off-by: Kukjin Kim --- 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(-) (limited to 'arch/arm/mach-s3c64xx') 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); -- cgit v1.2.3 From 19c69dafad673f342b8eb9dbc6a1ac9fa38b4f9f Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 27 Feb 2015 05:50:22 +0900 Subject: ARM: S3C64XX: fix __initdata section mismatch 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 Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-s3c64xx') 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"), }; -- cgit v1.2.3