From: Rajendra Nayak <rnayak@ti.com>
To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: tony@atomide.com, paul@pwsan.com, Rajendra Nayak <rnayak@ti.com>,
Benoit Cousson <bcousson@baylibre.com>
Subject: [PATCH 2/2] ARM: OMAP2+: hwmod: Don't leave the optional clocks in clk_prepare()ed state
Date: Wed, 23 Apr 2014 11:41:04 +0530 [thread overview]
Message-ID: <1398233465-8845-3-git-send-email-rnayak@ti.com> (raw)
In-Reply-To: <1398233465-8845-1-git-send-email-rnayak@ti.com>
At hwmod init, theres no reason why optional clocks should be left in
clk_prepare()ed state as these are actually directly controlled by the
drivers themselves. Let the drivers prepare/unprepare as well as enable/
disable them.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Cc: Benoit Cousson <bcousson@baylibre.com>
---
arch/arm/mach-omap2/omap_hwmod.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 1f33f5d..9e3afc9 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -857,15 +857,6 @@ static int _init_opt_clks(struct omap_hwmod *oh)
continue;
}
oc->_clk = c;
- /*
- * HACK: This needs a re-visit once clk_prepare() is implemented
- * to do something meaningful. Today its just a no-op.
- * If clk_prepare() is used at some point to do things like
- * voltage scaling etc, then this would have to be moved to
- * some point where subsystems like i2c and pmic become
- * available.
- */
- clk_prepare(oc->_clk);
}
return ret;
@@ -945,7 +936,7 @@ static void _enable_optional_clocks(struct omap_hwmod *oh)
if (oc->_clk) {
pr_debug("omap_hwmod: enable %s:%s\n", oc->role,
__clk_get_name(oc->_clk));
- clk_enable(oc->_clk);
+ clk_prepare_enable(oc->_clk);
}
}
@@ -960,7 +951,7 @@ static void _disable_optional_clocks(struct omap_hwmod *oh)
if (oc->_clk) {
pr_debug("omap_hwmod: disable %s:%s\n", oc->role,
__clk_get_name(oc->_clk));
- clk_disable(oc->_clk);
+ clk_disable_unprepare(oc->_clk);
}
}
--
1.7.9.5
next prev parent reply other threads:[~2014-04-23 6:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-23 6:11 [PATCH 0/2] OMAP2+: optional clock handling fixes Rajendra Nayak
2014-04-23 6:11 ` [PATCH 1/2] gpio: omap: prepare and unprepare the debounce clock Rajendra Nayak
2014-05-08 7:06 ` Rajendra Nayak
2014-05-08 9:26 ` Javier Martinez Canillas
2014-05-08 11:10 ` Rajendra Nayak
2014-05-08 12:04 ` Javier Martinez Canillas
2014-05-08 12:06 ` Rajendra Nayak
2014-05-13 9:24 ` Linus Walleij
2014-05-08 14:40 ` Santosh Shilimkar
2014-05-08 14:45 ` Santosh Shilimkar
2014-04-23 6:11 ` Rajendra Nayak [this message]
2014-05-08 0:08 ` [PATCH 0/2] OMAP2+: optional clock handling fixes Paul Walmsley
2014-05-08 6:59 ` Rajendra Nayak
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=1398233465-8845-3-git-send-email-rnayak@ti.com \
--to=rnayak@ti.com \
--cc=bcousson@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=tony@atomide.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).