android_kernel_motorola_sm6375/drivers/clk
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Chen-Yu Tsai 2c5ad2d642 clk: Honor CLK_OPS_PARENT_ENABLE in clk_core_is_enabled()
[ Upstream commit 79200d5851c8e7179f68a4a6f162d8f1bde4986f ]

In the previous commits that added CLK_OPS_PARENT_ENABLE, support for
this flag was only added to rate change operations (rate setting and
reparent) and disabling unused subtree. It was not added to the
clock gate related operations. Any hardware driver that needs it for
these operations will either see bogus results, or worse, hang.

This has been seen on MT8192 and MT8195, where the imp_ii2_* clk
drivers set this, but dumping debugfs clk_summary would cause it
to hang.

Prepare parent on prepare and enable parent on enable dependencies are
already handled automatically by the core as part of its sequencing.
Whether the case for "enable parent on prepare" should be supported by
this flag or not is not clear, and thus ignored for now.

This change solely fixes the handling of clk_core_is_enabled, i.e.
enabling the parent clock when reading the hardware state. Unfortunately
clk_core_is_enabled is called in a variety of places, sometimes with
the enable clock already held. To avoid deadlocking, the core will
ignore readouts and just return false if CLK_OPS_PARENT_ENABLE is set
but the parent isn't currently enabled.

Fixes: fc8726a2c0 ("clk: core: support clocks which requires parents enable (part 2)")
Fixes: a4b3518d14 ("clk: core: support clocks which requires parents enable (part 1)")
Signed-off-by: Chen-Yu Tsai <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Tested-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2023-03-11 16:43:51 +01:00
..
actions clk: actions: Terminate clk_div_table with sentinel element 2022-04-15 14:18:19 +02:00
analogbits
at91 clk: at91: generated: consider range when calculating best rate 2022-05-25 09:14:36 +02:00
axis
axs10x
bcm clk: bcm2835: Make peripheral PLLC critical 2022-10-26 13:22:59 +02:00
berlin clk: berlin: Add of_node_put() for of_get_parent() 2022-10-26 13:22:35 +02:00
davinci
h8300
hisilicon
imgtec
imx clk: imx: replace osc_hdmi with dummy 2023-01-18 11:41:06 +01:00
ingenic clk: ingenic-tcu: Properly enable registers before accessing timers 2022-10-05 10:37:42 +02:00
keystone
loongson1 clk: loongson1: Terminate clk_div_table with sentinel element 2022-04-15 14:18:19 +02:00
mediatek clk: mediatek: mt8183: mfgcfg: Propagate rate changes to parent 2022-10-26 13:22:42 +02:00
meson clk: meson: Hold reference returned by of_get_parent() 2022-10-26 13:22:34 +02:00
microchip
mmp
mvebu clk: mvebu: ap-cpu-clk: Fix a memory leak in error handling paths 2021-11-17 09:48:41 +01:00
mxs
nxp
pistachio
pxa
qcom clk: qcom: gpucc-sdm845: fix clk_dis_wait being programmed for CX GDSC 2023-03-11 16:43:51 +01:00
renesas clk: renesas: cpg-mssr: Remove superfluous check in resume code 2023-03-11 16:43:51 +01:00
rockchip clk: rockchip: Fix memory leak in rockchip_clk_register_pll() 2023-01-18 11:41:05 +01:00
samsung clk: samsung: Fix memory leak in _samsung_clk_register_pll() 2023-01-18 11:41:12 +01:00
sifive
sirf
socfpga clk: socfpga: Fix memory leak in socfpga_gate_init() 2023-01-18 11:41:13 +01:00
spear
sprd
st clk: st: Fix memory leak in st_of_quadfs_setup() 2023-01-18 11:41:38 +01:00
sunxi clk: sunxi: sun9i-mmc: check return value after calling platform_get_resource() 2022-05-09 09:03:25 +02:00
sunxi-ng
tegra clk: tegra20: Fix refcount leak in tegra20_clock_init 2022-10-26 13:22:35 +02:00
ti clk: ti: dra7-atl: Fix reference leak in of_dra7_atl_clk_probe 2022-10-26 13:22:43 +02:00
uniphier clk: uniphier: Fix fixed-rate initialization 2022-04-15 14:17:58 +02:00
ux500
versatile
x86
zte
zynq
zynqmp clk: zynqmp: pll: rectify rate rounding in zynqmp_pll_round_rate 2022-10-26 13:22:55 +02:00
clk-asm9260.c
clk-aspeed.c
clk-aspeed.h
clk-ast2600.c clk: ast2600: BCLK comes from EPLL 2022-10-26 13:22:43 +02:00
clk-axi-clkgen.c
clk-axm5516.c
clk-bd718x7.c
clk-bulk.c
clk-cdce706.c
clk-cdce925.c
clk-clps711x.c clk: clps711x: Terminate clk_div_table with sentinel element 2022-04-15 14:18:19 +02:00
clk-composite.c
clk-conf.c
clk-cs2000-cp.c
clk-devres.c clk: Fix pointer casting to prevent oops in devm_clk_release() 2023-02-06 07:52:48 +01:00
clk-divider.c
clk-efm32gg.c
clk-fixed-factor.c
clk-fixed-mmio.c
clk-fixed-rate.c
clk-fractional-divider.c
clk-gate.c
clk-gemini.c
clk-gpio.c
clk-hi655x.c
clk-highbank.c
clk-hsdk-pll.c
clk-lochnagar.c
clk-max9485.c
clk-max77686.c
clk-milbeaut.c
clk-moxart.c
clk-multiplier.c
clk-mux.c
clk-nomadik.c
clk-npcm7xx.c
clk-nspire.c
clk-oxnas.c clk: oxnas: Hold reference returned by of_get_parent() 2022-10-26 13:22:34 +02:00
clk-palmas.c
clk-pwm.c
clk-qoriq.c
clk-rk808.c
clk-s2mps11.c
clk-scmi.c
clk-scpi.c
clk-si514.c
clk-si544.c
clk-si570.c
clk-si5341.c clk: si5341: fix reported clk_rate when output divider is 2 2022-04-15 14:18:35 +02:00
clk-si5351.c
clk-si5351.h
clk-stm32f4.c clk: stm32: Fix ltdc's clock turn off by clk_disable_unused() after system enter shell 2022-01-27 09:19:39 +01:00
clk-stm32h7.c
clk-stm32mp1.c
clk-tango4.c
clk-twl6040.c
clk-u300.c
clk-versaclock5.c
clk-vt8500.c
clk-wm831x.c
clk-xgene.c
clk.c clk: Honor CLK_OPS_PARENT_ENABLE in clk_core_is_enabled() 2023-03-11 16:43:51 +01:00
clk.h
clkdev.c
Kconfig
Makefile