1 From a84014e1db35d8e7af09878d0b4bf30804fb17d5 Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
3 Date: Tue, 30 Apr 2019 09:59:37 -0500
4 Subject: soc: sunxi: Fix missing dependency on REGMAP_MMIO
6 From: Samuel Holland <samuel@sholland.org>
8 commit a84014e1db35d8e7af09878d0b4bf30804fb17d5 upstream.
10 When enabling ARCH_SUNXI from allnoconfig, SUNXI_SRAM is enabled, but
11 not REGMAP_MMIO, so the kernel fails to link with an undefined reference
12 to __devm_regmap_init_mmio_clk. Select REGMAP_MMIO, as suggested in
13 drivers/base/regmap/Kconfig.
15 This creates the following dependency loop:
17 drivers/of/Kconfig:68: symbol OF_IRQ depends on IRQ_DOMAIN
18 kernel/irq/Kconfig:63: symbol IRQ_DOMAIN is selected by REGMAP
19 drivers/base/regmap/Kconfig:7: symbol REGMAP default is visible depending on REGMAP_MMIO
20 drivers/base/regmap/Kconfig:39: symbol REGMAP_MMIO is selected by SUNXI_SRAM
21 drivers/soc/sunxi/Kconfig:4: symbol SUNXI_SRAM is selected by USB_MUSB_SUNXI
22 drivers/usb/musb/Kconfig:63: symbol USB_MUSB_SUNXI depends on GENERIC_PHY
23 drivers/phy/Kconfig:7: symbol GENERIC_PHY is selected by PHY_BCM_NS_USB3
24 drivers/phy/broadcom/Kconfig:29: symbol PHY_BCM_NS_USB3 depends on MDIO_BUS
25 drivers/net/phy/Kconfig:12: symbol MDIO_BUS default is visible depending on PHYLIB
26 drivers/net/phy/Kconfig:181: symbol PHYLIB is selected by ARC_EMAC_CORE
27 drivers/net/ethernet/arc/Kconfig:18: symbol ARC_EMAC_CORE is selected by ARC_EMAC
28 drivers/net/ethernet/arc/Kconfig:24: symbol ARC_EMAC depends on OF_IRQ
30 To fix the circular dependency, make USB_MUSB_SUNXI select GENERIC_PHY
31 instead of depending on it. This matches the use of GENERIC_PHY by all
32 but two other drivers.
34 Cc: <stable@vger.kernel.org> # 4.19
35 Fixes: 5828729bebbb ("soc: sunxi: export a regmap for EMAC clock reg on A64")
36 Signed-off-by: Samuel Holland <samuel@sholland.org>
37 Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
38 Signed-off-by: Bin Liu <b-liu@ti.com>
39 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
40 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
43 drivers/soc/sunxi/Kconfig | 1 +
44 drivers/usb/musb/Kconfig | 2 +-
45 2 files changed, 2 insertions(+), 1 deletion(-)
47 --- a/drivers/soc/sunxi/Kconfig
48 +++ b/drivers/soc/sunxi/Kconfig
55 Say y here to enable the SRAM controller support. This
56 device is responsible on mapping the SRAM in the sunXi SoCs
57 --- a/drivers/usb/musb/Kconfig
58 +++ b/drivers/usb/musb/Kconfig
59 @@ -66,7 +66,7 @@ config USB_MUSB_SUNXI
60 depends on NOP_USB_XCEIV
61 depends on PHY_SUN4I_USB
63 - depends on GENERIC_PHY
67 config USB_MUSB_DAVINCI