phy: sun9i-usb: add USB dependency
PATCH 1/1 phy: sun9i-usb: add USB dependency
The sun9i usb phy driver calls of_usb_get_phy_mode(), which is not available if USB is disabled:
drivers/built-in.o: In function `sun9i_usb_phy_probe':
:(.text+0x7fb0): undefined reference to `of_usb_get_phy_mode'
This adds a dependency to avoid the randconfig build errors.
drivers/phy/Kconfig +1 -0
@@ -233,6 +233,7 @@ config PHY_SUN9I_USB tristate "Allwinner sun9i SoC USB PHY driver" depends on ARCH_SUNXI && HAS_IOMEM && OF depends on RESET_CONTROLLER + depends on USB_COMMON select GENERIC_PHY help Enable this to support the transceiver that is part of Allwinner
Hi,
Quoted 16 lines · Arnd Bergmann
The sun9i usb phy driver calls
of_usb_get_phy_mode(), which is not available if USB is disabled:
drivers/built-in.o: In function `sun9i_usb_phy_probe':
:(.text+0x7fb0): undefined reference to `of_usb_get_phy_mode'This adds a dependency to avoid the randconfig build errors.
Signed-off-by Arnd Bergmann <[email protected]>Fixes 9c3b44302636 ("phy: Add driver to support individual USB PHYs on sun9i")drivers/phy/Kconfig +0
-0
drivers/phy/Kconfig config PHY_SUN9I_USB · line 236
Quoted 4 lines
drivers/phy/Kconfig +1
-0@@ -233,6 +233,7 @@ config PHY_SUN9I_USB tristate "Allwinner sun9i SoC USB PHY driver" depends on ARCH_SUNXI && HAS_IOMEM && OF depends on RESET_CONTROLLER + depends on USB_COMMON
USB_SUPPORT seems like the one to use. Some other phy drivers depend on this, and so does drivers/usb/phy/of.c, which is where of_usb_get_phy_mode() is located.
Thanks for catching this!
Regards
ChenYu
Quoted 4 lines
drivers/phy/Kconfig +0
-0select GENERIC_PHY help Enable this to support the transceiver that is part of Allwinner
Quoted 12 lines · On Monday 30 November 2015 20:27:04 Chen-Yu Tsai wrote:
Quoted 11 lines · Arnd Bergmann
The sun9i usb phy driver calls
of_usb_get_phy_mode(), which is not available if USB is disabled:
drivers/built-in.o: In function `sun9i_usb_phy_probe':
:(.text+0x7fb0): undefined reference to `of_usb_get_phy_mode'This adds a dependency to avoid the randconfig build errors.
Signed-off-by Arnd Bergmann <[email protected]>Fixes 9c3b44302636 ("phy: Add driver to support individual USB PHYs on sun9i")
Quoted 13 lines
drivers/phy/Kconfig config PHY_SUN9I_USB · line 236
Quoted 9 lines
drivers/phy/Kconfig +1
-0@@ -233,6 +233,7 @@ config PHY_SUN9I_USB tristate "Allwinner sun9i SoC USB PHY driver" depends on ARCH_SUNXI && HAS_IOMEM && OF depends on RESET_CONTROLLER + depends on USB_COMMON
USB_SUPPORTseems like the one to use. Some other phy drivers depend on this, and so doesdrivers/usb/phy/of.c, which is whereof_usb_get_phy_mode()is located.
USB_SUPPORT is the user-selectable option that enables USB and USB_GADGET to be selected, while USB_COMMON is automatically enabled if one of those two is.
If you have USB_SUPPORT=y but both USB and USB_GADGET disabled, then Kbuild does not enter the drivers/usb/phy directory and you still get the build failure.
Arnd
Chen-Yu Tsai
Acked-byQuoted 27 lines · Arnd Bergmann
Quoted 12 lines · On Monday 30 November 2015 20:27:04 Chen-Yu Tsai wrote:
Quoted 11 lines · Arnd Bergmann
The sun9i usb phy driver calls
of_usb_get_phy_mode(), which is not available if USB is disabled:
drivers/built-in.o: In function `sun9i_usb_phy_probe':
:(.text+0x7fb0): undefined reference to `of_usb_get_phy_mode'This adds a dependency to avoid the randconfig build errors.
Signed-off-by Arnd Bergmann <[email protected]>Fixes 9c3b44302636 ("phy: Add driver to support individual USB PHYs on sun9i")Quoted 13 lines
drivers/phy/Kconfig config PHY_SUN9I_USB · line 236
Quoted 9 lines
drivers/phy/Kconfig +1
-0@@ -233,6 +233,7 @@ config PHY_SUN9I_USB tristate "Allwinner sun9i SoC USB PHY driver" depends on ARCH_SUNXI && HAS_IOMEM && OF depends on RESET_CONTROLLER + depends on USB_COMMON
USB_SUPPORTseems like the one to use. Some other phy drivers depend on this, and so doesdrivers/usb/phy/of.c, which is whereof_usb_get_phy_mode()is located.
Quoted 7 lines
USB_SUPPORTis the user-selectable option that enables USB andUSB_GADGETto be selected, whileUSB_COMMONis automatically enabled if one of those two is.If you have USB_SUPPORT=y but both USB and
USB_GADGETdisabled, thenKbuilddoes not enter thedrivers/usb/phydirectory and you still get the build failure.
I see why the others work with USB_SUPPORT. They select USB_PHY, so Kbuild enters driver/usb/phy.
Thanks!