From 46a07e41b1b0feda7ded8bda82487a96ff527957 Mon Sep 17 00:00:00 2001 From: make shi Date: Thu, 20 Sep 2012 17:20:14 +0800 Subject: [PATCH] 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 --- arch/arm/mach-mx6/pm.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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 { -- 2.39.5