Skip to contentSkip to conversation

ARM: imx6: enable WAIT mode hardware workaround for imx6sx

PATCH New Anson Huang 3 participants 4 messages Aug 22, 2016 – Aug 29, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: imx6: enable WAIT mode hardware workaround for imx6sx

Need to enable INT_MEM_CLK_LPM bit in CCM_CGPR for WAIT mode, without this bit set, if there is pending interrupt during ARM platform entering WAIT mode without power gating, cache data will be corrupted, this is a hardware workaround for WAIT mode and must be enabled.

---
 arch/arm/mach-imx/cpuidle-imx6sx.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-imx/cpuidle-imx6sx.c +1 -0
index 3c6672b..41cdce6 100644
@@ -90,6 +90,7 @@ static struct cpuidle_driver imx6sx_cpuidle_driver = {
 
 int __init imx6sx_cpuidle_init(void)
 {
+	imx6q_set_int_mem_clk_lpm(true);
 	imx6_enable_rbc(false);
 	/*
 	 * set ARM power up/down timing to the fastest,
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 ARM: imx6: enable WAIT mode hardware workaround for imx6sx

Quoted 25 lines

Need to enable INT_MEM_CLK_LPM bit in CCM_CGPR for WAIT mode, without this bit set, if there is pending interrupt during ARM platform entering WAIT mode without power gating, cache data will be corrupted, this is a hardware workaround for WAIT mode and must be enabled.

---
arch/arm/mach-imx/cpuidle-imx6sx.c | 1 +

1 file changed, 1 insertion(+)
arch/arm/mach-imx/cpuidle- renamed from arch/arm/mach-imx/cpuidle-imx6sx.c +0 -0

imx6sx.c
index 3c6672b..41cdce6 100644

arch/arm/mach-imx/cpuidle-imx6sx.c +1 -1
@@ -90,6 +90,7 @@ static struct cpuidle_driver imx6sx_cpuidle_driver = {
 
 int __init imx6sx_cpuidle_init(void)
 {
+	imx6q_set_int_mem_clk_lpm(true);
 	imx6_enable_rbc(false);
 	/*
 	 * set ARM power up/down timing to the fastest,
--
Quoted 1 line

1.9.1

It fixed the system unstable problem at my imx6sx-sdb board. So:

Peter

#2 lore raw

PATCH 1/1 ARM: imx6: enable WAIT mode hardware workaround for imx6sx

In reply to Anson Huang
Quoted 16 lines · Anson Huang

Need to enable INT_MEM_CLK_LPM bit in CCM_CGPR for WAIT mode, without this bit set, if there is pending interrupt during ARM platform entering WAIT mode without power gating, cache data will be corrupted, this is a hardware workaround for WAIT mode and must be enabled.

---
 arch/arm/mach-imx/cpuidle-imx6sx.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-imx/cpuidle-imx6sx.c +0 -0
index 3c6672b..41cdce6 100644

arch/arm/mach-imx/cpuidle-imx6sx.c static struct cpuidle_driver imx6sx_cpuidle_driver = { · line 93

Quoted 4 lines
arch/arm/mach-imx/cpuidle-imx6sx.c +1 -0
@@ -90,6 +90,7 @@ static struct cpuidle_driver imx6sx_cpuidle_driver = {
 
 int __init imx6sx_cpuidle_init(void)
 {
+	imx6q_set_int_mem_clk_lpm(true);

It might be the time to rename the function to imx6_set_int_mem_clk_lpm() with a beforehand patch.

Shawn

Quoted 11 lines
arch/arm/mach-imx/cpuidle-imx6sx.c +0 -0
 	imx6_enable_rbc(false);
 	/*
 	 * set ARM power up/down timing to the fastest,
Signature · 7 lines
1.9.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#3 lore raw

PATCH 1/1 ARM: imx6: enable WAIT mode hardware workaround for imx6sx

Best Regards!
Anson Huang

Quoted 30 lines

-----Original Message-----
From: Shawn Guo [mailto:shawnguo at kernel.org]
Sent: 2016-08-29 1:44 PM
To: Yongcai Huang <[email protected]>
Cc: linux-arm-kernel at lists.infradead.org; Fabio Estevam <[email protected]>; Peter Chen <[email protected]>; kernel at pengutronix.de
Subject: Re: [PATCH] ARM: imx6: enable WAIT mode hardware workaround for imx6sx

Quoted 1 line · Anson Huang

Need to enable INT_MEM_CLK_LPM bit in CCM_CGPR for WAIT mode,

without

Quoted 17 lines

this bit set, if there is pending interrupt during ARM platform entering WAIT mode without power gating, cache data will be corrupted, this is a hardware workaround for WAIT mode and must be enabled.

---
 arch/arm/mach-imx/cpuidle-imx6sx.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-imx/cpuidle-imx6sx.c +0 -0
index 3c6672b..41cdce6 100644
@@ -90,6 +90,7 @@ static struct cpuidle_driver imx6sx_cpuidle_driver =
 {
 
Quoted 8 lines

arch/arm/mach-imx/cpuidle-imx6sx.c static struct cpuidle_driver imx6sx_cpuidle_driver = { · line 93

Quoted 3 lines
arch/arm/mach-imx/cpuidle-imx6sx.c +1 -0
 int __init imx6sx_cpuidle_init(void)
 {
+	imx6q_set_int_mem_clk_lpm(true);

It might be the time to rename the function to imx6_set_int_mem_clk_lpm() with a beforehand patch.

Shawn

Agree, already send out a V2 patch set to rename the function firstly, thanks.

Anson.

Quoted 12 lines
Quoted 12 lines
arch/arm/mach-imx/cpuidle-imx6sx.c +0 -0
 	imx6_enable_rbc(false);
 	/*

* set ARM power up/down timing to the fastest,
--
1.9.1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel