Commit 76eb5567 authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Kukjin Kim

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: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent bd0a521e
...@@ -151,9 +151,12 @@ static __init int exynos4_pm_init_power_domain(void) ...@@ -151,9 +151,12 @@ static __init int exynos4_pm_init_power_domain(void)
if (of_have_populated_dt()) if (of_have_populated_dt())
return exynos_pm_dt_parse_domains(); return exynos_pm_dt_parse_domains();
for (idx = 0; idx < ARRAY_SIZE(exynos4_pm_domains); idx++) for (idx = 0; idx < ARRAY_SIZE(exynos4_pm_domains); idx++) {
pm_genpd_init(&exynos4_pm_domains[idx]->pd, NULL, struct exynos_pm_domain *pd = exynos4_pm_domains[idx];
exynos4_pm_domains[idx]->is_off); int on = __raw_readl(pd->base + 0x4) & S5P_INT_LOCAL_PWR_EN;
pm_genpd_init(&pd->pd, NULL, !on);
}
#ifdef CONFIG_S5P_DEV_FIMD0 #ifdef CONFIG_S5P_DEV_FIMD0
exynos_pm_add_dev_to_genpd(&s5p_device_fimd0, &exynos4_pd_lcd0); exynos_pm_add_dev_to_genpd(&s5p_device_fimd0, &exynos4_pd_lcd0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment