#ifdef CONFIG_ARCH_MX6
#define MX6_USB_HOST_HACK
-
#include <linux/fsl_devices.h>
-extern void fsl_platform_set_usb_phy_dis(struct fsl_usb2_platform_data *pdata,
- bool enable);
#endif
/* if we are in debug mode, always announce new devices */
#ifdef DEBUG
(msg.event & PM_EVENT_AUTO ? "auto-" : ""));
msleep(25);
+#ifdef MX6_USB_HOST_HACK
+ if (hub->hdev->parent == NULL) {
+ struct usb_device *hdev = hub->hdev;
+ struct usb_hcd *hcd = bus_to_hcd(hdev->bus);
+ struct fsl_usb2_platform_data *pdata;
+ pdata = hcd->self.controller->platform_data;
+ if (pdata->platform_rh_resume)
+ pdata->platform_rh_resume(pdata);
+ }
+#endif
+
/* Virtual root hubs can trigger on GET_PORT_STATUS to
* stop resume signaling. Then finish the resume
* sequence.
}
SuspendCleared:
+#ifdef MX6_USB_HOST_HACK
+ if (hub->hdev->parent == NULL) {
+ struct usb_device *hdev = hub->hdev;
+ struct usb_hcd *hcd = bus_to_hcd(hdev->bus);
+ struct fsl_usb2_platform_data *pdata;
+ pdata = hcd->self.controller->platform_data;
+ if (pdata->platform_rh_resume)
+ pdata->platform_rh_resume(pdata);
+ }
+#endif
if (status == 0) {
if (hub_is_superspeed(hub->hdev)) {
if (portchange & USB_PORT_STAT_C_LINK_STATE)
struct fsl_usb2_platform_data *pdata;
pdata = (struct fsl_usb2_platform_data *)
dev->platform_data;
- fsl_platform_set_usb_phy_dis(pdata, 1);
+ if (pdata && pdata->platform_set_disconnect_det)
+ pdata->platform_set_disconnect_det(pdata, 1);
}
}
}
pdata->init(NULL);
}
if ((port1 == 1) && (hdev->level == 0)) {
- if (!(portstatus&USB_PORT_STAT_CONNECTION)) {
+ if (!(portstatus & USB_PORT_STAT_CONNECTION)) {
/* Must clear HOSTDISCONDETECT when disconnect*/
- fsl_platform_set_usb_phy_dis(pdata, 0);
+ if (pdata->platform_set_disconnect_det)
+ pdata->platform_set_disconnect_det(pdata, 0);
}
}
}
spin_unlock_irq(&ehci->lock);
msleep(20);
spin_lock_irq(&ehci->lock);
+#ifdef MX6_USB_HOST_HACK
+ {
+ struct fsl_usb2_platform_data *pdata;
+ pdata = hcd->self.controller->platform_data;
+ if (pdata->platform_rh_resume)
+ pdata->platform_rh_resume(pdata);
+ }
+#endif
}
i = HCS_N_PORTS (ehci->hcs_params);
msleep(5);/* wait to leave low-power mode */
spin_lock_irqsave(&ehci->lock, flags);
}
- #ifdef MX6_USB_HOST_HACK
- {
- struct fsl_usb2_platform_data *pdata;
- pdata = hcd->self.controller->platform_data;
- if (pdata->platform_resume)
- pdata->platform_resume(pdata);
- }
- #endif
/* resume signaling for 20 msec */
temp &= ~(PORT_RWC_BITS | PORT_WAKE_BITS);
{
struct fsl_usb2_platform_data *pdata;
pdata = hcd->self.controller->platform_data;
- if (pdata->platform_suspend)
- pdata->platform_suspend(pdata);
+ if (pdata->platform_rh_suspend)
+ pdata->platform_rh_suspend(pdata);
}
#endif
if (hostpc_reg) {