soc: sunxi: Fix missing dependency on REGMAP_MMIO
Subsystems (4)
Samuel Holland
maintainerPATCH v2 1/1 soc: sunxi: Fix missing dependency on REGMAP_MMIO
When enabling ARCH_SUNXI from allnoconfig, SUNXI_SRAM is enabled, but not REGMAP_MMIO, so the kernel fails to link with an undefined reference to __devm_regmap_init_mmio_clk. Select REGMAP_MMIO, as suggested in drivers/base/regmap/Kconfig.
This creates the following dependency loop:
drivers/of/Kconfig:68: symbol OF_IRQ depends on IRQ_DOMAIN kernel/irq/Kconfig:63: symbol IRQ_DOMAIN is selected by REGMAP drivers/base/regmap/Kconfig:7: symbol REGMAP default is visible depending on REGMAP_MMIO drivers/base/regmap/Kconfig:39: symbol REGMAP_MMIO is selected by SUNXI_SRAM drivers/soc/sunxi/Kconfig:4: symbol SUNXI_SRAM is selected by USB_MUSB_SUNXI drivers/usb/musb/Kconfig:63: symbol USB_MUSB_SUNXI depends on GENERIC_PHY drivers/phy/Kconfig:7: symbol GENERIC_PHY is selected by PHY_BCM_NS_USB3 drivers/phy/broadcom/Kconfig:29: symbol PHY_BCM_NS_USB3 depends on MDIO_BUS drivers/net/phy/Kconfig:12: symbol MDIO_BUS default is visible depending on PHYLIB drivers/net/phy/Kconfig:181: symbol PHYLIB is selected by ARC_EMAC_CORE drivers/net/ethernet/arc/Kconfig:18: symbol ARC_EMAC_CORE is selected by ARC_EMAC drivers/net/ethernet/arc/Kconfig:24: symbol ARC_EMAC depends on OF_IRQ
To fix the circular dependency, make USB_MUSB_SUNXI select GENERIC_PHY instead of depending on it. This matches the use of GENERIC_PHY by all but two other drivers.
---
changes from v1:
- add stable@ and Fixes: tag
--- drivers/soc/sunxi/Kconfig | 1 + drivers/usb/musb/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/soc/sunxi/Kconfig +1 -0
@@ -4,6 +4,7 @@ config SUNXI_SRAM bool default ARCH_SUNXI + select REGMAP_MMIO help Say y here to enable the SRAM controller support. This device is responsible on mapping the SRAM in the sunXi SoCs
drivers/usb/musb/Kconfig +1 -1
@@ -66,7 +66,7 @@ config USB_MUSB_SUNXI depends on NOP_USB_XCEIV depends on PHY_SUN4I_USB depends on EXTCON - depends on GENERIC_PHY + select GENERIC_PHY select SUNXI_SRAM config USB_MUSB_DAVINCI
Quoted 20 lines · Samuel Holland
When enabling
ARCH_SUNXIfrom allnoconfig,SUNXI_SRAMis enabled, but notREGMAP_MMIO, so the kernel fails to link with an undefined reference to__devm_regmap_init_mmio_clk. SelectREGMAP_MMIO, as suggested indrivers/base/regmap/Kconfig.This creates the following dependency loop:
drivers/of/Kconfig:68: symbol OF_IRQ depends on IRQ_DOMAIN kernel/irq/Kconfig:63: symbol IRQ_DOMAIN is selected by REGMAP drivers/base/regmap/Kconfig:7: symbol REGMAP default is visible depending on REGMAP_MMIO drivers/base/regmap/Kconfig:39: symbol REGMAP_MMIO is selected by SUNXI_SRAM drivers/soc/sunxi/Kconfig:4: symbol SUNXI_SRAM is selected by USB_MUSB_SUNXI drivers/usb/musb/Kconfig:63: symbol USB_MUSB_SUNXI depends on GENERIC_PHY drivers/phy/Kconfig:7: symbol GENERIC_PHY is selected by PHY_BCM_NS_USB3 drivers/phy/broadcom/Kconfig:29: symbol PHY_BCM_NS_USB3 depends on MDIO_BUS drivers/net/phy/Kconfig:12: symbol MDIO_BUS default is visible depending on PHYLIB drivers/net/phy/Kconfig:181: symbol PHYLIB is selected by ARC_EMAC_CORE drivers/net/ethernet/arc/Kconfig:18: symbol ARC_EMAC_CORE is selected by ARC_EMAC drivers/net/ethernet/arc/Kconfig:24: symbol ARC_EMAC depends on OF_IRQ
Quoted 7 lines
To fix the circular dependency, make
USB_MUSB_SUNXIselectGENERIC_PHYinstead of depending on it. This matches the use ofGENERIC_PHYby all but two other drivers.Cc <[email protected]> # 4.19Fixes 5828729bebbb ("soc: sunxi: export a regmap for EMAC clock reg on A64")Signed-off-by Samuel Holland <[email protected]>
Maxime
---
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Bin Liu
maintainerQuoted 25 lines · Maxime Ripard
Quoted 24 lines · Samuel Holland
When enabling
ARCH_SUNXIfrom allnoconfig,SUNXI_SRAMis enabled, but notREGMAP_MMIO, so the kernel fails to link with an undefined reference to__devm_regmap_init_mmio_clk. SelectREGMAP_MMIO, as suggested indrivers/base/regmap/Kconfig.This creates the following dependency loop:
drivers/of/Kconfig:68: symbol OF_IRQ depends on IRQ_DOMAIN kernel/irq/Kconfig:63: symbol IRQ_DOMAIN is selected by REGMAP drivers/base/regmap/Kconfig:7: symbol REGMAP default is visible depending on REGMAP_MMIO drivers/base/regmap/Kconfig:39: symbol REGMAP_MMIO is selected by SUNXI_SRAM drivers/soc/sunxi/Kconfig:4: symbol SUNXI_SRAM is selected by USB_MUSB_SUNXI drivers/usb/musb/Kconfig:63: symbol USB_MUSB_SUNXI depends on GENERIC_PHY drivers/phy/Kconfig:7: symbol GENERIC_PHY is selected by PHY_BCM_NS_USB3 drivers/phy/broadcom/Kconfig:29: symbol PHY_BCM_NS_USB3 depends on MDIO_BUS drivers/net/phy/Kconfig:12: symbol MDIO_BUS default is visible depending on PHYLIB drivers/net/phy/Kconfig:181: symbol PHYLIB is selected by ARC_EMAC_CORE drivers/net/ethernet/arc/Kconfig:18: symbol ARC_EMAC_CORE is selected by ARC_EMAC drivers/net/ethernet/arc/Kconfig:24: symbol ARC_EMAC depends on OF_IRQTo fix the circular dependency, make
USB_MUSB_SUNXIselectGENERIC_PHYinstead of depending on it. This matches the use ofGENERIC_PHYby all but two other drivers.
Quoted 5 lines
Quoted 3 lines
Cc <[email protected]> # 4.19Fixes 5828729bebbb ("soc: sunxi: export a regmap for EMAC clock reg on A64")Signed-off-by Samuel Holland <[email protected]>Acked-by Maxime Ripard <[email protected]>
The patch is applied.
Thanks,
-Bin.