diff options
Diffstat (limited to 'drivers/rtc/rtc-pxa.c')
-rw-r--r-- | drivers/rtc/rtc-pxa.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c index 29e867a1aaa8..fc9f4991574b 100644 --- a/drivers/rtc/rtc-pxa.c +++ b/drivers/rtc/rtc-pxa.c | |||
@@ -209,32 +209,6 @@ static void pxa_rtc_release(struct device *dev) | |||
209 | free_irq(pxa_rtc->irq_1Hz, dev); | 209 | free_irq(pxa_rtc->irq_1Hz, dev); |
210 | } | 210 | } |
211 | 211 | ||
212 | static int pxa_periodic_irq_set_freq(struct device *dev, int freq) | ||
213 | { | ||
214 | struct pxa_rtc *pxa_rtc = dev_get_drvdata(dev); | ||
215 | int period_ms; | ||
216 | |||
217 | if (freq < 1 || freq > MAXFREQ_PERIODIC) | ||
218 | return -EINVAL; | ||
219 | |||
220 | period_ms = 1000 / freq; | ||
221 | rtc_writel(pxa_rtc, PIAR, period_ms); | ||
222 | |||
223 | return 0; | ||
224 | } | ||
225 | |||
226 | static int pxa_periodic_irq_set_state(struct device *dev, int enabled) | ||
227 | { | ||
228 | struct pxa_rtc *pxa_rtc = dev_get_drvdata(dev); | ||
229 | |||
230 | if (enabled) | ||
231 | rtsr_set_bits(pxa_rtc, RTSR_PIALE | RTSR_PICE); | ||
232 | else | ||
233 | rtsr_clear_bits(pxa_rtc, RTSR_PIALE | RTSR_PICE); | ||
234 | |||
235 | return 0; | ||
236 | } | ||
237 | |||
238 | static int pxa_alarm_irq_enable(struct device *dev, unsigned int enabled) | 212 | static int pxa_alarm_irq_enable(struct device *dev, unsigned int enabled) |
239 | { | 213 | { |
240 | struct pxa_rtc *pxa_rtc = dev_get_drvdata(dev); | 214 | struct pxa_rtc *pxa_rtc = dev_get_drvdata(dev); |
@@ -250,21 +224,6 @@ static int pxa_alarm_irq_enable(struct device *dev, unsigned int enabled) | |||
250 | return 0; | 224 | return 0; |
251 | } | 225 | } |
252 | 226 | ||
253 | static int pxa_update_irq_enable(struct device *dev, unsigned int enabled) | ||
254 | { | ||
255 | struct pxa_rtc *pxa_rtc = dev_get_drvdata(dev); | ||
256 | |||
257 | spin_lock_irq(&pxa_rtc->lock); | ||
258 | |||
259 | if (enabled) | ||
260 | rtsr_set_bits(pxa_rtc, RTSR_HZE); | ||
261 | else | ||
262 | rtsr_clear_bits(pxa_rtc, RTSR_HZE); | ||
263 | |||
264 | spin_unlock_irq(&pxa_rtc->lock); | ||
265 | return 0; | ||
266 | } | ||
267 | |||
268 | static int pxa_rtc_read_time(struct device *dev, struct rtc_time *tm) | 227 | static int pxa_rtc_read_time(struct device *dev, struct rtc_time *tm) |
269 | { | 228 | { |
270 | struct pxa_rtc *pxa_rtc = dev_get_drvdata(dev); | 229 | struct pxa_rtc *pxa_rtc = dev_get_drvdata(dev); |
@@ -346,10 +305,7 @@ static const struct rtc_class_ops pxa_rtc_ops = { | |||
346 | .read_alarm = pxa_rtc_read_alarm, | 305 | .read_alarm = pxa_rtc_read_alarm, |
347 | .set_alarm = pxa_rtc_set_alarm, | 306 | .set_alarm = pxa_rtc_set_alarm, |
348 | .alarm_irq_enable = pxa_alarm_irq_enable, | 307 | .alarm_irq_enable = pxa_alarm_irq_enable, |
349 | .update_irq_enable = pxa_update_irq_enable, | ||
350 | .proc = pxa_rtc_proc, | 308 | .proc = pxa_rtc_proc, |
351 | .irq_set_state = pxa_periodic_irq_set_state, | ||
352 | .irq_set_freq = pxa_periodic_irq_set_freq, | ||
353 | }; | 309 | }; |
354 | 310 | ||
355 | static int __init pxa_rtc_probe(struct platform_device *pdev) | 311 | static int __init pxa_rtc_probe(struct platform_device *pdev) |