From patchwork Wed Oct 22 13:34:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 5132401 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2982C9F349 for ; Wed, 22 Oct 2014 13:39:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5EE3E20122 for ; Wed, 22 Oct 2014 13:39:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 91DC9200DF for ; Wed, 22 Oct 2014 13:39:50 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xgw63-0005NP-Ef; Wed, 22 Oct 2014 13:37:03 +0000 Received: from down.free-electrons.com ([37.187.137.238] helo=mail.free-electrons.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xgw5u-0005Jr-Sj for linux-arm-kernel@lists.infradead.org; Wed, 22 Oct 2014 13:36:55 +0000 Received: by mail.free-electrons.com (Postfix, from userid 106) id 4841F4FF5; Wed, 22 Oct 2014 15:36:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from arch.hh.imgtec.org (unknown [190.2.108.156]) by mail.free-electrons.com (Postfix) with ESMTPSA id 1FBA04FC3; Wed, 22 Oct 2014 15:36:32 +0200 (CEST) From: Ezequiel Garcia To: Jason Cooper , Daniel Lezcano , Thomas Gleixner , Wim Van Sebroeck Subject: [PATCH 1/4] clocksource: armada-370-xp: Add missing clock enable Date: Wed, 22 Oct 2014 10:34:41 -0300 Message-Id: <1413984884-20273-2-git-send-email-ezequiel.garcia@free-electrons.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1413984884-20273-1-git-send-email-ezequiel.garcia@free-electrons.com> References: <1413984884-20273-1-git-send-email-ezequiel.garcia@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141022_063655_118661_B36F789B X-CRM114-Status: UNSURE ( 8.13 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.5 (/) Cc: Lior Amsalem , Thomas Petazzoni , linux-watchdog@vger.kernel.org, Tawfik Bayouk , Nadav Haklai , Ezequiel Garcia , Gregory Clement , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This commit makes sure the timer clock is prepared and enabled before retrieving its rate. Signed-off-by: Ezequiel Garcia Reviewed-by: Thomas Petazzoni Acked-by: Gregory CLEMENT --- drivers/clocksource/time-armada-370-xp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clocksource/time-armada-370-xp.c b/drivers/clocksource/time-armada-370-xp.c index 0451e62..d8555f9 100644 --- a/drivers/clocksource/time-armada-370-xp.c +++ b/drivers/clocksource/time-armada-370-xp.c @@ -293,6 +293,7 @@ static void __init armada_xp_timer_init(struct device_node *np) /* The 25Mhz fixed clock is mandatory, and must always be available */ BUG_ON(IS_ERR(clk)); + clk_prepare_enable(clk); timer_clk = clk_get_rate(clk); armada_370_xp_timer_common_init(np); @@ -305,6 +306,7 @@ static void __init armada_370_timer_init(struct device_node *np) struct clk *clk = of_clk_get(np, 0); BUG_ON(IS_ERR(clk)); + clk_prepare_enable(clk); timer_clk = clk_get_rate(clk) / TIMER_DIVIDER; timer25Mhz = false;