···335335 if (!IS_ENABLED(CONFIG_SMP))336336 exynos_sysram_init();337337338338- exynos_cpuidle_init();338338+ if (!of_machine_is_compatible("samsung,exynos5420"))339339+ exynos_cpuidle_init();340340+339341 exynos_cpufreq_init();340342341343 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+36
arch/arm/mach-exynos/mcpm-exynos.c
···257257 return -ETIMEDOUT; /* timeout */258258}259259260260+static void exynos_powered_up(void)261261+{262262+ unsigned int mpidr, cpu, cluster;263263+264264+ mpidr = read_cpuid_mpidr();265265+ cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);266266+ cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);267267+268268+ arch_spin_lock(&exynos_mcpm_lock);269269+ if (cpu_use_count[cpu][cluster] == 0)270270+ cpu_use_count[cpu][cluster] = 1;271271+ arch_spin_unlock(&exynos_mcpm_lock);272272+}273273+274274+static void exynos_suspend(u64 residency)275275+{276276+ unsigned int mpidr, cpunr;277277+278278+ exynos_power_down();279279+280280+ /*281281+ * Execution reaches here only if cpu did not power down.282282+ * Hence roll back the changes done in exynos_power_down function.283283+ *284284+ * CAUTION: "This function requires the stack data to be visible through285285+ * power down and can only be executed on processors like A15 and A7286286+ * that hit the cache with the C bit clear in the SCTLR register."287287+ */288288+ mpidr = read_cpuid_mpidr();289289+ cpunr = exynos_pmu_cpunr(mpidr);290290+291291+ exynos_cpu_power_up(cpunr);292292+}293293+260294static const struct mcpm_platform_ops exynos_power_ops = {261295 .power_up = exynos_power_up,262296 .power_down = exynos_power_down,263297 .wait_for_powerdown = exynos_wait_for_powerdown,298298+ .suspend = exynos_suspend,299299+ .powered_up = exynos_powered_up,264300};265301266302static void __init exynos_mcpm_usage_count_init(void)
···991010config ARM_BIG_LITTLE_CPUIDLE1111 bool "Support for ARM big.LITTLE processors"1212- depends on ARCH_VEXPRESS_TC2_PM1212+ depends on ARCH_VEXPRESS_TC2_PM || ARCH_EXYNOS1313 select ARM_CPU_SUSPEND1414 select CPU_IDLE_MULTIPLE_DRIVERS1515 help
+11-1
drivers/cpuidle/cpuidle-big_little.c
···163163 return 0;164164}165165166166+static const struct of_device_id compatible_machine_match[] = {167167+ { .compatible = "arm,vexpress,v2p-ca15_a7" },168168+ { .compatible = "samsung,exynos5420" },169169+ {},170170+};171171+166172static int __init bl_idle_init(void)167173{168174 int ret;175175+ struct device_node *root = of_find_node_by_path("/");176176+177177+ if (!root)178178+ return -ENODEV;169179170180 /*171181 * Initialize the driver just for a compliant set of machines172182 */173173- if (!of_machine_is_compatible("arm,vexpress,v2p-ca15_a7"))183183+ if (!of_match_node(compatible_machine_match, root))174184 return -ENODEV;175185 /*176186 * For now the differentiation between little and big cores