Skip to content

Commit 37385c0

Browse files
geertudlezcano
authored andcommitted
clocksource/drivers/renesas-ostm: Avoid reprobe after successful early probe
The Renesas OS Timer (OSTM) driver contains two probe points, of which only one should complete: 1. Early probe, using TIMER_OF_DECLARE(), to provide the sole clocksource on (arm32) RZ/A1 and RZ/A2 SoCs, 2. Normal probe, using a platform driver, to provide additional timers on (arm64 + riscv) RZ/G2L and similar SoCs. The latter is needed because using OSTM on RZ/G2L requires manipulation of its reset signal, which is not yet available at the time of early probe, causing early probe to fail with -EPROBE_DEFER. It is only enabled when building a kernel with support for the RZ/G2L family, so it does not impact RZ/A1 and RZ/A2. Hence only one probe method can complete on all affected systems. As relying on the order of initialization of subsystems inside the kernel is fragile, set the DT node's OF_POPULATED flag after a succesful early probe. This makes sure the platform driver's probe is never called after a successful early probe. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviwed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/bd027379713cbaafa21ffe9e848ebb7f475ca0e7.1710930542.git.geert+renesas@glider.be
1 parent 0f63c95 commit 37385c0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/clocksource/renesas-ostm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ static int __init ostm_init(struct device_node *np)
210210
pr_info("%pOF: used for clock events\n", np);
211211
}
212212

213+
of_node_set_flag(np, OF_POPULATED);
213214
return 0;
214215

215216
err_cleanup:

0 commit comments

Comments
 (0)