diff options
-rw-r--r-- | drivers/usb/dwc2/gadget.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 650a43ba79e5..94f7a3ffebd5 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c | |||
@@ -3423,6 +3423,9 @@ static int s3c_hsotg_probe(struct platform_device *pdev) | |||
3423 | if (!hsotg) | 3423 | if (!hsotg) |
3424 | return -ENOMEM; | 3424 | return -ENOMEM; |
3425 | 3425 | ||
3426 | /* Set default UTMI width */ | ||
3427 | hsotg->phyif = GUSBCFG_PHYIF16; | ||
3428 | |||
3426 | /* | 3429 | /* |
3427 | * Attempt to find a generic PHY, then look for an old style | 3430 | * Attempt to find a generic PHY, then look for an old style |
3428 | * USB PHY, finally fall back to pdata | 3431 | * USB PHY, finally fall back to pdata |
@@ -3441,8 +3444,15 @@ static int s3c_hsotg_probe(struct platform_device *pdev) | |||
3441 | hsotg->plat = plat; | 3444 | hsotg->plat = plat; |
3442 | } else | 3445 | } else |
3443 | hsotg->uphy = uphy; | 3446 | hsotg->uphy = uphy; |
3444 | } else | 3447 | } else { |
3445 | hsotg->phy = phy; | 3448 | hsotg->phy = phy; |
3449 | /* | ||
3450 | * If using the generic PHY framework, check if the PHY bus | ||
3451 | * width is 8-bit and set the phyif appropriately. | ||
3452 | */ | ||
3453 | if (phy_get_bus_width(phy) == 8) | ||
3454 | hsotg->phyif = GUSBCFG_PHYIF8; | ||
3455 | } | ||
3446 | 3456 | ||
3447 | hsotg->dev = dev; | 3457 | hsotg->dev = dev; |
3448 | 3458 | ||
@@ -3502,16 +3512,6 @@ static int s3c_hsotg_probe(struct platform_device *pdev) | |||
3502 | goto err_supplies; | 3512 | goto err_supplies; |
3503 | } | 3513 | } |
3504 | 3514 | ||
3505 | /* Set default UTMI width */ | ||
3506 | hsotg->phyif = GUSBCFG_PHYIF16; | ||
3507 | |||
3508 | /* | ||
3509 | * If using the generic PHY framework, check if the PHY bus | ||
3510 | * width is 8-bit and set the phyif appropriately. | ||
3511 | */ | ||
3512 | if (hsotg->phy && (phy_get_bus_width(phy) == 8)) | ||
3513 | hsotg->phyif = GUSBCFG_PHYIF8; | ||
3514 | |||
3515 | /* usb phy enable */ | 3515 | /* usb phy enable */ |
3516 | s3c_hsotg_phy_enable(hsotg); | 3516 | s3c_hsotg_phy_enable(hsotg); |
3517 | 3517 | ||