|
@@ -299,7 +299,7 @@ static void utmi_phy_clk_disable(struct tegra_usb_phy *phy)
|
|
|
val &= ~USB_SUSP_SET;
|
|
|
writel(val, base + USB_SUSP_CTRL);
|
|
|
} else
|
|
|
- tegra_ehci_set_phcd(&phy->u_phy, true);
|
|
|
+ phy->set_phcd(&phy->u_phy, true);
|
|
|
|
|
|
if (utmi_wait_register(base + USB_SUSP_CTRL, USB_PHY_CLK_VALID, 0) < 0)
|
|
|
pr_err("%s: timeout waiting for phy to stabilize\n", __func__);
|
|
@@ -321,7 +321,7 @@ static void utmi_phy_clk_enable(struct tegra_usb_phy *phy)
|
|
|
val &= ~USB_SUSP_CLR;
|
|
|
writel(val, base + USB_SUSP_CTRL);
|
|
|
} else
|
|
|
- tegra_ehci_set_phcd(&phy->u_phy, false);
|
|
|
+ phy->set_phcd(&phy->u_phy, false);
|
|
|
|
|
|
if (utmi_wait_register(base + USB_SUSP_CTRL, USB_PHY_CLK_VALID,
|
|
|
USB_PHY_CLK_VALID))
|
|
@@ -444,7 +444,7 @@ static int utmi_phy_power_on(struct tegra_usb_phy *phy)
|
|
|
utmi_phy_clk_enable(phy);
|
|
|
|
|
|
if (!phy->is_legacy_phy)
|
|
|
- tegra_ehci_set_pts(&phy->u_phy, 0);
|
|
|
+ phy->set_pts(&phy->u_phy, 0);
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
@@ -688,7 +688,10 @@ static int tegra_usb_phy_suspend(struct usb_phy *x, int suspend)
|
|
|
}
|
|
|
|
|
|
struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance,
|
|
|
- void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode)
|
|
|
+ void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode,
|
|
|
+ void (*set_pts)(struct usb_phy *x, u8 pts_val),
|
|
|
+ void (*set_phcd)(struct usb_phy *x, bool enable))
|
|
|
+
|
|
|
{
|
|
|
struct tegra_usb_phy *phy;
|
|
|
unsigned long parent_rate;
|
|
@@ -707,6 +710,8 @@ struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance,
|
|
|
phy->dev = dev;
|
|
|
phy->is_legacy_phy =
|
|
|
of_property_read_bool(np, "nvidia,has-legacy-mode");
|
|
|
+ phy->set_pts = set_pts;
|
|
|
+ phy->set_phcd = set_phcd;
|
|
|
err = of_property_match_string(np, "phy_type", "ulpi");
|
|
|
if (err < 0)
|
|
|
phy->is_ulpi_phy = false;
|