From patchwork Wed Jan 11 09:04:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 6147 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 1990223E0C for ; Wed, 11 Jan 2012 09:05:13 +0000 (UTC) Received: from mail-bk0-f52.google.com (mail-bk0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id 02DFCA183F7 for ; Wed, 11 Jan 2012 09:05:12 +0000 (UTC) Received: by mail-bk0-f52.google.com with SMTP id zu5so475257bkb.11 for ; Wed, 11 Jan 2012 01:05:12 -0800 (PST) Received: by 10.204.153.27 with SMTP id i27mr9778237bkw.81.1326272712812; Wed, 11 Jan 2012 01:05:12 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.82.144 with SMTP id ac16cs103526bkc; Wed, 11 Jan 2012 01:05:12 -0800 (PST) Received: by 10.14.40.79 with SMTP id e55mr9099239eeb.26.1326272711472; Wed, 11 Jan 2012 01:05:11 -0800 (PST) Received: from eu1sys200aog110.obsmtp.com (eu1sys200aog110.obsmtp.com. [207.126.144.129]) by mx.google.com with SMTP id u56si418751eef.103.2012.01.11.01.05.06 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 Jan 2012 01:05:11 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.129 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.129; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.129 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob110.postini.com ([207.126.147.11]) with SMTP ID DSNKTw1QwVokLmzzcEcX2Zh8G839Hva24kkK@postini.com; Wed, 11 Jan 2012 09:05:10 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id CBEB9106; Wed, 11 Jan 2012 08:56:35 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 6324A1318; Wed, 11 Jan 2012 09:05:02 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 6845424C2C0; Wed, 11 Jan 2012 10:04:55 +0100 (CET) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Wed, 11 Jan 2012 10:04:59 +0100 From: Linus Walleij To: Cc: Linus Walleij , Alessandro Rubini Subject: [PATCH 2/3] plat-nomadik: handle clocking properly Date: Wed, 11 Jan 2012 10:04:53 +0100 Message-ID: <1326272693-5709-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.8 MIME-Version: 1.0 From: Linus Walleij clk_prepare() was missing from the Nomadik MTU driver, also handle errors on prepare and enable in the simplest way possible, by bugging out - we cannot start the system without time anyway. Cc: Alessandro Rubini Signed-off-by: Linus Walleij --- arch/arm/plat-nomadik/timer.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-nomadik/timer.c b/arch/arm/plat-nomadik/timer.c index 46f50f2..954a862 100644 --- a/arch/arm/plat-nomadik/timer.c +++ b/arch/arm/plat-nomadik/timer.c @@ -190,8 +190,8 @@ void __init nmdk_timer_init(void __iomem *base) mtu_base = base; clk0 = clk_get_sys("mtu0", NULL); BUG_ON(IS_ERR(clk0)); - - clk_enable(clk0); + BUG_ON(clk_prepare(clk0) < 0); + BUG_ON(clk_enable(clk0) < 0); /* * Tick rate is 2.4MHz for Nomadik and 2.4Mhz, 100MHz or 133 MHz