From patchwork Mon Feb 18 08:21:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Abraham X-Patchwork-Id: 2156341 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 EB5893FCFC for ; Mon, 18 Feb 2013 08:22:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756717Ab3BRIW3 (ORCPT ); Mon, 18 Feb 2013 03:22:29 -0500 Received: from mail-da0-f52.google.com ([209.85.210.52]:53465 "EHLO mail-da0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756663Ab3BRIW3 (ORCPT ); Mon, 18 Feb 2013 03:22:29 -0500 Received: by mail-da0-f52.google.com with SMTP id f10so2329110dak.11 for ; Mon, 18 Feb 2013 00:22:28 -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=n9Buu1lUsWP6tO2xLA08819auE+aN75jVabrzuQ3+aA=; b=Ls/iGCW4XQbJOShXFNqdJT3gY+Xfh6kI1klqCmsBhIIdLdrXBA3fJQLKGWGaEydmSw 6tmrPhlzXw65T5+3vaJS0q3yaB5DN2DcxtyzTyIXM49gsT2MKIoqvBYRA8A7OG6oOgQJ CjMQHLMvO7bR7urkY+UXlIBTqquOaxAgrxLYTgkPfQqxDs8N3OymN45dkK+zNo3Mykx8 7HQT7Qz834oi4bT+Soxxg3f6je4PaBNKsrP+K8SBw9nRR8Ay4RwLHYe5mHlbx+a3UzEa o9hNuLQiDWyJulNm/wK0p3h9Iv8ucdMYLvAQrn36wA+6ujhNOYTyyVlz3HYspPy8s+ZY okbg== X-Received: by 10.68.35.6 with SMTP id d6mr14572225pbj.167.1361175748498; Mon, 18 Feb 2013 00:22:28 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id hp7sm13733707pbc.8.2013.02.18.00.22.25 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Feb 2013 00:22:27 -0800 (PST) From: Thomas Abraham To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Cc: devicetree-discuss@lists.ozlabs.org, mturquette@linaro.org, kgene.kim@samsung.com, t.figa@samsung.com, sylvester.nawrocki@gmail.com Subject: [PATCH v6 10/16] clocksource: mct: use fin_pll clock as the tick clock source for mct Date: Mon, 18 Feb 2013 13:51:20 +0530 Message-Id: <1361175686-19400-11-git-send-email-thomas.abraham@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1361175686-19400-1-git-send-email-thomas.abraham@linaro.org> References: <1361175686-19400-1-git-send-email-thomas.abraham@linaro.org> X-Gm-Message-State: ALoCoQkdopaRGLh8BhSU9e9dajjNDddGEt0M8/Gtrgo7zAkyPEX9kZOKrZ0/hdP3E0rWk+KZs3b8 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.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 --- drivers/clocksource/exynos_mct.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index e067130..8f84c42 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -480,10 +480,13 @@ static struct local_timer_ops exynos4_mct_tick_ops __cpuinitdata = { static void __init exynos4_timer_resources(struct device_node *np) { - struct clk *mct_clk; - mct_clk = clk_get(NULL, "xtal"); + struct clk *tick_clk; - clk_rate = clk_get_rate(mct_clk); + tick_clk = np ? of_clk_get_by_name(np, "fin_pll") : + 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); reg_base = np ? of_iomap(np, 0) : S5P_VA_SYSTIMER; if (!reg_base)