diff mbox

[1/2] clk: shmobile: Fix MSTP clock index

Message ID 1388167599-23525-2-git-send-email-valentine.barshak@cogentembedded.com (mailing list archive)
State Superseded
Headers show

Commit Message

Valentine Barshak Dec. 27, 2013, 6:06 p.m. UTC
Use clkidx when registering MSTP clocks instead of loop counter
since the value is then used to access the specific clock index bit
in the mstp register.

The issue was introduced by the following commit:
f94859c215b6d977 "clk: shmobile: Add MSTP clock support"

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/clk/shmobile/clk-mstp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ben Dooks Jan. 9, 2014, 5:21 p.m. UTC | #1
On 27/12/13 18:06, Valentine Barshak wrote:
> Use clkidx when registering MSTP clocks instead of loop counter
> since the value is then used to access the specific clock index bit
> in the mstp register.
>
> The issue was introduced by the following commit:
> f94859c215b6d977 "clk: shmobile: Add MSTP clock support"
>
> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Ben Dooks <ben.dooks@codethink.co.uk>

We just caught this one, it really needs fixing in Simon's tree
as it stops stuff working!
Ben Dooks Jan. 9, 2014, 5:23 p.m. UTC | #2
On 09/01/14 17:21, Ben Dooks wrote:
> On 27/12/13 18:06, Valentine Barshak wrote:
>> Use clkidx when registering MSTP clocks instead of loop counter
>> since the value is then used to access the specific clock index bit
>> in the mstp register.
>>
>> The issue was introduced by the following commit:
>> f94859c215b6d977 "clk: shmobile: Add MSTP clock support"
>>
>> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
>> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Reviewed-by: Ben Dooks <ben.dooks@codethink.co.uk>
>
> We just caught this one, it really needs fixing in Simon's tree
> as it stops stuff working!

sorry, meant to say:

Tested-by: Ben Dooks <ben.dooks@codethink.co.uk>
diff mbox

Patch

diff --git a/drivers/clk/shmobile/clk-mstp.c b/drivers/clk/shmobile/clk-mstp.c
index e576b60..be7d017 100644
--- a/drivers/clk/shmobile/clk-mstp.c
+++ b/drivers/clk/shmobile/clk-mstp.c
@@ -205,8 +205,8 @@  static void __init cpg_mstp_clocks_init(struct device_node *np)
 			continue;
 		}
 
-		clks[clkidx] = cpg_mstp_clock_register(name, parent_name, i,
-						       group);
+		clks[clkidx] = cpg_mstp_clock_register(name, parent_name,
+						       clkidx, group);
 		if (!IS_ERR(clks[clkidx])) {
 			group->data.clk_num = max(group->data.clk_num, clkidx);
 			/*