diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2011-05-25 06:56:50 -0400 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2011-07-01 21:09:44 -0400 |
commit | 46b21218145ecef0936eb4338a9e0ffef84f00cf (patch) | |
tree | 8a69926e13fb0f8358ca5ad8bc0a7fc5440d6a0a /drivers/rtc | |
parent | 47eac337cd87464b90d0ad2eb2a060036a95b649 (diff) |
rtc: stmp3xxx: Port stmp-functions to mxs-equivalents
The stmp3xxx driver used to include functions from a stmp-specific
include. Because of consolidation, plat-stmp has now been removed and
merged with the compatible mach-mxs.
Use the apropriate mxs-functions for transition. The accessors will be
converted to readl/writel in a later patch.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Tested-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/Kconfig | 6 | ||||
-rw-r--r-- | drivers/rtc/rtc-stmp3xxx.c | 28 |
2 files changed, 17 insertions, 17 deletions
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index ce2aabf5c550..dcb61e23b985 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig | |||
@@ -981,11 +981,11 @@ config RTC_DRV_COH901331 | |||
981 | 981 | ||
982 | 982 | ||
983 | config RTC_DRV_STMP | 983 | config RTC_DRV_STMP |
984 | tristate "Freescale STMP3xxx RTC" | 984 | tristate "Freescale STMP3xxx/i.MX23/i.MX28 RTC" |
985 | depends on ARCH_STMP3XXX | 985 | depends on ARCH_MXS |
986 | help | 986 | help |
987 | If you say yes here you will get support for the onboard | 987 | If you say yes here you will get support for the onboard |
988 | STMP3xxx RTC. | 988 | STMP3xxx/i.MX23/i.MX28 RTC. |
989 | 989 | ||
990 | This driver can also be built as a module. If so, the module | 990 | This driver can also be built as a module. If so, the module |
991 | will be called rtc-stmp3xxx. | 991 | will be called rtc-stmp3xxx. |
diff --git a/drivers/rtc/rtc-stmp3xxx.c b/drivers/rtc/rtc-stmp3xxx.c index e54bea076067..ac40f971a40e 100644 --- a/drivers/rtc/rtc-stmp3xxx.c +++ b/drivers/rtc/rtc-stmp3xxx.c | |||
@@ -24,8 +24,8 @@ | |||
24 | #include <linux/rtc.h> | 24 | #include <linux/rtc.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | 26 | ||
27 | #include <mach/platform.h> | 27 | #include <mach/common.h> |
28 | #include <mach/stmp3xxx.h> | 28 | #include <mach/mxs.h> |
29 | 29 | ||
30 | #define STMP3XXX_RTC_CTRL 0x0 | 30 | #define STMP3XXX_RTC_CTRL 0x0 |
31 | #define STMP3XXX_RTC_CTRL_ALARM_IRQ_EN 0x00000001 | 31 | #define STMP3XXX_RTC_CTRL_ALARM_IRQ_EN 0x00000001 |
@@ -97,13 +97,13 @@ static irqreturn_t stmp3xxx_rtc_interrupt(int irq, void *dev_id) | |||
97 | STMP3XXX_RTC_CTRL_ONEMSEC_IRQ); | 97 | STMP3XXX_RTC_CTRL_ONEMSEC_IRQ); |
98 | 98 | ||
99 | if (status & STMP3XXX_RTC_CTRL_ALARM_IRQ) { | 99 | if (status & STMP3XXX_RTC_CTRL_ALARM_IRQ) { |
100 | stmp3xxx_clearl(STMP3XXX_RTC_CTRL_ALARM_IRQ, | 100 | __mxs_clrl(STMP3XXX_RTC_CTRL_ALARM_IRQ, |
101 | rtc_data->io + STMP3XXX_RTC_CTRL); | 101 | rtc_data->io + STMP3XXX_RTC_CTRL); |
102 | events |= RTC_AF | RTC_IRQF; | 102 | events |= RTC_AF | RTC_IRQF; |
103 | } | 103 | } |
104 | 104 | ||
105 | if (status & STMP3XXX_RTC_CTRL_ONEMSEC_IRQ) { | 105 | if (status & STMP3XXX_RTC_CTRL_ONEMSEC_IRQ) { |
106 | stmp3xxx_clearl(STMP3XXX_RTC_CTRL_ONEMSEC_IRQ, | 106 | __mxs_clrl(STMP3XXX_RTC_CTRL_ONEMSEC_IRQ, |
107 | rtc_data->io + STMP3XXX_RTC_CTRL); | 107 | rtc_data->io + STMP3XXX_RTC_CTRL); |
108 | if (++rtc_data->irq_count % 1000 == 0) { | 108 | if (++rtc_data->irq_count % 1000 == 0) { |
109 | events |= RTC_UF | RTC_IRQF; | 109 | events |= RTC_UF | RTC_IRQF; |
@@ -124,13 +124,13 @@ static int stmp3xxx_alarm_irq_enable(struct device *dev, unsigned int enabled) | |||
124 | *ctl = rtc_data->io + STMP3XXX_RTC_CTRL; | 124 | *ctl = rtc_data->io + STMP3XXX_RTC_CTRL; |
125 | 125 | ||
126 | if (enabled) { | 126 | if (enabled) { |
127 | stmp3xxx_setl(STMP3XXX_RTC_PERSISTENT0_ALARM_EN | | 127 | __mxs_setl(STMP3XXX_RTC_PERSISTENT0_ALARM_EN | |
128 | STMP3XXX_RTC_PERSISTENT0_ALARM_WAKE_EN, p); | 128 | STMP3XXX_RTC_PERSISTENT0_ALARM_WAKE_EN, p); |
129 | stmp3xxx_setl(STMP3XXX_RTC_CTRL_ALARM_IRQ_EN, ctl); | 129 | __mxs_setl(STMP3XXX_RTC_CTRL_ALARM_IRQ_EN, ctl); |
130 | } else { | 130 | } else { |
131 | stmp3xxx_clearl(STMP3XXX_RTC_PERSISTENT0_ALARM_EN | | 131 | __mxs_clrl(STMP3XXX_RTC_PERSISTENT0_ALARM_EN | |
132 | STMP3XXX_RTC_PERSISTENT0_ALARM_WAKE_EN, p); | 132 | STMP3XXX_RTC_PERSISTENT0_ALARM_WAKE_EN, p); |
133 | stmp3xxx_clearl(STMP3XXX_RTC_CTRL_ALARM_IRQ_EN, ctl); | 133 | __mxs_clrl(STMP3XXX_RTC_CTRL_ALARM_IRQ_EN, ctl); |
134 | } | 134 | } |
135 | return 0; | 135 | return 0; |
136 | } | 136 | } |
@@ -170,7 +170,7 @@ static int stmp3xxx_rtc_remove(struct platform_device *pdev) | |||
170 | if (!rtc_data) | 170 | if (!rtc_data) |
171 | return 0; | 171 | return 0; |
172 | 172 | ||
173 | stmp3xxx_clearl(STMP3XXX_RTC_CTRL_ONEMSEC_IRQ_EN | | 173 | __mxs_clrl(STMP3XXX_RTC_CTRL_ONEMSEC_IRQ_EN | |
174 | STMP3XXX_RTC_CTRL_ALARM_IRQ_EN, | 174 | STMP3XXX_RTC_CTRL_ALARM_IRQ_EN, |
175 | rtc_data->io + STMP3XXX_RTC_CTRL); | 175 | rtc_data->io + STMP3XXX_RTC_CTRL); |
176 | free_irq(rtc_data->irq_alarm, &pdev->dev); | 176 | free_irq(rtc_data->irq_alarm, &pdev->dev); |
@@ -216,8 +216,8 @@ static int stmp3xxx_rtc_probe(struct platform_device *pdev) | |||
216 | goto out_remap; | 216 | goto out_remap; |
217 | } | 217 | } |
218 | 218 | ||
219 | stmp3xxx_reset_block(rtc_data->io, true); | 219 | mxs_reset_block(rtc_data->io); |
220 | stmp3xxx_clearl(STMP3XXX_RTC_PERSISTENT0_ALARM_EN | | 220 | __mxs_clrl(STMP3XXX_RTC_PERSISTENT0_ALARM_EN | |
221 | STMP3XXX_RTC_PERSISTENT0_ALARM_WAKE_EN | | 221 | STMP3XXX_RTC_PERSISTENT0_ALARM_WAKE_EN | |
222 | STMP3XXX_RTC_PERSISTENT0_ALARM_WAKE, | 222 | STMP3XXX_RTC_PERSISTENT0_ALARM_WAKE, |
223 | rtc_data->io + STMP3XXX_RTC_PERSISTENT0); | 223 | rtc_data->io + STMP3XXX_RTC_PERSISTENT0); |
@@ -251,7 +251,7 @@ static int stmp3xxx_rtc_probe(struct platform_device *pdev) | |||
251 | out_irq1: | 251 | out_irq1: |
252 | free_irq(rtc_data->irq_alarm, &pdev->dev); | 252 | free_irq(rtc_data->irq_alarm, &pdev->dev); |
253 | out_irq_alarm: | 253 | out_irq_alarm: |
254 | stmp3xxx_clearl(STMP3XXX_RTC_CTRL_ONEMSEC_IRQ_EN | | 254 | __mxs_clrl(STMP3XXX_RTC_CTRL_ONEMSEC_IRQ_EN | |
255 | STMP3XXX_RTC_CTRL_ALARM_IRQ_EN, | 255 | STMP3XXX_RTC_CTRL_ALARM_IRQ_EN, |
256 | rtc_data->io + STMP3XXX_RTC_CTRL); | 256 | rtc_data->io + STMP3XXX_RTC_CTRL); |
257 | rtc_device_unregister(rtc_data->rtc); | 257 | rtc_device_unregister(rtc_data->rtc); |
@@ -272,8 +272,8 @@ static int stmp3xxx_rtc_resume(struct platform_device *dev) | |||
272 | { | 272 | { |
273 | struct stmp3xxx_rtc_data *rtc_data = platform_get_drvdata(dev); | 273 | struct stmp3xxx_rtc_data *rtc_data = platform_get_drvdata(dev); |
274 | 274 | ||
275 | stmp3xxx_reset_block(rtc_data->io, true); | 275 | mxs_reset_block(rtc_data->io); |
276 | stmp3xxx_clearl(STMP3XXX_RTC_PERSISTENT0_ALARM_EN | | 276 | __mxs_clrl(STMP3XXX_RTC_PERSISTENT0_ALARM_EN | |
277 | STMP3XXX_RTC_PERSISTENT0_ALARM_WAKE_EN | | 277 | STMP3XXX_RTC_PERSISTENT0_ALARM_WAKE_EN | |
278 | STMP3XXX_RTC_PERSISTENT0_ALARM_WAKE, | 278 | STMP3XXX_RTC_PERSISTENT0_ALARM_WAKE, |
279 | rtc_data->io + STMP3XXX_RTC_PERSISTENT0); | 279 | rtc_data->io + STMP3XXX_RTC_PERSISTENT0); |