linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] rtc-imxdi: Support for i.MX53
@ 2012-10-18 16:06 Roland Stigge
  2012-10-18 16:06 ` [PATCH 2/2] rtc-imxdi: Add devicetree support Roland Stigge
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Roland Stigge @ 2012-10-18 16:06 UTC (permalink / raw)
  To: a.zummo, grant.likely, rob.herring, rtc-linux, linux-kernel,
	devicetree-discuss, s.hauer, linux-arm-kernel
  Cc: Roland Stigge

This patch enables support for i.MX53 in addition to i.MX25 by enabling the
driver on ARCH_MXC generally.

Signed-off-by: Roland Stigge <stigge@antcom.de>
---
 drivers/rtc/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.orig/drivers/rtc/Kconfig
+++ linux-2.6/drivers/rtc/Kconfig
@@ -768,7 +768,7 @@ config RTC_DRV_DAVINCI
 
 config RTC_DRV_IMXDI
 	tristate "Freescale IMX DryIce Real Time Clock"
-	depends on SOC_IMX25
+	depends on ARCH_MXC
 	help
 	   Support for Freescale IMX DryIce RTC
 

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH 1/2] rtc-imxdi: Support for i.MX53
@ 2012-10-16 14:51 Roland Stigge
  2012-10-16 14:51 ` [PATCH 2/2] rtc-imxdi: Add devicetree support Roland Stigge
  0 siblings, 1 reply; 7+ messages in thread
From: Roland Stigge @ 2012-10-16 14:51 UTC (permalink / raw)
  To: a.zummo, grant.likely, rob.herring, rtc-linux, linux-kernel,
	devicetree-discuss, s.hauer
  Cc: Roland Stigge

This patch enables support for i.MX53 in addition to i.MX25

Signed-off-by: Roland Stigge <stigge@antcom.de>
---
 drivers/rtc/Kconfig     |    2 +-
 drivers/rtc/rtc-imxdi.c |   25 ++++++++++++++++---------
 2 files changed, 17 insertions(+), 10 deletions(-)

--- linux-2.6.orig/drivers/rtc/Kconfig
+++ linux-2.6/drivers/rtc/Kconfig
@@ -768,7 +768,7 @@ config RTC_DRV_DAVINCI
 
 config RTC_DRV_IMXDI
 	tristate "Freescale IMX DryIce Real Time Clock"
-	depends on SOC_IMX25
+	depends on SOC_IMX25 || SOC_IMX53
 	help
 	   Support for Freescale IMX DryIce RTC
 
--- linux-2.6.orig/drivers/rtc/rtc-imxdi.c
+++ linux-2.6/drivers/rtc/rtc-imxdi.c
@@ -37,6 +37,7 @@
 #include <linux/rtc.h>
 #include <linux/sched.h>
 #include <linux/workqueue.h>
+#include <mach/hardware.h>
 
 /* DryIce Register Definitions */
 
@@ -402,11 +403,13 @@ static int dryice_rtc_probe(struct platf
 
 	mutex_init(&imxdi->write_mutex);
 
-	imxdi->clk = clk_get(&pdev->dev, NULL);
-	if (IS_ERR(imxdi->clk))
-		return PTR_ERR(imxdi->clk);
-	clk_prepare_enable(imxdi->clk);
-
+	/* For IMX53, RTC is available always */
+	if (cpu_is_mx25()) {
+		imxdi->clk = clk_get(&pdev->dev, NULL);
+		if (IS_ERR(imxdi->clk))
+			return PTR_ERR(imxdi->clk);
+		clk_prepare_enable(imxdi->clk);
+	}
 	/*
 	 * Initialize dryice hardware
 	 */
@@ -470,8 +473,10 @@ static int dryice_rtc_probe(struct platf
 	return 0;
 
 err:
-	clk_disable_unprepare(imxdi->clk);
-	clk_put(imxdi->clk);
+	if (cpu_is_mx25()) {
+		clk_disable_unprepare(imxdi->clk);
+		clk_put(imxdi->clk);
+	}
 
 	return rc;
 }
@@ -487,8 +492,10 @@ static int __devexit dryice_rtc_remove(s
 
 	rtc_device_unregister(imxdi->rtc);
 
-	clk_disable_unprepare(imxdi->clk);
-	clk_put(imxdi->clk);
+	if (cpu_is_mx25()) {
+		clk_disable_unprepare(imxdi->clk);
+		clk_put(imxdi->clk);
+	}
 
 	return 0;
 }

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-10-29 21:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-18 16:06 [PATCH 1/2] rtc-imxdi: Support for i.MX53 Roland Stigge
2012-10-18 16:06 ` [PATCH 2/2] rtc-imxdi: Add devicetree support Roland Stigge
2012-10-29 21:00   ` Sascha Hauer
2012-10-18 16:06 ` [PATCH] ARM: mach-imx: Support for DryIce RTC in i.MX53 Roland Stigge
2012-10-29 21:03   ` Sascha Hauer
2012-10-29 21:00 ` [PATCH 1/2] rtc-imxdi: Support for i.MX53 Sascha Hauer
  -- strict thread matches above, loose matches on Subject: below --
2012-10-16 14:51 Roland Stigge
2012-10-16 14:51 ` [PATCH 2/2] rtc-imxdi: Add devicetree support Roland Stigge

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).