diff options
author | Elyes HAOUAS <ehaouas@noos.fr> | 2018-11-26 22:53:49 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-11-29 12:17:45 +0000 |
commit | 6df3b64c77a868ab8526b980561ed2be3fe392b6 (patch) | |
tree | a95ac78c1e4e222971ee9749e9e114494681e9c4 /src/soc/rockchip/rk3288/clock.c | |
parent | 1a5ce95815210032783d01e830390ee5b6a54dc5 (diff) | |
download | coreboot-6df3b64c77a868ab8526b980561ed2be3fe392b6.tar.xz |
src: Remove duplicated round up function
This removes CEIL_DIV and div_round_up() altogether and
replace it by DIV_ROUND_UP defined in commonlib/helpers.h.
Change-Id: I9aabc3fbe7834834c92d6ba59ff0005986622a34
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/29847
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src/soc/rockchip/rk3288/clock.c')
-rw-r--r-- | src/soc/rockchip/rk3288/clock.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/soc/rockchip/rk3288/clock.c b/src/soc/rockchip/rk3288/clock.c index 1b1c135d98..28c7a426d4 100644 --- a/src/soc/rockchip/rk3288/clock.c +++ b/src/soc/rockchip/rk3288/clock.c @@ -519,15 +519,15 @@ static int pll_para_config(u32 freq_hz, struct pll_div *div, u32 *ext_div) return -1; } - no = div_round_up(VCO_MIN_KHZ, freq_khz); + no = DIV_ROUND_UP(VCO_MIN_KHZ, freq_khz); if (ext_div) { - *ext_div = div_round_up(no, max_no); - no = div_round_up(no, *ext_div); + *ext_div = DIV_ROUND_UP(no, max_no); + no = DIV_ROUND_UP(no, *ext_div); } /* only even divisors (and 1) are supported */ if (no > 1) - no = div_round_up(no, 2) * 2; + no = DIV_ROUND_UP(no, 2) * 2; vco_khz = freq_khz * no; if (ext_div) |