diff options
-rwxr-xr-x[-rw-r--r--] | arch/arm/mach-omap2/pm44xx.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c index 6f34267..1921eff 100644..100755 --- a/arch/arm/mach-omap2/pm44xx.c +++ b/arch/arm/mach-omap2/pm44xx.c @@ -90,6 +90,19 @@ static struct powerdomain *tesla_pwrdm; u8 pm44xx_errata; #define is_pm44xx_erratum(erratum) (pm44xx_errata & OMAP4_PM_ERRATUM_##erratum) +/* HACK: check CAWAKE wakeup event */ +#define USBB1_ULPITLL_CLK 0x4A1000C0 +#define CONTROL_PADCONF_WAKEUPEVENT_2 0x4A1001E0 +static int cawake_event_flag = 0; +void check_cawake_wakeup_event(void) +{ + if ((omap_readl(USBB1_ULPITLL_CLK) & 0x80000000) || + (omap_readl(CONTROL_PADCONF_WAKEUPEVENT_2) & 0x2)) { + pr_info("[HSI] PORT 1 CAWAKE WAKEUP EVENT\n"); + cawake_event_flag = 1; + } +} + #define MAX_IOPAD_LATCH_TIME 1000 void omap4_trigger_ioctrl(void) { @@ -638,6 +651,10 @@ static int omap4_pm_suspend(void) * More details can be found in OMAP4430 TRM section 4.3.4.2. */ omap4_enter_sleep(0, PWRDM_POWER_OFF, true); + + /* HACK: check CAWAKE wakeup event */ + check_cawake_wakeup_event(); + omap4_print_wakeirq(); prcmdebug_dump(PRCMDEBUG_LASTSLEEP); @@ -947,9 +964,16 @@ static irqreturn_t prcm_interrupt_handler (int irq, void *dev_id) /* Check if a IO_ST interrupt */ if (irqstatus_mpu & OMAP4430_IO_ST_MASK) { /* Check if HSI caused the IO wakeup */ - if (omap_hsi_is_io_wakeup_from_hsi(&hsi_port)) { + + /* HACK: check CAWAKE wakeup event */ + if (cawake_event_flag) { + hsi_port = 1; + cawake_event_flag = 0; omap_hsi_wakeup(hsi_port); - } + } else + if (omap_hsi_is_io_wakeup_from_hsi(&hsi_port)) + omap_hsi_wakeup(hsi_port); + omap_uart_resume_idle(); if (!machine_is_tuna()) usbhs_wakeup(); |