aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-pl031.c
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2011-02-03 15:02:07 -0500
committerJohn Stultz <john.stultz@linaro.org>2011-03-09 14:23:35 -0500
commit696160fec162601d06940862b5b3aa4460344c1b (patch)
tree63c5d1d87f140b6a989256727b62071dd19d894b /drivers/rtc/rtc-pl031.c
parent80d4bb515b78f38738f3378fd1be6039063ab040 (diff)
RTC: Cleanup rtc_class_ops->irq_set_freq()
With the generic rtc code now emulating PIE mode irqs via an hrtimer, no one calls the rtc_class_ops->irq_set_freq call. This patch removes the hook and deletes the driver functions if no one else calls them. CC: Thomas Gleixner <tglx@linutronix.de> CC: Alessandro Zummo <a.zummo@towertech.it> CC: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br> CC: rtc-linux@googlegroups.com Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'drivers/rtc/rtc-pl031.c')
-rw-r--r--drivers/rtc/rtc-pl031.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c
index 0e7c15b24c1c..d829ea63c4fb 100644
--- a/drivers/rtc/rtc-pl031.c
+++ b/drivers/rtc/rtc-pl031.c
@@ -293,25 +293,6 @@ static int pl031_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
293 return ret; 293 return ret;
294} 294}
295 295
296static int pl031_irq_set_freq(struct device *dev, int freq)
297{
298 struct pl031_local *ldata = dev_get_drvdata(dev);
299
300 /* Cant set timer if it is already enabled */
301 if (readl(ldata->base + RTC_TCR) & RTC_TCR_EN) {
302 dev_err(dev, "can't change frequency while timer enabled\n");
303 return -EINVAL;
304 }
305
306 /* If self start bit in RTC_TCR is set timer will start here,
307 * but we never set that bit. Instead we start the timer when
308 * set_state is called with enabled == 1.
309 */
310 writel(RTC_TIMER_FREQ / freq, ldata->base + RTC_TLR);
311
312 return 0;
313}
314
315static int pl031_remove(struct amba_device *adev) 296static int pl031_remove(struct amba_device *adev)
316{ 297{
317 struct pl031_local *ldata = dev_get_drvdata(&adev->dev); 298 struct pl031_local *ldata = dev_get_drvdata(&adev->dev);
@@ -408,7 +389,6 @@ static struct rtc_class_ops stv1_pl031_ops = {
408 .read_alarm = pl031_read_alarm, 389 .read_alarm = pl031_read_alarm,
409 .set_alarm = pl031_set_alarm, 390 .set_alarm = pl031_set_alarm,
410 .alarm_irq_enable = pl031_alarm_irq_enable, 391 .alarm_irq_enable = pl031_alarm_irq_enable,
411 .irq_set_freq = pl031_irq_set_freq,
412}; 392};
413 393
414/* And the second ST derivative */ 394/* And the second ST derivative */
@@ -418,7 +398,6 @@ static struct rtc_class_ops stv2_pl031_ops = {
418 .read_alarm = pl031_stv2_read_alarm, 398 .read_alarm = pl031_stv2_read_alarm,
419 .set_alarm = pl031_stv2_set_alarm, 399 .set_alarm = pl031_stv2_set_alarm,
420 .alarm_irq_enable = pl031_alarm_irq_enable, 400 .alarm_irq_enable = pl031_alarm_irq_enable,
421 .irq_set_freq = pl031_irq_set_freq,
422}; 401};
423 402
424static struct amba_id pl031_ids[] = { 403static struct amba_id pl031_ids[] = {