diff mbox

[v2] sh: clkfwk: bugfix: sh_clk_div_enable() care sh_clk_div_set_rate() if div6

Message ID 87a9u4x5q1.wl%kuninori.morimoto.gx@renesas.com (mailing list archive)
State Accepted
Commit 5a799b824b6046befa7e10107a3d65f40816f645
Headers show

Commit Message

Kuninori Morimoto Nov. 26, 2012, 6:01 a.m. UTC
764f4e4e33d18cde4dcaf8a0d860b749c6d6d08b
(sh: clkfwk: Use shared sh_clk_div_enable/disable())
shared enable/disable funcions for div4/div6.
But new sh_clk_div_enable() didn't care sh_clk_div_set_rate()
which is required on div6 clock.
This patch fixes it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
>> Paul

This is v2 patch of sh_clk_div_disable() bugfix.
it used SH_CLK_DIV6_MSK as you indicated.
Sorry for my late response.

 drivers/sh/clk/cpg.c |    6 ++++++
 1 file changed, 6 insertions(+)

Comments

Paul Mundt Nov. 26, 2012, 6:23 a.m. UTC | #1
On Sun, Nov 25, 2012 at 10:01:46PM -0800, Kuninori Morimoto wrote:
> 764f4e4e33d18cde4dcaf8a0d860b749c6d6d08b
> (sh: clkfwk: Use shared sh_clk_div_enable/disable())
> shared enable/disable funcions for div4/div6.
> But new sh_clk_div_enable() didn't care sh_clk_div_set_rate()
> which is required on div6 clock.
> This patch fixes it.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Looks better, I'll queue it up, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kuninori Morimoto Nov. 27, 2012, 12:45 a.m. UTC | #2
Hi Paul

> > 764f4e4e33d18cde4dcaf8a0d860b749c6d6d08b
> > (sh: clkfwk: Use shared sh_clk_div_enable/disable())
> > shared enable/disable funcions for div4/div6.
> > But new sh_clk_div_enable() didn't care sh_clk_div_set_rate()
> > which is required on div6 clock.
> > This patch fixes it.
> > 
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Looks better, I'll queue it up, thanks.

Thanks.
Is it possible to go to v3.7-rcX ?

Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paul Mundt Nov. 27, 2012, 1:33 a.m. UTC | #3
On Mon, Nov 26, 2012 at 04:45:45PM -0800, Kuninori Morimoto wrote:
> 
> Hi Paul
> 
> > > 764f4e4e33d18cde4dcaf8a0d860b749c6d6d08b
> > > (sh: clkfwk: Use shared sh_clk_div_enable/disable())
> > > shared enable/disable funcions for div4/div6.
> > > But new sh_clk_div_enable() didn't care sh_clk_div_set_rate()
> > > which is required on div6 clock.
> > > This patch fixes it.
> > > 
> > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > 
> > Looks better, I'll queue it up, thanks.
> 
> Thanks.
> Is it possible to go to v3.7-rcX ?
> 
Yes, should be fine.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kuninori Morimoto Jan. 11, 2013, 1:30 a.m. UTC | #4
Hi Paul

I still couldn't find this patch on linus/master branch.
What is current status of this ?

At Tue, 27 Nov 2012 10:33:38 +0900,
Paul Mundt wrote:
> 
> On Mon, Nov 26, 2012 at 04:45:45PM -0800, Kuninori Morimoto wrote:
> > 
> > Hi Paul
> > 
> > > > 764f4e4e33d18cde4dcaf8a0d860b749c6d6d08b
> > > > (sh: clkfwk: Use shared sh_clk_div_enable/disable())
> > > > shared enable/disable funcions for div4/div6.
> > > > But new sh_clk_div_enable() didn't care sh_clk_div_set_rate()
> > > > which is required on div6 clock.
> > > > This patch fixes it.
> > > > 
> > > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > > 
> > > Looks better, I'll queue it up, thanks.
> > 
> > Thanks.
> > Is it possible to go to v3.7-rcX ?
> > 
> Yes, should be fine.


Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paul Mundt Jan. 11, 2013, 11:59 a.m. UTC | #5
On Thu, Jan 10, 2013 at 05:30:25PM -0800, Kuninori Morimoto wrote:
> 
> Hi Paul
> 
> I still couldn't find this patch on linus/master branch.
> What is current status of this ?
> 
Looks like it got missed, possibly when I was shuffling trees and
machines around. I've queued it up now.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/sh/clk/cpg.c b/drivers/sh/clk/cpg.c
index 07e9fb4..d118bac 100644
--- a/drivers/sh/clk/cpg.c
+++ b/drivers/sh/clk/cpg.c
@@ -126,6 +126,12 @@  static int sh_clk_div_set_rate(struct clk *clk, unsigned long rate)
 
 static int sh_clk_div_enable(struct clk *clk)
 {
+	if (clk->div_mask == SH_CLK_DIV6_MSK) {
+		int ret = sh_clk_div_set_rate(clk, clk->rate);
+		if (ret < 0)
+			return ret;
+	}
+
 	sh_clk_write(sh_clk_read(clk) & ~CPG_CKSTP_BIT, clk);
 	return 0;
 }