]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
riscv: Fix kernel time_init()
authorDamien Le Moal <damien.lemoal@wdc.com>
Sun, 13 Dec 2020 13:50:34 +0000 (22:50 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jan 2021 10:47:43 +0000 (11:47 +0100)
commitcd0c46821aa5bbc3f2f2a09a68b9adc647fb4167
tree30213ad3d5c00ef261b10f9c531f990e498097e4
parent5a1d7bb7d333849eb7d3ab5ebfbf9805b2cd46c9
riscv: Fix kernel time_init()

[ Upstream commit 11f4c2e940e2f317c9d8fb5a79702f2a4a02ff98 ]

If of_clk_init() is not called in time_init(), clock providers defined
in the system device tree are not initialized, resulting in failures for
other devices to initialize due to missing clocks.
Similarly to other architectures and to the default kernel time_init()
implementation, call of_clk_init() before executing timer_probe() in
time_init().

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/riscv/kernel/time.c