linux/drivers/clk/imx
Ahmad Fatoum d36207b848 clk: imx8m: fix clock tree update of TF-A managed clocks
On the i.MX8M*, the TF-A exposes a SiP (Silicon Provider) service
for DDR frequency scaling. The imx8m-ddrc-devfreq driver calls the
SiP and then does clk_set_parent on the DDR muxes to synchronize
the clock tree.

Since 936c383673 ("clk: imx: fix composite peripheral flags"),
these TF-A managed muxes have SET_PARENT_GATE set, which results
in imx8m-ddrc-devfreq's clk_set_parent after SiP failing with -EBUSY:

	echo 25000000 > userspace/set_freq
	imx8m-ddrc-devfreq 3d400000.memory-controller: failed to set
		dram_apb parent: -16

Fix this by adding a new i.MX composite flag for firmware managed
clocks, which clears SET_PARENT_GATE.

This is safe to do, because updating the Linux clock tree to reflect
reality will always be glitch-free.

Fixes: 936c383673 ("clk: imx: fix composite peripheral flags")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Link: https://lore.kernel.org/r/20210810151432.9228-1-a.fatoum@pengutronix.de
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
2021-08-24 16:09:07 +03: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: imx8m: fix clock tree update of TF-A managed clocks 2021-08-24 16:09:07 +03: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: clk-divider-gate: Switch to clk_divider.determine_rate 2021-08-24 16:09:07 +03: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: Remove unused variable ret 2020-11-10 09:08:03 +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-04-04 22:39:04 +03:00
clk-imx6q.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-04-04 22:39:04 +03:00
clk-imx6sl.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-04-04 22:39:04 +03:00
clk-imx6sll.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-04-04 22:39:04 +03:00
clk-imx6sx.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-04-04 22:39:04 +03: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-04-04 22:39:04 +03:00
clk-imx7ulp.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-04-04 22:39:04 +03:00
clk-imx8mm.c clk: imx8m: fix clock tree update of TF-A managed clocks 2021-08-24 16:09:07 +03:00
clk-imx8mn.c clk: imx8m: fix clock tree update of TF-A managed clocks 2021-08-24 16:09:07 +03:00
clk-imx8mp.c clk: imx: Remove the audio ipg clock from imx8mp 2021-06-14 12:33:04 +03:00
clk-imx8mq.c clk: imx8m: fix clock tree update of TF-A managed clocks 2021-08-24 16:09:07 +03:00
clk-imx8qm-rsrc.c clk: imx8qm: add clock valid resource checking 2021-06-14 12:33:22 +03:00
clk-imx8qxp-lpcg.c clk: imx: lpcg: add suspend/resume support 2020-10-26 10:54:08 +08:00
clk-imx8qxp-lpcg.h clk: imx: add imx8qxp lpcg driver 2018-12-14 13:01:14 -08:00
clk-imx8qxp-rsrc.c clk: imx8qxp: add clock valid checking mechnism 2021-06-14 12:33:19 +03:00
clk-imx8qxp.c clk: imx: scu: add more scu clocks 2021-06-14 12:33:30 +03:00
clk-imx25.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-04-04 22:39:04 +03:00
clk-imx27.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-04-04 22:39:04 +03:00
clk-imx31.c clk: imx: clk-imx31: Remove unused static const table 'uart_clks' 2021-01-29 21:31:52 +08:00
clk-imx35.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-04-04 22:39:04 +03:00
clk-lpcg-scu.c clk: imx: Reference preceded by free 2021-04-04 22:39:05 +03: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: remove unneeded semicolon 2020-11-01 17:19:18 +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: scu: Do not enable runtime PM for CPU clks 2021-06-14 12:34:51 +03:00
clk-scu.h clk: imx8qm: add clock valid resource checking 2021-06-14 12:33:22 +03: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-04-04 22:39:04 +03:00
clk.h clk: imx8m: fix clock tree update of TF-A managed clocks 2021-08-24 16:09:07 +03:00
Kconfig clk: imx: fix Kconfig warning for i.MX SCU clk 2021-01-12 11:25:54 -08:00
Makefile clk: imx8qm: add clock valid resource checking 2021-06-14 12:33:22 +03:00