[PATCH 4/7] Exynos: add support for 'domain-always-on' property
Marek Szyprowski
m.szyprowski at samsung.com
Tue Jul 1 01:10:08 PDT 2014
This patch adds support for domain-always-on property to Exynos power
domain driver. Domains with this property as always kept enabled.
Signed-off-by: Marek Szyprowski <m.szyprowski at samsung.com>
---
Documentation/devicetree/bindings/arm/exynos/power_domain.txt | 2 ++
arch/arm/mach-exynos/pm_domains.c | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
index 5216b419016a..b25d9b1ce471 100644
--- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
+++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
@@ -8,6 +8,8 @@ Required Properties:
* samsung,exynos4210-pd - for exynos4210 type power domain.
- reg: physical base address of the controller and length of memory mapped
region.
+Optional properties:
+- domain-always-on: keeps the domain always enabled
Node of a device using power domains must have a samsung,power-domain property
defined with a phandle to respective power domain.
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index fe6570ebbdde..279b008de02f 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -151,6 +151,7 @@ static __init int exynos4_pm_init_power_domain(void)
struct device_node *np;
for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") {
+ struct dev_power_governor *gov = NULL;
struct exynos_pm_domain *pd;
int on;
@@ -163,6 +164,9 @@ static __init int exynos4_pm_init_power_domain(void)
return -ENOMEM;
}
+ if (of_property_read_bool(np, "domain-always-on"))
+ gov = &pm_domain_always_on_gov;
+
pd->pd.name = kstrdup(np->name, GFP_KERNEL);
pd->name = pd->pd.name;
pd->base = of_iomap(np, 0);
@@ -174,7 +178,7 @@ static __init int exynos4_pm_init_power_domain(void)
on = __raw_readl(pd->base + 0x4) & S5P_INT_LOCAL_PWR_EN;
- pm_genpd_init(&pd->pd, NULL, !on);
+ pm_genpd_init(&pd->pd, gov, !on);
}
bus_register_notifier(&platform_bus_type, &platform_nb);
--
1.9.2
More information about the dri-devel
mailing list