struct tegra_ehci_hcd {
struct tegra_usb_phy *phy;
struct clk *clk;
- struct usb_phy *transceiver;
int port_resuming;
bool needs_double_reset;
enum tegra_usb_phy_port_speed port_speed;
goto cleanup_phy;
}
- if (pdata->operating_mode == TEGRA_USB_OTG) {
- tegra->transceiver =
- devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2);
- if (!IS_ERR(tegra->transceiver))
- otg_set_host(tegra->transceiver->otg, &hcd->self);
- } else {
- tegra->transceiver = ERR_PTR(-ENODEV);
- }
+ otg_set_host(u_phy->otg, &hcd->self);
err = usb_add_hcd(hcd, irq, IRQF_SHARED);
if (err) {
dev_err(&pdev->dev, "Failed to add USB HCD\n");
- goto cleanup_transceiver;
+ goto cleanup_otg_set_host;
}
return err;
-cleanup_transceiver:
- if (!IS_ERR(tegra->transceiver))
- otg_set_host(tegra->transceiver->otg, NULL);
+cleanup_otg_set_host:
+ otg_set_host(u_phy->otg, NULL);
cleanup_phy:
usb_phy_shutdown(hcd->phy);
cleanup_clk_en:
struct tegra_ehci_hcd *tegra =
(struct tegra_ehci_hcd *)hcd_to_ehci(hcd)->priv;
- if (!IS_ERR(tegra->transceiver))
- otg_set_host(tegra->transceiver->otg, NULL);
+ otg_set_host(hcd->phy->otg, NULL);
usb_phy_shutdown(hcd->phy);
usb_remove_hcd(hcd);