Skip to content

Commit 05d2709

Browse files
ConchuODclaudiubeznea
authored andcommitted
clk: microchip: mpfs: make the rtc's ahb clock critical
The onboard RTC's AHB bus clock must be kept running as the RTC will stop & lose track of time if the AHB interface clock is disabled. Fixes: 635e5e7 ("clk: microchip: Add driver for Microchip PolarFire SoC") Signed-off-by: Conor Dooley <[email protected]> Signed-off-by: Claudiu Beznea <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 5da39ac commit 05d2709

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/clk/microchip/clk-mpfs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,8 @@ static const struct clk_ops mpfs_periph_clk_ops = {
375375
* trap handler
376376
* - CLK_MMUART0: reserved by the hss
377377
* - CLK_DDRC: provides clock to the ddr subsystem
378+
* - CLK_RTC: the onboard RTC's AHB bus clock must be kept running as the rtc will stop
379+
* if the AHB interface clock is disabled
378380
* - CLK_FICx: these provide the processor side clocks to the "FIC" (Fabric InterConnect)
379381
* clock domain crossers which provide the interface to the FPGA fabric. Disabling them
380382
* causes the FPGA fabric to go into reset.
@@ -399,7 +401,7 @@ static struct mpfs_periph_hw_clock mpfs_periph_clks[] = {
399401
CLK_PERIPH(CLK_CAN0, "clk_periph_can0", PARENT_CLK(AHB), 14, 0),
400402
CLK_PERIPH(CLK_CAN1, "clk_periph_can1", PARENT_CLK(AHB), 15, 0),
401403
CLK_PERIPH(CLK_USB, "clk_periph_usb", PARENT_CLK(AHB), 16, 0),
402-
CLK_PERIPH(CLK_RTC, "clk_periph_rtc", PARENT_CLK(AHB), 18, 0),
404+
CLK_PERIPH(CLK_RTC, "clk_periph_rtc", PARENT_CLK(AHB), 18, CLK_IS_CRITICAL),
403405
CLK_PERIPH(CLK_QSPI, "clk_periph_qspi", PARENT_CLK(AHB), 19, 0),
404406
CLK_PERIPH(CLK_GPIO0, "clk_periph_gpio0", PARENT_CLK(AHB), 20, 0),
405407
CLK_PERIPH(CLK_GPIO1, "clk_periph_gpio1", PARENT_CLK(AHB), 21, 0),

0 commit comments

Comments
 (0)