aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChristian Marangi2024-07-06 18:13:02 +0200
committerTom Rini2024-07-18 07:40:30 -0600
commit0f02269b76bc25a7c9332ae8630ba407cb62f9ec (patch)
tree029ca1e833d6691edc3e7e46bae080905b07f523 /drivers
parent0c7c9494d61bd6c2284a57e29ffd3729e5c9d8d3 (diff)
timer: mtk: skip setting parent with dummy fixed-clock
Skip setting parent with dummy fixed-clock. Upstream linux might declare an additional clock for the mtk timer and that additional clock might also be a fixed-clock defined in DT. Setting parent of a dummy fixed-clock resulta in error hence mtk timer fails to probe. Skip setting parent to permit correct probe of the mtk timer. Fixes: d3c3606c5cc6 ("timer: MediaTek: add timer driver for MediaTek SoCs") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/timer/mtk_timer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/timer/mtk_timer.c b/drivers/timer/mtk_timer.c
index 8216c289837..06deb23eb99 100644
--- a/drivers/timer/mtk_timer.c
+++ b/drivers/timer/mtk_timer.c
@@ -73,7 +73,8 @@ static int mtk_timer_probe(struct udevice *dev)
return ret;
ret = clk_get_by_index(dev, 1, &parent);
- if (!ret) {
+ /* Skip setting the parent with dummy fixed-clock */
+ if (!ret && parent.dev->driver != DM_DRIVER_GET(fixed_clock)) {
ret = clk_set_parent(&clk, &parent);
if (ret)
return ret;