]> git.baikalelectronics.ru Git - kernel.git/commit
spi_mpc83xx: fix clockrate calculation for low speed
authorPeter Korsgaard <jacmet@sunsite.dk>
Sat, 13 Sep 2008 09:33:14 +0000 (02:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Sep 2008 21:41:51 +0000 (14:41 -0700)
commit7266d88ddea489ff94880dd107fa2bddc8d88629
tree93d032d0948f081174401cd755b68ed3c479bc6b
parent21b8c7288e6bb2f1481a8af58c80561b1bb3f29b
spi_mpc83xx: fix clockrate calculation for low speed

Commit cbd3eb71 (spi_mpc83xx clockrate fixes) broke clockrate calculation
for low speeds.  SPMODE_DIV16 should be set if the divider is higher than
64, not only if the divider gets clipped to 1024.

Furthermore, the clipping check was off by a factor 16 as well.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/spi/spi_mpc83xx.c