usb: ehci: Make usage of generic_{setup,shutdown}_phy() helpers

Replace ehci_setup_phy() and ehci_shutdown_phy () by respectively
generic_setup_phy() and generic_shutdown_phy().

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
This commit is contained in:
Patrice Chotard 2022-09-06 08:15:28 +02:00 committed by Marek Vasut
parent 10005004db
commit 083f8aa978
4 changed files with 10 additions and 10 deletions

View File

@ -96,7 +96,7 @@ static int ehci_usb_probe(struct udevice *dev)
if (err) if (err)
goto reset_err; goto reset_err;
err = ehci_setup_phy(dev, &priv->phy, 0); err = generic_setup_phy(dev, &priv->phy, 0);
if (err) if (err)
goto regulator_err; goto regulator_err;
@ -111,7 +111,7 @@ static int ehci_usb_probe(struct udevice *dev)
return 0; return 0;
phy_err: phy_err:
ret = ehci_shutdown_phy(dev, &priv->phy); ret = generic_shutdown_phy(&priv->phy);
if (ret) if (ret)
dev_err(dev, "failed to shutdown usb phy (ret=%d)\n", ret); dev_err(dev, "failed to shutdown usb phy (ret=%d)\n", ret);
@ -141,7 +141,7 @@ static int ehci_usb_remove(struct udevice *dev)
if (ret) if (ret)
return ret; return ret;
ret = ehci_shutdown_phy(dev, &priv->phy); ret = generic_shutdown_phy(&priv->phy);
if (ret) if (ret)
return ret; return ret;

View File

@ -56,7 +56,7 @@ static int ehci_usb_probe(struct udevice *dev)
hcor = (struct ehci_hcor *)((phys_addr_t)hccr + hcor = (struct ehci_hcor *)((phys_addr_t)hccr +
HC_LENGTH(ehci_readl(&(hccr)->cr_capbase))); HC_LENGTH(ehci_readl(&(hccr)->cr_capbase)));
ret = ehci_setup_phy(dev, &p->phy, 0); ret = generic_setup_phy(dev, &p->phy, 0);
if (ret) if (ret)
return ret; return ret;
@ -81,7 +81,7 @@ static int ehci_usb_remove(struct udevice *dev)
/* Stop controller. */ /* Stop controller. */
clrbits_le32(&ehci->usbcmd, CMD_RUN); clrbits_le32(&ehci->usbcmd, CMD_RUN);
ret = ehci_shutdown_phy(dev, &p->phy); ret = generic_shutdown_phy(&p->phy);
if (ret) if (ret)
return ret; return ret;

View File

@ -726,7 +726,7 @@ static int ehci_usb_probe(struct udevice *dev)
mdelay(10); mdelay(10);
#if defined(CONFIG_PHY) #if defined(CONFIG_PHY)
ret = ehci_setup_phy(dev, &priv->phy, 0); ret = generic_setup_phy(dev, &priv->phy, 0);
if (ret) if (ret)
goto err_regulator; goto err_regulator;
#endif #endif
@ -743,7 +743,7 @@ static int ehci_usb_probe(struct udevice *dev)
err_phy: err_phy:
#if defined(CONFIG_PHY) #if defined(CONFIG_PHY)
ehci_shutdown_phy(dev, &priv->phy); generic_shutdown_phy(&priv->phy);
err_regulator: err_regulator:
#endif #endif
#if CONFIG_IS_ENABLED(DM_REGULATOR) #if CONFIG_IS_ENABLED(DM_REGULATOR)
@ -767,7 +767,7 @@ int ehci_usb_remove(struct udevice *dev)
ehci_deregister(dev); ehci_deregister(dev);
#if defined(CONFIG_PHY) #if defined(CONFIG_PHY)
ehci_shutdown_phy(dev, &priv->phy); generic_shutdown_phy(&priv->phy);
#endif #endif
#if CONFIG_IS_ENABLED(DM_REGULATOR) #if CONFIG_IS_ENABLED(DM_REGULATOR)

View File

@ -31,7 +31,7 @@ static int ehci_pci_init(struct udevice *dev, struct ehci_hccr **ret_hccr,
int ret; int ret;
u32 cmd; u32 cmd;
ret = ehci_setup_phy(dev, &priv->phy, 0); ret = generic_setup_phy(dev, &priv->phy, 0);
if (ret) if (ret)
return ret; return ret;
@ -149,7 +149,7 @@ static int ehci_pci_remove(struct udevice *dev)
if (ret) if (ret)
return ret; return ret;
return ehci_shutdown_phy(dev, &priv->phy); return generic_shutdown_phy(&priv->phy);
} }
static const struct udevice_id ehci_pci_ids[] = { static const struct udevice_id ehci_pci_ids[] = {