Re: [PATCH v2] ARM: imx: Enable cpuidle for i.MX6DL starting at 1.1

From: Lucas Stach
Date: Wed Oct 11 2017 - 08:10:08 EST


Am Mittwoch, den 11.10.2017, 15:08 +0300 schrieb Leonard Crestez:
> 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.
>
> Signed-off-by: Bai Ping <ping.bai@xxxxxxx>
> Signed-off-by: Leonard Crestez <leonard.crestez@xxxxxxx>

Reviewed-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx>

> ---
>
> 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(-)
>
> diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-
> imx6q.c
> index 45801b2..5707113 100644
> --- a/arch/arm/mach-imx/mach-imx6q.c
> +++ b/arch/arm/mach-imx/mach-imx6q.c
> @@ -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)) {