summaryrefslogtreecommitdiff
path: root/drivers/clk/sunxi-ng/ccu_mp.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2017-04-07 12:45:20 -0600
committerJens Axboe <axboe@fb.com>2017-04-07 12:45:20 -0600
commit65f619d2535197d97067eeeef75a40f25b552e69 (patch)
tree13f96c51a2b591ed22f1771541998bb77178f685 /drivers/clk/sunxi-ng/ccu_mp.c
parentfbbaf700e7b163a0f1704b2d542ee28be11fce21 (diff)
parent6d8c6c0f97ad8a3517c42b179c1dc8e77397d0e2 (diff)
Merge branch 'for-linus' into for-4.12/block
We've added a considerable amount of fixes for stalls and issues with the blk-mq scheduling in the 4.11 series since forking off the for-4.12/block branch. We need to do improvements on top of that for 4.12, so pull in the previous fixes to make our lives easier going forward. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/clk/sunxi-ng/ccu_mp.c')
-rw-r--r--drivers/clk/sunxi-ng/ccu_mp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/clk/sunxi-ng/ccu_mp.c b/drivers/clk/sunxi-ng/ccu_mp.c
index 22c2ca7a2a22..b583f186a804 100644
--- a/drivers/clk/sunxi-ng/ccu_mp.c
+++ b/drivers/clk/sunxi-ng/ccu_mp.c
@@ -85,6 +85,10 @@ static unsigned long ccu_mp_recalc_rate(struct clk_hw *hw,
unsigned int m, p;
u32 reg;
+ /* Adjust parent_rate according to pre-dividers */
+ ccu_mux_helper_adjust_parent_for_prediv(&cmp->common, &cmp->mux,
+ -1, &parent_rate);
+
reg = readl(cmp->common.base + cmp->common.reg);
m = reg >> cmp->m.shift;
@@ -117,6 +121,10 @@ static int ccu_mp_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned int m, p;
u32 reg;
+ /* Adjust parent_rate according to pre-dividers */
+ ccu_mux_helper_adjust_parent_for_prediv(&cmp->common, &cmp->mux,
+ -1, &parent_rate);
+
max_m = cmp->m.max ?: 1 << cmp->m.width;
max_p = cmp->p.max ?: 1 << ((1 << cmp->p.width) - 1);