linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: shc_work@mail.ru (Alexander Shiyan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 3/5] ARM: imx: Using proper clocks for RTC driver
Date: Sat, 29 Jun 2013 12:40:43 +0400	[thread overview]
Message-ID: <1372495244-21215-4-git-send-email-shc_work@mail.ru> (raw)
In-Reply-To: <1372495244-21215-1-git-send-email-shc_work@mail.ru>

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 <shc_work@mail.ru>
---
 arch/arm/mach-imx/clk-imx31.c | 3 ++-
 arch/arm/mach-imx/clk-imx35.c | 2 ++
 drivers/rtc/rtc-mxc.c         | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

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 f333581..80c6f1f 100644
--- a/drivers/rtc/rtc-mxc.c
+++ b/drivers/rtc/rtc-mxc.c
@@ -343,7 +343,7 @@ static int mxc_rtc_probe(struct platform_device *pdev)
 	if (IS_ERR(pdata->ioaddr))
 		return PTR_ERR(pdata->ioaddr);
 
-	pdata->clk_rtc = devm_clk_get(&pdev->dev, NULL);
+	pdata->clk_rtc = devm_clk_get(&pdev->dev, "rtc");
 	if (IS_ERR(pdata->clk_rtc)) {
 		dev_err(&pdev->dev, "Unable to get clock!\n");
 		return PTR_ERR(pdata->clk_rtc);
-- 
1.8.1.5

  parent reply	other threads:[~2013-06-29  8:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-29  8:40 [PATCH v3 1/5] rtc: mxc_rtc: Driver rework Alexander Shiyan
2013-06-29  8:40 ` [PATCH v3 2/5] rtc: mxc_rtc: Cleanup code Alexander Shiyan
2013-06-29  8:40 ` [PATCH v3 4/5] rtc: mxc_rtc: Add DT support Alexander Shiyan
2013-06-29  8:40 ` Alexander Shiyan [this message]
2013-06-29  8:40 ` [PATCH v3 5/5] ARM: imx: move i.MX1/21/27 RTC clk lookup into DT Alexander Shiyan
2013-06-29 12:14 ` [PATCH v3 1/5] rtc: mxc_rtc: Driver rework Sascha Hauer
2013-06-29 21:01   ` Re[2]: " Alexander Shiyan
2013-06-29 21:33     ` Re[3]: " Alexander Shiyan
2013-06-30  8:05       ` Sascha Hauer
2013-06-30  9:10         ` Re[2]: " Alexander Shiyan
2013-06-30 10:16           ` Sascha Hauer
2013-06-30  7:52 ` Sascha Hauer
2013-06-30  8:26   ` Re[2]: " Alexander Shiyan
2013-06-30  8:42     ` [PATCH v3 1/5] rtc: mxc_rtc: Driver re work Lothar Waßmann
2013-06-30  8:45       ` Re[4]: " Alexander Shiyan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1372495244-21215-4-git-send-email-shc_work@mail.ru \
    --to=shc_work@mail.ru \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).