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: Valentin Longchamp <[email protected]>
cc: Holger Brunck <
[email protected]>
cc: Prafulla Wadaskar <
[email protected]>
Acked-by: Prafulla Wadaskar <[email protected]>
Signed-off-by: Prafulla Wadaskar <[email protected]>