From 29fb58dc3cf2d4ada1a32eb9b000c18871d9b691 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Wed, 16 Jan 2013 15:53:48 -0800 Subject: ARM: S3C24XX: Make 'clk_msysclk' static Fixes the following warning: arch/arm/mach-s3c24xx/common-s3c2443.c:135:19: warning: symbol 'clk_msysclk' was not declared. Should it be static? Signed-off-by: Sachin Kamat Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c24xx/common-s3c2443.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-s3c24xx/common-s3c2443.c b/arch/arm/mach-s3c24xx/common-s3c2443.c index aeb4a24ff3e..f6b9f2ef01b 100644 --- a/arch/arm/mach-s3c24xx/common-s3c2443.c +++ b/arch/arm/mach-s3c24xx/common-s3c2443.c @@ -132,7 +132,7 @@ static struct clk *clk_msysclk_sources[] = { [3] = &clk_mpllref, }; -struct clksrc_clk clk_msysclk = { +static struct clksrc_clk clk_msysclk = { .clk = { .name = "msysclk", .parent = &clk_xtal, -- cgit v1.2.3-70-g09d2 From 8baaa265c5e8e378cb60164f47e24bf296a6d685 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Fri, 25 Jan 2013 10:29:01 -0800 Subject: ARM: SAMSUNG: using vsnprintf instead of vsprintf for the limit buffer length 256 the buff is 256 limited, so need use vsnprintf instead of vsprintf Signed-off-by: Chen Gang Cc: Ben Dooks Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index 15070284343..d896add68ad 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c @@ -51,7 +51,7 @@ void s3c_pm_dbg(const char *fmt, ...) char buff[256]; va_start(va, fmt); - vsprintf(buff, fmt, va); + vsnprintf(buff, sizeof(buff), fmt, va); va_end(va); printascii(buff); -- cgit v1.2.3-70-g09d2 From d3fcacf52d24ff1b12d994d9ddb7496f651294a2 Mon Sep 17 00:00:00 2001 From: Abhilash Kesavan Date: Fri, 25 Jan 2013 10:40:19 -0800 Subject: ARM: SAMSUNG: Gracefully exit on suspend failure As per the Exynos5250 User Manual: When there are pending interrupt events, WFI/WFE instruction are ignored. To cancel the power-down sequence follow these steps: 1) Disable system power-down using CENTRAL_SEQ_CONFIGURATION register 2) Clear WAKEUP_STAT register 3) Enable interrupt service routine for CPU Code for early wakeup for exynos already exists. Remove the panic on suspend failure, clear the wakeup state register and return 1 from cpu_suspend to indicate a failed suspend (to a user daemon). Older Samsung SoCs have similar panics and I have removed them all. Haven't touched the S3C2410 sleep code. Signed-off-by: Abhilash Kesavan Signed-off-by: Kukjin Kim --- arch/arm/mach-exynos/pm.c | 6 ++++-- arch/arm/mach-s3c24xx/pm-s3c2412.c | 3 ++- arch/arm/mach-s3c24xx/pm-s3c2416.c | 3 ++- arch/arm/mach-s3c64xx/pm.c | 3 ++- arch/arm/mach-s5p64x0/pm.c | 4 ++-- arch/arm/mach-s5pv210/pm.c | 4 ++-- arch/arm/plat-samsung/pm.c | 5 ++++- 7 files changed, 18 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index b9b539cac81..5106ab83e59 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -91,8 +91,8 @@ static int exynos_cpu_suspend(unsigned long arg) /* issue the standby signal into the pm unit. */ cpu_do_idle(); - /* we should never get past here */ - panic("sleep resumed to originator?"); + pr_info("Failed to suspend the system\n"); + return 1; /* Aborting suspend */ } static void exynos_pm_prepare(void) @@ -282,6 +282,8 @@ static void exynos_pm_resume(void) if (!(tmp & S5P_CENTRAL_LOWPWR_CFG)) { tmp |= S5P_CENTRAL_LOWPWR_CFG; __raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION); + /* clear the wakeup state register */ + __raw_writel(0x0, S5P_WAKEUP_STAT); /* No need to perform below restore code */ goto early_wakeup; } diff --git a/arch/arm/mach-s3c24xx/pm-s3c2412.c b/arch/arm/mach-s3c24xx/pm-s3c2412.c index c60f67a75af..f5dc2b254a5 100644 --- a/arch/arm/mach-s3c24xx/pm-s3c2412.c +++ b/arch/arm/mach-s3c24xx/pm-s3c2412.c @@ -48,7 +48,8 @@ static int s3c2412_cpu_suspend(unsigned long arg) s3c2412_sleep_enter(); - panic("sleep resumed to originator?"); + pr_info("Failed to suspend the system\n"); + return 1; /* Aborting suspend */ } static void s3c2412_pm_prepare(void) diff --git a/arch/arm/mach-s3c24xx/pm-s3c2416.c b/arch/arm/mach-s3c24xx/pm-s3c2416.c index 1bd4817b8eb..1a9e8dd194f 100644 --- a/arch/arm/mach-s3c24xx/pm-s3c2416.c +++ b/arch/arm/mach-s3c24xx/pm-s3c2416.c @@ -34,7 +34,8 @@ static int s3c2416_cpu_suspend(unsigned long arg) s3c2412_sleep_enter(); - panic("sleep resumed to originator?"); + pr_info("Failed to suspend the system\n"); + return 1; /* Aborting suspend */ } static void s3c2416_pm_prepare(void) diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c index 7feb426fc20..54d48b857f7 100644 --- a/arch/arm/mach-s3c64xx/pm.c +++ b/arch/arm/mach-s3c64xx/pm.c @@ -296,7 +296,8 @@ static int s3c64xx_cpu_suspend(unsigned long arg) /* we should never get past here */ - panic("sleep resumed to originator?"); + pr_info("Failed to suspend the system\n"); + return 1; /* Aborting suspend */ } /* mapping of interrupts to parts of the wakeup mask */ diff --git a/arch/arm/mach-s5p64x0/pm.c b/arch/arm/mach-s5p64x0/pm.c index 9cba18bfe47..97c2a08ad49 100644 --- a/arch/arm/mach-s5p64x0/pm.c +++ b/arch/arm/mach-s5p64x0/pm.c @@ -103,8 +103,8 @@ static int s5p64x0_cpu_suspend(unsigned long arg) "mcr p15, 0, %0, c7, c10, 4\n\t" "mcr p15, 0, %0, c7, c0, 4" : : "r" (tmp)); - /* we should never get past here */ - panic("sleep resumed to originator?"); + pr_info("Failed to suspend the system\n"); + return 1; /* Aborting suspend */ } /* mapping of interrupts to parts of the wakeup mask */ diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c index 736bfb103cb..2b68a67b6e9 100644 --- a/arch/arm/mach-s5pv210/pm.c +++ b/arch/arm/mach-s5pv210/pm.c @@ -104,8 +104,8 @@ static int s5pv210_cpu_suspend(unsigned long arg) "mcr p15, 0, %0, c7, c10, 4\n\t" "wfi" : : "r" (tmp)); - /* we should never get past here */ - panic("sleep resumed to originator?"); + pr_info("Failed to suspend the system\n"); + return 1; /* Aborting suspend */ } static void s5pv210_pm_prepare(void) diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index d896add68ad..002b1472293 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c @@ -243,6 +243,7 @@ int (*pm_cpu_sleep)(unsigned long); static int s3c_pm_enter(suspend_state_t state) { + int ret; /* ensure the debug is initialised (if enabled) */ s3c_pm_debug_init(); @@ -300,7 +301,9 @@ static int s3c_pm_enter(suspend_state_t state) * we resume as it saves its own register state and restores it * during the resume. */ - cpu_suspend(0, pm_cpu_sleep); + ret = cpu_suspend(0, pm_cpu_sleep); + if (ret) + return ret; /* restore the system state */ -- cgit v1.2.3-70-g09d2 From 7eae354fcd308694027ad38799fdcaada62bf93e Mon Sep 17 00:00:00 2001 From: Heiko Stuebner Date: Fri, 8 Feb 2013 11:13:15 -0800 Subject: ARM: S3C24XX: let S3C2412_PM select S3C2412_PM_SLEEP The code to enter sleep is used by both the s3c2412 and s3c2416 and was thus factored out into an extra config option. But it seems it was forgotten to add the appropriate select to the s3c2412 pm option, resulting in breakage when only compiling s3c2412 support. Signed-off-by: Heiko Stuebner Signed-off-by: Kukjin Kim --- 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 25df14a9e26..5dde9804661 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig @@ -273,6 +273,7 @@ config S3C2412_DMA config S3C2412_PM bool + select S3C2412_PM_SLEEP help Internal config node to apply S3C2412 power management -- cgit v1.2.3-70-g09d2 From 083c8e28e24a1f79b2eef5de5222be1ac8132af2 Mon Sep 17 00:00:00 2001 From: Heiko Stuebner Date: Fri, 8 Feb 2013 11:13:16 -0800 Subject: ARM: S3C24XX: add missing platform_device.h include for osiris The missing include led to a implcit declaration warning: In file included from arch/arm/mach-s3c24xx/mach-osiris.c:34:0: include/linux/platform_data/i2c-s3c2410.h:37:26: warning: 'struct platform_device' declared inside parameter list [enabled by default] include/linux/platform_data/i2c-s3c2410.h:37:26: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] include/linux/platform_data/i2c-s3c2410.h:66:38: warning: 'struct platform_device' declared inside parameter list [enabled by default] include/linux/platform_data/i2c-s3c2410.h:67:38: warning: 'struct platform_device' declared inside parameter list [enabled by default] include/linux/platform_data/i2c-s3c2410.h:68:38: warning: 'struct platform_device' declared inside parameter list [enabled by default] include/linux/platform_data/i2c-s3c2410.h:69:38: warning: 'struct platform_device' declared inside parameter list [enabled by default] include/linux/platform_data/i2c-s3c2410.h:70:38: warning: 'struct platform_device' declared inside parameter list [enabled by default] include/linux/platform_data/i2c-s3c2410.h:71:38: warning: 'struct platform_device' declared inside parameter list [enabled by default] include/linux/platform_data/i2c-s3c2410.h:72:38: warning: 'struct platform_device' declared inside parameter list [enabled by default] include/linux/platform_data/i2c-s3c2410.h:73:38: warning: 'struct platform_device' declared inside parameter list [enabled by default] Signed-off-by: Heiko Stuebner Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c24xx/mach-osiris.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c24xx/mach-osiris.c index bb36d832bd3..c52100ef232 100644 --- a/arch/arm/mach-s3c24xx/mach-osiris.c +++ b/arch/arm/mach-s3c24xx/mach-osiris.c @@ -22,6 +22,7 @@ #include #include #include +#include #include -- cgit v1.2.3-70-g09d2 From 1a4c2a1974a06f31ce1b7d724dfdc5cc1be32006 Mon Sep 17 00:00:00 2001 From: Alexander Shiyan Date: Fri, 8 Feb 2013 13:41:36 -0800 Subject: ARM: S3C24XX: Fix compile breakage for SMDK2410 Symbol S3C_DEV_USB_HOST should be defined to avoid this problem. LINK vmlinux LD vmlinux.o MODPOST vmlinux.o WARNING: modpost: Found 2 section mismatch(es). To see full details build your kernel with: 'make CONFIG_DEBUG_SECTION_MISMATCH=y' GEN .version CHK include/generated/compile.h UPD include/generated/compile.h CC init/version.o LD init/built-in.o arch/arm/mach-s3c24xx/built-in.o:(.init.data+0x660): undefined reference to `s3c_device_ohci' make: *** [vmlinux] Error 1 Signed-off-by: Alexander Shiyan Signed-off-by: Kukjin Kim --- 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 5dde9804661..d1e80d0fd67 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig @@ -226,6 +226,7 @@ config MACH_QT2410 config ARCH_SMDK2410 bool "SMDK2410/A9M2410" select S3C24XX_SMDK + select S3C_DEV_USB_HOST help Say Y here if you are using the SMDK2410 or the derived module A9M2410 -- cgit v1.2.3-70-g09d2 From f0cdbdd6d8ada085199e6250cbf3b7fbe69392ac Mon Sep 17 00:00:00 2001 From: Alexey Galakhov Date: Fri, 8 Feb 2013 13:44:43 -0800 Subject: ARM: S5PV210: Fix early uart output in fifo mode Enabling UART FIFO in bootloader caused the kernel infinite loop on S5PV210 due to uninitialized fifo_max and fifo_mask global variables. This patch adds the correct initialization. Signed-off-by: Alexey Galakhov Signed-off-by: Kukjin Kim --- arch/arm/mach-s5pv210/include/mach/uncompress.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-s5pv210/include/mach/uncompress.h b/arch/arm/mach-s5pv210/include/mach/uncompress.h index 08ff2fda1fb..ef977ea8546 100644 --- a/arch/arm/mach-s5pv210/include/mach/uncompress.h +++ b/arch/arm/mach-s5pv210/include/mach/uncompress.h @@ -19,6 +19,8 @@ static void arch_detect_cpu(void) { /* we do not need to do any cpu detection here at the moment. */ + fifo_mask = S5PV210_UFSTAT_TXMASK; + fifo_max = 63 << S5PV210_UFSTAT_TXSHIFT; } #endif /* __ASM_ARCH_UNCOMPRESS_H */ -- cgit v1.2.3-70-g09d2 From 8d67ec8605f15256b3675d23cb729f253c4e3b03 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Tue, 12 Feb 2013 10:27:52 -0800 Subject: ARM: SAMSUNG: Silence empty switch warning in sdhci.h Add 'default' case to silence the following warning: arch/arm/plat-samsung/include/plat/sdhci.h:356:9: warning: switch with no cases Signed-off-by: Sachin Kamat Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/include/plat/sdhci.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index 151cc9195cf..9b87f38fc4f 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h @@ -374,6 +374,8 @@ static inline void s3c_sdhci_setname(int id, char *name) s3c_device_hsmmc3.name = name; break; #endif + default: + break; } } -- cgit v1.2.3-70-g09d2 From 12ebb8ff767e530c5a8c88bd42531554a27672d9 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Tue, 12 Feb 2013 10:27:55 -0800 Subject: ARM: SAMSUNG: Silence empty switch warning in fimc-core.h Add 'default' case to silence the below warning: arch/arm/plat-samsung/include/plat/fimc-core.h:25:9: warning: switch with no cases Signed-off-by: Sachin Kamat Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/include/plat/fimc-core.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/plat-samsung/include/plat/fimc-core.h b/arch/arm/plat-samsung/include/plat/fimc-core.h index 945a99d5956..1d6cb2b8b09 100644 --- a/arch/arm/plat-samsung/include/plat/fimc-core.h +++ b/arch/arm/plat-samsung/include/plat/fimc-core.h @@ -43,6 +43,8 @@ static inline void s3c_fimc_setname(int id, char *name) s5p_device_fimc3.name = name; break; #endif + default: + break; } } -- cgit v1.2.3-70-g09d2 From ebf4762812ebe77ed960543421ec894108315f2f Mon Sep 17 00:00:00 2001 From: Shirish S Date: Tue, 12 Feb 2013 10:35:40 -0800 Subject: ARM: dts: Correct pin configuration of SD 4 for exynos4x12-pinctrl This patch corrects the pin function value of sd4_bus8 from 3 to 4. This is verified on origen board for testing eMMC on dw_mci controller. Signed-off-by: Shirish S Signed-off-by: Alim Akhtar Reviewed-by: Tomasz Figa Signed-off-by: Kukjin Kim --- arch/arm/boot/dts/exynos4x12-pinctrl.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/exynos4x12-pinctrl.dtsi b/arch/arm/boot/dts/exynos4x12-pinctrl.dtsi index 8e6115adcd9..099cec79e2a 100644 --- a/arch/arm/boot/dts/exynos4x12-pinctrl.dtsi +++ b/arch/arm/boot/dts/exynos4x12-pinctrl.dtsi @@ -661,7 +661,7 @@ sd4_bus8: sd4-bus-width8 { samsung,pins = "gpk1-3", "gpk1-4", "gpk1-5", "gpk1-6"; - samsung,pin-function = <3>; + samsung,pin-function = <4>; samsung,pin-pud = <4>; samsung,pin-drv = <3>; }; -- cgit v1.2.3-70-g09d2