Searched hist:"3 beb61db" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/spi/ |
H A D | spi-rspi.c | 3beb61db Thu May 22 13:07:35 CDT 2014 Geert Uytterhoeven <geert+renesas@glider.be> spi: rspi: Round up division to avoid slave overclocking
The calculation of the bit rate divider used a standard C division, which rounds down the quotient. This may lead to a higher bitrate than requested. Round up to avoid this.
E.g. on Koelsch, the SPI flash (configured for 30 MHz) was driven at 48.75 MHz. After this patch it's driven at a safe 24.375 MHz.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@linaro.org> 3beb61db Thu May 22 13:07:35 CDT 2014 Geert Uytterhoeven <geert+renesas@glider.be> spi: rspi: Round up division to avoid slave overclocking The calculation of the bit rate divider used a standard C division, which rounds down the quotient. This may lead to a higher bitrate than requested. Round up to avoid this. E.g. on Koelsch, the SPI flash (configured for 30 MHz) was driven at 48.75 MHz. After this patch it's driven at a safe 24.375 MHz. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@linaro.org>
|