* [PATCH] soc: sunxi: Fix missing dependency on REGMAP_MMIO
@ 2019-03-01 2:20 Samuel Holland
2019-03-01 14:43 ` Maxime Ripard
0 siblings, 1 reply; 4+ messages in thread
From: Samuel Holland @ 2019-03-01 2:20 UTC (permalink / raw)
To: Maxime Ripard, Chen-Yu Tsai, Bin Liu
Cc: linux-arm-kernel, linux-kernel, linux-usb, linux-sunxi, Samuel Holland
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.
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
drivers/soc/sunxi/Kconfig | 1 +
drivers/usb/musb/Kconfig | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/sunxi/Kconfig b/drivers/soc/sunxi/Kconfig
index 353b07e40176..e84eb4e59f58 100644
--- a/drivers/soc/sunxi/Kconfig
+++ b/drivers/soc/sunxi/Kconfig
@@ -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
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index ad08895e78f9..c3dae7d5cb6e 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -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
--
2.19.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] soc: sunxi: Fix missing dependency on REGMAP_MMIO
2019-03-01 2:20 [PATCH] soc: sunxi: Fix missing dependency on REGMAP_MMIO Samuel Holland
@ 2019-03-01 14:43 ` Maxime Ripard
2019-04-01 15:29 ` Bin Liu
0 siblings, 1 reply; 4+ messages in thread
From: Maxime Ripard @ 2019-03-01 14:43 UTC (permalink / raw)
To: Samuel Holland
Cc: Chen-Yu Tsai, Bin Liu, linux-arm-kernel, linux-kernel, linux-usb,
linux-sunxi
[-- Attachment #1: Type: text/plain, Size: 1869 bytes --]
On Thu, Feb 28, 2019 at 08:20:44PM -0600, Samuel Holland wrote:
> 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.
>
> Signed-off-by: Samuel Holland <samuel@sholland.org>
I assume it would go through the USB tree.
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] soc: sunxi: Fix missing dependency on REGMAP_MMIO
2019-03-01 14:43 ` Maxime Ripard
@ 2019-04-01 15:29 ` Bin Liu
2019-04-01 22:04 ` [linux-sunxi] " Samuel Holland
0 siblings, 1 reply; 4+ messages in thread
From: Bin Liu @ 2019-04-01 15:29 UTC (permalink / raw)
To: Maxime Ripard
Cc: Samuel Holland, Chen-Yu Tsai, linux-arm-kernel, linux-kernel,
linux-usb, linux-sunxi
On Fri, Mar 01, 2019 at 03:43:48PM +0100, Maxime Ripard wrote:
> On Thu, Feb 28, 2019 at 08:20:44PM -0600, Samuel Holland wrote:
> > 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.
Should this go to stable tree as well? Is a 'Fixes' tag for it?
> > Signed-off-by: Samuel Holland <samuel@sholland.org>
>
> I assume it would go through the USB tree.
>
> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Regards,
-Bin.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-sunxi] Re: [PATCH] soc: sunxi: Fix missing dependency on REGMAP_MMIO
2019-04-01 15:29 ` Bin Liu
@ 2019-04-01 22:04 ` Samuel Holland
0 siblings, 0 replies; 4+ messages in thread
From: Samuel Holland @ 2019-04-01 22:04 UTC (permalink / raw)
To: Bin Liu, Maxime Ripard, Chen-Yu Tsai, linux-arm-kernel,
linux-kernel, linux-usb, linux-sunxi
On 4/1/19 10:29 AM, 'Bin Liu' via linux-sunxi wrote:
> On Fri, Mar 01, 2019 at 03:43:48PM +0100, Maxime Ripard wrote:
>> On Thu, Feb 28, 2019 at 08:20:44PM -0600, Samuel Holland wrote:
>>> 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.
>
> Should this go to stable tree as well? Is a 'Fixes' tag for it?
Yes, I just sent v2 with these tags (although I forgot Maxime's Ack).
>>> Signed-off-by: Samuel Holland <samuel@sholland.org>
>>
>> I assume it would go through the USB tree.
>>
>> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Cheers,
Samuel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-04-01 22:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-01 2:20 [PATCH] soc: sunxi: Fix missing dependency on REGMAP_MMIO Samuel Holland
2019-03-01 14:43 ` Maxime Ripard
2019-04-01 15:29 ` Bin Liu
2019-04-01 22:04 ` [linux-sunxi] " Samuel Holland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).