diff mbox

USB: host: tegra: CONFIG_USB_EHCI_TEGRA requires ULPI and ULPI viewport support

Message ID alpine.DEB.2.02.1310032300110.32666@tamien
State Not Applicable, archived
Headers show

Commit Message

Paul Walmsley Oct. 4, 2013, 6:02 a.m. UTC
Selecting CONFIG_USB_EHCI_TEGRA requires CONFIG_USB_ULPI_VIEWPORT.
Otherwise the build can break with:

drivers/usb/phy/phy-tegra-usb.c: In function 'ulpi_open':
drivers/usb/phy/phy-tegra-usb.c:689:31: error: 'ulpi_viewport_access_ops' undeclared (first use in this function)
drivers/usb/phy/phy-tegra-usb.c:689:31: note: each undeclared identifier is reported only once for each function it appears in

if CONFIG_USB_ULPI_VIEWPORT is not manually selected.

Fix by forcing CONFIG_USB_ULPI_VIEWPORT to be selected when
CONFIG_USB_EHCI_TEGRA is selected.  Then, since CONFIG_USB_ULPI_VIEWPORT
requires CONFIG_USB_ULPI to be selected, add that too.

N.B.: ULPI is deprecated on this controller for T114, so it might make 
sense to split the ULPI support code into a separate file, compiled only 
if a ULPI PHY is selected.

Signed-off-by: Paul Walmsley <pwalmsley@nvidia.com>
Cc: <stable@vger.kernel.org>
---

Observed while building the stable kernels v3.11.[123] with a T114-only 
Kconfig.

  drivers/usb/host/Kconfig | 2 ++
  1 file changed, 2 insertions(+)

Comments

Stephen Warren Oct. 4, 2013, 4:04 p.m. UTC | #1
On 10/04/2013 12:02 AM, Paul Walmsley wrote:
> 
> Selecting CONFIG_USB_EHCI_TEGRA requires CONFIG_USB_ULPI_VIEWPORT.
> Otherwise the build can break with:
> 
> drivers/usb/phy/phy-tegra-usb.c: In function 'ulpi_open':
> drivers/usb/phy/phy-tegra-usb.c:689:31: error:
> 'ulpi_viewport_access_ops' undeclared (first use in this function)
> drivers/usb/phy/phy-tegra-usb.c:689:31: note: each undeclared identifier
> is reported only once for each function it appears in
> 
> if CONFIG_USB_ULPI_VIEWPORT is not manually selected.
> 
> Fix by forcing CONFIG_USB_ULPI_VIEWPORT to be selected when
> CONFIG_USB_EHCI_TEGRA is selected.  Then, since CONFIG_USB_ULPI_VIEWPORT
> requires CONFIG_USB_ULPI to be selected, add that too.
> 
> N.B.: ULPI is deprecated on this controller for T114, so it might make
> sense to split the ULPI support code into a separate file, compiled only
> if a ULPI PHY is selected.

This was fixed at least in 3.13 (perhaps 3.12 too?) by:

config ARCH_TEGRA
...
        select USB_ARCH_HAS_EHCI if USB_SUPPORT
        select USB_ULPI if USB_PHY
        select USB_ULPI_VIEWPORT if USB_PHY

I think it'd be better to back-port that patch to stable, for consistency.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paul Walmsley Oct. 4, 2013, 7:30 p.m. UTC | #2
On 10/04/2013 09:04 AM, Stephen Warren wrote:
> On 10/04/2013 12:02 AM, Paul Walmsley wrote:
>> Selecting CONFIG_USB_EHCI_TEGRA requires CONFIG_USB_ULPI_VIEWPORT.
>> Otherwise the build can break with:
>>
>> drivers/usb/phy/phy-tegra-usb.c: In function 'ulpi_open':
>> drivers/usb/phy/phy-tegra-usb.c:689:31: error:
>> 'ulpi_viewport_access_ops' undeclared (first use in this function)
>> drivers/usb/phy/phy-tegra-usb.c:689:31: note: each undeclared identifier
>> is reported only once for each function it appears in
>>
>> if CONFIG_USB_ULPI_VIEWPORT is not manually selected.
>>
>> Fix by forcing CONFIG_USB_ULPI_VIEWPORT to be selected when
>> CONFIG_USB_EHCI_TEGRA is selected.  Then, since CONFIG_USB_ULPI_VIEWPORT
>> requires CONFIG_USB_ULPI to be selected, add that too.
>>
>> N.B.: ULPI is deprecated on this controller for T114, so it might make
>> sense to split the ULPI support code into a separate file, compiled only
>> if a ULPI PHY is selected.
> This was fixed at least in 3.13 (perhaps 3.12 too?) by:
>
> config ARCH_TEGRA
> ...
>          select USB_ARCH_HAS_EHCI if USB_SUPPORT
>          select USB_ULPI if USB_PHY
>          select USB_ULPI_VIEWPORT if USB_PHY
>
> I think it'd be better to back-port that patch to stable, for consistency.

Yep agreed.  Want to cc that patch to linux-stable instead?  The v3.13.x 
-stable builds are breaking here for T114-only Kconfigs...



- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 4263d01..81b9d34 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -202,6 +202,8 @@  config USB_EHCI_TEGRA
         depends on ARCH_TEGRA
         select USB_EHCI_ROOT_HUB_TT
         select USB_PHY
+       select USB_ULPI
+       select USB_ULPI_VIEWPORT
         help
           This driver enables support for the internal USB Host Controllers
           found in NVIDIA Tegra SoCs. The controllers are EHCI compliant.