From: t.figa@samsung.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/4] ARM: EXYNOS: pm_domain: Detect domain state on registration from DT
Date: Tue, 13 Nov 2012 14:08:24 +0100 [thread overview]
Message-ID: <1352812107-8777-2-git-send-email-t.figa@samsung.com> (raw)
In-Reply-To: <1352812107-8777-1-git-send-email-t.figa@samsung.com>
Initial state of power domains might vary on different boards and with
different bootloaders.
This patch adds detection of initial state of power domains when being
registered from DT.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
Documentation/devicetree/bindings/arm/exynos/power_domain.txt | 4 ----
arch/arm/mach-exynos/pm_domains.c | 8 +++++---
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
index 6528e21..843b546 100644
--- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
+++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
@@ -9,10 +9,6 @@ Required Properties:
- reg: physical base address of the controller and length of memory mapped
region.
-Optional Properties:
-- samsung,exynos4210-pd-off: Specifies that the power domain is in turned-off
- state during boot and remains to be turned-off until explicitly turned-on.
-
Example:
lcd0: power-domain-lcd0 {
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index c0bc83a..d1abc1a 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -89,6 +89,7 @@ static __init int exynos_pm_dt_parse_domains(void)
for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") {
struct exynos_pm_domain *pd;
+ int on;
pd = kzalloc(sizeof(*pd), GFP_KERNEL);
if (!pd) {
@@ -97,14 +98,15 @@ static __init int exynos_pm_dt_parse_domains(void)
return -ENOMEM;
}
- if (of_get_property(np, "samsung,exynos4210-pd-off", NULL))
- pd->is_off = true;
pd->name = np->name;
pd->base = of_iomap(np, 0);
pd->pd.power_off = exynos_pd_power_off;
pd->pd.power_on = exynos_pd_power_on;
pd->pd.of_node = np;
- pm_genpd_init(&pd->pd, NULL, false);
+
+ on = __raw_readl(pd->base + 0x4) & S5P_INT_LOCAL_PWR_EN;
+
+ pm_genpd_init(&pd->pd, NULL, !on);
}
return 0;
}
--
1.8.0
next prev parent reply other threads:[~2012-11-13 13:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-13 13:08 [PATCH v3 RESEND 0/4] ARM: EXYNOS: Power domain DT support extension Tomasz Figa
2012-11-13 13:08 ` Tomasz Figa [this message]
2012-11-13 13:08 ` [PATCH v3 2/4] ARM: EXYNOS: pm_domain: Fix power domain name initialization Tomasz Figa
2012-11-13 13:08 ` [PATCH v3 3/4] ARM: EXYNOS: pm_domain: Bind devices to power domains using DT Tomasz Figa
2012-11-13 13:08 ` [PATCH v3 4/4] ARM: dts: exynos4: Set up power domains Tomasz Figa
2012-11-21 10:38 ` [PATCH v3 RESEND 0/4] ARM: EXYNOS: Power domain DT support extension Tomasz Figa
2012-11-21 12:15 ` Kukjin Kim
-- strict thread matches above, loose matches on Subject: below --
2012-11-13 12:51 [PATCH v3 " Tomasz Figa
2012-11-13 12:51 ` [PATCH v3 1/4] ARM: EXYNOS: pm_domain: Detect domain state on registration from DT Tomasz Figa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1352812107-8777-2-git-send-email-t.figa@samsung.com \
--to=t.figa@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox