Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clk: rockchip: Add PLL flag ROCKCHIP_PLL_FIXED_MODE

RK3528 comes with a new PLL variant: its "PPLL", which mainly generates
clocks for the PCIe controller, operates in normal mode only. Let's
describe it with flag ROCKCHIP_PLL_FIXED_MODE and handle it in code.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Link: https://lore.kernel.org/r/20250217061142.38480-7-ziyao@disroot.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>

authored by

Yao Zi and committed by
Heiko Stuebner
651aabc9 3688efdb

+8 -4
+6 -4
drivers/clk/rockchip/clk-pll.c
··· 204 204 rockchip_rk3036_pll_get_params(pll, &cur); 205 205 cur.rate = 0; 206 206 207 - cur_parent = pll_mux_ops->get_parent(&pll_mux->hw); 208 - if (cur_parent == PLL_MODE_NORM) { 209 - pll_mux_ops->set_parent(&pll_mux->hw, PLL_MODE_SLOW); 210 - rate_change_remuxed = 1; 207 + if (!(pll->flags & ROCKCHIP_PLL_FIXED_MODE)) { 208 + cur_parent = pll_mux_ops->get_parent(&pll_mux->hw); 209 + if (cur_parent == PLL_MODE_NORM) { 210 + pll_mux_ops->set_parent(&pll_mux->hw, PLL_MODE_SLOW); 211 + rate_change_remuxed = 1; 212 + } 211 213 } 212 214 213 215 /* update pll values */
+2
drivers/clk/rockchip/clk.h
··· 444 444 * Flags: 445 445 * ROCKCHIP_PLL_SYNC_RATE - check rate parameters to match against the 446 446 * rate_table parameters and ajust them if necessary. 447 + * ROCKCHIP_PLL_FIXED_MODE - the pll operates in normal mode only 447 448 */ 448 449 struct rockchip_pll_clock { 449 450 unsigned int id; ··· 462 461 }; 463 462 464 463 #define ROCKCHIP_PLL_SYNC_RATE BIT(0) 464 + #define ROCKCHIP_PLL_FIXED_MODE BIT(1) 465 465 466 466 #define PLL(_type, _id, _name, _pnames, _flags, _con, _mode, _mshift, \ 467 467 _lshift, _pflags, _rtable) \