From patchwork Sat Nov 24 21:18:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Abraham X-Patchwork-Id: 1798891 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 1D177DFABD for ; Sat, 24 Nov 2012 21:24:31 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TcNA6-0003YB-Oz; Sat, 24 Nov 2012 21:21:18 +0000 Received: from mail-pa0-f49.google.com ([209.85.220.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TcN87-0002UO-OB for linux-arm-kernel@lists.infradead.org; Sat, 24 Nov 2012 21:19:17 +0000 Received: by mail-pa0-f49.google.com with SMTP id bi1so3831713pad.36 for ; Sat, 24 Nov 2012 13:19:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=qbmc8zw7gms0FXWyCv8haeJTA9YzIOCL9++Q7KFiy20=; b=LQOtiWeWw1FnTQkWxf6vv9EtMK8Sd8csaUl3jZAFHxEE2+Po/m/FYSHYTAwSjUw9OG vbB1VD4ETnt1XJb+am0UKyBIvhktEIm4vao3r8nhVLbbKbL1FQwT1xZarkirLGY76KPe eJxiv3I12jIf96JxELyhbusA+T01CdOZCh/XZV8DgFFM5oyL0iFQvKrnYcbP3YC/7Za8 dMi/uJJZqQpvDAQQun3DqW2AHfCXZq2gnv4ZA8fULWvRcex1SWgnkmSlNJXF/oKpJ3cy DvYPCMIw7amwj0lkXY3kVKJPRe3BnmZdiMFSV+GDFw+1TQA68u/Rx/cMuuoIJ66nNmPp wKow== Received: by 10.68.212.68 with SMTP id ni4mr25060246pbc.107.1353791955470; Sat, 24 Nov 2012 13:19:15 -0800 (PST) Received: from localhost.localdomain ([14.99.191.127]) by mx.google.com with ESMTPS id nf9sm5984822pbc.17.2012.11.24.13.19.10 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 24 Nov 2012 13:19:14 -0800 (PST) From: Thomas Abraham To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 08/12] ARM: Exynos4: allow legacy board support to specify xxti and xusbxti clock speed Date: Sun, 25 Nov 2012 02:48:01 +0530 Message-Id: <1353791885-2566-9-git-send-email-thomas.abraham@linaro.org> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1353791885-2566-1-git-send-email-thomas.abraham@linaro.org> References: <1353791885-2566-1-git-send-email-thomas.abraham@linaro.org> X-Gm-Message-State: ALoCoQkY1oz3z3IpVJLQbSyKUWochS692v8ZmnCU3jwHD9zny7hxZx+Xitl1M0NaX/Jn64dhfRxM X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121124_161916_005258_E10FF147 X-CRM114-Status: GOOD ( 14.34 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.49 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: kgene.kim@samsung.com, mturquette@linaro.org, devicetree-discuss@lists.ozlabs.org, Thomas Abraham , sylvester.nawrocki@gmail.com, t.figa@samsung.com, mturquette@ti.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The clock speed of xxti and xusbxti clocks depends on the oscillator used on the board to generate these clocks. For non-dt platforms, allow the board support for those platforms to set the clock frequency of xxti and xusbxti clocks. Cc: Kukjin Kim Signed-off-by: Thomas Abraham --- arch/arm/mach-exynos/common.c | 3 +++ arch/arm/mach-exynos/common.h | 1 + arch/arm/mach-exynos/mach-nuri.c | 2 ++ arch/arm/mach-exynos/mach-origen.c | 2 ++ arch/arm/mach-exynos/mach-smdkv310.c | 2 ++ arch/arm/mach-exynos/mach-universal_c210.c | 2 ++ 6 files changed, 12 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 3ff2f09..55fa586 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -69,6 +69,8 @@ static void exynos5_init_clocks(int xtal); static void exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no); static int exynos_init(void); +unsigned long xxti_f = 0, xusbxti_f = 0; + static struct cpu_table cpu_ids[] __initdata = { { .idcode = EXYNOS4210_CPU_ID, @@ -408,6 +410,7 @@ void __init exynos_timer_init(void) if (!of_have_populated_dt() && (soc_is_exynos4210() || soc_is_exynos4212() || soc_is_exynos4412())) { exynos4_clk_init(); + exynos4_clk_register_fixed_ext(xxti_f, xusbxti_f); exynos_mct_init(); return; } diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index 42c49b7..3555d29 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h @@ -24,6 +24,7 @@ void exynos_init_late(void); extern void exynos_mct_init(void); #ifdef CONFIG_COMMON_CLK +extern unsigned long xxti_f, xusbxti_f; extern void exynos4_clk_init(void); extern void exynos4_clk_register_fixed_ext(unsigned long, unsigned long); #else diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c index 8695d33..afe068f 100644 --- a/arch/arm/mach-exynos/mach-nuri.c +++ b/arch/arm/mach-exynos/mach-nuri.c @@ -1332,6 +1332,8 @@ static void __init nuri_map_io(void) { exynos_init_io(NULL, 0); s3c24xx_init_uarts(nuri_uartcfgs, ARRAY_SIZE(nuri_uartcfgs)); + xxti_f = 0; + xusbxti_f = 24000000; } static void __init nuri_reserve(void) diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c index 838e66b..4e1c0c1 100644 --- a/arch/arm/mach-exynos/mach-origen.c +++ b/arch/arm/mach-exynos/mach-origen.c @@ -756,6 +756,8 @@ static void __init origen_map_io(void) { exynos_init_io(NULL, 0); s3c24xx_init_uarts(origen_uartcfgs, ARRAY_SIZE(origen_uartcfgs)); + xxti_f = 0; + xusbxti_f = 24000000; } static void __init origen_power_init(void) diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c index 66dad92..b5e83f4 100644 --- a/arch/arm/mach-exynos/mach-smdkv310.c +++ b/arch/arm/mach-exynos/mach-smdkv310.c @@ -374,6 +374,8 @@ static void __init smdkv310_map_io(void) { exynos_init_io(NULL, 0); s3c24xx_init_uarts(smdkv310_uartcfgs, ARRAY_SIZE(smdkv310_uartcfgs)); + xxti_f = 12000000; + xusbxti_f = 24000000; } static void __init smdkv310_reserve(void) diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c index 3999c16..3de63cb 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c @@ -1095,6 +1095,8 @@ static void __init universal_map_io(void) exynos_init_io(NULL, 0); s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs)); s5p_set_timer_source(S5P_PWM2, S5P_PWM4); + xxti_f = 0; + xusbxti_f = 24000000; } static void s5p_tv_setup(void)