• Chen-Yu Tsai's avatar
    clk: sunxi-ng: mux: Add clk notifier functions · 8adfb086
    Chen-Yu Tsai authored
    On sunxi we support cpufreq by changing the clock rate of PLL-CPU.
    It's possible the clock output of the PLL goes out of the CPU's
    operational limits when the PLL's multipliers / dividers are changed
    and it hasn't stabilized yet. This would result in the CPU hanging.
    
    To circumvent this, we temporarily switch the CPU mux clock to another
    stable clock before the rate change, and switch it back after the PLL
    stabilizes. This is done with clk notifiers registered on the PLL.
    
    This patch adds common functions for notifiers to reparent mux clocks.
    Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
    Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
    8adfb086
ccu_mux.h 2.69 KB