Skip to contentSkip to conversation

clk: qcom: Skip halt checks on gcc_usb3_phy_pipe_clk for 8998

PATCH Applied Jeffrey Hugo 2 participants 4 messages Jan 4, 2019 – Jan 9, 2019

Subsystems (4)

v1 of 3 Applied Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 2/6 clk: qcom: Skip halt checks on gcc_usb3_phy_pipe_clk for 8998

The gcc_usb3_phy_pipe_clk is generated by the phy, but is also used by the phy during init. The clock needs to be enabled during the init sequence, but may not be fully active until after the init sequence is complete. This causes a catch-22 if the clock status is checked during enable. As a result, skip the checks to avoid the troubling situation.

---
 drivers/clk/qcom/gcc-msm8998.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/qcom/gcc-msm8998.c +1 -1
index 42de947..1a1806a 100644
@@ -2496,7 +2496,7 @@ enum {
 
 static struct clk_branch gcc_usb3_phy_pipe_clk = {
 	.halt_reg = 0x50004,
-	.halt_check = BRANCH_HALT,
+	.halt_check = BRANCH_HALT_SKIP,
 	.clkr = {
 		.enable_reg = 0x50004,
 		.enable_mask = BIT(0),
Signature · 3 lines
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
maintainer
#1 lore raw

Quoting Jeffrey Hugo (2019-01-04 08:50:15)

Quoted 5 lines

The gcc_usb3_phy_pipe_clk is generated by the phy, but is also used by the phy during init. The clock needs to be enabled during the init sequence, but may not be fully active until after the init sequence is complete. This causes a catch-22 if the clock status is checked during enable. As a result, skip the checks to avoid the troubling situation.

I will ask again, is anyone going to fix this in the phy driver? In theory it isn't needed if the phy driver can do things differently, but last time I checked I was told that the phy team said it had to be done this way.

#2 lore raw
Quoted 7 lines · Stephen Boyd

Quoting Jeffrey Hugo (2019-01-04 08:50:15)

Quoted 5 lines

The gcc_usb3_phy_pipe_clk is generated by the phy, but is also used by the phy during init. The clock needs to be enabled during the init sequence, but may not be fully active until after the init sequence is complete. This causes a catch-22 if the clock status is checked during enable. As a result, skip the checks to avoid the troubling situation.

Quoted 5 lines

I will ask again, is anyone going to fix this in the phy driver? In theory it isn't needed if the phy driver can do things differently, but last time I checked I was told that the phy team said it had to be done this way.

Interesting. I was unaware of past discussion(s) on this. Thank you for taking the change, but I'll try having a look to see if maybe I can prove your theory going forward.

Signature · 4 lines
Jeffrey Hugo
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
maintainer Applied
#3 lore raw
In reply to Jeffrey Hugo

Quoting Jeffrey Hugo (2019-01-04 08:50:15)

Quoted 8 lines

The gcc_usb3_phy_pipe_clk is generated by the phy, but is also used by the phy during init. The clock needs to be enabled during the init sequence, but may not be fully active until after the init sequence is complete. This causes a catch-22 if the clock status is checked during enable. As a result, skip the checks to avoid the troubling situation.

---

Applied to clk-next