Re: [PATCH] usb: ehci-s5p: skip phy setup for Exynos5440 based platforms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday, April 11, 2013 8:42 PM, Thomas Abraham wrote:
> 
> Exynos5440 does not require any explict USB phy configuration. So skip
> the USB phy configuration for Exynos5440 based platforms.
> 
> Signed-off-by: Thomas Abraham <thomas.ab@xxxxxxxxxxx>

CC'ed Alan Stern, Doug Anderson


Hi Thomas,

This patch cannot be applied to usb-next tree due to the other changes.
Would you rebase on usb-next tree?
This comment also applies to the exynos 'ohci' patch that you sent.


Best regards,
Jingoo Han


> ---
>  drivers/usb/host/ehci-s5p.c |   11 +++++++++--
>  1 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c
> index 867a923..0f13ef3 100644
> --- a/drivers/usb/host/ehci-s5p.c
> +++ b/drivers/usb/host/ehci-s5p.c
> @@ -76,7 +76,7 @@ static void s5p_ehci_phy_enable(struct s5p_ehci_hcd *s5p_ehci)
> 
>  	if (s5p_ehci->phy)
>  		usb_phy_init(s5p_ehci->phy);
> -	else if (s5p_ehci->pdata->phy_init)
> +	else if (s5p_ehci->pdata && s5p_ehci->pdata->phy_init)
>  		s5p_ehci->pdata->phy_init(pdev, USB_PHY_TYPE_HOST);
>  }
> 
> @@ -86,7 +86,7 @@ static void s5p_ehci_phy_disable(struct s5p_ehci_hcd *s5p_ehci)
> 
>  	if (s5p_ehci->phy)
>  		usb_phy_shutdown(s5p_ehci->phy);
> -	else if (s5p_ehci->pdata->phy_exit)
> +	else if (s5p_ehci->pdata && s5p_ehci->pdata->phy_exit)
>  		s5p_ehci->pdata->phy_exit(pdev, USB_PHY_TYPE_HOST);
>  }
> 
> @@ -138,6 +138,10 @@ static int s5p_ehci_probe(struct platform_device *pdev)
>  	if (!s5p_ehci)
>  		return -ENOMEM;
> 
> +	if (of_device_is_compatible(pdev->dev.of_node,
> +					"samsung,exynos5440-ehci"))
> +		goto skip_phy;
> +
>  	phy = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2);
>  	if (IS_ERR(phy)) {
>  		/* Fallback to pdata */
> @@ -152,6 +156,8 @@ static int s5p_ehci_probe(struct platform_device *pdev)
>  		s5p_ehci->otg = phy->otg;
>  	}
> 
> +skip_phy:
> +
>  	s5p_ehci->dev = &pdev->dev;
> 
>  	hcd = usb_create_hcd(&s5p_ehci_hc_driver, &pdev->dev,
> @@ -306,6 +312,7 @@ static const struct dev_pm_ops s5p_ehci_pm_ops = {
>  #ifdef CONFIG_OF
>  static const struct of_device_id exynos_ehci_match[] = {
>  	{ .compatible = "samsung,exynos4210-ehci" },
> +	{ .compatible = "samsung,exynos5440-ehci" },
>  	{},
>  };
>  MODULE_DEVICE_TABLE(of, exynos_ehci_match);
> --
> 1.6.6.rc2

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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux