From: Rajendra Nayak <rnayak@ti.com>
To: tony@atomide.com, linux-omap@vger.kernel.org
Cc: paul@pwsan.com, balbi@ti.com, mpfj-list@newflow.co.uk,
vaibhav.bedia@ti.com, khilman@linaro.org, sourav.poddar@ti.com,
linux-arm-kernel@lists.infradead.org, gregkh@linuxfoundation.org,
linux-serial@vger.kernel.org, grygorii.strashko@ti.com,
Rajendra Nayak <rnayak@ti.com>
Subject: [PATCH 4/4] ARM: OMAP2+: Sync hwmod state with the pm_runtime and omap_device state
Date: Mon, 22 Jul 2013 15:31:17 +0530 [thread overview]
Message-ID: <1374487277-26099-5-git-send-email-rnayak@ti.com> (raw)
In-Reply-To: <1374487277-26099-1-git-send-email-rnayak@ti.com>
Some hwmods which are marked with HWMOD_INIT_NO_IDLE are left in enabled
state post setup(). When a omap_device gets created for such hwmods
make sure the omap_device and pm_runtime states are also in sync for such
hwmods by doing a omap_device_enable() and pm_runtime_set_active() for the
device.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
---
arch/arm/mach-omap2/omap_device.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index 1c82cde..f99f68e 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -129,6 +129,7 @@ static int omap_device_build_from_dt(struct platform_device *pdev)
struct device_node *node = pdev->dev.of_node;
const char *oh_name;
int oh_cnt, i, ret = 0;
+ bool device_active = false;
oh_cnt = of_property_count_strings(node, "ti,hwmods");
if (oh_cnt <= 0) {
@@ -152,6 +153,8 @@ static int omap_device_build_from_dt(struct platform_device *pdev)
goto odbfd_exit1;
}
hwmods[i] = oh;
+ if (oh->flags & HWMOD_INIT_NO_IDLE)
+ device_active = true;
}
od = omap_device_alloc(pdev, hwmods, oh_cnt);
@@ -172,6 +175,11 @@ static int omap_device_build_from_dt(struct platform_device *pdev)
pdev->dev.pm_domain = &omap_device_pm_domain;
+ if (device_active) {
+ omap_device_enable(pdev);
+ pm_runtime_set_active(&pdev->dev);
+ }
+
odbfd_exit1:
kfree(hwmods);
odbfd_exit:
--
1.7.9.5
next prev parent reply other threads:[~2013-07-22 10:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-22 10:01 [PATCH 0/4] OMAP2+: Fix boot hang with earlycon enabled Rajendra Nayak
2013-07-22 10:01 ` [PATCH 1/4] ARM: OMAP2+: hwmod: Fix a crash in _setup_reset() with DEBUG_LL Rajendra Nayak
2013-07-22 10:01 ` [PATCH 2/4] serial: omap: enable PM runtime only when its fully configured Rajendra Nayak
2013-07-29 8:44 ` Paul Walmsley
2013-07-29 8:50 ` Rajendra Nayak
2013-07-30 5:16 ` Rajendra Nayak
2013-07-30 10:20 ` Paul Walmsley
2013-07-22 10:01 ` [PATCH 3/4] ARM: OMAP2+: Avoid idling memory controllers with no drivers Rajendra Nayak
2013-07-22 17:48 ` Paul Walmsley
2013-07-23 4:59 ` Rajendra Nayak
2013-07-22 10:01 ` Rajendra Nayak [this message]
2013-08-05 15:43 ` [PATCH 4/4] ARM: OMAP2+: Sync hwmod state with the pm_runtime and omap_device state Kevin Hilman
2013-07-22 14:52 ` [PATCH 0/4] OMAP2+: Fix boot hang with earlycon enabled Mark Jackson
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=1374487277-26099-5-git-send-email-rnayak@ti.com \
--to=rnayak@ti.com \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=grygorii.strashko@ti.com \
--cc=khilman@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mpfj-list@newflow.co.uk \
--cc=paul@pwsan.com \
--cc=sourav.poddar@ti.com \
--cc=tony@atomide.com \
--cc=vaibhav.bedia@ti.com \
/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;
as well as URLs for NNTP newsgroup(s).