From: Geert Uytterhoeven Date: Thu, 22 May 2014 18:07:35 +0000 (+0200) Subject: spi: rspi: Round up division to avoid slave overclocking X-Git-Tag: omap-for-v3.16/fixes-against-rc1~39^2~29^2~1^4~17 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3beb61dbfcf188399cbc36ce1eeb8b2ba724de38;p=pandora-kernel.git 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 Signed-off-by: Mark Brown --- Reading git-diff-tree failed