[PATCH v2 1/2] phy: spacemit: fix K1 USB 2.0 PHY Kconfig dependencies
Bruno Banelli <[email protected]>
| Newsgroups | org.infradead.lists.linux-riscv,dev.linux.lists.spacemit,org.infradead.lists.linux-phy,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
phy-k1-usb2.c maps its registers with devm_platform_ioremap_resource()
and wraps them with devm_regmap_init_mmio(), but PHY_SPACEMIT_K1_USB2
neither depends on HAS_IOMEM nor selects REGMAP_MMIO.
REGMAP_MMIO has no prompt and can only be enabled by select, so a
configuration that leaves it off fails to link. In practice the symbol
is usually pulled in indirectly, which is why this has gone unnoticed.
PHY_SPACEMIT_K1_PCIE, directly above it in the same file, already has
the HAS_IOMEM dependency; without it PHY_SPACEMIT_K1_USB2 can be built
under COMPILE_TEST on architectures that provide no I/O memory.
Fixes: fe4bc1a08638 ("phy: spacemit: support K1 USB2.0 PHY controller")
Signed-off-by: Bruno Banelli <[email protected]>
---
drivers/phy/spacemit/Kconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/phy/spacemit/Kconfig b/drivers/phy/spacemit/Kconfig
index 5fdf18fce..cd7ae48d8 100644
--- a/drivers/phy/spacemit/Kconfig
+++ b/drivers/phy/spacemit/Kconfig
@@ -18,8 +18,10 @@ config PHY_SPACEMIT_K1_USB2
tristate "SpacemiT K1 USB 2.0 PHY support"
depends on (ARCH_SPACEMIT || COMPILE_TEST) && OF
depends on COMMON_CLK
+ depends on HAS_IOMEM
depends on USB_COMMON
select GENERIC_PHY
+ select REGMAP_MMIO
help
Enable this to support K1 USB 2.0 PHY driver. This driver takes care of
enabling and clock setup and will be used by K1 udc/ehci/otg/xhci driver.
--
2.43.0
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv