spi/omap_mcspi: Off-by-one error in finding the right divisor
Off-by-one error, gave erroneous divisor value 16 if speed_hz is over zero but less than OMAP2_MCSPI_MAX_FREQ / (1 << 15), that is, [1..1463]. Also few overly complex bit shifts in divisor fixed. Also one dev_dgb line fixed, which indicated max speed exceeding transfer speed. Introducing a new function omap2_mcspi_calc_divisor() for getting the right divisor in omap2_mcspi_setup_transfer(). Signed-off-by: NPhil Carmody <ext-phil.2.carmody@nokia.com> Signed-off-by: NHannu Heikkinen <ext-hannu.m.heikkinen@nokia.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
Showing
想要评论请 注册 或 登录