aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKim, Milo <Milo.Kim@ti.com>2012-12-17 19:02:51 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-17 20:15:21 -0500
commit18c701a9dbe91768e1629f1aece9d50543b3abfa (patch)
treecdf878420aea8e3e9e5a655399c1eb2b7e1318ac /drivers
parent162a96ea4bc77ad8d553ea5de6300b6ed70d13e1 (diff)
drivers/rtc/rtc-tps65910.c: enable RTC power domain on initialization
Enabling RTC HW block depends on the default value of TPS65910 register. In some mode, RTC block is disabled by default.(eg. AM3517 Craneboard) In this case, RTC_PWDN(RTC power down) bit should be cleared to enable the RTC HW block. This patch also works in case that RTC block is active by default, because there is no side effect even if the bit is updated again. Tested on AM3517 Craneboard. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Acked-by: Venu Byravarasu <vbyravarasu@nvidia.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Sivaram Nair <sivaramn@nvidia.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/rtc/rtc-tps65910.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c
index 687006f31727..22eb4ebfa1a6 100644
--- a/drivers/rtc/rtc-tps65910.c
+++ b/drivers/rtc/rtc-tps65910.c
@@ -247,6 +247,13 @@ static int __devinit tps65910_rtc_probe(struct platform_device *pdev)
247 return ret; 247 return ret;
248 248
249 dev_dbg(&pdev->dev, "Enabling rtc-tps65910.\n"); 249 dev_dbg(&pdev->dev, "Enabling rtc-tps65910.\n");
250
251 /* Enable RTC digital power domain */
252 ret = regmap_update_bits(tps65910->regmap, TPS65910_DEVCTRL,
253 DEVCTRL_RTC_PWDN_MASK, 0 << DEVCTRL_RTC_PWDN_SHIFT);
254 if (ret < 0)
255 return ret;
256
250 rtc_reg = TPS65910_RTC_CTRL_STOP_RTC; 257 rtc_reg = TPS65910_RTC_CTRL_STOP_RTC;
251 ret = regmap_write(tps65910->regmap, TPS65910_RTC_CTRL, rtc_reg); 258 ret = regmap_write(tps65910->regmap, TPS65910_RTC_CTRL, rtc_reg);
252 if (ret < 0) 259 if (ret < 0)