linux/drivers/clk/sunxi
Rikard Falkeborn 7b139b714a clk: sunxi: Fix incorrect usage of round_down()
[ Upstream commit ee25d9742d ]

round_down() can only round to powers of 2. If round_down() is asked
to round to something that is not a power of 2, incorrect results are
produced. The incorrect results can be both too large and too small.

Instead, use rounddown() which can round to any number.

Fixes: 6a721db180 ("clk: sunxi: Add A31 clocks support")
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-24 17:50:08 +02:00
..
Kconfig
Makefile
clk-a10-codec.c
clk-a10-hosc.c
clk-a10-mod1.c
clk-a10-pll2.c
clk-a10-ve.c
clk-a20-gmac.c
clk-factors.c
clk-factors.h
clk-mod0.c
clk-simple-gates.c
clk-sun4i-display.c
clk-sun4i-pll3.c
clk-sun4i-tcon-ch1.c
clk-sun6i-apb0-gates.c
clk-sun6i-apb0.c
clk-sun6i-ar100.c
clk-sun8i-apb0.c
clk-sun8i-bus-gates.c
clk-sun8i-mbus.c
clk-sun9i-core.c
clk-sun9i-cpus.c
clk-sun9i-mmc.c
clk-sunxi.c clk: sunxi: Fix incorrect usage of round_down() 2020-06-24 17:50:08 +02:00
clk-usb.c