summaryrefslogtreecommitdiff
path: root/tools/patman/patchstream.py
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2024-06-28 19:40:46 +0200
committerTom Rini <trini@konsulko.com>2024-08-01 15:32:18 -0600
commited908c486827536a36aa236bb622a90408603e57 (patch)
tree2c5d114b84661ef6f0328b5b7a6992397d42e2d2 /tools/patman/patchstream.py
parent8937bb265a7f2251c1bd999784a4ef10e9c6080d (diff)
clk: mediatek: return XTAL rate directly for gates with XTAL parent
There is currently a massive bug that makes any gate clk that have CLK_XTAL as parent to return the wrong clock. Following the code, with CLK_XTAL defined as TOPCKGEN parent, the topckgen get_rate is called. The clk ID (0) is parsed and only in some corner case (scenario where fixed clock are not defined) the correct XTAL rate will be returned as get_factor or get_mux is called (that have correct handling for CLK_XTAL). With fixed clock defined, the rate that will be returned will always be the FIRST ELEMENT of the fixed clock table instead of the hardcoded XTAL rate. To handle this, add additional logic and if the flag is set to PARENT_XTAL for the gate, return the XTAL rate directly. We assume the clk_tree to have xtal_rate defined with clk gates that have XTAL as parents. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'tools/patman/patchstream.py')
0 files changed, 0 insertions, 0 deletions