Skip to content

Commit

Permalink
ARM: EXYNOS: Remove regs-pmu.h header dependency from pm_domain
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pankaj Dubey authored and Kukjin Kim committed Jul 14, 2014
1 parent 4552386 commit b634e38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
9 changes: 4 additions & 5 deletions arch/arm/mach-exynos/pm_domains.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

/*
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-exynos/regs-pmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b634e38

Please sign in to comment.