clk: divider: return real rate instead of divider value
PATCH 1/1 clk: divider: return real rate instead of divider value
Commit bca9690b9426 ("clk: divider: Make generic for usage elsewhere") returned only the divider value for read-only dividers instead of the actual rate.
--- drivers/clk/clk-divider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-divider.c +1 -1
@@ -355,7 +355,7 @@ static long clk_divider_round_rate(struct clk_hw *hw, unsigned long rate, bestdiv =readl (divider->reg) >> divider->shift; bestdiv &=div_mask (divider->width); bestdiv =_get_div (divider->table, bestdiv, divider->flags); -return bestdiv; +return DIV_ROUND_UP (*prate, bestdiv); } return divider_round_rate(hw, rate, prate, divider->table,
Signature · 1 line
2.1.4
Quoted 6 lines · Heiko St?bner
Commit
bca9690b9426("clk: divider: Make generic for usage elsewhere") returned only the divider value for read-only dividers instead of the actual rate.Fixes bca9690b9426 ("clk: divider: Make generic for usage elsewhere")Signed-off-by Heiko Stuebner <[email protected]>
I just created an identical patch, so
Thanks
James
Quoted 26 lines
--- drivers/clk/clk-divider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/clk/clk-divider.c +1
-2@@ -355,7 +355,7 @@ static long clk_divider_round_rate(struct clk_hw *hw, unsigned long rate, bestdiv =readl (divider->reg) >> divider->shift; bestdiv &=div_mask (divider->width); bestdiv =_get_div (divider->table, bestdiv, divider->flags); -return bestdiv; +return DIV_ROUND_UP (*prate, bestdiv); } return divider_round_rate(hw, rate, prate, divider->table, --2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 7 lines · Heiko St?bner
Commit
bca9690b9426("clk: divider: Make generic for usage elsewhere") returned only the divider value for read-only dividers instead of the actual rate.Fixes bca9690b9426 ("clk: divider: Make generic for usage elsewhere")Signed-off-by Heiko Stuebner <[email protected]>
Oops. Thanks.
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Mike Turquette
AppliedQuoting Stephen Boyd (2015-02-25 16:13:15)
Quoted 5 lines · Heiko St?bner
Quoted 4 lines
Commit
bca9690b9426("clk: divider: Make generic for usage elsewhere") returned only the divider value for read-only dividers instead of the actual rate.
Quoted 7 lines
Quoted 3 lines
Fixes bca9690b9426 ("clk: divider: Make generic for usage elsewhere")Signed-off-by Heiko Stuebner <[email protected]>Oops. Thanks.
Acked-by Stephen Boyd <[email protected]>
Applied to clk-fixes.
Regards,
Mike
Quoted 5 lines
Signature · 3 lines
-- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project