summaryrefslogtreecommitdiffstats
path: root/bsp/arm-versatile-926ejs/arm_versatile_926ejs-kick-off-PrimeCell-RTC-PL031.patch
blob: 912e3938d412648661d32e590c8eedd1e9a1a51e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 0befccd1e939e2fb89791bc6dfac0f279d97bbf7 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] 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>
---
 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 30943d200c5e..0cb8cc2f17f8 100644
--- a/drivers/rtc/rtc-pl031.c
+++ b/drivers/rtc/rtc-pl031.c
@@ -397,8 +397,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:
-- 
2.5.0