aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/rtc/rtc-pl031.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c
index f41873f98f66..0264b117893b 100644
--- a/drivers/rtc/rtc-pl031.c
+++ b/drivers/rtc/rtc-pl031.c
@@ -51,10 +51,10 @@ static int pl031_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)
51 51
52 switch (cmd) { 52 switch (cmd) {
53 case RTC_AIE_OFF: 53 case RTC_AIE_OFF:
54 __raw_writel(1, ldata->base + RTC_MIS); 54 writel(1, ldata->base + RTC_MIS);
55 return 0; 55 return 0;
56 case RTC_AIE_ON: 56 case RTC_AIE_ON:
57 __raw_writel(0, ldata->base + RTC_MIS); 57 writel(0, ldata->base + RTC_MIS);
58 return 0; 58 return 0;
59 } 59 }
60 60
@@ -65,7 +65,7 @@ static int pl031_read_time(struct device *dev, struct rtc_time *tm)
65{ 65{
66 struct pl031_local *ldata = dev_get_drvdata(dev); 66 struct pl031_local *ldata = dev_get_drvdata(dev);
67 67
68 rtc_time_to_tm(__raw_readl(ldata->base + RTC_DR), tm); 68 rtc_time_to_tm(readl(ldata->base + RTC_DR), tm);
69 69
70 return 0; 70 return 0;
71} 71}
@@ -76,7 +76,7 @@ static int pl031_set_time(struct device *dev, struct rtc_time *tm)
76 struct pl031_local *ldata = dev_get_drvdata(dev); 76 struct pl031_local *ldata = dev_get_drvdata(dev);
77 77
78 rtc_tm_to_time(tm, &time); 78 rtc_tm_to_time(tm, &time);
79 __raw_writel(time, ldata->base + RTC_LR); 79 writel(time, ldata->base + RTC_LR);
80 80
81 return 0; 81 return 0;
82} 82}
@@ -85,9 +85,9 @@ static int pl031_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
85{ 85{
86 struct pl031_local *ldata = dev_get_drvdata(dev); 86 struct pl031_local *ldata = dev_get_drvdata(dev);
87 87
88 rtc_time_to_tm(__raw_readl(ldata->base + RTC_MR), &alarm->time); 88 rtc_time_to_tm(readl(ldata->base + RTC_MR), &alarm->time);
89 alarm->pending = __raw_readl(ldata->base + RTC_RIS); 89 alarm->pending = readl(ldata->base + RTC_RIS);
90 alarm->enabled = __raw_readl(ldata->base + RTC_IMSC); 90 alarm->enabled = readl(ldata->base + RTC_IMSC);
91 91
92 return 0; 92 return 0;
93} 93}
@@ -99,8 +99,8 @@ static int pl031_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
99 99
100 rtc_tm_to_time(&alarm->time, &time); 100 rtc_tm_to_time(&alarm->time, &time);
101 101
102 __raw_writel(time, ldata->base + RTC_MR); 102 writel(time, ldata->base + RTC_MR);
103 __raw_writel(!alarm->enabled, ldata->base + RTC_MIS); 103 writel(!alarm->enabled, ldata->base + RTC_MIS);
104 104
105 return 0; 105 return 0;
106} 106}
@@ -180,8 +180,9 @@ err_req:
180 180
181static struct amba_id pl031_ids[] __initdata = { 181static struct amba_id pl031_ids[] __initdata = {
182 { 182 {
183 .id = 0x00041031, 183 .id = 0x00041031,
184 .mask = 0x000fffff, }, 184 .mask = 0x000fffff,
185 },
185 {0, 0}, 186 {0, 0},
186}; 187};
187 188