aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos/pm.c
diff options
context:
space:
mode:
authorAbhilash Kesavan <a.kesavan@samsung.com>2014-05-16 04:23:26 +0900
committerKukjin Kim <kgene.kim@samsung.com>2014-05-16 04:24:51 +0900
commit096d21c6ebd01b3440d1e6063e646d9db8e31ac9 (patch)
tree0e20c38cfe275540bea9996f514c1120d9e47940 /arch/arm/mach-exynos/pm.c
parentARM: EXYNOS: use generic exynos cpu power control functions (diff)
downloadlinux-dev-096d21c6ebd01b3440d1e6063e646d9db8e31ac9.tar.xz
linux-dev-096d21c6ebd01b3440d1e6063e646d9db8e31ac9.zip
ARM: EXYNOS: Add generic cluster power control functions
Add generic cluster power control functions for exynos based SoCS for cluster power up/down and to know the cluster status. Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos/pm.c')
-rw-r--r--arch/arm/mach-exynos/pm.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index cbfe23598236..3f2ae864582e 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -136,6 +136,36 @@ int exynos_cpu_power_state(int cpu)
S5P_CORE_LOCAL_PWR_EN);
}
+/**
+ * exynos_cluster_power_down : power down the specified cluster
+ * @cluster : the cluster to power down
+ */
+void exynos_cluster_power_down(int cluster)
+{
+ __raw_writel(0, EXYNOS_COMMON_CONFIGURATION(cluster));
+}
+
+/**
+ * exynos_cluster_power_up : power up the specified cluster
+ * @cluster : the cluster to power up
+ */
+void exynos_cluster_power_up(int cluster)
+{
+ __raw_writel(S5P_CORE_LOCAL_PWR_EN,
+ EXYNOS_COMMON_CONFIGURATION(cluster));
+}
+
+/**
+ * exynos_cluster_power_state : returns the power state of the cluster
+ * @cluster : the cluster to retrieve the power state from
+ *
+ */
+int exynos_cluster_power_state(int cluster)
+{
+ return (__raw_readl(EXYNOS_COMMON_STATUS(cluster)) &
+ S5P_CORE_LOCAL_PWR_EN);
+}
+
/* For Cortex-A9 Diagnostic and Power control register */
static unsigned int save_arm_register[2];