* [PATCHv2] OMAP: McBSP: Do not enable or disable clocks on failed path
@ 2009-03-18 11:41 ext-eero.nurkkala
2009-03-19 12:45 ` Jarkko Nikula
2009-03-26 22:48 ` [APPLIED] [PATCHv2] OMAP: McBSP: Do not enable or disable clocks on failed Tony Lindgren
0 siblings, 2 replies; 3+ messages in thread
From: ext-eero.nurkkala @ 2009-03-18 11:41 UTC (permalink / raw)
To: linux-omap; +Cc: Eero Nurkkala
From: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
McBSP clocks are being double enabled in the event the
McBSP is already active. Also, they are unnecessarily
disabled when there's no active McBSP in use. Fix this
phenomenom by enabling and disabling the clocks at the
proper location.
Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
---
arch/arm/plat-omap/mcbsp.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index 02b3f2d..e2e8b76 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -226,9 +226,6 @@ int omap_mcbsp_request(unsigned int id)
if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->request)
mcbsp->pdata->ops->request(id);
- for (i = 0; i < mcbsp->num_clks; i++)
- clk_enable(mcbsp->clks[i]);
-
spin_lock(&mcbsp->lock);
if (!mcbsp->free) {
dev_err(mcbsp->dev, "McBSP%d is currently in use\n",
@@ -240,6 +237,9 @@ int omap_mcbsp_request(unsigned int id)
mcbsp->free = 0;
spin_unlock(&mcbsp->lock);
+ for (i = 0; i < mcbsp->num_clks; i++)
+ clk_enable(mcbsp->clks[i]);
+
/*
* Enable wakup behavior, smart idle and all wakeups
* REVISIT: some wakeups may be unnecessary
@@ -319,9 +319,6 @@ void omap_mcbsp_free(unsigned int id)
if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->free)
mcbsp->pdata->ops->free(id);
- for (i = mcbsp->num_clks - 1; i >= 0; i--)
- clk_disable(mcbsp->clks[i]);
-
spin_lock(&mcbsp->lock);
if (mcbsp->free) {
dev_err(mcbsp->dev, "McBSP%d was not reserved\n",
@@ -329,7 +326,12 @@ void omap_mcbsp_free(unsigned int id)
spin_unlock(&mcbsp->lock);
return;
}
+ spin_unlock(&mcbsp->lock);
+ for (i = mcbsp->num_clks - 1; i >= 0; i--)
+ clk_disable(mcbsp->clks[i]);
+
+ spin_lock(&mcbsp->lock);
mcbsp->free = 1;
spin_unlock(&mcbsp->lock);
--
1.5.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCHv2] OMAP: McBSP: Do not enable or disable clocks on failed path
2009-03-18 11:41 [PATCHv2] OMAP: McBSP: Do not enable or disable clocks on failed path ext-eero.nurkkala
@ 2009-03-19 12:45 ` Jarkko Nikula
2009-03-26 22:48 ` [APPLIED] [PATCHv2] OMAP: McBSP: Do not enable or disable clocks on failed Tony Lindgren
1 sibling, 0 replies; 3+ messages in thread
From: Jarkko Nikula @ 2009-03-19 12:45 UTC (permalink / raw)
To: Nurkkala Eero.An (EXT-Offcode/Oulu); +Cc: linux-omap
On Wed, 18 Mar 2009 12:41:25 +0100
"Nurkkala Eero.An (EXT-Offcode/Oulu)" <ext-Eero.Nurkkala@nokia.com>
wrote:
> From: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
>
> McBSP clocks are being double enabled in the event the
> McBSP is already active. Also, they are unnecessarily
> disabled when there's no active McBSP in use. Fix this
> phenomenom by enabling and disabling the clocks at the
> proper location.
>
> Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
> ---
> arch/arm/plat-omap/mcbsp.c | 14 ++++++++------
> 1 files changed, 8 insertions(+), 6 deletions(-)
>
Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [APPLIED] [PATCHv2] OMAP: McBSP: Do not enable or disable clocks on failed
2009-03-18 11:41 [PATCHv2] OMAP: McBSP: Do not enable or disable clocks on failed path ext-eero.nurkkala
2009-03-19 12:45 ` Jarkko Nikula
@ 2009-03-26 22:48 ` Tony Lindgren
1 sibling, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2009-03-26 22:48 UTC (permalink / raw)
To: linux-omap
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.
Commit: 58cf2f1425abfd3a449f9fe985e48be2d2555022
PatchWorks
http://patchwork.kernel.org/patch/12822/
Git
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=58cf2f1425abfd3a449f9fe985e48be2d2555022
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-26 22:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-18 11:41 [PATCHv2] OMAP: McBSP: Do not enable or disable clocks on failed path ext-eero.nurkkala
2009-03-19 12:45 ` Jarkko Nikula
2009-03-26 22:48 ` [APPLIED] [PATCHv2] OMAP: McBSP: Do not enable or disable clocks on failed Tony Lindgren
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).