#include <soc/samsung/cal-if.h>
#include <soc/samsung/exynos-pmu.h>
+#ifdef CONFIG_CPU_IDLE
/******************************************************************************
* IDLE_IP *
******************************************************************************/
idle_ip_max_index -= count;
}
+#endif
/******************************************************************************
* CAL interfaces *
cal_cluster_disable(cluster_id);
}
+/******************************************************************************
+ * CPU HOTPLUG *
+ ******************************************************************************/
+static int cpuhp_cpupm_online(unsigned int cpu)
+{
+ struct cpumask mask;
+
+ cpumask_and(&mask, cpu_coregroup_mask(cpu), cpu_online_mask);
+ if (cpumask_weight(&mask) == 0)
+ cluster_enable(cpu);
+
+ cpu_enable(cpu);
+
+ return 0;
+}
+
+static int cpuhp_cpupm_offline(unsigned int cpu)
+{
+ struct cpumask mask;
+
+ cpu_disable(cpu);
+
+ cpumask_and(&mask, cpu_coregroup_mask(cpu), cpu_online_mask);
+ if (cpumask_weight(&mask) == 0)
+ cluster_disable(cpu);
+
+ return 0;
+}
+
+#ifdef CONFIG_CPU_IDLE
+
/******************************************************************************
* CPU idle management *
******************************************************************************/
spin_unlock(&cpupm_lock);
}
-/******************************************************************************
- * CPU HOTPLUG *
- ******************************************************************************/
-static int cpuhp_cpupm_online(unsigned int cpu)
-{
- struct cpumask mask;
-
- cpumask_and(&mask, cpu_coregroup_mask(cpu), cpu_online_mask);
- if (cpumask_weight(&mask) == 0)
- cluster_enable(cpu);
-
- cpu_enable(cpu);
-
- return 0;
-}
-
-static int cpuhp_cpupm_offline(unsigned int cpu)
-{
- struct cpumask mask;
-
- cpu_disable(cpu);
-
- cpumask_and(&mask, cpu_coregroup_mask(cpu), cpu_online_mask);
- if (cpumask_weight(&mask) == 0)
- cluster_disable(cpu);
-
- return 0;
-}
-
/******************************************************************************
* Initialization *
******************************************************************************/
return 0;
}
arch_initcall(exynos_cpupm_init);
+#endif
static int __init exynos_cpupm_early_init(void)
{