--- linux-2.6.21.3/drivers/rtc/rtc-pl031.c.orig 2007-05-24 23:22:47.000000000 +0200 +++ linux-2.6.21.3/drivers/rtc/rtc-pl031.c 2007-06-06 22:07:53.000000000 +0200 @@ -49,9 +49,14 @@ static irqreturn_t pl031_interrupt(int irq, void *dev_id) { - struct rtc_device *rtc = dev_id; + struct pl031_local *ldata = dev_id; - rtc_update_irq(&rtc->class_dev, 1, RTC_AF); + rtc_update_irq(&ldata->rtc->class_dev, 1, RTC_AF); + + /* www.arm.com/pdfs/DDI0287B_arm926ejs_dev_chip_trm.pdf at page + 222 tells that "The interrupt is cleared by writing any data + value to the interrupt clear register RTCICR." */ + __raw_writel(1, ldata->base + RTC_ICR); return IRQ_HANDLED; } @@ -173,8 +178,11 @@ goto out_no_remap; } - if (request_irq(adev->irq[0], pl031_interrupt, IRQF_DISABLED, - "rtc-pl031", ldata->rtc)) { + /* Pass ldata to the interrupt handler, so we're able to write + the register that clears the interrupt: we need ldata->base + for that. */ + if (request_irq(adev->irq[0], pl031_interrupt, IRQF_DISABLED, + "rtc-pl031", ldata)) { ret = -EIO; goto out_no_irq; }