On Wed, Dec 02, 2020 at 12:13:17PM +0100, Marek Szyprowski wrote: > Bootloader might use RTC hardware and leave it in the enabled state. Ensure > that the potentially enabled periodic tick interrupts are disabled before > enabling the driver, because they might cause lockup if tick interrupt > happens after disabling RTC gate clock. > > Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> > --- > drivers/rtc/rtc-s3c.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c > index 24a41909f049..16a326e95d46 100644 > --- a/drivers/rtc/rtc-s3c.c > +++ b/drivers/rtc/rtc-s3c.c > @@ -503,6 +503,10 @@ static int s3c_rtc_probe(struct platform_device *pdev) > goto err_src_clk; > } > > + /* disable RTC enable bits potentially set by the bootloader */ > + if (info->data->disable) > + info->data->disable(info); > + It took me some time to figure out why this makes sense: disable followed immediately by enable. :) You could add in commit msg that enable() callback does not enable the tick interrupt. Reviewed-by: Krzysztof Kozlowski <krzk@xxxxxxxxxx> Best regards, Krzysztof