]> git.karo-electronics.de Git - karo-tx-linux.git/commit
spi: spi-bfin5xx: Calculate transfer speed unconditionally
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Tue, 15 Sep 2015 13:26:17 +0000 (16:26 +0300)
committerMark Brown <broonie@kernel.org>
Wed, 16 Sep 2015 19:54:32 +0000 (20:54 +0100)
commit95a8fde23ef426aeee579bc99f35dc854e711225
treebef9504ac890c1bfea45ebfda3ae99b2725b339f
parent6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f
spi: spi-bfin5xx: Calculate transfer speed unconditionally

SPI core validates the transfer speed and defaults to spi->max_speed_hz in
case the transfer speed is not set so code here won't use the
chip->baud value (which is derived from spi->max_speed_hz).

Please note driver uses chip->baud at the beginning of message transmission
by calling the bfin_spi_restore_state() but then programs per transfer
speed in bfin_spi_pump_transfers(). I'm not familiar with the HW so I don't
know would it be possible to remove chip->baud completely by either using
constant value in bfin_spi_restore_state() or by removing the baud register
write there.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-bfin5xx.c