aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-ds1553.c2
-rw-r--r--drivers/rtc/rtc-ds1742.c2
-rw-r--r--drivers/rtc/rtc-rs5c348.c2
-rw-r--r--drivers/rtc/rtc-v3020.c9
4 files changed, 10 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c
index 46da5714932c..5ab3492817d1 100644
--- a/drivers/rtc/rtc-ds1553.c
+++ b/drivers/rtc/rtc-ds1553.c
@@ -61,7 +61,7 @@
61struct rtc_plat_data { 61struct rtc_plat_data {
62 struct rtc_device *rtc; 62 struct rtc_device *rtc;
63 void __iomem *ioaddr; 63 void __iomem *ioaddr;
64 unsigned long baseaddr; 64 resource_size_t baseaddr;
65 unsigned long last_jiffies; 65 unsigned long last_jiffies;
66 int irq; 66 int irq;
67 unsigned int irqen; 67 unsigned int irqen;
diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c
index b2e5481ba3b6..67291b0f8283 100644
--- a/drivers/rtc/rtc-ds1742.c
+++ b/drivers/rtc/rtc-ds1742.c
@@ -55,7 +55,7 @@ struct rtc_plat_data {
55 void __iomem *ioaddr_rtc; 55 void __iomem *ioaddr_rtc;
56 size_t size_nvram; 56 size_t size_nvram;
57 size_t size; 57 size_t size;
58 unsigned long baseaddr; 58 resource_size_t baseaddr;
59 unsigned long last_jiffies; 59 unsigned long last_jiffies;
60}; 60};
61 61
diff --git a/drivers/rtc/rtc-rs5c348.c b/drivers/rtc/rtc-rs5c348.c
index f50f3fc353cd..839462659afa 100644
--- a/drivers/rtc/rtc-rs5c348.c
+++ b/drivers/rtc/rtc-rs5c348.c
@@ -226,7 +226,7 @@ static int __devexit rs5c348_remove(struct spi_device *spi)
226 226
227static struct spi_driver rs5c348_driver = { 227static struct spi_driver rs5c348_driver = {
228 .driver = { 228 .driver = {
229 .name = "rs5c348", 229 .name = "rtc-rs5c348",
230 .bus = &spi_bus_type, 230 .bus = &spi_bus_type,
231 .owner = THIS_MODULE, 231 .owner = THIS_MODULE,
232 }, 232 },
diff --git a/drivers/rtc/rtc-v3020.c b/drivers/rtc/rtc-v3020.c
index 3b58d3d5d38a..a6b572978dc0 100644
--- a/drivers/rtc/rtc-v3020.c
+++ b/drivers/rtc/rtc-v3020.c
@@ -26,6 +26,7 @@
26#include <linux/types.h> 26#include <linux/types.h>
27#include <linux/bcd.h> 27#include <linux/bcd.h>
28#include <linux/rtc-v3020.h> 28#include <linux/rtc-v3020.h>
29#include <linux/delay.h>
29 30
30#include <asm/io.h> 31#include <asm/io.h>
31 32
@@ -47,6 +48,7 @@ static void v3020_set_reg(struct v3020 *chip, unsigned char address,
47 for (i = 0; i < 4; i++) { 48 for (i = 0; i < 4; i++) {
48 writel((tmp & 1) << chip->leftshift, chip->ioaddress); 49 writel((tmp & 1) << chip->leftshift, chip->ioaddress);
49 tmp >>= 1; 50 tmp >>= 1;
51 udelay(1);
50 } 52 }
51 53
52 /* Commands dont have data */ 54 /* Commands dont have data */
@@ -54,6 +56,7 @@ static void v3020_set_reg(struct v3020 *chip, unsigned char address,
54 for (i = 0; i < 8; i++) { 56 for (i = 0; i < 8; i++) {
55 writel((data & 1) << chip->leftshift, chip->ioaddress); 57 writel((data & 1) << chip->leftshift, chip->ioaddress);
56 data >>= 1; 58 data >>= 1;
59 udelay(1);
57 } 60 }
58 } 61 }
59} 62}
@@ -66,12 +69,14 @@ static unsigned char v3020_get_reg(struct v3020 *chip, unsigned char address)
66 for (i = 0; i < 4; i++) { 69 for (i = 0; i < 4; i++) {
67 writel((address & 1) << chip->leftshift, chip->ioaddress); 70 writel((address & 1) << chip->leftshift, chip->ioaddress);
68 address >>= 1; 71 address >>= 1;
72 udelay(1);
69 } 73 }
70 74
71 for (i = 0; i < 8; i++) { 75 for (i = 0; i < 8; i++) {
72 data >>= 1; 76 data >>= 1;
73 if (readl(chip->ioaddress) & (1 << chip->leftshift)) 77 if (readl(chip->ioaddress) & (1 << chip->leftshift))
74 data |= 0x80; 78 data |= 0x80;
79 udelay(1);
75 } 80 }
76 81
77 return data; 82 return data;
@@ -95,7 +100,7 @@ static int v3020_read_time(struct device *dev, struct rtc_time *dt)
95 tmp = v3020_get_reg(chip, V3020_MONTH_DAY); 100 tmp = v3020_get_reg(chip, V3020_MONTH_DAY);
96 dt->tm_mday = BCD2BIN(tmp); 101 dt->tm_mday = BCD2BIN(tmp);
97 tmp = v3020_get_reg(chip, V3020_MONTH); 102 tmp = v3020_get_reg(chip, V3020_MONTH);
98 dt->tm_mon = BCD2BIN(tmp); 103 dt->tm_mon = BCD2BIN(tmp) - 1;
99 tmp = v3020_get_reg(chip, V3020_WEEK_DAY); 104 tmp = v3020_get_reg(chip, V3020_WEEK_DAY);
100 dt->tm_wday = BCD2BIN(tmp); 105 dt->tm_wday = BCD2BIN(tmp);
101 tmp = v3020_get_reg(chip, V3020_YEAR); 106 tmp = v3020_get_reg(chip, V3020_YEAR);
@@ -135,7 +140,7 @@ static int v3020_set_time(struct device *dev, struct rtc_time *dt)
135 v3020_set_reg(chip, V3020_MINUTES, BIN2BCD(dt->tm_min)); 140 v3020_set_reg(chip, V3020_MINUTES, BIN2BCD(dt->tm_min));
136 v3020_set_reg(chip, V3020_HOURS, BIN2BCD(dt->tm_hour)); 141 v3020_set_reg(chip, V3020_HOURS, BIN2BCD(dt->tm_hour));
137 v3020_set_reg(chip, V3020_MONTH_DAY, BIN2BCD(dt->tm_mday)); 142 v3020_set_reg(chip, V3020_MONTH_DAY, BIN2BCD(dt->tm_mday));
138 v3020_set_reg(chip, V3020_MONTH, BIN2BCD(dt->tm_mon)); 143 v3020_set_reg(chip, V3020_MONTH, BIN2BCD(dt->tm_mon + 1));
139 v3020_set_reg(chip, V3020_WEEK_DAY, BIN2BCD(dt->tm_wday)); 144 v3020_set_reg(chip, V3020_WEEK_DAY, BIN2BCD(dt->tm_wday));
140 v3020_set_reg(chip, V3020_YEAR, BIN2BCD(dt->tm_year % 100)); 145 v3020_set_reg(chip, V3020_YEAR, BIN2BCD(dt->tm_year % 100));
141 146