diff options
author | wonhee <wonhee48.seo@samsung.com> | 2011-10-21 18:42:55 +0900 |
---|---|---|
committer | Benoit Goby <benoit@android.com> | 2011-10-21 14:18:15 -0700 |
commit | fb09543e912c02a947118da5b26f0c3e25814cda (patch) | |
tree | ff867ce221b9381abf40bb1042c57b2584bde2fc /arch/arm/mach-omap2/pm44xx.c | |
parent | a1d1521ea596b011505cf44441363b1370d6a975 (diff) | |
download | kernel_samsung_tuna-fb09543e912c02a947118da5b26f0c3e25814cda.zip kernel_samsung_tuna-fb09543e912c02a947118da5b26f0c3e25814cda.tar.gz kernel_samsung_tuna-fb09543e912c02a947118da5b26f0c3e25814cda.tar.bz2 |
HACK: omap_hsi: Workaround for missing CAWAKE event from off mode
1. Make cawake event flag.
- save status of wakeup event of cawake
Change-Id: Iaeda7a92ebaa1c6676e775dec1eb9e1c1cc015f7
Signed-off-by: wonhee <wonhee48.seo@samsung.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm44xx.c')
-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(); |