diff options
| author | Pankaj Dubey <pankaj.dubey@samsung.com> | 2014-07-07 18:54:19 -0400 |
|---|---|---|
| committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-07-14 19:40:32 -0400 |
| commit | b634e38f31a4b70dcaefd21b1158c27d520bd017 (patch) | |
| tree | cffb6baef0eb25827d85d1d1d7857c4fcd25be7d | |
| parent | 4552386a3ef9a1db6190ed2e089a93f339d428eb (diff) | |
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>
| -rw-r--r-- | arch/arm/mach-exynos/pm_domains.c | 9 | ||||
| -rw-r--r-- | 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 @@ | |||
| 23 | #include <linux/of_platform.h> | 23 | #include <linux/of_platform.h> |
| 24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
| 25 | 25 | ||
| 26 | #include "regs-pmu.h" | 26 | #define INT_LOCAL_PWR_EN 0x7 |
| 27 | |||
| 28 | #define MAX_CLK_PER_DOMAIN 4 | 27 | #define MAX_CLK_PER_DOMAIN 4 |
| 29 | 28 | ||
| 30 | /* | 29 | /* |
| @@ -63,13 +62,13 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on) | |||
| 63 | } | 62 | } |
| 64 | } | 63 | } |
| 65 | 64 | ||
| 66 | pwr = power_on ? S5P_INT_LOCAL_PWR_EN : 0; | 65 | pwr = power_on ? INT_LOCAL_PWR_EN : 0; |
| 67 | __raw_writel(pwr, base); | 66 | __raw_writel(pwr, base); |
| 68 | 67 | ||
| 69 | /* Wait max 1ms */ | 68 | /* Wait max 1ms */ |
| 70 | timeout = 10; | 69 | timeout = 10; |
| 71 | 70 | ||
| 72 | while ((__raw_readl(base + 0x4) & S5P_INT_LOCAL_PWR_EN) != pwr) { | 71 | while ((__raw_readl(base + 0x4) & INT_LOCAL_PWR_EN) != pwr) { |
| 73 | if (!timeout) { | 72 | if (!timeout) { |
| 74 | op = (power_on) ? "enable" : "disable"; | 73 | op = (power_on) ? "enable" : "disable"; |
| 75 | pr_err("Power domain %s %s failed\n", domain->name, op); | 74 | pr_err("Power domain %s %s failed\n", domain->name, op); |
| @@ -231,7 +230,7 @@ static __init int exynos4_pm_init_power_domain(void) | |||
| 231 | no_clk: | 230 | no_clk: |
| 232 | platform_set_drvdata(pdev, pd); | 231 | platform_set_drvdata(pdev, pd); |
| 233 | 232 | ||
| 234 | on = __raw_readl(pd->base + 0x4) & S5P_INT_LOCAL_PWR_EN; | 233 | on = __raw_readl(pd->base + 0x4) & INT_LOCAL_PWR_EN; |
| 235 | 234 | ||
| 236 | pm_genpd_init(&pd->pd, NULL, !on); | 235 | pm_genpd_init(&pd->pd, NULL, !on); |
| 237 | } | 236 | } |
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 @@ | |||
| 126 | #define S5P_PAD_RET_EBIB_OPTION S5P_PMUREG(0x31A8) | 126 | #define S5P_PAD_RET_EBIB_OPTION S5P_PMUREG(0x31A8) |
| 127 | 127 | ||
| 128 | #define S5P_CORE_LOCAL_PWR_EN 0x3 | 128 | #define S5P_CORE_LOCAL_PWR_EN 0x3 |
| 129 | #define S5P_INT_LOCAL_PWR_EN 0x7 | ||
| 130 | 129 | ||
| 131 | /* Only for EXYNOS4210 */ | 130 | /* Only for EXYNOS4210 */ |
| 132 | #define S5P_CMU_CLKSTOP_LCD1_LOWPWR S5P_PMUREG(0x1154) | 131 | #define S5P_CMU_CLKSTOP_LCD1_LOWPWR S5P_PMUREG(0x1154) |
