diff mbox

ARM: EXYNOS4: Fix soft reboot hang after suspend/resume

Message ID 1332929866-31489-1-git-send-email-inderpal.singh@linaro.org
State Accepted
Headers show

Commit Message

Inderpal Singh March 28, 2012, 10:17 a.m. UTC
Upon wake-up, clear the sleep mode set in INFORM1 register.

Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org>
---
 arch/arm/mach-exynos/pm.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

Comments

Kukjin Kim May 14, 2012, 8:15 a.m. UTC | #1
Inderpal Singh wrote:
> 
> Upon wake-up, clear the sleep mode set in INFORM1 register.
> 
Is this for wake-up or _really_ software reset? And is this available on all
of EXYNOS4 SoCs?

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

> Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org>
> ---
>  arch/arm/mach-exynos/pm.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
> index f0bb467..16cba3f 100644
> --- a/arch/arm/mach-exynos/pm.c
> +++ b/arch/arm/mach-exynos/pm.c
> @@ -381,6 +381,10 @@ static void exynos4_pm_resume(void)
>  #endif
> 
>  early_wakeup:
> +
> +	/* Clear SLEEP mode set in INFORM1 */
> +	__raw_writel(0x0, S5P_INFORM1);
> +
>  	return;
>  }
>
Inderpal Singh May 14, 2012, 8:42 a.m. UTC | #2
Hi Kukjin,

On 14 May 2012 13:45, Kukjin Kim <kgene.kim@samsung.com> wrote:
> Inderpal Singh wrote:
>>
>> Upon wake-up, clear the sleep mode set in INFORM1 register.
>>
> Is this for wake-up or _really_ software reset? And is this available on all
> of EXYNOS4 SoCs?

This is for soft reboot hang after one cycle of suspend/resume is complete.
And yes this is applicable for all exynos SOCs.

With Regards,
Inder

>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
>> Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org>
>> ---
>>  arch/arm/mach-exynos/pm.c |    4 ++++
>>  1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
>> index f0bb467..16cba3f 100644
>> --- a/arch/arm/mach-exynos/pm.c
>> +++ b/arch/arm/mach-exynos/pm.c
>> @@ -381,6 +381,10 @@ static void exynos4_pm_resume(void)
>>  #endif
>>
>>  early_wakeup:
>> +
>> +     /* Clear SLEEP mode set in INFORM1 */
>> +     __raw_writel(0x0, S5P_INFORM1);
>> +
>>       return;
>>  }
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kukjin Kim May 14, 2012, 1:43 p.m. UTC | #3
On 05/14/12 17:42, Inderpal Singh wrote:
> Hi Kukjin,
>
> On 14 May 2012 13:45, Kukjin Kim<kgene.kim@samsung.com>  wrote:
>> Inderpal Singh wrote:
>>>
>>> Upon wake-up, clear the sleep mode set in INFORM1 register.
>>>
>> Is this for wake-up or _really_ software reset? And is this available on all
>> of EXYNOS4 SoCs?
>
> This is for soft reboot hang after one cycle of suspend/resume is complete.
> And yes this is applicable for all exynos SOCs.
>
Hi,

As I know, we don't need it for all of EXYNOS SoCs but let me check 
about the situation you said with hardware engineer tomorrow. If any 
updates, let you know.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
Inderpal Singh May 15, 2012, 4:31 a.m. UTC | #4
Hi Kukjin,

On 14 May 2012 19:13, Kukjin Kim <kgene.kim@samsung.com> wrote:
> On 05/14/12 17:42, Inderpal Singh wrote:
>>
>> Hi Kukjin,
>>
>> On 14 May 2012 13:45, Kukjin Kim<kgene.kim@samsung.com>  wrote:
>>>
>>> Inderpal Singh wrote:
>>>>
>>>>
>>>> Upon wake-up, clear the sleep mode set in INFORM1 register.
>>>>
>>> Is this for wake-up or _really_ software reset? And is this available on
>>> all
>>> of EXYNOS4 SoCs?
>>
>>
>> This is for soft reboot hang after one cycle of suspend/resume is
>> complete.
>> And yes this is applicable for all exynos SOCs.
>>
> Hi,
>
> As I know, we don't need it for all of EXYNOS SoCs but let me check about
> the situation you said with hardware engineer tomorrow. If any updates, let
> you know.
>

The issue happens because u-boot checks INFROM1 register to know if
its wake-up from sleep. Hence if INFORM1 is not cleared, the soft
reboot after one suspend/resume cycle will be understood by u-boot as
wake-up from sleep, so it will try to resume and will hang up.

I have faced this issue on Origen, Pegasus SMDK and 5250 SMDK.

Thanks,
Inder

>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
Inderpal Singh Sept. 14, 2012, 5:14 a.m. UTC | #5
Hi Kukjin,

On 15 May 2012 10:01, Inderpal Singh <inderpal.singh@linaro.org> wrote:
> Hi Kukjin,
>
> On 14 May 2012 19:13, Kukjin Kim <kgene.kim@samsung.com> wrote:
>> On 05/14/12 17:42, Inderpal Singh wrote:
>>>
>>> Hi Kukjin,
>>>
>>> On 14 May 2012 13:45, Kukjin Kim<kgene.kim@samsung.com>  wrote:
>>>>
>>>> Inderpal Singh wrote:
>>>>>
>>>>>
>>>>> Upon wake-up, clear the sleep mode set in INFORM1 register.
>>>>>
>>>> Is this for wake-up or _really_ software reset? And is this available on
>>>> all
>>>> of EXYNOS4 SoCs?
>>>
>>>
>>> This is for soft reboot hang after one cycle of suspend/resume is
>>> complete.
>>> And yes this is applicable for all exynos SOCs.
>>>
>> Hi,
>>
>> As I know, we don't need it for all of EXYNOS SoCs but let me check about
>> the situation you said with hardware engineer tomorrow. If any updates, let
>> you know.
>>
>

Any updates on this ?
As i mentioned below, Its applicable for Origen, Pegasus and 5250 as well.

> The issue happens because u-boot checks INFROM1 register to know if
> its wake-up from sleep. Hence if INFORM1 is not cleared, the soft
> reboot after one suspend/resume cycle will be understood by u-boot as
> wake-up from sleep, so it will try to resume and will hang up.
>
> I have faced this issue on Origen, Pegasus SMDK and 5250 SMDK.
>
> Thanks,
> Inder
>
>>
>> Thanks.
>>
>> Best regards,
>> Kgene.
>> --
>> Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
>> SW Solution Development Team, Samsung Electronics Co., Ltd.

With Regards,
Inder
diff mbox

Patch

diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index f0bb467..16cba3f 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -381,6 +381,10 @@  static void exynos4_pm_resume(void)
 #endif
 
 early_wakeup:
+
+	/* Clear SLEEP mode set in INFORM1 */
+	__raw_writel(0x0, S5P_INFORM1);
+
 	return;
 }