From patchwork Fri Apr 12 14:03:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2435871 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id AE5CEDF2A1 for ; Fri, 12 Apr 2013 14:03:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751670Ab3DLODz (ORCPT ); Fri, 12 Apr 2013 10:03:55 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:62762 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751440Ab3DLODy (ORCPT ); Fri, 12 Apr 2013 10:03:54 -0400 Received: from wuerfel.lan (HSI-KBW-095-208-002-043.hsi5.kabel-badenwuerttemberg.de [95.208.2.43]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MgYIJ-1UFQiN2ty3-00Nzkm; Fri, 12 Apr 2013 16:03:37 +0200 From: Arnd Bergmann To: Kukjin Kim Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Chanho Park , Tushar Behera , Tomasz Figa , Thomas Abraham , Kyungmin Park , Arnd Bergmann , Thomas Gleixner , John Stultz Subject: [PATCH 2/7] clocksource: exynos_mct: remove platform header dependency Date: Fri, 12 Apr 2013 16:03:20 +0200 Message-Id: <1365775405-115297-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1365775405-115297-1-git-send-email-arnd@arndb.de> References: <1365775405-115297-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:L0TQAk/nE9EYQ5Xln1QtpduwQ+1uHS8EZAjhx3K0T35 YznvIazykKZr8mrTk+lsiRgIWBN0qORialpQ0Waq6+I/8ejSj1 rfHPkj8g6vCShzNz0eOGETOAOl49xIBtwSiYXMIg2z1v40yFZp lNQ4MF/G6TwYMIuP5Tg8+xOiXrPJDidTGH0HoY8bo25L3NSKEv En2jQWoOjTMyWSqlmPxcrdEugV6nAC3s22F2ZsMaWdND+pc5cz CXBtSVyimPK+jTMv8vJflFCFLajYGSF9l3zmGtG1z0UKS2OKYe S9x4XtV5ETWGDZQ0nWexLEkK+WUNhMlD0oei17pFNaITu7P+qu DFwgewvuGO6lv0j7JnH9N3nyUYQrO/Vr1dJiU7gpQ Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org For the non-DT case, the mct_init() function requires access to a couple of platform specific constants, but cannot include the header files in case we are building for multiplatform. This changes the interface to the platform so we pass all the necessary data as arguments to mct_init. Signed-off-by: Arnd Bergmann Cc: Thomas Gleixner Cc: John Stultz --- arch/arm/mach-exynos/common.c | 2 +- arch/arm/mach-exynos/common.h | 2 +- drivers/clocksource/exynos_mct.c | 21 ++++++--------------- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 42f399a..59cb8fe 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -413,7 +413,7 @@ void __init exynos_init_time(void) exynos4_clk_init(NULL, !soc_is_exynos4210(), S5P_VA_CMU, readl(S5P_VA_CHIPID + 8) & 1); exynos4_clk_register_fixed_ext(xxti_f, xusbxti_f); #endif - mct_init(); + mct_init(S5P_VA_SYSTIMER, EXYNOS4_IRQ_MCT_G0, EXYNOS4_IRQ_MCT_L0, EXYNOS4_IRQ_MCT_L1); } } diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index 4ed8eef..9717d0f 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h @@ -14,7 +14,7 @@ #include -extern void mct_init(void); +void mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1); void exynos_init_time(void); extern unsigned long xxti_f, xusbxti_f; diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 509a601..2292452 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -26,11 +26,6 @@ #include #include - -#include - -#include -#include #include #define EXYNOS4_MCTREG(x) (x) @@ -511,18 +506,14 @@ static void __init exynos4_timer_resources(struct device_node *np, void __iomem #endif /* CONFIG_LOCAL_TIMERS */ } -void __init mct_init(void) +void __init mct_init(void __iomem *base, int irq_g0, int irq_l0, int irq_l1) { - if (soc_is_exynos4210()) { - mct_irqs[MCT_G0_IRQ] = EXYNOS4_IRQ_MCT_G0; - mct_irqs[MCT_L0_IRQ] = EXYNOS4_IRQ_MCT_L0; - mct_irqs[MCT_L1_IRQ] = EXYNOS4_IRQ_MCT_L1; - mct_int_type = MCT_INT_SPI; - } else { - panic("unable to determine mct controller type\n"); - } + mct_irqs[MCT_G0_IRQ] = irq_g0; + mct_irqs[MCT_L0_IRQ] = irq_l0; + mct_irqs[MCT_L1_IRQ] = irq_l1; + mct_int_type = MCT_INT_SPI; - exynos4_timer_resources(NULL, S5P_VA_SYSTIMER); + exynos4_timer_resources(NULL, base); exynos4_clocksource_init(); exynos4_clockevent_init(); }