-
由 Adam Ford 提交于
Most if not all i.MX SoC's call a function which enables all UARTS. This is a problem for users who need to re-parent the clock source, because any attempt to change the parent results in an busy error due to the fact that the clocks have been enabled already. clk: failed to reparent uart1 to sys_pll1_80m: -16 Instead of pre-initializing all UARTS, scan the device tree to see which UART clocks are associated to stdout, and only enable those UART clocks if it's needed early. This will move initialization of the remaining clocks until after the parenting of the clocks. When the clocks are shutdown, this mechanism will also disable any clocks that were pre-initialized. Fixes: 9461f7b3 ("clk: fix CLK_SET_RATE_GATE with clock rate protection") Suggested-by: NAisheng Dong <aisheng.dong@nxp.com> Signed-off-by: NAdam Ford <aford173@gmail.com> Reviewed-by: NAbel Vesa <abel.vesa@nxp.com> Tested-by: NAhmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: NAbel Vesa <abel.vesa@nxp.com>
379c9a24