lkml.org 
[lkml]   [2014]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/6] usb: dwc2/gadget: move phy bus legth initialization
Hi Greg and Paul,

On 2014-09-09 10:44, Robert Baldyga wrote:
> From: Kamil Debski <k.debski@samsung.com>
>
> This patch moves the part of code that initializes the PHY bus width.
> This results in simpler code and removes the need to check whether
> the Generic PHY Framework is used.

I've noticed that patches from this patchset have been finally merged to
usb-next tree, but I cannot find this patch there. Is there any reason for
dropping it?

> Signed-off-by: Kamil Debski <k.debski@samsung.com>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
> ---
> drivers/usb/dwc2/gadget.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> index ce6071d..9cbe136 100644
> --- a/drivers/usb/dwc2/gadget.c
> +++ b/drivers/usb/dwc2/gadget.c
> @@ -3392,6 +3392,9 @@ static int s3c_hsotg_probe(struct platform_device *pdev)
> if (!hsotg)
> return -ENOMEM;
>
> + /* Set default UTMI width */
> + hsotg->phyif = GUSBCFG_PHYIF16;
> +
> /*
> * Attempt to find a generic PHY, then look for an old style
> * USB PHY, finally fall back to pdata
> @@ -3410,8 +3413,15 @@ static int s3c_hsotg_probe(struct platform_device *pdev)
> hsotg->plat = plat;
> } else
> hsotg->uphy = uphy;
> - } else
> + } else {
> hsotg->phy = phy;
> + /*
> + * If using the generic PHY framework, check if the PHY bus
> + * width is 8-bit and set the phyif appropriately.
> + */
> + if (phy_get_bus_width(phy) == 8)
> + hsotg->phyif = GUSBCFG_PHYIF8;
> + }
>
> hsotg->dev = dev;
>
> @@ -3471,16 +3481,6 @@ static int s3c_hsotg_probe(struct platform_device *pdev)
> goto err_supplies;
> }
>
> - /* Set default UTMI width */
> - hsotg->phyif = GUSBCFG_PHYIF16;
> -
> - /*
> - * If using the generic PHY framework, check if the PHY bus
> - * width is 8-bit and set the phyif appropriately.
> - */
> - if (hsotg->phy && (phy_get_bus_width(phy) == 8))
> - hsotg->phyif = GUSBCFG_PHYIF8;
> -
> /* usb phy enable */
> s3c_hsotg_phy_enable(hsotg);
>

Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland



\
 
 \ /
  Last update: 2014-09-25 14:41    [W:0.103 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site