remarkable-linux/drivers/clk/at91
Boris Brezillon ff553ea1a3 clk: at91: usb: fix at91rm9200 round and set rate
at91rm9200_clk_usb_set_rate might fail depending on the requested rate,
because the parent_rate / rate remainder is not necessarily zero.
Moreover, when rounding down the calculated rate we might alter the
divisor calculation and end up with an invalid divisor.

To solve those problems, accept a non zero remainder, and always round
division to the closest result.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reported-by: Andreas Henriksson <andreas.henriksson@endian.se>
Tested-by: Andreas Henriksson <andreas.henriksson@endian.se>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
2014-11-17 10:38:40 -08:00
..
clk-h32mx.c clk: at91: add a driver for the h32mx clock 2014-09-22 11:38:59 +02:00
clk-main.c clk: at91: main: warn when the main crystal frequency is not set 2014-07-02 09:00:52 -07:00
clk-master.c clk:at91: Fix memory leak in of_at91_clk_master_setup() 2014-02-26 18:00:56 -08:00
clk-peripheral.c clk: at91: add PMC peripheral clocks 2013-12-02 15:31:24 +01:00
clk-pll.c clk: at91: fix recalc_rate implementation of PLL driver 2014-09-02 15:37:17 -07:00
clk-plldiv.c clk: at91: add PMC pll clocks 2013-12-02 15:31:22 +01:00
clk-programmable.c clk: at91: optimization of the set_rate callback 2014-03-19 15:22:02 -07:00
clk-slow.c clk: at91: fix num_parents test in at91sam9260 slow clk implementation 2014-09-02 14:44:41 -07:00
clk-smd.c clk: at91: add PMC smd clock 2013-12-02 15:31:25 +01:00
clk-system.c clk: at91: remove the useless CLK_IGNORE_UNUSED flag 2014-07-15 11:54:09 +02:00
clk-usb.c clk: at91: usb: fix at91rm9200 round and set rate 2014-11-17 10:38:40 -08:00
clk-utmi.c clk: at91: add PMC utmi clock 2013-12-02 15:31:25 +01:00
Makefile clk: at91: add a driver for the h32mx clock 2014-09-22 11:38:59 +02:00
pmc.c clk: at91: add a driver for the h32mx clock 2014-09-22 11:38:59 +02:00
pmc.h clk: at91: add a driver for the h32mx clock 2014-09-22 11:38:59 +02:00
sckc.c clk: at91: add slow clks driver 2014-05-07 18:27:45 +02:00
sckc.h clk: at91: add slow clks driver 2014-05-07 18:27:45 +02:00