linux_dsm_epyc7002/drivers/clk/imx
Adam Ford 9e33e261b4 clk: imx: Fix reparenting of UARTs not associated with stdout
[ Upstream commit 379c9a24cc239000b1dec53db02fe17a86947423 ]

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: 9461f7b33d ("clk: fix CLK_SET_RATE_GATE with clock rate protection")
Suggested-by: Aisheng Dong <aisheng.dong@nxp.com>
Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Tested-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-14 09:50:25 +02:00
..
clk-busy.c clk: imx: Explicitly include bits.h 2020-08-22 20:36:57 +08:00
clk-composite-7ulp.c clk: imx: Explicitly include bits.h 2020-08-22 20:36:57 +08:00
clk-composite-8m.c clk: imx: fix composite peripheral flags 2020-09-07 11:08:50 +08:00
clk-cpu.c clk: imx: Support building i.MX common clock driver as module 2020-08-22 12:38:20 +08:00
clk-divider-gate.c clk: imx: Rename the imx_clk_divider_gate to imply it's clk_hw based 2019-12-11 19:19:59 +08:00
clk-fixup-div.c clk: imx: drop redundant initialization 2020-02-17 14:32:32 +08:00
clk-fixup-mux.c clk: imx: Explicitly include bits.h 2020-08-22 20:36:57 +08:00
clk-frac-pll.c clk: imx: Support building i.MX common clock driver as module 2020-08-22 12:38:20 +08:00
clk-gate2.c clk: imx: gate2: Fix a few typos 2020-09-13 09:21:29 +08:00
clk-gate-exclusive.c This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
clk-imx1.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
clk-imx5.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-05-14 09:50:25 +02:00
clk-imx6q.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-05-14 09:50:25 +02:00
clk-imx6sl.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-05-14 09:50:25 +02:00
clk-imx6sll.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-05-14 09:50:25 +02:00
clk-imx6sx.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-05-14 09:50:25 +02:00
clk-imx6ul.c clk: imx: imx6ul: change flexcan clock to support CiA bitrates 2020-04-13 22:22:33 +08:00
clk-imx7d.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-05-14 09:50:25 +02:00
clk-imx7ulp.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-05-14 09:50:25 +02:00
clk-imx8mm.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-05-14 09:50:25 +02:00
clk-imx8mn.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-05-14 09:50:25 +02:00
clk-imx8mp.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-05-14 09:50:25 +02:00
clk-imx8mq.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-05-14 09:50:25 +02:00
clk-imx8qxp-lpcg.c clk: imx8qxp: Support building i.MX8QXP clock driver as module 2020-08-22 12:38:29 +08:00
clk-imx8qxp-lpcg.h clk: imx: add imx8qxp lpcg driver 2018-12-14 13:01:14 -08:00
clk-imx8qxp.c clk: imx8qxp: Support building i.MX8QXP clock driver as module 2020-08-22 12:38:29 +08:00
clk-imx25.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-05-14 09:50:25 +02:00
clk-imx27.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-05-14 09:50:25 +02:00
clk-imx31.c clk: imx: imx31: Remove mx31_clocks_init() 2020-09-22 14:08:19 +08:00
clk-imx35.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-05-14 09:50:25 +02:00
clk-lpcg-scu.c clk: imx: Explicitly include bits.h 2020-08-22 20:36:57 +08:00
clk-pfd.c clk: imx: Fix and update kerneldoc 2020-09-07 11:08:50 +08:00
clk-pfdv2.c clk: imx: Fix and update kerneldoc 2020-09-07 11:08:50 +08:00
clk-pll14xx.c clk: imx: Explicitly include bits.h 2020-08-22 20:36:57 +08:00
clk-pllv1.c clk: imx: Explicitly include bits.h 2020-08-22 20:36:57 +08:00
clk-pllv2.c clk: imx: pllv2: Switch to clk_hw based API 2019-12-11 19:19:44 +08:00
clk-pllv3.c clk: imx: Fix and update kerneldoc 2020-09-07 11:08:50 +08:00
clk-pllv4.c clk: imx: Explicitly include bits.h 2020-08-22 20:36:57 +08:00
clk-scu.c clk: imx: Align imx sc clock parent msg structs to 4 2020-03-25 18:46:05 -07:00
clk-scu.h clk: imx: scu: add set parent support 2019-02-21 12:41:16 -08:00
clk-sscg-pll.c clk: imx: Support building i.MX common clock driver as module 2020-08-22 12:38:20 +08:00
clk-vf610.c clk: imx: vf610: Add CRC clock 2020-08-23 10:08:35 +08:00
clk.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-05-14 09:50:25 +02:00
clk.h clk: imx: Fix reparenting of UARTs not associated with stdout 2021-05-14 09:50:25 +02:00
Kconfig clk: imx: fix Kconfig warning for i.MX SCU clk 2021-02-03 23:28:44 +01:00
Makefile clk: imx: imx21: Remove clock driver 2020-09-22 14:09:19 +08:00