From: make shi Date: Thu, 20 Sep 2012 09:20:14 +0000 (+0800) Subject: ENGR00225131-06 MX6 PM: clear stop_mode_config after system resume X-Git-Tag: v3.0.35-fsl~443 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=46a07e41b1b0feda7ded8bda82487a96ff527957;p=karo-tx-linux.git ENGR00225131-06 MX6 PM: clear stop_mode_config after system resume - If stop_mode_config is set as 1, the USB otg vbus wakeup system can be supported - After system resume, need clear stop_mode_config bit to keep the 1P1 default off Signed-off-by: make shi --- diff --git a/arch/arm/mach-mx6/pm.c b/arch/arm/mach-mx6/pm.c index 20139e0b9594..40e0d39470bd 100644 --- a/arch/arm/mach-mx6/pm.c +++ b/arch/arm/mach-mx6/pm.c @@ -38,6 +38,7 @@ #endif #include "crm_regs.h" #include "src-reg.h" +#include "regs-anadig.h" #define SCU_CTRL_OFFSET 0x00 #define GPC_IMR1_OFFSET 0x08 @@ -122,6 +123,11 @@ static void usb_power_down_handler(void) { u32 temp; bool usb_oh3_clk_already_on; + if ((__raw_readl(anatop_base + HW_ANADIG_ANA_MISC0) + & BM_ANADIG_ANA_MISC0_STOP_MODE_CONFIG) != 0) { + usb_vbus_wakeup_enabled = false; + return; + } /* enable usb oh3 clock if needed*/ temp = __raw_readl(MXC_CCM_CCGR6); usb_oh3_clk_already_on = \ @@ -433,6 +439,9 @@ static int mx6_suspend_enter(suspend_state_t state) mx6_suspend_restore(); + __raw_writel(BM_ANADIG_ANA_MISC0_STOP_MODE_CONFIG, + anatop_base + HW_ANADIG_ANA_MISC0_CLR); + if (pm_data && pm_data->suspend_exit) pm_data->suspend_exit(); } else {