summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-coldfire-qspi.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-03-20 22:59:06 +0800
committerMark Brown <broonie@linaro.org>2014-03-25 18:05:17 +0000
commit8023d384ff5c55a431c1a9a84cd76648d43ba7d8 (patch)
tree9dc68bbde8c8908ebdb22bc969da5a07abf10e4a /drivers/spi/spi-coldfire-qspi.c
parent2271cf124a2763b7252887814a7fc8a844767e8f (diff)
spi: coldfire-qspi: Simplify the code to set register bits for transfer speed
spi core will use spi->max_speed_hz as transfer speed if the transfer speed was not set. So we don't need to test t->speed_hz in mcfqspi_transfer_one(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-coldfire-qspi.c')
-rw-r--r--drivers/spi/spi-coldfire-qspi.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/spi/spi-coldfire-qspi.c b/drivers/spi/spi-coldfire-qspi.c
index 6d78f96bdc55..492ceb1654e5 100644
--- a/drivers/spi/spi-coldfire-qspi.c
+++ b/drivers/spi/spi-coldfire-qspi.c
@@ -321,10 +321,7 @@ static int mcfqspi_transfer_one(struct spi_master *master,
qmr |= MCFQSPI_QMR_CPHA;
if (spi->mode & SPI_CPOL)
qmr |= MCFQSPI_QMR_CPOL;
- if (t->speed_hz)
- qmr |= mcfqspi_qmr_baud(t->speed_hz);
- else
- qmr |= mcfqspi_qmr_baud(spi->max_speed_hz);
+ qmr |= mcfqspi_qmr_baud(t->speed_hz);
mcfqspi_wr_qmr(mcfqspi, qmr);
mcfqspi_wr_qir(mcfqspi, MCFQSPI_QIR_SPIFE);