aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2012-07-12 04:29:54 -0400
committerKukjin Kim <kgene.kim@samsung.com>2012-07-12 04:29:54 -0400
commit76eb5567afd18aa0a61fd31cd80fb80b616aaba4 (patch)
treed340e70ceb523306a5c9fdefe9e240a81216cd1b /arch/arm
parentbd0a521e88aa7a06ae7aabaed7ae196ed4ad867a (diff)
ARM: EXYNOS: read initial state of power domain from hw registers
Some bootloaders disable unused power domains to reduce power consuption. Power domain driver can easily read the actual state from the hardware registers instead of assuming that their initial state is always 'on'. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-exynos/pm_domains.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index e9fafcf163de..0a952a5c45bd 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -151,9 +151,12 @@ static __init int exynos4_pm_init_power_domain(void)
151 if (of_have_populated_dt()) 151 if (of_have_populated_dt())
152 return exynos_pm_dt_parse_domains(); 152 return exynos_pm_dt_parse_domains();
153 153
154 for (idx = 0; idx < ARRAY_SIZE(exynos4_pm_domains); idx++) 154 for (idx = 0; idx < ARRAY_SIZE(exynos4_pm_domains); idx++) {
155 pm_genpd_init(&exynos4_pm_domains[idx]->pd, NULL, 155 struct exynos_pm_domain *pd = exynos4_pm_domains[idx];
156 exynos4_pm_domains[idx]->is_off); 156 int on = __raw_readl(pd->base + 0x4) & S5P_INT_LOCAL_PWR_EN;
157
158 pm_genpd_init(&pd->pd, NULL, !on);
159 }
157 160
158#ifdef CONFIG_S5P_DEV_FIMD0 161#ifdef CONFIG_S5P_DEV_FIMD0
159 exynos_pm_add_dev_to_genpd(&s5p_device_fimd0, &exynos4_pd_lcd0); 162 exynos_pm_add_dev_to_genpd(&s5p_device_fimd0, &exynos4_pd_lcd0);