From patchwork Sat Nov 24 21:18:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Abraham X-Patchwork-Id: 1798931 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 B955CDFABD for ; Sat, 24 Nov 2012 21:25:49 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TcNBV-0004cg-NG; Sat, 24 Nov 2012 21:22:46 +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 1TcN8O-0002UO-St for linux-arm-kernel@lists.infradead.org; Sat, 24 Nov 2012 21:19:34 +0000 Received: by mail-pa0-f49.google.com with SMTP id bi1so3831713pad.36 for ; Sat, 24 Nov 2012 13:19:32 -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=nwICh8HCj7Nm/dEP+uYMiQons906ZABWYPR/jqbdoi0=; b=HW+7Y+JQFI23SmgvDMqPoN4mXK7laC8N7aN1IAti+43I1jFJ2dMDsYqbbeHldu+dr+ Y73KvRdgiSSvOQdoNdMQFZ8W6yZZvJDTSPU/2rfz9dtXSVIQSgkbBbllkRL9ybwaP+8H pUbpFC9cN/DgeVXLauk5cNQJtuOrzUP9aFL7+WddyLSsY6w1upIV0+wPDhqjnVk+FGy9 PvPpNleOp9xNbrSSMDUmWwLofGyeoJXrhEz/sOInb8BCbIlwZa1gpDdAs/49XVFpVrcL HIyVYvLLmvDHuMHcuqCrHxafhTxVWn+xlZYRERgb2RbO/VEru0yBn1VLtsFBe7n5bCBe Ivhw== Received: by 10.68.253.230 with SMTP id ad6mr25602707pbd.84.1353791972630; Sat, 24 Nov 2012 13:19:32 -0800 (PST) Received: from localhost.localdomain ([14.99.191.127]) by mx.google.com with ESMTPS id nf9sm5984822pbc.17.2012.11.24.13.19.27 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 24 Nov 2012 13:19:31 -0800 (PST) From: Thomas Abraham To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 11/12] ARM: Exynos: use fin_pll clock as the tick clock source for mct Date: Sun, 25 Nov 2012 02:48:04 +0530 Message-Id: <1353791885-2566-12-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: ALoCoQmhz52d7choQHNzPQkFUlQpQFjNsngj5M/diLuQSXE+b94ozRydEcvZJhO6snVnIdw+rkbq X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121124_161933_177432_710DF96A X-CRM114-Status: GOOD ( 13.26 ) 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 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)