clk: fractional-divider: support for divider bypassing
PATCH 1/1 clk: fractional-divider: support for divider bypassing
If the divider or multiplier values values are 0 in the register, bypassing the divider and returning the parent clock rate in clk_fd_recalc_rate().
--- drivers/clk/clk-fractional-divider.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/clk/clk-fractional-divider.c +3 -0
@@ -36,6 +36,9 @@ static unsigned long clk_fd_recalc_rate(struct clk_hw *hw, m = (val & fd->mmask) >> fd->mshift; n = (val & fd->nmask) >> fd->nshift; +if (!n || !m) +return parent_rate; + ret = (u64 )parent_rate * m;do_div (ret, n);
Signature · 1 line
2.1.4
Quoted 1 line · Heikki Krogerus
If the divider or multiplier values values are 0 in the
s/values//
Quoted 5 lines
register, bypassing the divider and returning the parent clock rate in
clk_fd_recalc_rate().Signed-off-by Heikki Krogerus <[email protected]>---
Quoted 17 lines
drivers/clk/clk-fractional-divider.c | 3 +++ 1 file changed, 3 insertions(+)drivers/clk/clk-fractional-divider.c +3
-0@@ -36,6 +36,9 @@ static unsigned long clk_fd_recalc_rate(struct clk_hw *hw, m = (val & fd->mmask) >> fd->mshift; n = (val & fd->nmask) >> fd->nshift; +if (!n || !m) +return parent_rate; + ret = (u64 )parent_rate * m;do_div (ret, n);
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-02 11:42:55)
Quoted 5 lines · Heikki Krogerus
Quoted 1 line
If the divider or multiplier values values are 0 in the
s/values//
Quoted 7 lines
Quoted 5 lines
register, bypassing the divider and returning the parent clock rate in
clk_fd_recalc_rate().Signed-off-by Heikki Krogerus <[email protected]>---
Reviewed-by Stephen Boyd <[email protected]>
Applied to clk-next.
Regards,
Mike
Quoted 24 lines
Quoted 18 lines
drivers/clk/clk-fractional-divider.c | 3 +++ 1 file changed, 3 insertions(+)drivers/clk/clk-fractional-divider.c +3
-0@@ -36,6 +36,9 @@ static unsigned long clk_fd_recalc_rate(struct clk_hw *hw, m = (val & fd->mmask) >> fd->mshift; n = (val & fd->nmask) >> fd->nshift; +if (!n || !m) +return parent_rate; + ret = (u64 )parent_rate * m;do_div (ret, n);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-02 11:42:55)
Quoted 5 lines · Heikki Krogerus
Quoted 1 line
If the divider or multiplier values values are 0 in the
s/values//
Quoted 7 lines
Quoted 5 lines
register, bypassing the divider and returning the parent clock rate in
clk_fd_recalc_rate().Signed-off-by Heikki Krogerus <[email protected]>---
Reviewed-by Stephen Boyd <[email protected]>
Applied to clk-next.
Regards,
Mike
Quoted 24 lines
Quoted 18 lines
drivers/clk/clk-fractional-divider.c | 3 +++ 1 file changed, 3 insertions(+)drivers/clk/clk-fractional-divider.c +3
-0@@ -36,6 +36,9 @@ static unsigned long clk_fd_recalc_rate(struct clk_hw *hw, m = (val & fd->mmask) >> fd->mshift; n = (val & fd->nmask) >> fd->nshift; +if (!n || !m) +return parent_rate; + ret = (u64 )parent_rate * m;do_div (ret, n);Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project