1
0
Fork 0

rtc: s3c: Disable all enable (RTC, tick) bits in the probe

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@samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201202111318.5353-1-m.szyprowski@samsung.com
zero-sugar-mainline-defconfig
Marek Szyprowski 2020-12-02 12:13:17 +01:00 committed by Alexandre Belloni
parent 00c33482bb
commit 31b16d978f
1 changed files with 4 additions and 0 deletions

View File

@ -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);
/* check to see if everything is setup correctly */
if (info->data->enable)
info->data->enable(info);