diff options
Diffstat (limited to 'drivers/spi/pxa2xx_spi.c')
-rw-r--r-- | drivers/spi/pxa2xx_spi.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c index 3f3c08c6ba4e..c7365e0b22dd 100644 --- a/drivers/spi/pxa2xx_spi.c +++ b/drivers/spi/pxa2xx_spi.c | |||
@@ -1236,9 +1236,6 @@ static int setup(struct spi_device *spi) | |||
1236 | uint tx_thres = TX_THRESH_DFLT; | 1236 | uint tx_thres = TX_THRESH_DFLT; |
1237 | uint rx_thres = RX_THRESH_DFLT; | 1237 | uint rx_thres = RX_THRESH_DFLT; |
1238 | 1238 | ||
1239 | if (!spi->bits_per_word) | ||
1240 | spi->bits_per_word = 8; | ||
1241 | |||
1242 | if (drv_data->ssp_type != PXA25x_SSP | 1239 | if (drv_data->ssp_type != PXA25x_SSP |
1243 | && (spi->bits_per_word < 4 || spi->bits_per_word > 32)) { | 1240 | && (spi->bits_per_word < 4 || spi->bits_per_word > 32)) { |
1244 | dev_err(&spi->dev, "failed setup: ssp_type=%d, bits/wrd=%d " | 1241 | dev_err(&spi->dev, "failed setup: ssp_type=%d, bits/wrd=%d " |
@@ -1328,18 +1325,14 @@ static int setup(struct spi_device *spi) | |||
1328 | 1325 | ||
1329 | /* NOTE: PXA25x_SSP _could_ use external clocking ... */ | 1326 | /* NOTE: PXA25x_SSP _could_ use external clocking ... */ |
1330 | if (drv_data->ssp_type != PXA25x_SSP) | 1327 | if (drv_data->ssp_type != PXA25x_SSP) |
1331 | dev_dbg(&spi->dev, "%d bits/word, %ld Hz, mode %d, %s\n", | 1328 | dev_dbg(&spi->dev, "%ld Hz actual, %s\n", |
1332 | spi->bits_per_word, | ||
1333 | clk_get_rate(ssp->clk) | 1329 | clk_get_rate(ssp->clk) |
1334 | / (1 + ((chip->cr0 & SSCR0_SCR) >> 8)), | 1330 | / (1 + ((chip->cr0 & SSCR0_SCR) >> 8)), |
1335 | spi->mode & 0x3, | ||
1336 | chip->enable_dma ? "DMA" : "PIO"); | 1331 | chip->enable_dma ? "DMA" : "PIO"); |
1337 | else | 1332 | else |
1338 | dev_dbg(&spi->dev, "%d bits/word, %ld Hz, mode %d, %s\n", | 1333 | dev_dbg(&spi->dev, "%ld Hz actual, %s\n", |
1339 | spi->bits_per_word, | ||
1340 | clk_get_rate(ssp->clk) / 2 | 1334 | clk_get_rate(ssp->clk) / 2 |
1341 | / (1 + ((chip->cr0 & SSCR0_SCR) >> 8)), | 1335 | / (1 + ((chip->cr0 & SSCR0_SCR) >> 8)), |
1342 | spi->mode & 0x3, | ||
1343 | chip->enable_dma ? "DMA" : "PIO"); | 1336 | chip->enable_dma ? "DMA" : "PIO"); |
1344 | 1337 | ||
1345 | if (spi->bits_per_word <= 8) { | 1338 | if (spi->bits_per_word <= 8) { |