OSDN Git Service

clocksource/drivers/dw_apb_timer_of: Add error handling if no clock available
authorDinh Nguyen <dinguyen@kernel.org>
Sat, 5 Dec 2020 10:52:23 +0000 (04:52 -0600)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Sat, 5 Dec 2020 18:33:55 +0000 (19:33 +0100)
commit5d9814df0aec56a638bbf20795abb4cfaf3cd331
tree507e92555147562b03cfdff83ee06eefd35d4162
parentfef92cd2bc04c64bb3743d40c0b4be47aedf9e23
clocksource/drivers/dw_apb_timer_of: Add error handling if no clock available

commit ("b0fc70ce1f02 arm64: berlin: Select DW_APB_TIMER_OF") added the
support for the dw_apb_timer into the arm64 defconfig. However, for some
platforms like the Intel Stratix10 and Agilex, the clock manager doesn't
get loaded until after the timer driver get loaded. Thus, the driver hits
the panic "No clock nor clock-frequency property for" because it cannot
properly get the clock.

This patch adds the error handling needed for the timer driver so that
the kernel can continue booting instead of just hitting the panic.

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201205105223.208604-1-dinguyen@kernel.org
drivers/clocksource/dw_apb_timer_of.c