mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
clk: mediatek: return XTAL rate for infrasys get_mux_rate
We currently return 0 if XTAL rate is requested in get_mux_rate. This deviates from what is done in get_factor_rate and is totally wrong as it can cause unwanted results (division by 0 crash) For infrasys that makes use of CLK_XTAL, assume xtal_rate to be defined in clk_tree and return the rate when BYPASS_XTAL is not enabled with clk ID 0 index parents. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
committed by
Tom Rini
parent
ed908c4868
commit
bf6ba78143
@@ -377,7 +377,7 @@ static ulong mtk_infrasys_get_mux_rate(struct clk *clk, u32 off)
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return priv->tree->xtal_rate;
|
||||
}
|
||||
|
||||
static ulong mtk_topckgen_get_rate(struct clk *clk)
|
||||
|
||||
Reference in New Issue
Block a user