]> git.baikalelectronics.ru Git - kernel.git/commit
phy: qcom-snps-femto-v2: properly enable ref clock
authorAdrien Thierry <athierry@redhat.com>
Thu, 29 Jun 2023 14:45:39 +0000 (10:45 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Aug 2023 08:23:57 +0000 (10:23 +0200)
commitcf52320a391a7711c81fcb904ff2d267e6ebf4f4
tree99b3be37241a159e02445dd0b5150c69044a2c4b
parent01d8e499999c0e195271878876234f3035d23535
phy: qcom-snps-femto-v2: properly enable ref clock

[ Upstream commit 8a0eb8f9b9a002291a3934acfd913660b905249e ]

The driver is not enabling the ref clock, which thus gets disabled by
the clk_disable_unused() initcall. This leads to the dwc3 controller
failing to initialize if probed after clk_disable_unused() is called,
for instance when the driver is built as a module.

To fix this, switch to the clk_bulk API to handle both cfg_ahb and ref
clocks at the proper places.

Note that the cfg_ahb clock is currently not used by any device tree
instantiation of the PHY. Work needs to be done separately to fix this.

Link: https://lore.kernel.org/linux-arm-msm/ZEqvy+khHeTkC2hf@fedora/
Fixes: 51e8114f80d0 ("phy: qcom-snps: Add SNPS USB PHY driver for QCOM based SOCs")
Signed-off-by: Adrien Thierry <athierry@redhat.com>
Link: https://lore.kernel.org/r/20230629144542.14906-3-athierry@redhat.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c