Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137447
b: refs/heads/master
c: 9d1d4f9
h: refs/heads/master
i:
  137445: 425d5b3
  137443: 3ff0543
  137439: 2e61559
v: v3
  • Loading branch information
Nicolas Pitre committed Mar 24, 2009
1 parent 0e18037 commit fd79403
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0c1355e36fdc304b102851312d80a1e69c01f5a2
refs/heads/master: 9d1d4f9eabbca276a2a618a94ed3149d5971063e
11 changes: 11 additions & 0 deletions trunk/drivers/rtc/rtc-mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/bcd.h>
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/delay.h>


#define RTC_TIME_REG_OFFS 0
Expand Down Expand Up @@ -119,6 +120,16 @@ static int __init mv_rtc_probe(struct platform_device *pdev)
return -EINVAL;
}

/* make sure it is actually functional */
if (rtc_time == 0x01000000) {
ssleep(1);
rtc_time = readl(pdata->ioaddr + RTC_TIME_REG_OFFS);
if (rtc_time == 0x01000000) {
dev_err(&pdev->dev, "internal RTC not ticking\n");
return -ENODEV;
}
}

platform_set_drvdata(pdev, pdata);
pdata->rtc = rtc_device_register(pdev->name, &pdev->dev,
&mv_rtc_ops, THIS_MODULE);
Expand Down

0 comments on commit fd79403

Please sign in to comment.