Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208453
b: refs/heads/master
c: 0a89b55
h: refs/heads/master
i:
  208451: b7fcb6c
v: v3
  • Loading branch information
Wan ZongShun authored and Linus Torvalds committed Aug 11, 2010
1 parent e5250f6 commit c1b2ef2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5fc79d85d2ab7ce144bc75e06cab58126249afbb
refs/heads/master: 0a89b55364e0a4fd4be9bc2c9a697f9b027eb395
15 changes: 7 additions & 8 deletions trunk/drivers/rtc/rtc-nuc900.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,21 @@ static irqreturn_t nuc900_rtc_interrupt(int irq, void *_rtc)

static int *check_rtc_access_enable(struct nuc900_rtc *nuc900_rtc)
{
unsigned int i;
unsigned int i, timeout = 0x1000;
__raw_writel(INIRRESET, nuc900_rtc->rtc_reg + REG_RTC_INIR);

mdelay(10);

__raw_writel(AERPOWERON, nuc900_rtc->rtc_reg + REG_RTC_AER);

for (i = 0; i < 1000; i++) {
if (__raw_readl(nuc900_rtc->rtc_reg + REG_RTC_AER) & AERRWENB)
return 0;
}
while (!(__raw_readl(nuc900_rtc->rtc_reg + REG_RTC_AER) & AERRWENB)
&& timeout--)
mdelay(1);

if ((__raw_readl(nuc900_rtc->rtc_reg + REG_RTC_AER) & AERRWENB) == 0x0)
return ERR_PTR(-ENODEV);
if (!timeout)
return ERR_PTR(-EPERM);

return ERR_PTR(-EPERM);
return 0;
}

static void nuc900_rtc_bcd2bin(unsigned int timereg,
Expand Down

0 comments on commit c1b2ef2

Please sign in to comment.