From b634e38f31a4b70dcaefd21b1158c27d520bd017 Mon Sep 17 00:00:00 2001 From: Pankaj Dubey Date: Tue, 8 Jul 2014 07:54:19 +0900 Subject: [PATCH] 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 Reviewed-by: Tomasz Figa Signed-off-by: Kukjin Kim --- arch/arm/mach-exynos/pm_domains.c | 9 ++++----- arch/arm/mach-exynos/regs-pmu.h | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c index 797cb134bfff..fd76e1b5a471 100644 --- a/arch/arm/mach-exynos/pm_domains.c +++ b/arch/arm/mach-exynos/pm_domains.c @@ -23,8 +23,7 @@ #include #include -#include "regs-pmu.h" - +#define INT_LOCAL_PWR_EN 0x7 #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); /* Wait max 1ms */ 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) { op = (power_on) ? "enable" : "disable"; 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: 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); } diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h index 790af14626bc..1993e6bd5388 100644 --- a/arch/arm/mach-exynos/regs-pmu.h +++ b/arch/arm/mach-exynos/regs-pmu.h @@ -126,7 +126,6 @@ #define S5P_PAD_RET_EBIB_OPTION S5P_PMUREG(0x31A8) #define S5P_CORE_LOCAL_PWR_EN 0x3 -#define S5P_INT_LOCAL_PWR_EN 0x7 /* Only for EXYNOS4210 */ #define S5P_CMU_CLKSTOP_LCD1_LOWPWR S5P_PMUREG(0x1154) -- 2.11.0