Commit cd65dd41 authored by Alexandre Belloni's avatar Alexandre Belloni
Browse files

rtc: sirfsoc: set range

This RTC is a 32bit counter running at 16Hz. This overflows every eight
years and a half. However, the driver uses the SW_VALUE register to store
the overflow, extending the counter to 64bit as long as the update happens
before the overflow.

Link: https://lore.kernel.org/r/20200305160452.27808-2-alexandre.belloni@bootlin.com


Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 2911ee9e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -346,6 +346,7 @@ static int sirfsoc_rtc_probe(struct platform_device *pdev)
		return PTR_ERR(rtcdrv->rtc);

	rtcdrv->rtc->ops = &sirfsoc_rtc_ops;
	rtcdrv->rtc->range_max = (1ULL << 60) - 1;

	rtcdrv->irq = platform_get_irq(pdev, 0);
	err = devm_request_irq(&pdev->dev, rtcdrv->irq, sirfsoc_rtc_irq_handler,