Skip to contentSkip to conversation

ARM: imx: Enable cpuidle for i.MX6DL starting at 1.1

PATCH Applied Leonard Crestez 3 participants 3 messages Oct 11, 2017 – Oct 14, 2017

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

PATCH v2 1/1 ARM: imx: Enable cpuidle for i.MX6DL starting at 1.1

Enable cpuidle support on i.MX6DL starting from IMX_CHIP_REVISION_1_1.

This also makes the code cleaner because 6q and 6dl actually have different revision histories.

---

Changes since v1: https://www.spinics.net/lists/arm-kernel/msg610461.html
* Clarified comment but kept > instead of >= because that's what the old code used. Would be OK to change with further feedback.

 arch/arm/mach-imx/mach-imx6q.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
arch/arm/mach-imx/mach-imx6q.c +6 -3
index 45801b2..5707113 100644
@@ -371,10 +371,13 @@ static struct platform_device imx6q_cpufreq_pdev = {
 static void __init imx6q_init_late(void)
 {
 	/*
-	 * WAIT mode is broken on TO 1.0 and 1.1, so there is no point
-	 * to run cpuidle on them.
+	 * WAIT mode is broken on imx6 Dual/Quad revision 1.0 and 1.1 so
+	 * there is no point to run cpuidle on them.
+	 *
+	 * It does work on imx6 Solo/DualLite starting from 1.1
 	 */
-	if (imx_get_soc_revision() > IMX_CHIP_REVISION_1_1)
+	if ((cpu_is_imx6q() && imx_get_soc_revision() > IMX_CHIP_REVISION_1_1) ||
+	    (cpu_is_imx6dl() && imx_get_soc_revision() > IMX_CHIP_REVISION_1_0))
 		imx6q_cpuidle_init();
 
 	if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) {
Signature · 1 line
2.7.4
Reviewed-by on v2 1/1
#1 lore raw

Am Mittwoch, den 11.10.2017, 15:08 +0300 schrieb Leonard Crestez:

Quoted 8 lines

Enable cpuidle support on i.MX6DL starting from
IMX_CHIP_REVISION_1_1.

This also makes the code cleaner because 6q and 6dl actually have different revision histories.

Quoted 37 lines

---

Changes since v1: https://www.spinics.net/lists/arm-kernel/msg610461.
html
* Clarified comment but kept > instead of >= because that's what the old code used. Would be OK to change with further feedback.

?arch/arm/mach-imx/mach-imx6q.c | 9 ++++++---
?1 file changed, 6 insertions(+), 3 deletions(-)

arch/arm/mach-imx/mach- renamed from arch/arm/mach-imx/mach-imx6q.c +0 -0

imx6q.c
index 45801b2..5707113 100644

arch/arm/mach-imx/mach-imx6q.c +0 -0
@@ -371,10 +371,13 @@ static struct platform_device
 imx6q_cpufreq_pdev = {
 ?static void __init imx6q_init_late(void)
 ?{

? /*

arch/arm/mach-imx/mach-imx6q.c +0 -1
-	?* WAIT mode is broken on TO 1.0 and 1.1, so there is no

point

arch/arm/mach-imx/mach-imx6q.c +1 -1
-	?* to run cpuidle on them.
+	?* WAIT mode is broken on imx6 Dual/Quad revision 1.0 and

1.1 so

arch/arm/mach-imx/mach-imx6q.c +3 -0
+	?* there is no point to run cpuidle on them.
+	?*
+	?* It does work on imx6 Solo/DualLite starting from 1.1

? ?*/

arch/arm/mach-imx/mach-imx6q.c +1 -1
-	if (imx_get_soc_revision() > IMX_CHIP_REVISION_1_1)
+	if ((cpu_is_imx6q() && imx_get_soc_revision() >

IMX_CHIP_REVISION_1_1) ||

arch/arm/mach-imx/mach-imx6q.c +1 -0
+	????(cpu_is_imx6dl() && imx_get_soc_revision() >

IMX_CHIP_REVISION_1_0))
? imx6q_cpuidle_init();
?
? if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) {