[RAMEN9610-10884][COMMON] soc: cpupm: Do not allow idle util system initialization
authorHyunju Kang <hjtop.kang@gmail.com>
Tue, 15 Jan 2019 02:21:28 +0000 (11:21 +0900)
committerhskang <hs1218.kang@samsung.com>
Tue, 15 Jan 2019 08:44:55 +0000 (17:44 +0900)
Change-Id: Iccd6b703d564470f199375a2cfa75597973775b3
Signed-off-by: Hyunju Kang <hjtop.kang@gmail.com>
drivers/soc/samsung/exynos-cpupm.c

index ea0c6f47d8e2c97e48b77d0c2ed7778d57817d84..69d56dc274fcb862728f4cf10621d03f6c541403 100644 (file)
@@ -561,10 +561,15 @@ static int cpus_busy(int target_residency, const struct cpumask *cpus)
        return 0;
 }
 
+static int initcall_done;
 static int system_busy(void)
 {
        int i;
 
+       /* do not allow system idle util initialization time */
+       if (!initcall_done)
+               return 1;
+
        for (i = 0; i < NUM_IDLE_IP_REG; i++)
                if (check_idle_ip(i))
                        return 1;
@@ -905,6 +910,14 @@ static int __init exynos_cpupm_init(void)
        return 0;
 }
 arch_initcall(exynos_cpupm_init);
+
+static int __init exynos_cpupm_late_init(void)
+{
+       initcall_done = true;
+
+       return 0;
+}
+late_initcall(exynos_cpupm_late_init);
 #endif
 
 static int cpuhp_cpupm_enable_idle(unsigned int cpu)