ARM: EXYNOS: Remove regs-pmu.h header dependency from pm_domain
authorPankaj Dubey <pankaj.dubey@samsung.com>
Mon, 7 Jul 2014 22:54:19 +0000 (07:54 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Mon, 14 Jul 2014 23:40:32 +0000 (08:40 +0900)
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>
arch/arm/mach-exynos/pm_domains.c
arch/arm/mach-exynos/regs-pmu.h

index 797cb134bffff75233bb5817913dab0fcd426b79..fd76e1b5a471a4f3ffcfd3a2c4539a16b2d26f40 100644 (file)
@@ -23,8 +23,7 @@
 #include <linux/of_platform.h>
 #include <linux/sched.h>
 
-#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);
        }
index 790af14626bc268594216d538bc3297baf91430d..1993e6bd5388c39606ac9fd074a5f12f0c5620d1 100644 (file)
 #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)