From patchwork Sun Jun 16 11:20:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 2728071 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 ACEC09F96B for ; Sun, 16 Jun 2013 11:22:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ABF3B2016D for ; Sun, 16 Jun 2013 11:22:15 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 842A52016B for ; Sun, 16 Jun 2013 11:22:14 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UoB1Y-0005iL-9A; Sun, 16 Jun 2013 11:21:32 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UoB1O-0001y7-Fo; Sun, 16 Jun 2013 11:21:22 +0000 Received: from smtp45.i.mail.ru ([94.100.177.105]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UoB18-0001vw-Tw for linux-arm-kernel@lists.infradead.org; Sun, 16 Jun 2013 11:21:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=2oWqAsh9Af+eEmOQYMMgm1ZyBr7w1iIHYZCFdHF9+sA=; b=Fab3O39sb1zoO9JOiAZOCU+7+UuQk4F1R3VQhcTzlVftLZ/PI/Chbg7QQrdIIVIV0vG/FGWOk58lPJALQEDllEe7NXUI8OmC7nGE0wmP1VhgcBbg9aB6rcoyJ26LougkWnei1ikSvTezQNC6SUqqMxjlD7pcmMlGDXVu+d2gUxM=; Received: from [188.134.40.128] (port=21129 helo=shc.zet) by smtp45.i.mail.ru with esmtpa (envelope-from ) id 1UoB0m-0004jB-QO; Sun, 16 Jun 2013 15:20:44 +0400 From: Alexander Shiyan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/3] ARM: imx: Using proper clocks for RTC driver Date: Sun, 16 Jun 2013 15:20:23 +0400 Message-Id: <1371381624-18823-2-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1371381624-18823-1-git-send-email-shc_work@mail.ru> References: <1371381624-18823-1-git-send-email-shc_work@mail.ru> X-Mras: Ok X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130616_072107_442638_817FAADE X-CRM114-Status: UNSURE ( 9.99 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) Cc: Alessandro Zummo , Russell King , Alexander Shiyan , rtc-linux@googlegroups.com, Rob Herring , Sascha Hauer , Grant Likely , Shawn Guo X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP i.MX RTC driver requires 32k clock for time function and optional clock for module itself. This patch fixes these clock names for the driver and adds missing definitions. Signed-off-by: Alexander Shiyan --- arch/arm/mach-imx/clk-imx1.c | 2 +- arch/arm/mach-imx/clk-imx21.c | 3 ++- arch/arm/mach-imx/clk-imx27.c | 3 ++- arch/arm/mach-imx/clk-imx31.c | 3 ++- arch/arm/mach-imx/clk-imx35.c | 2 ++ drivers/rtc/rtc-mxc.c | 2 +- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-imx/clk-imx1.c b/arch/arm/mach-imx/clk-imx1.c index 15f9d22..b001a8d 100644 --- a/arch/arm/mach-imx/clk-imx1.c +++ b/arch/arm/mach-imx/clk-imx1.c @@ -106,7 +106,7 @@ int __init mx1_clocks_init(unsigned long fref) clk_register_clkdev(clk[dummy], "ahb", "imx1-fb.0"); clk_register_clkdev(clk[hclk], "mshc", NULL); clk_register_clkdev(clk[per3], "ssi", NULL); - clk_register_clkdev(clk[clk32], NULL, "imx1-rtc.0"); + clk_register_clkdev(clk[clk32], "rtc", "imx1-rtc"); clk_register_clkdev(clk[clko], "clko", NULL); mxc_timer_init(MX1_IO_ADDRESS(MX1_TIM1_BASE_ADDR), MX1_TIM1_INT); diff --git a/arch/arm/mach-imx/clk-imx21.c b/arch/arm/mach-imx/clk-imx21.c index d7ed660..a88f331 100644 --- a/arch/arm/mach-imx/clk-imx21.c +++ b/arch/arm/mach-imx/clk-imx21.c @@ -172,7 +172,8 @@ int __init mx21_clocks_init(unsigned long lref, unsigned long href) clk_register_clkdev(clk[emma_gate], "emma", NULL); clk_register_clkdev(clk[slcdc_gate], "slcdc", NULL); clk_register_clkdev(clk[gpio_gate], "gpio", NULL); - clk_register_clkdev(clk[rtc_gate], "rtc", NULL); + clk_register_clkdev(clk[ckil], "rtc", "imx21-rtc"); + clk_register_clkdev(clk[rtc_gate], "ipg", "imx21-rtc"); clk_register_clkdev(clk[csi_hclk_gate], "csi", NULL); clk_register_clkdev(clk[ssi1_gate], "ssi1", NULL); clk_register_clkdev(clk[ssi2_gate], "ssi2", NULL); diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c index c3cfa41..f1c01c4 100644 --- a/arch/arm/mach-imx/clk-imx27.c +++ b/arch/arm/mach-imx/clk-imx27.c @@ -283,7 +283,8 @@ int __init mx27_clocks_init(unsigned long fref) clk_register_clkdev(clk[gpio_ipg_gate], "gpio", NULL); clk_register_clkdev(clk[brom_ahb_gate], "brom", NULL); clk_register_clkdev(clk[ata_ahb_gate], "ata", NULL); - clk_register_clkdev(clk[rtc_ipg_gate], NULL, "imx21-rtc"); + clk_register_clkdev(clk[ckil], "rtc", "imx21-rtc"); + clk_register_clkdev(clk[rtc_ipg_gate], "ipg", "imx21-rtc"); clk_register_clkdev(clk[scc_ipg_gate], "scc", NULL); clk_register_clkdev(clk[cpu_div], NULL, "cpufreq-cpu0.0"); clk_register_clkdev(clk[emi_ahb_gate], "emi_ahb" , NULL); diff --git a/arch/arm/mach-imx/clk-imx31.c b/arch/arm/mach-imx/clk-imx31.c index b5b65f3..3f2676d 100644 --- a/arch/arm/mach-imx/clk-imx31.c +++ b/arch/arm/mach-imx/clk-imx31.c @@ -134,7 +134,8 @@ int __init mx31_clocks_init(unsigned long fref) clk_register_clkdev(clk[cspi3_gate], NULL, "imx31-cspi.2"); clk_register_clkdev(clk[pwm_gate], "pwm", NULL); clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0"); - clk_register_clkdev(clk[rtc_gate], NULL, "imx21-rtc"); + clk_register_clkdev(clk[ckil], "rtc", "imx21-rtc"); + clk_register_clkdev(clk[rtc_gate], "ipg", "imx21-rtc"); clk_register_clkdev(clk[epit1_gate], "epit", NULL); clk_register_clkdev(clk[epit2_gate], "epit", NULL); clk_register_clkdev(clk[nfc], NULL, "imx27-nand.0"); diff --git a/arch/arm/mach-imx/clk-imx35.c b/arch/arm/mach-imx/clk-imx35.c index 2193c83..2e5af91 100644 --- a/arch/arm/mach-imx/clk-imx35.c +++ b/arch/arm/mach-imx/clk-imx35.c @@ -258,6 +258,8 @@ int __init mx35_clocks_init(void) clk_register_clkdev(clk[nfc_div], NULL, "imx25-nand.0"); clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0"); clk_register_clkdev(clk[admux_gate], "audmux", NULL); + clk_register_clkdev(clk[ckil], "rtc", "imx21-rtc"); + clk_register_clkdev(clk[rtc_gate], "ipg", "imx21-rtc"); clk_prepare_enable(clk[spba_gate]); clk_prepare_enable(clk[gpio1_gate]); diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c index 8becb95..3d692881 100644 --- a/drivers/rtc/rtc-mxc.c +++ b/drivers/rtc/rtc-mxc.c @@ -317,7 +317,7 @@ static int mxc_rtc_probe(struct platform_device *pdev) if (IS_ERR(priv->ioaddr)) return PTR_ERR(priv->ioaddr); - priv->clk_rtc = devm_clk_get(&pdev->dev, NULL); + priv->clk_rtc = devm_clk_get(&pdev->dev, "rtc"); if (IS_ERR(priv->clk_rtc)) { dev_err(&pdev->dev, "Unable to get clock!\n"); return PTR_ERR(priv->clk_rtc);