From b8d9461a3957dba555b1ae82481cf57f3ce9e8b1 Mon Sep 17 00:00:00 2001
From: Tony Liu <Bo.Liu@windriver.com>
Date: Thu, 25 Feb 2010 16:23:42 +0800
Subject: [PATCH] YOCTO: arm_versatile_926ejs: kick off PrimeCell RTC PL031

For RTC PL031, need to explicitly set bit "RTC start" of Control
register(RTCCR) to enable it's counting.

Signed-off-by: Tony Liu <Bo.Liu@windriver.com>
Signed-off-by: Amit Kucheria <amit.kucheria.ext@huawei.com>
---
 drivers/rtc/rtc-pl031.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c
index d4b2ab7861266..d5ef323134493 100644
--- a/drivers/rtc/rtc-pl031.c
+++ b/drivers/rtc/rtc-pl031.c
@@ -379,8 +379,12 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
 				  vendor->irqflags, "rtc-pl031", ldata);
 		if (ret)
 			goto out;
+		/*Set bit "RTC start" in register RTCCR to enable RTC */
+		writel(0x1, ldata->base + RTC_CR);
+
 		dev_pm_set_wake_irq(&adev->dev, adev->irq[0]);
 	}
+
 	return 0;
 
 out:
-- 
GitLab