linux/drivers/clk/mediatek
AngeloGioacchino Del Regno 672c779e4c clk: mediatek: clk-mtk: Allow specifying flags on mtk_fixed_factor clocks
Before this change, every mtk_fixed_factor clock forced clock flags to
CLK_SET_RATE_PARENT: while this is harmless in some cases, it may not
be desired in some others, especially when performing clock muxing on
a clock having multiple parents of which one is a dedicated PLL and the
others are not.

This is especially seen on the GPU clocks on some SoCs, where we are
muxing between multiple parents: a fixed clock (crystal), a programmable
GPU PLL and one or more dividers for the MAINPLL, used for a number of
devices; it happens that when a rate change is called for the GPU, the
clock framework will try to satisfy the rate request by using one of the
MAINPLL dividers, which have CLK_SET_RATE_PARENT and will set the rate
on MAINPLL itself - overclocking or underclocking many devices in the
system - and making it to lock up.

Logically, it should be harmless (and would only reduce possible bugs)
to change all of the univpll and mainpll related fixed factor clocks
to not declare the CLK_SET_RATE_PARENT by default but, on some SoCs,
this is also used for dividers of other PLLs for which a rate change
based on the divider may be desired, hence introduce a new FACTOR_FLAGS()
macro to use custom flags (or none) on selected fixed factor clocks.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20221024102307.33722-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
2022-11-29 14:42:40 +08:00
..
clk-apmixed.c clk: mediatek: clk-apmixed: Add helper function to unregister ref2usb_tx 2022-09-26 11:13:09 +08:00
clk-cpumux.c clk: mediatek: Export required symbols to compile clk drivers as module 2022-09-26 11:13:09 +08:00
clk-cpumux.h clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-gate.c clk: mediatek: gate: Export mtk_clk_register_gates_with_dev 2022-09-26 15:05:29 +08:00
clk-gate.h clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt2701-aud.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt2701-bdp.c clk: mediatek: mt2701: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt2701-eth.c clk: mediatek: reset: Add new register reset function with device 2022-06-15 17:24:13 -07:00
clk-mt2701-g3d.c clk: mediatek: reset: Add new register reset function with device 2022-06-15 17:24:13 -07:00
clk-mt2701-hif.c clk: mediatek: reset: Add new register reset function with device 2022-06-15 17:24:13 -07:00
clk-mt2701-img.c clk: mediatek: mt2701: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt2701-mm.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt2701-vdec.c clk: mediatek: mt2701: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt2701.c clk: mediatek: reset: Add new register reset function with device 2022-06-15 17:24:13 -07:00
clk-mt2712-bdp.c clk: mediatek: mt2712: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt2712-img.c clk: mediatek: mt2712: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt2712-jpgdec.c clk: mediatek: mt2712: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt2712-mfg.c clk: mediatek: mt2712: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt2712-mm.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt2712-vdec.c clk: mediatek: mt2712: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt2712-venc.c clk: mediatek: mt2712: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt2712.c clk: mediatek: reset: Add new register reset function with device 2022-06-15 17:24:13 -07:00
clk-mt6765-audio.c clk: mediatek: mt6765: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt6765-cam.c clk: mediatek: mt6765: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt6765-img.c clk: mediatek: mt6765: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt6765-mipi0a.c clk: mediatek: mt6765: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt6765-mm.c clk: mediatek: mt6765: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt6765-vcodec.c clk: mediatek: mt6765: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt6765.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt6779-aud.c clk: mediatek: mt6779: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt6779-cam.c clk: mediatek: mt6779: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt6779-img.c clk: mediatek: mt6779: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt6779-ipe.c clk: mediatek: mt6779: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt6779-mfg.c clk: mediatek: mt6779: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt6779-mm.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt6779-vdec.c clk: mediatek: mt6779: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt6779-venc.c clk: mediatek: mt6779: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt6779.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt6795-apmixedsys.c clk: mediatek: Add MediaTek Helio X10 MT6795 clock drivers 2022-09-26 11:13:09 +08:00
clk-mt6795-infracfg.c clk: mediatek: Add MediaTek Helio X10 MT6795 clock drivers 2022-09-26 11:13:09 +08:00
clk-mt6795-mfg.c clk: mediatek: Add MediaTek Helio X10 MT6795 clock drivers 2022-09-26 11:13:09 +08:00
clk-mt6795-mm.c clk: mediatek: Add MediaTek Helio X10 MT6795 clock drivers 2022-09-26 11:13:09 +08:00
clk-mt6795-pericfg.c clk: mediatek: Add MediaTek Helio X10 MT6795 clock drivers 2022-09-26 11:13:09 +08:00
clk-mt6795-topckgen.c clk: mediatek: Add MediaTek Helio X10 MT6795 clock drivers 2022-09-26 11:13:09 +08:00
clk-mt6795-vdecsys.c clk: mediatek: Add MediaTek Helio X10 MT6795 clock drivers 2022-09-26 11:13:09 +08:00
clk-mt6795-vencsys.c clk: mediatek: Add MediaTek Helio X10 MT6795 clock drivers 2022-09-26 11:13:09 +08:00
clk-mt6797-img.c clk: mediatek: mt6797: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt6797-mm.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt6797-vdec.c clk: mediatek: mt6797: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt6797-venc.c clk: mediatek: mt6797: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt6797.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt7622-aud.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt7622-eth.c clk: mediatek: reset: Add new register reset function with device 2022-06-15 17:24:13 -07:00
clk-mt7622-hif.c clk: mediatek: reset: Add new register reset function with device 2022-06-15 17:24:13 -07:00
clk-mt7622.c clk: mediatek: reset: Add new register reset function with device 2022-06-15 17:24:13 -07:00
clk-mt7629-eth.c clk: mediatek: reset: Add new register reset function with device 2022-06-15 17:24:13 -07:00
clk-mt7629-hif.c clk: mediatek: reset: Add new register reset function with device 2022-06-15 17:24:13 -07:00
clk-mt7629.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt7986-apmixed.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt7986-eth.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt7986-infracfg.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt7986-topckgen.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8135.c clk: mediatek: reset: Support nonsequence base offsets of reset registers 2022-06-15 17:24:12 -07:00
clk-mt8167-aud.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8167-img.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8167-mfgcfg.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8167-mm.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8167-vdec.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8167.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8173-mm.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8173.c clk: mediatek: reset: Support nonsequence base offsets of reset registers 2022-06-15 17:24:12 -07:00
clk-mt8183-audio.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8183-cam.c clk: mediatek: mt8183: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt8183-img.c clk: mediatek: mt8183: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt8183-ipu0.c clk: mediatek: mt8183: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt8183-ipu1.c clk: mediatek: mt8183: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt8183-ipu_adl.c clk: mediatek: mt8183: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt8183-ipu_conn.c clk: mediatek: mt8183: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt8183-mfgcfg.c clk: mediatek: mt8183: mfgcfg: Propagate rate changes to parent 2022-09-29 12:01:43 +08:00
clk-mt8183-mm.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8183-vdec.c clk: mediatek: mt8183: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt8183-venc.c clk: mediatek: mt8183: use mtk_clk_simple_probe to simplify driver 2022-09-26 11:13:45 +08:00
clk-mt8183.c clk: mediatek: mt8183: Add clk mux notifier for MFG mux 2022-09-29 12:05:47 +08:00
clk-mt8186-apmixedsys.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8186-cam.c clk: mediatek: Add MT8186 camsys clock support 2022-04-25 16:59:40 -07:00
clk-mt8186-img.c clk: mediatek: Add MT8186 imgsys clock support 2022-04-25 16:59:40 -07:00
clk-mt8186-imp_iic_wrap.c clk: mediatek: Add MT8186 imp i2c wrapper clock support 2022-04-25 16:59:39 -07:00
clk-mt8186-infra_ao.c clk: mediatek: reset: Add infra_ao reset support for MT8186 2022-06-15 17:24:25 -07:00
clk-mt8186-ipe.c clk: mediatek: Add MT8186 ipesys clock support 2022-04-25 16:59:41 -07:00
clk-mt8186-mcu.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8186-mdp.c clk: mediatek: Add MT8186 mdpsys clock support 2022-04-25 16:59:40 -07:00
clk-mt8186-mfg.c clk: mediatek: Add MT8186 mfgsys clock support 2022-04-25 16:59:39 -07:00
clk-mt8186-mm.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8186-topckgen.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8186-vdec.c clk: mediatek: Add MT8186 vdecsys clock support 2022-04-25 16:59:40 -07:00
clk-mt8186-venc.c clk: mediatek: Add MT8186 vencsys clock support 2022-04-25 16:59:40 -07:00
clk-mt8186-wpe.c clk: mediatek: Add MT8186 wpesys clock support 2022-04-25 16:59:40 -07:00
clk-mt8192-aud.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8192-cam.c clk: mediatek: mt8192: add mtk_clk_simple_remove 2022-09-26 11:13:45 +08:00
clk-mt8192-img.c clk: mediatek: mt8192: add mtk_clk_simple_remove 2022-09-26 11:13:45 +08:00
clk-mt8192-imp_iic_wrap.c clk: mediatek: mt8192: add mtk_clk_simple_remove 2022-09-26 11:13:45 +08:00
clk-mt8192-ipe.c clk: mediatek: mt8192: add mtk_clk_simple_remove 2022-09-26 11:13:45 +08:00
clk-mt8192-mdp.c clk: mediatek: mt8192: add mtk_clk_simple_remove 2022-09-26 11:13:45 +08:00
clk-mt8192-mfg.c clk: mediatek: clk-mt8192-mfg: Propagate rate changes to parent 2022-09-29 12:17:43 +08:00
clk-mt8192-mm.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8192-msdc.c clk: mediatek: mt8192: add mtk_clk_simple_remove 2022-09-26 11:13:45 +08:00
clk-mt8192-scp_adsp.c clk: mediatek: mt8192: add mtk_clk_simple_remove 2022-09-26 11:13:45 +08:00
clk-mt8192-vdec.c clk: mediatek: mt8192: add mtk_clk_simple_remove 2022-09-26 11:13:45 +08:00
clk-mt8192-venc.c clk: mediatek: mt8192: add mtk_clk_simple_remove 2022-09-26 11:13:45 +08:00
clk-mt8192.c clk: mediatek: mt8192: deduplicate parent clock lists 2022-09-29 12:27:33 +08:00
clk-mt8195-apmixedsys.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8195-apusys_pll.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8195-cam.c clk: mediatek: mt8195: Hook up mtk_clk_simple_remove() 2022-02-17 12:12:25 -08:00
clk-mt8195-ccu.c clk: mediatek: mt8195: Hook up mtk_clk_simple_remove() 2022-02-17 12:12:25 -08:00
clk-mt8195-img.c clk: mediatek: mt8195: Hook up mtk_clk_simple_remove() 2022-02-17 12:12:25 -08:00
clk-mt8195-imp_iic_wrap.c clk: mediatek: mt8195: Hook up mtk_clk_simple_remove() 2022-02-17 12:12:25 -08:00
clk-mt8195-infra_ao.c clk: mediatek: mt8195: Add reset idx for USB/PCIe T-PHY 2022-08-31 18:16:45 -07:00
clk-mt8195-ipe.c clk: mediatek: mt8195: Hook up mtk_clk_simple_remove() 2022-02-17 12:12:25 -08:00
clk-mt8195-mfg.c clk: mediatek: clk-mt8195-mfg: Reparent mfg_bg3d and propagate rate changes 2022-09-29 12:06:34 +08:00
clk-mt8195-peri_ao.c clk: mediatek: mt8195: Hook up mtk_clk_simple_remove() 2022-02-17 12:12:25 -08:00
clk-mt8195-scp_adsp.c clk: mediatek: mt8195: Hook up mtk_clk_simple_remove() 2022-02-17 12:12:25 -08:00
clk-mt8195-topckgen.c clk: mediatek: clk-mt8195-topckgen: Drop univplls from mfg mux parents 2022-09-29 12:14:56 +08:00
clk-mt8195-vdec.c clk: mediatek: mt8195: Hook up mtk_clk_simple_remove() 2022-02-17 12:12:25 -08:00
clk-mt8195-vdo0.c clk: mediatek: clk-mt8195-vdo0: Set rate on vdo0_dp_intf0_dp_intf's parent 2022-08-31 10:49:53 -07:00
clk-mt8195-vdo1.c clk: mediatek: add VDOSYS1 clock 2022-09-26 13:26:20 +08:00
clk-mt8195-venc.c clk: mediatek: mt8195: Hook up mtk_clk_simple_remove() 2022-02-17 12:12:25 -08:00
clk-mt8195-vpp0.c clk: mediatek: mt8195: Hook up mtk_clk_simple_remove() 2022-02-17 12:12:25 -08:00
clk-mt8195-vpp1.c clk: mediatek: mt8195: Hook up mtk_clk_simple_remove() 2022-02-17 12:12:25 -08:00
clk-mt8195-wpe.c clk: mediatek: mt8195: Hook up mtk_clk_simple_remove() 2022-02-17 12:12:25 -08:00
clk-mt8365-apu.c clk: mediatek: add driver for MT8365 SoC 2022-09-30 15:08:16 -07:00
clk-mt8365-cam.c clk: mediatek: add driver for MT8365 SoC 2022-09-30 15:08:16 -07:00
clk-mt8365-mfg.c clk: mediatek: add driver for MT8365 SoC 2022-09-30 15:08:16 -07:00
clk-mt8365-mm.c clk: mediatek: add driver for MT8365 SoC 2022-09-30 15:08:16 -07:00
clk-mt8365-vdec.c clk: mediatek: add driver for MT8365 SoC 2022-09-30 15:08:16 -07:00
clk-mt8365-venc.c clk: mediatek: add driver for MT8365 SoC 2022-09-30 15:08:16 -07:00
clk-mt8365.c clk: mediatek: add driver for MT8365 SoC 2022-09-30 15:08:16 -07:00
clk-mt8516-aud.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mt8516.c clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
clk-mtk.c clk: mediatek: clk-mtk: Allow specifying flags on mtk_fixed_factor clocks 2022-11-29 14:42:40 +08:00
clk-mtk.h clk: mediatek: clk-mtk: Allow specifying flags on mtk_fixed_factor clocks 2022-11-29 14:42:40 +08:00
clk-mux.c Merge branch 'clk-rate-range' into clk-next 2022-10-14 13:44:44 -07:00
clk-mux.h clk: mediatek: mux: add clk notifier functions 2022-09-29 12:05:13 +08:00
clk-pll.c clk: mediatek: Switch to clk_hw provider APIs 2022-05-19 16:57:57 -07:00
clk-pll.h clk: mediatek: Replace 'struct clk' with 'struct clk_hw' 2022-05-19 16:57:56 -07:00
Kconfig clk: mediatek: add driver for MT8365 SoC 2022-09-30 15:08:16 -07:00
Makefile clk: mediatek: add driver for MT8365 SoC 2022-09-30 15:08:16 -07:00
reset.c clk: mediatek: Export required symbols to compile clk drivers as module 2022-09-26 11:13:09 +08:00
reset.h clk: mediatek: reset: Add infra_ao reset support for MT8192/MT8195 2022-06-15 17:24:13 -07:00