Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176621
b: refs/heads/master
c: 2934d6a
h: refs/heads/master
i:
  176619: fbf0bba
v: v3
  • Loading branch information
Linus Walleij authored and Linus Torvalds committed Dec 16, 2009
1 parent 011bb7f commit 8c08e31
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 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: 1ce7c83fa91d27bd0e195e8b2ff10d3a1caeb0d6
refs/heads/master: 2934d6a859b70e57c729644e169a4fdf8c1c290c
23 changes: 12 additions & 11 deletions trunk/drivers/rtc/rtc-pl031.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ static int pl031_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)

switch (cmd) {
case RTC_AIE_OFF:
__raw_writel(1, ldata->base + RTC_MIS);
writel(1, ldata->base + RTC_MIS);
return 0;
case RTC_AIE_ON:
__raw_writel(0, ldata->base + RTC_MIS);
writel(0, ldata->base + RTC_MIS);
return 0;
}

Expand All @@ -65,7 +65,7 @@ static int pl031_read_time(struct device *dev, struct rtc_time *tm)
{
struct pl031_local *ldata = dev_get_drvdata(dev);

rtc_time_to_tm(__raw_readl(ldata->base + RTC_DR), tm);
rtc_time_to_tm(readl(ldata->base + RTC_DR), tm);

return 0;
}
Expand All @@ -76,7 +76,7 @@ static int pl031_set_time(struct device *dev, struct rtc_time *tm)
struct pl031_local *ldata = dev_get_drvdata(dev);

rtc_tm_to_time(tm, &time);
__raw_writel(time, ldata->base + RTC_LR);
writel(time, ldata->base + RTC_LR);

return 0;
}
Expand All @@ -85,9 +85,9 @@ static int pl031_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
{
struct pl031_local *ldata = dev_get_drvdata(dev);

rtc_time_to_tm(__raw_readl(ldata->base + RTC_MR), &alarm->time);
alarm->pending = __raw_readl(ldata->base + RTC_RIS);
alarm->enabled = __raw_readl(ldata->base + RTC_IMSC);
rtc_time_to_tm(readl(ldata->base + RTC_MR), &alarm->time);
alarm->pending = readl(ldata->base + RTC_RIS);
alarm->enabled = readl(ldata->base + RTC_IMSC);

return 0;
}
Expand All @@ -99,8 +99,8 @@ static int pl031_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)

rtc_tm_to_time(&alarm->time, &time);

__raw_writel(time, ldata->base + RTC_MR);
__raw_writel(!alarm->enabled, ldata->base + RTC_MIS);
writel(time, ldata->base + RTC_MR);
writel(!alarm->enabled, ldata->base + RTC_MIS);

return 0;
}
Expand Down Expand Up @@ -180,8 +180,9 @@ static int pl031_probe(struct amba_device *adev, struct amba_id *id)

static struct amba_id pl031_ids[] __initdata = {
{
.id = 0x00041031,
.mask = 0x000fffff, },
.id = 0x00041031,
.mask = 0x000fffff,
},
{0, 0},
};

Expand Down

0 comments on commit 8c08e31

Please sign in to comment.