From patchwork Tue Mar 5 17:42:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2220621 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 032D53FCF2 for ; Tue, 5 Mar 2013 17:42:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757442Ab3CERmm (ORCPT ); Tue, 5 Mar 2013 12:42:42 -0500 Received: from moutng.kundenserver.de ([212.227.126.187]:60541 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756958Ab3CERml (ORCPT ); Tue, 5 Mar 2013 12:42:41 -0500 Received: from wuerfel.lan (HSI-KBW-46-223-90-92.hsi.kabel-badenwuerttemberg.de [46.223.90.92]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0Lsi1h-1UxZKj0hHV-0121bT; Tue, 05 Mar 2013 18:42:40 +0100 From: Arnd Bergmann To: Thomas Abraham Cc: Kukjin Kim , Tushar Behera , Deepak Saxena , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH 21/23] ARM: exynos: hack to disable private clock code Date: Tue, 5 Mar 2013 18:42:31 +0100 Message-Id: <1362505353-8873-22-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1362505353-8873-1-git-send-email-arnd@arndb.de> References: <1362505353-8873-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:T1Cf8oaUUa04UNN+c9gVuo3J8CmOcVwO1ULToUxme5m a940OzXxyARufwZkoANFW+NmIsJR4X2OBPFGwYWio85Y+6hx2m Pjatzq3VDoWyalevh0awjcOfLdS231J3zzCy52B6yRp52/XQq0 IBL1yb3t5A8LHYkjRl7K4PWlpB3rwgnv4U6NdE+GoK4W2HK4+F A0UvaREhyrbH8pjhaGgbu/AyrvqBXGoT3WxOPD82RtBoy8XgTx B9tzV2UvfNKil5/H3shT8FdA1qq+PSFXcdH3pAuDa0Zf/99+tz FC4hVJj1z+W3dif6QIjMAXnp1+hbrH2MNQeliDwstxn8C0oAJ5 FRr6FN+7dKfqgEQe3zgPm+XM00e1X05xYJPvHRrtm Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Multiplatform kernels rely on the common clock implementation, which conflicts with Samsung's own implementation of the same interface. This disables all code that provides or requires the nonstandard version. Signed-off-by: Arnd Bergmann --- arch/arm/mach-exynos/Makefile | 2 ++ arch/arm/mach-exynos/common.c | 6 ++++++ arch/arm/plat-samsung/clock-clksrc.c | 3 +++ arch/arm/plat-samsung/s5p-clock.c | 3 +++ drivers/cpufreq/Kconfig.arm | 4 +++- drivers/devfreq/Kconfig | 1 + 6 files changed, 18 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 435757e..b0dcf7d 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile @@ -13,10 +13,12 @@ obj- := # Core obj-$(CONFIG_ARCH_EXYNOS) += common.o +ifdef CONFIG_SAMSUNG_CLOCK obj-$(CONFIG_ARCH_EXYNOS4) += clock-exynos4.o obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o obj-$(CONFIG_SOC_EXYNOS5250) += clock-exynos5.o +endif obj-$(CONFIG_PM) += pm.o obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 4b4526d..504d50e 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -404,6 +404,9 @@ static void __init exynos5_map_io(void) static void __init exynos4_init_clocks(int xtal) { + if (!IS_ENABLED(CONFIG_SAMSUNG_CLOCK)) + return; + printk(KERN_DEBUG "%s: initializing clocks\n", __func__); s3c24xx_register_baseclocks(xtal); @@ -425,6 +428,9 @@ static void __init exynos5440_map_io(void) static void __init exynos5_init_clocks(int xtal) { + if (!IS_ENABLED(CONFIG_SAMSUNG_CLOCK)) + return; + printk(KERN_DEBUG "%s: initializing clocks\n", __func__); /* EXYNOS5440 can support only common clock framework */ diff --git a/arch/arm/plat-samsung/clock-clksrc.c b/arch/arm/plat-samsung/clock-clksrc.c index 786a410..094fde9 100644 --- a/arch/arm/plat-samsung/clock-clksrc.c +++ b/arch/arm/plat-samsung/clock-clksrc.c @@ -179,6 +179,9 @@ void __init s3c_register_clksrc(struct clksrc_clk *clksrc, int size) { int ret; + if (!IS_ENABLED(CONFIG_SAMSUNG_CLOCK)) + return; + for (; size > 0; size--, clksrc++) { if (!clksrc->reg_div.reg && !clksrc->reg_src.reg) printk(KERN_ERR "%s: clock %s has no registers set\n", diff --git a/arch/arm/plat-samsung/s5p-clock.c b/arch/arm/plat-samsung/s5p-clock.c index 48a1599..0e22618 100644 --- a/arch/arm/plat-samsung/s5p-clock.c +++ b/arch/arm/plat-samsung/s5p-clock.c @@ -286,6 +286,9 @@ void __init s5p_register_clocks(unsigned long xtal_freq) { int ret; + if (!IS_ENABLED(CONFIG_SAMSUNG_CLOCK)) + return; + clk_ext_xtal_mux.rate = xtal_freq; ret = s3c24xx_register_clocks(s5p_clks, ARRAY_SIZE(s5p_clks)); diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index 030ddf6..b6fb4fa 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -51,7 +51,7 @@ config ARM_S5PV210_CPUFREQ config ARM_EXYNOS_CPUFREQ bool "SAMSUNG EXYNOS SoCs" - depends on ARCH_EXYNOS + depends on ARCH_EXYNOS && SAMSUNG_CLOCK default y help This adds the CPUFreq driver common part for Samsung @@ -59,6 +59,7 @@ config ARM_EXYNOS_CPUFREQ If in doubt, say N. +if ARM_EXYNOS_CPUFREQ config ARM_EXYNOS4210_CPUFREQ def_bool CPU_EXYNOS4210 help @@ -76,6 +77,7 @@ config ARM_EXYNOS5250_CPUFREQ help This adds the CPUFreq driver for Samsung EXYNOS5250 SoC. +endif config ARM_KIRKWOOD_CPUFREQ def_bool ARCH_KIRKWOOD && OF diff --git a/drivers/devfreq/Kconfig b/drivers/devfreq/Kconfig index 0f079be..d4f9a24 100644 --- a/drivers/devfreq/Kconfig +++ b/drivers/devfreq/Kconfig @@ -68,6 +68,7 @@ comment "DEVFREQ Drivers" config ARM_EXYNOS4_BUS_DEVFREQ bool "ARM Exynos4210/4212/4412 Memory Bus DEVFREQ Driver" depends on CPU_EXYNOS4210 || CPU_EXYNOS4212 || CPU_EXYNOS4412 + depends on SAMSUNG_CLOCK select ARCH_HAS_OPP select DEVFREQ_GOV_SIMPLE_ONDEMAND help