kw_spi: fix clock prescaler computation
The computation was not correct with low clock values: setting a 1MHz clock would result in an overlap that would then configure a 25Mhz clock. This patch implements a correct computation method according to the kirkwood functionnal spec. table 600 (Serial Memory Interface Configuration Register). Signed-off-by: NValentin Longchamp <valentin.longchamp@keymile.com> cc: Holger Brunck <holger.brunck@keymile.com> cc: Prafulla Wadaskar <prafulla@marvell.com> Acked-by: NPrafulla Wadaskar <Prafulla@marvell.com> Signed-off-by: NPrafulla Wadaskar <prafulla@marvell.com>
Showing
想要评论请 注册 或 登录