Skip to contentSkip to conversation

phy: Kconfig: spacemit: add COMMON_CLK dependency

PATCH Applied Alex Elder 3 participants 6 messages Dec 26, 2025 – Jan 2

Subsystems (3)
lore
Share & tools
lore

Alex Elder

author
#0 lore raw

PATCH 1/1 phy: Kconfig: spacemit: add COMMON_CLK dependency

The SpacemiT PCIe PHY driver depends on the common clock framework. Not specifying that led to a failure when doing a COMPILE_TEST build for the SPARC architecture.

---
Note: This is based on phy/next, which I find doesn't currently build
cleanly using "arch/riscv/configs/defconfig".

 drivers/phy/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/phy/Kconfig +1 -0
index aa2d30e0e3261..3bc7378ea8658 100644
@@ -104,6 +104,7 @@ config PHY_NXP_PTN3222
 config PHY_SPACEMIT_K1_PCIE
 	tristate "PCIe and combo PHY driver for the SpacemiT K1 SoC"
 	depends on ARCH_SPACEMIT || COMPILE_TEST
+	depends on COMMON_CLK
 	depends on HAS_IOMEM
 	depends on OF
 	select GENERIC_PHY

base-commit: 27287e3b52b5954b73203d32ee76ffd5f53f5074

Signature · 1 line
2.48.1
Reviewed-by on v1 1/1
#1 lore raw

Alex Elder <[email protected]> writes:

Hello Alex,

Quoted 8 lines

The SpacemiT PCIe PHY driver depends on the common clock framework. Not specifying that led to a failure when doing a COMPILE_TEST build for the SPARC architecture.

---

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat
maintainer
#2 lore raw
In reply to Alex Elder
Quoted 10 lines · Alex Elder

The SpacemiT PCIe PHY driver depends on the common clock framework. Not specifying that led to a failure when doing a COMPILE_TEST build for the SPARC architecture.

---
Note: This is based on phy/next, which I find doesn't currently build
cleanly using "arch/riscv/configs/defconfig".

I dont build rsicv, I should add that. What is the failure you see, looking at changes I dont see anything that might break this

Quoted 20 lines
 drivers/phy/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/phy/Kconfig +1 -0
index aa2d30e0e3261..3bc7378ea8658 100644
@@ -104,6 +104,7 @@ config PHY_NXP_PTN3222
 config PHY_SPACEMIT_K1_PCIE
 	tristate "PCIe and combo PHY driver for the SpacemiT K1 SoC"
 	depends on ARCH_SPACEMIT || COMPILE_TEST
+	depends on COMMON_CLK
 	depends on HAS_IOMEM
 	depends on OF
 	select GENERIC_PHY

base-commit: 27287e3b52b5954b73203d32ee76ffd5f53f5074

Signature · 1 line
2.48.1
Signature · 1 line
~Vinod
author
#3 lore raw
Quoted 12 lines · Vinod Koul
Quoted 10 lines · Alex Elder

The SpacemiT PCIe PHY driver depends on the common clock framework. Not specifying that led to a failure when doing a COMPILE_TEST build for the SPARC architecture.

---
Note: This is based on phy/next, which I find doesn't currently build
cleanly using "arch/riscv/configs/defconfig".

Quoted 2 lines

I dont build rsicv, I should add that. What is the failure you see, looking at changes I dont see anything that might break this

The clock calls are not defined in the SPARC environment.

phy-spacemit-k1-pcie.o: in function `k1_pcie_phy_pll_setup':
phy-spacemit-k1-pcie.c:299: undefined reference to devm_clk_hw_register' phy-spacemit-k1-pcie.c:306: undefined reference to devm_clk_hw_get_clk'

https://lore.kernel.org/oe-kbuild-all/[email protected]/

(I now realize you can just click on the "Closes" link.)

-Alex

Quoted 21 lines
Quoted 20 lines
  drivers/phy/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/phy/Kconfig +1 -0
index aa2d30e0e3261..3bc7378ea8658 100644
@@ -104,6 +104,7 @@ config PHY_NXP_PTN3222
  config PHY_SPACEMIT_K1_PCIE
  	tristate "PCIe and combo PHY driver for the SpacemiT K1 SoC"
  	depends on ARCH_SPACEMIT || COMPILE_TEST
+	depends on COMMON_CLK
  	depends on HAS_IOMEM
  	depends on OF
  	select GENERIC_PHY

base-commit: 27287e3b52b5954b73203d32ee76ffd5f53f5074

Signature · 1 line
2.48.1
maintainer Applied
#4 lore raw
In reply to Alex Elder
Quoted 5 lines · Alex Elder

The SpacemiT PCIe PHY driver depends on the common clock framework. Not specifying that led to a failure when doing a COMPILE_TEST build for the SPARC architecture.

Applied, thanks!

[1/1] phy: Kconfig: spacemit: add COMMON_CLK dependency

      commit: 8df20813eb01fe29b4507fd470d73675bda3e1dd

Best regards,

Signature · 1 line
~Vinod
author
#5 lore raw
Quoted 8 lines · Vinod Koul
Quoted 5 lines · Alex Elder

The SpacemiT PCIe PHY driver depends on the common clock framework. Not specifying that led to a failure when doing a COMPILE_TEST build for the SPARC architecture.

Quoted 6 lines

Applied, thanks!

[1/1] phy: Kconfig: spacemit: add COMMON_CLK dependency

       commit: 8df20813eb01fe29b4507fd470d73675bda3e1dd

Best regards,

Thank you. It looks like the same problem affects the s390 build as well.

https://lore.kernel.org/oe-kbuild-all/[email protected]/

I have confirmed that this fix wasn't applied, and with this fix applied the s390 build error no longer occurs.

-Alex