Patchwork [U-Boot,v3,3/7] ARM: OMAP: USB: Fix linker error when ULPI is not defined

login
register
mail settings
Submitter Dan Murphy
Date July 17, 2013, 8:16 p.m.
Message ID <1374092167-27645-4-git-send-email-dmurphy@ti.com>
Download mbox | patch
Permalink /patch/259755/
State Awaiting Upstream
Delegated to: Marek Vasut
Headers show

Comments

Dan Murphy - July 17, 2013, 8:16 p.m.
Fix the linker error for missing ulpi_reset when ulpi is not defined
in the board config.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
---
v3 - No updates - http://patchwork.ozlabs.org/patch/258228/

 drivers/usb/host/ehci-omap.c |    7 +++++++
 1 file changed, 7 insertions(+)
Marek Vasut - July 18, 2013, 4:23 a.m.
Dear Dan Murphy,

> Fix the linker error for missing ulpi_reset when ulpi is not defined
> in the board config.
> 
> Signed-off-by: Dan Murphy <dmurphy@ti.com>

Acked-by: Marek Vasut <marex@denx.de>
> ---
> v3 - No updates - http://patchwork.ozlabs.org/patch/258228/
> 
>  drivers/usb/host/ehci-omap.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
> index 17f2214..bd7191c 100644
> --- a/drivers/usb/host/ehci-omap.c
> +++ b/drivers/usb/host/ehci-omap.c
> @@ -90,6 +90,7 @@ static void omap_usbhs_hsic_init(int port)
>  	writel(reg, &usbtll->channel_conf + port);
>  }
> 
> +#ifdef CONFIG_USB_ULPI
>  static void omap_ehci_soft_phy_reset(int port)
>  {
>  	struct ulpi_viewport ulpi_vp;
> @@ -99,6 +100,12 @@ static void omap_ehci_soft_phy_reset(int port)
> 
>  	ulpi_reset(&ulpi_vp);
>  }
> +#else
> +static void omap_ehci_soft_phy_reset(int port)
> +{
> +	return;
> +}
> +#endif
> 
>  inline int __board_usb_init(void)
>  {

Best regards,
Marek Vasut

Patch

diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 17f2214..bd7191c 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -90,6 +90,7 @@  static void omap_usbhs_hsic_init(int port)
 	writel(reg, &usbtll->channel_conf + port);
 }
 
+#ifdef CONFIG_USB_ULPI
 static void omap_ehci_soft_phy_reset(int port)
 {
 	struct ulpi_viewport ulpi_vp;
@@ -99,6 +100,12 @@  static void omap_ehci_soft_phy_reset(int port)
 
 	ulpi_reset(&ulpi_vp);
 }
+#else
+static void omap_ehci_soft_phy_reset(int port)
+{
+	return;
+}
+#endif
 
 inline int __board_usb_init(void)
 {