Skip to content

Commit 46b2121

Browse files
Wolfram Sangjohnstultz-work
authored andcommitted
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>
1 parent 47eac33 commit 46b2121

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

‎drivers/rtc/Kconfig‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -981,11 +981,11 @@ config RTC_DRV_COH901331
981981

982982

983983
config RTC_DRV_STMP
984-
tristate "Freescale STMP3xxx RTC"
985-
depends on ARCH_STMP3XXX
984+
tristate "Freescale STMP3xxx/i.MX23/i.MX28 RTC"
985+
depends on ARCH_MXS
986986
help
987987
If you say yes here you will get support for the onboard
988-
STMP3xxx RTC.
988+
STMP3xxx/i.MX23/i.MX28 RTC.
989989

990990
This driver can also be built as a module. If so, the module
991991
will be called rtc-stmp3xxx.

‎drivers/rtc/rtc-stmp3xxx.c‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
#include <linux/rtc.h>
2525
#include <linux/slab.h>
2626

27-
#include <mach/platform.h>
28-
#include <mach/stmp3xxx.h>
27+
#include <mach/common.h>
28+
#include <mach/mxs.h>
2929

3030
#define STMP3XXX_RTC_CTRL 0x0
3131
#define STMP3XXX_RTC_CTRL_ALARM_IRQ_EN 0x00000001
@@ -97,13 +97,13 @@ static irqreturn_t stmp3xxx_rtc_interrupt(int irq, void *dev_id)
9797
STMP3XXX_RTC_CTRL_ONEMSEC_IRQ);
9898

9999
if (status & STMP3XXX_RTC_CTRL_ALARM_IRQ) {
100-
stmp3xxx_clearl(STMP3XXX_RTC_CTRL_ALARM_IRQ,
100+
__mxs_clrl(STMP3XXX_RTC_CTRL_ALARM_IRQ,
101101
rtc_data->io + STMP3XXX_RTC_CTRL);
102102
events |= RTC_AF | RTC_IRQF;
103103
}
104104

105105
if (status & STMP3XXX_RTC_CTRL_ONEMSEC_IRQ) {
106-
stmp3xxx_clearl(STMP3XXX_RTC_CTRL_ONEMSEC_IRQ,
106+
__mxs_clrl(STMP3XXX_RTC_CTRL_ONEMSEC_IRQ,
107107
rtc_data->io + STMP3XXX_RTC_CTRL);
108108
if (++rtc_data->irq_count % 1000 == 0) {
109109
events |= RTC_UF | RTC_IRQF;
@@ -124,13 +124,13 @@ static int stmp3xxx_alarm_irq_enable(struct device *dev, unsigned int enabled)
124124
*ctl = rtc_data->io + STMP3XXX_RTC_CTRL;
125125

126126
if (enabled) {
127-
stmp3xxx_setl(STMP3XXX_RTC_PERSISTENT0_ALARM_EN |
127+
__mxs_setl(STMP3XXX_RTC_PERSISTENT0_ALARM_EN |
128128
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);
130130
} else {
131-
stmp3xxx_clearl(STMP3XXX_RTC_PERSISTENT0_ALARM_EN |
131+
__mxs_clrl(STMP3XXX_RTC_PERSISTENT0_ALARM_EN |
132132
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);
134134
}
135135
return 0;
136136
}
@@ -170,7 +170,7 @@ static int stmp3xxx_rtc_remove(struct platform_device *pdev)
170170
if (!rtc_data)
171171
return 0;
172172

173-
stmp3xxx_clearl(STMP3XXX_RTC_CTRL_ONEMSEC_IRQ_EN |
173+
__mxs_clrl(STMP3XXX_RTC_CTRL_ONEMSEC_IRQ_EN |
174174
STMP3XXX_RTC_CTRL_ALARM_IRQ_EN,
175175
rtc_data->io + STMP3XXX_RTC_CTRL);
176176
free_irq(rtc_data->irq_alarm, &pdev->dev);
@@ -216,8 +216,8 @@ static int stmp3xxx_rtc_probe(struct platform_device *pdev)
216216
goto out_remap;
217217
}
218218

219-
stmp3xxx_reset_block(rtc_data->io, true);
220-
stmp3xxx_clearl(STMP3XXX_RTC_PERSISTENT0_ALARM_EN |
219+
mxs_reset_block(rtc_data->io);
220+
__mxs_clrl(STMP3XXX_RTC_PERSISTENT0_ALARM_EN |
221221
STMP3XXX_RTC_PERSISTENT0_ALARM_WAKE_EN |
222222
STMP3XXX_RTC_PERSISTENT0_ALARM_WAKE,
223223
rtc_data->io + STMP3XXX_RTC_PERSISTENT0);
@@ -251,7 +251,7 @@ static int stmp3xxx_rtc_probe(struct platform_device *pdev)
251251
out_irq1:
252252
free_irq(rtc_data->irq_alarm, &pdev->dev);
253253
out_irq_alarm:
254-
stmp3xxx_clearl(STMP3XXX_RTC_CTRL_ONEMSEC_IRQ_EN |
254+
__mxs_clrl(STMP3XXX_RTC_CTRL_ONEMSEC_IRQ_EN |
255255
STMP3XXX_RTC_CTRL_ALARM_IRQ_EN,
256256
rtc_data->io + STMP3XXX_RTC_CTRL);
257257
rtc_device_unregister(rtc_data->rtc);
@@ -272,8 +272,8 @@ static int stmp3xxx_rtc_resume(struct platform_device *dev)
272272
{
273273
struct stmp3xxx_rtc_data *rtc_data = platform_get_drvdata(dev);
274274

275-
stmp3xxx_reset_block(rtc_data->io, true);
276-
stmp3xxx_clearl(STMP3XXX_RTC_PERSISTENT0_ALARM_EN |
275+
mxs_reset_block(rtc_data->io);
276+
__mxs_clrl(STMP3XXX_RTC_PERSISTENT0_ALARM_EN |
277277
STMP3XXX_RTC_PERSISTENT0_ALARM_WAKE_EN |
278278
STMP3XXX_RTC_PERSISTENT0_ALARM_WAKE,
279279
rtc_data->io + STMP3XXX_RTC_PERSISTENT0);

0 commit comments

Comments
 (0)