瀏覽代碼

ARM: EXYNOS: Remove regs-pmu.h header dependency from pm_domain

Current "pm_domain.c" file uses "S5P_INT_LOCAL_PWR_EN" definition from
"regs-pmu.h" and hence needs to include this header file. As there is
no other user of "S5P_INT_LOCAL_PWR_EN" definition other than pm_domain,
to remove "regs-pmu.h" header file dependency from "pm_domain.c"  it's
better we define this definition in "pm_domain.c" file itself and thus it
will help in removing header file inclusion from "pm_domain.c".
Also removing "S5P_" prefix from macro.

Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Pankaj Dubey 11 年之前
父節點
當前提交
b634e38f31
共有 2 個文件被更改,包括 4 次插入6 次删除
  1. 4 5
      arch/arm/mach-exynos/pm_domains.c
  2. 0 1
      arch/arm/mach-exynos/regs-pmu.h

+ 4 - 5
arch/arm/mach-exynos/pm_domains.c

@@ -23,8 +23,7 @@
 #include <linux/of_platform.h>
 #include <linux/of_platform.h>
 #include <linux/sched.h>
 #include <linux/sched.h>
 
 
-#include "regs-pmu.h"
-
+#define INT_LOCAL_PWR_EN	0x7
 #define MAX_CLK_PER_DOMAIN	4
 #define MAX_CLK_PER_DOMAIN	4
 
 
 /*
 /*
@@ -63,13 +62,13 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
 		}
 		}
 	}
 	}
 
 
-	pwr = power_on ? S5P_INT_LOCAL_PWR_EN : 0;
+	pwr = power_on ? INT_LOCAL_PWR_EN : 0;
 	__raw_writel(pwr, base);
 	__raw_writel(pwr, base);
 
 
 	/* Wait max 1ms */
 	/* Wait max 1ms */
 	timeout = 10;
 	timeout = 10;
 
 
-	while ((__raw_readl(base + 0x4) & S5P_INT_LOCAL_PWR_EN)	!= pwr) {
+	while ((__raw_readl(base + 0x4) & INT_LOCAL_PWR_EN) != pwr) {
 		if (!timeout) {
 		if (!timeout) {
 			op = (power_on) ? "enable" : "disable";
 			op = (power_on) ? "enable" : "disable";
 			pr_err("Power domain %s %s failed\n", domain->name, op);
 			pr_err("Power domain %s %s failed\n", domain->name, op);
@@ -231,7 +230,7 @@ static __init int exynos4_pm_init_power_domain(void)
 no_clk:
 no_clk:
 		platform_set_drvdata(pdev, pd);
 		platform_set_drvdata(pdev, pd);
 
 
-		on = __raw_readl(pd->base + 0x4) & S5P_INT_LOCAL_PWR_EN;
+		on = __raw_readl(pd->base + 0x4) & INT_LOCAL_PWR_EN;
 
 
 		pm_genpd_init(&pd->pd, NULL, !on);
 		pm_genpd_init(&pd->pd, NULL, !on);
 	}
 	}

+ 0 - 1
arch/arm/mach-exynos/regs-pmu.h

@@ -126,7 +126,6 @@
 #define S5P_PAD_RET_EBIB_OPTION			S5P_PMUREG(0x31A8)
 #define S5P_PAD_RET_EBIB_OPTION			S5P_PMUREG(0x31A8)
 
 
 #define S5P_CORE_LOCAL_PWR_EN			0x3
 #define S5P_CORE_LOCAL_PWR_EN			0x3
-#define S5P_INT_LOCAL_PWR_EN			0x7
 
 
 /* Only for EXYNOS4210 */
 /* Only for EXYNOS4210 */
 #define S5P_CMU_CLKSTOP_LCD1_LOWPWR	S5P_PMUREG(0x1154)
 #define S5P_CMU_CLKSTOP_LCD1_LOWPWR	S5P_PMUREG(0x1154)