--- zzzz-none-000/linux-3.10.107/arch/arm/mach-imx/cpuidle-imx6q.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/arm/mach-imx/cpuidle-imx6q.c 2021-02-04 17:41:59.000000000 +0000 @@ -9,10 +9,10 @@ #include #include #include -#include #include "common.h" #include "cpuidle.h" +#include "hardware.h" static atomic_t master = ATOMIC_INIT(0); static DEFINE_SPINLOCK(master_lock); @@ -27,9 +27,9 @@ */ if (!spin_trylock(&master_lock)) goto idle; - imx6q_set_lpm(WAIT_UNCLOCKED); + imx6_set_lpm(WAIT_UNCLOCKED); cpu_do_idle(); - imx6q_set_lpm(WAIT_CLOCKED); + imx6_set_lpm(WAIT_CLOCKED); spin_unlock(&master_lock); goto done; } @@ -52,8 +52,7 @@ { .exit_latency = 50, .target_residency = 75, - .flags = CPUIDLE_FLAG_TIME_VALID | - CPUIDLE_FLAG_TIMER_STOP, + .flags = CPUIDLE_FLAG_TIMER_STOP, .enter = imx6q_enter_wait, .name = "WAIT", .desc = "Clock off", @@ -65,11 +64,8 @@ int __init imx6q_cpuidle_init(void) { - /* Need to enable SCU standby for entering WAIT modes */ - imx_scu_standby_enable(); - - /* Set chicken bit to get a reliable WAIT mode support */ - imx6q_set_chicken_bit(); + /* Set INT_MEM_CLK_LPM bit to get a reliable WAIT mode support */ + imx6q_set_int_mem_clk_lpm(true); return cpuidle_register(&imx6q_cpuidle_driver, NULL); }