DBG("%s inst:[%d]\n", __func__, phy->inst);
/* Disable PHY clock valid interrupts while going into suspend*/
- if (phy->pdata->u_data.host.hot_plug) {
+ if (phy->hot_plug) {
val = readl(base + USB_SUSP_CTRL);
val &= ~USB_PHY_CLK_VALID_INT_ENB;
writel(val, base + USB_SUSP_CTRL);
remote_wakeup = true;
}
- if (phy->pdata->u_data.host.hot_plug) {
+ if (phy->hot_plug) {
val = readl(base + USB_SUSP_CTRL);
if ((val & USB_PHY_CLK_VALID_INT_STS)) {
val &= ~USB_PHY_CLK_VALID_INT_ENB |
utmip_setup_pmc_wake_detect(phy);
}
- if (!phy->pdata->u_data.host.hot_plug) {
+ if (!phy->hot_plug) {
val = readl(base + UTMIP_XCVR_CFG0);
val |= (UTMIP_FORCE_PD_POWERDOWN | UTMIP_FORCE_PD2_POWERDOWN |
UTMIP_FORCE_PDZI_POWERDOWN);
utmi_phy_pad_power_off(phy);
- if (phy->pdata->u_data.host.hot_plug) {
+ if (phy->hot_plug) {
bool enable_hotplug = true;
/* if it is OTG port then make sure to enable hot-plug feature
only if host adaptor is connected, i.e id is low */
val |= HOSTPC1_DEVLC_PHCD;
writel(val, base + HOSTPC1_DEVLC);
- if (!phy->pdata->u_data.host.hot_plug) {
+ if (!phy->hot_plug) {
val = readl(base + USB_SUSP_CTRL);
val |= UTMIP_RESET;
writel(val, base + USB_SUSP_CTRL);
DBG("%s(%d) inst:[%d]\n", __func__, __LINE__, phy->inst);
usb_phy_fence_read(phy);
- if (phy->pdata->u_data.host.hot_plug) {
+ if (phy->hot_plug) {
val = readl(base + USB_SUSP_CTRL);
if ((val & USB_PHY_CLK_VALID_INT_STS)) {
val &= ~USB_PHY_CLK_VALID_INT_ENB |
writel(val, base + UTMIP_BAT_CHRG_CFG0);
}
- if (!phy->pdata->u_data.host.hot_plug) {
+ if (!phy->hot_plug) {
val = readl(base + UTMIP_XCVR_UHSIC_HSRX_CFG0);
val |= (UTMIP_FORCE_PD_POWERDOWN | UTMIP_FORCE_PD2_POWERDOWN |
UTMIP_FORCE_PDZI_POWERDOWN);
phy->port_speed = (readl(base + USB_PORTSC) >> 26) &
USB_PORTSC_PSPD_MASK;
- if (phy->pdata->u_data.host.hot_plug) {
+ if (phy->hot_plug) {
bool enable_hotplug = true;
/* if it is OTG port then make sure to enable hot-plug feature
only if host adaptor is connected, i.e id is low */
DBG("%s inst:[%d]\n", __func__, phy->inst);
/* Disable PHY clock valid interrupts while going into suspend*/
- if (phy->pdata->u_data.host.hot_plug) {
+ if (phy->hot_plug) {
val = readl(base + USB_SUSP_CTRL);
val &= ~USB_PHY_CLK_VALID_INT_ENB;
writel(val, base + USB_SUSP_CTRL);
remote_wakeup = true;
}
- if (phy->pdata->u_data.host.hot_plug) {
+ if (phy->hot_plug) {
val = readl(base + USB_SUSP_CTRL);
if ((val & USB_PHY_CLK_VALID_INT_STS)) {
val &= ~USB_PHY_CLK_VALID_INT_ENB |
utmip_setup_pmc_wake_detect(phy);
}
- if (!phy->pdata->u_data.host.hot_plug) {
+ if (!phy->hot_plug) {
val = readl(base + UTMIP_XCVR_CFG0);
val |= (UTMIP_FORCE_PD_POWERDOWN | UTMIP_FORCE_PD2_POWERDOWN |
UTMIP_FORCE_PDZI_POWERDOWN);
utmi_phy_pad_power_off(phy);
- if (phy->pdata->u_data.host.hot_plug) {
+ if (phy->hot_plug) {
bool enable_hotplug = true;
/* if it is OTG port then make sure to enable hot-plug feature
only if host adaptor is connected, i.e id is low */
val |= HOSTPC1_DEVLC_PHCD;
writel(val, base + HOSTPC1_DEVLC);
- if (!phy->pdata->u_data.host.hot_plug) {
+ if (!phy->hot_plug) {
val = readl(base + USB_SUSP_CTRL);
val |= UTMIP_RESET;
writel(val, base + USB_SUSP_CTRL);
bool pmc_sleepwalk;
bool bus_reseting;
bool linkphy_init;
+ bool hot_plug;
};
int usb_phy_reg_status_wait(void __iomem *reg, u32 mask,
phy->pdev = pdev;
phy->inst = pdev->id;
+ if (phy->pdata->op_mode == TEGRA_USB_OPMODE_HOST)
+ phy->hot_plug = phy->pdata->u_data.host.hot_plug;
+
print_usb_plat_data_info(phy);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);