From patchwork Sun Dec 30 00:33:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Abraham X-Patchwork-Id: 1919461 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 ECECFDFB7B for ; Sun, 30 Dec 2012 00:47:21 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tp70D-0005Zg-1y; Sun, 30 Dec 2012 00:43:46 +0000 Received: from mail-pa0-f54.google.com ([209.85.220.54]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Tp6xs-0004cw-Ea for linux-arm-kernel@lists.infradead.org; Sun, 30 Dec 2012 00:41:29 +0000 Received: by mail-pa0-f54.google.com with SMTP id bi5so6586324pad.13 for ; Sat, 29 Dec 2012 16:41:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=SsKWbvo7quQ7i6wNKmdELqyQxrR3WfmJqi8ZshE4jDk=; b=n1EKzwMYti1PYHNutAxPQuRw21W6CG3PP9AlBVqGeGbKqWmcsZx4kwRAyzjbrQKDKL ceQr6nvT0Kjeprz24eWPvLl68JGNb4cLA80HhDz/2srO0w1FQ88lxB1Jx7mwxO4eaRoO TmfowDKz2N4pBSaGtMu3OowtZY7yXK/XL+NdRpMHgvh60UEIEXpy+2V68LOFB6cmS1Yv Oxty8ZGetPIrCf8SKKkeeyaEf1WYvXeAfUCd/8zeEElTGHHwCGuUbrZ1IgH24RgEb6cA Y/PCnUzz3OrCE3zaK8cEiFAyKQA6QtiDs8lnZ3cCFf++21awWWgpD1jjaCt59DCnrA5r cnbQ== X-Received: by 10.66.73.167 with SMTP id m7mr110300716pav.68.1356828078654; Sat, 29 Dec 2012 16:41:18 -0800 (PST) Received: from localhost.localdomain (72-254-22-152.client.stsn.net. [72.254.22.152]) by mx.google.com with ESMTPS id pj1sm22190834pbb.71.2012.12.29.16.41.17 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 29 Dec 2012 16:41:18 -0800 (PST) From: Thomas Abraham To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v5 11/12] ARM: Exynos: use fin_pll clock as the tick clock source for mct Date: Sat, 29 Dec 2012 16:33:40 -0800 Message-Id: <1356827621-27617-12-git-send-email-thomas.abraham@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1356827621-27617-1-git-send-email-thomas.abraham@linaro.org> References: <1356827621-27617-1-git-send-email-thomas.abraham@linaro.org> X-Gm-Message-State: ALoCoQmM8gk006JiWZQQTLZuUrAQxDHRk6SxDl3h7tyU1PfpAZ/aRNRaq9zvSknqh6KQYOi04thf X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121229_194120_796948_F9C7867D X-CRM114-Status: GOOD ( 12.31 ) 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.54 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: devicetree-discuss@lists.ozlabs.org, kgene.kim@samsung.com, mturquette@linaro.org, t.figa@samsung.com, sylvester.nawrocki@gmail.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 With the migration of Exynos4 clocks to use common clock framework, the old styled 'xtal' clock is not used anymore. Instead, the clock 'fin_pll' is used as the tick clock for mct controller. Cc: Kukjin Kim Signed-off-by: Thomas Abraham --- arch/arm/mach-exynos/mct.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-exynos/mct.c b/arch/arm/mach-exynos/mct.c index 448ce86..71e1502 100644 --- a/arch/arm/mach-exynos/mct.c +++ b/arch/arm/mach-exynos/mct.c @@ -487,10 +487,22 @@ static struct local_timer_ops exynos4_mct_tick_ops __cpuinitdata = { static void __init exynos4_timer_resources(struct device_node *np) { +#ifdef CONFIG_COMMON_CLK + struct clk *tick_clk; + + tick_clk = clk_get(NULL, "fin_pll"); + if (IS_ERR(tick_clk)) + panic("%s: unable to determine tick clock rate\n", __func__); + clk_rate = clk_get_rate(tick_clk); +#else + /* + * todo: remove this legacy code after adding common clock support for + * exynos5250. + */ struct clk *mct_clk; mct_clk = clk_get(NULL, "xtal"); - clk_rate = clk_get_rate(mct_clk); +#endif reg_base = np ? of_iomap(np, 0) : S5P_VA_SYSTIMER; if (!reg_base)