static void _host_wakeup_enable(struct fsl_usb2_platform_data *pdata, bool enable) { __wakeup_irq_enable(enable, ENABLED_BY_HOST); /* host only care the ID change wakeup event */ if (enable) { pr_debug("host wakeup enable\n"); USBCTRL_HOST2 |= UCTRL_H2OIDWK_EN; } else { pr_debug("host wakeup disable\n"); USBCTRL_HOST2 &= ~UCTRL_H2OIDWK_EN; /* The interrupt must be disabled for at least 3 clock * cycles of the standby clock(32k Hz) , that is 0.094 ms*/ udelay(100); } }
static void _host_wakeup_enable(struct fsl_usb2_platform_data *pdata, bool enable) { __wakeup_irq_enable(pdata, enable, ENABLED_BY_HOST); if (enable) { pr_debug("host wakeup enable\n"); USB_OTG_CTRL |= UCTRL_WKUP_ID_EN; } else { pr_debug("host wakeup disable\n"); USB_OTG_CTRL &= ~UCTRL_WKUP_ID_EN; /* The interrupt must be disabled for at least 3 clock * cycles of the standby clock(32k Hz) , that is 0.094 ms*/ udelay(100); } pr_debug("the otgsc is 0x%x, usbsts is 0x%x, portsc is 0x%x, otgctrl: 0x%x\n", UOG_OTGSC, UOG_USBSTS, UOG_PORTSC1, USB_OTG_CTRL); }
static void _device_wakeup_enable(struct fsl_usb2_platform_data *pdata, bool enable) { __wakeup_irq_enable(enable, ENABLED_BY_DEVICE); /* if udc is not used by any gadget, we can not enable the vbus wakeup */ if (!pdata->port_enables) { USBCTRL_HOST2 &= ~UCTRL_H2OVBWK_EN; return; } if (enable) { pr_debug("device wakeup enable\n"); USBCTRL_HOST2 |= UCTRL_H2OVBWK_EN; } else { pr_debug("device wakeup disable\n"); USBCTRL_HOST2 &= ~UCTRL_H2OVBWK_EN; } }