Searched hist:"5 d1d150d7d775db1dccb4dc4676075d456dea392" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/spi/ |
H A D | spi-rockchip.c | diff 5d1d150d7d775db1dccb4dc4676075d456dea392 Thu Aug 28 18:43:48 CDT 2014 Doug Anderson <dianders@chromium.org> spi/rockchip: Avoid accidentally turning off the clock
If our client is requesting a clock that is above the maximum clock then the following division will result in 0: rs->max_freq / rs->speed
We'll then program 0 into the SPI_BAUDR register. The Rockchip TRM says: "If the value is 0, the serial output clock (sclk_out) is disabled."
It's much better to end up with the fastest possible clock rather than a clock that is off, so enforce a minimum value.
Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
|