void usbhs_wakeup() { int workq = 0; if (!usbhs_wake) return; if (test_bit(USB_OHCI_LOADED, &usb_hcds_loaded) && omap_hwmod_pad_get_wakeup_status(usbhs_wake->oh_ohci) == true) { usbhs_wake->wakeup_ohci = 1; workq = 1; } if (test_bit(USB_EHCI_LOADED, &usb_hcds_loaded) && omap_hwmod_pad_get_wakeup_status(usbhs_wake->oh_ehci) == true) { usbhs_wake->wakeup_ehci = 1; workq = 1; } if (workq) queue_work(pm_wq, &usbhs_wake->wakeup_work); }
/* TBD: Will be removed once we have irq-chaing mechanism */ static bool omap_uart_chk_wakeup(struct platform_device *pdev) { struct omap_uart_port_info *up = pdev->dev.platform_data; struct omap_device *od; u32 wkst = 0; bool ret = false; od = to_omap_device(pdev); if (omap_hwmod_pad_get_wakeup_status(od->hwmods[0]) == true) ret = true; if (up->wk_st && up->wk_en && up->wk_mask) { /* Check for normal UART wakeup (and clear it) */ wkst = __raw_readl(up->wk_st) & up->wk_mask; if (wkst) { __raw_writel(wkst, up->wk_st); ret = true; } } return ret; }