Commit d0fd9378 authored by Mike Frysinger's avatar Mike Frysinger Committed by Linus Torvalds

Blackfin RTC Driver: dont let RTC programming in bootloaders randomly cause ~5 second boot delays

Signed-off-by: default avatarMike Frysinger <>
Signed-off-by: default avatarBryan Wu <>
Cc: Alessandro Zummo <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 7f604599
......@@ -363,6 +363,7 @@ static int __devinit bfin_rtc_probe(struct platform_device *pdev)
struct bfin_rtc *rtc;
struct device *dev = &pdev->dev;
int ret = 0;
unsigned long timeout;
......@@ -377,6 +378,13 @@ static int __devinit bfin_rtc_probe(struct platform_device *pdev)
ret = request_irq(IRQ_RTC, bfin_rtc_interrupt, IRQF_SHARED, pdev->name, dev);
if (unlikely(ret))
goto err;
/* sometimes the bootloader touched things, but the write complete was not
* enabled, so let's just do a quick timeout here since the IRQ will not fire ...
timeout = jiffies + HZ;
if (time_after(jiffies, timeout))
bfin_rtc_reset(dev, RTC_ISTAT_WRITE_COMPLETE);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment