mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 09:54:35 +00:00
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: d3c3606c5c
("timer: MediaTek: add timer driver for MediaTek SoCs")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
parent
0c7c9494d6
commit
0f02269b76
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue