diff options
author | Douglas Anderson <dianders@chromium.org> | 2015-09-30 16:07:38 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-10-26 16:00:07 +0100 |
commit | 4351f19a337d48a780762d076408ebe9b0c1f945 (patch) | |
tree | 903abc321be44907394e9d399066126c2f0db5de /drivers/mmc | |
parent | f0232063fb64fc79bfb7b6b35d611b2e4a79ffe6 (diff) |
clk: rockchip: Make calculations use rounding
Let's use DIV_ROUND_CLOSEST for rounding, not just truncating
division. This lets us get closer to the right rate.
Before this:
set_phase(86) delay_nums=26 reg[0xf000420c]=0x468 actual_degrees=83
set_phase(89) delay_nums=27 reg[0xf000420c]=0x46c actual_degrees=86
After this:
set_phase(86) delay_nums=27 reg[0xf000420c]=0x46c actual_degrees=86
set_phase(89) delay_nums=28 reg[0xf000420c]=0x470 actual_degrees=90
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
0 files changed, 0 insertions, 0 deletions