clk: qoriq: fix a register offset error
authorTang Yuantian <Yuantian.Tang@nxp.com>
Mon, 15 Aug 2016 07:28:20 +0000 (15:28 +0800)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 18 Aug 2016 23:52:24 +0000 (16:52 -0700)
The offset of Core Cluster clock control/status register
on cluster group V3 version is different from others, and
should be plus 0x70000.

Signed-off-by: Tang Yuantian <yuantian.tang@nxp.com>
Reviewed-by: Scott Wood <oss@buserror.net>
Fixes: 9e19ca2f627e ("clk: qoriq: Add ls2080a support.")
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk-qoriq.c

index 58566a17944a7320799b5e17316d02178d4be878..20b105584f82fb9bad9ba17ec4b1a6136affc656 100644 (file)
@@ -766,7 +766,11 @@ static struct clk * __init create_one_cmux(struct clockgen *cg, int idx)
        if (!hwc)
                return NULL;
 
-       hwc->reg = cg->regs + 0x20 * idx;
+       if (cg->info.flags & CG_VER3)
+               hwc->reg = cg->regs + 0x70000 + 0x20 * idx;
+       else
+               hwc->reg = cg->regs + 0x20 * idx;
+
        hwc->info = cg->info.cmux_groups[cg->info.cmux_to_group[idx]];
 
        /*