aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/spi/spi_bfin5xx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index 21de8605dbce..bd182145bc2c 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -644,11 +644,16 @@ static void bfin_spi_pump_transfers(unsigned long data)
644 drv_data->len = transfer->len; 644 drv_data->len = transfer->len;
645 cr_width = 0; 645 cr_width = 0;
646 drv_data->ops = &bfin_transfer_ops_u8; 646 drv_data->ops = &bfin_transfer_ops_u8;
647 } else { 647 } else if (bits_per_word == 16) {
648 drv_data->n_bytes = 2; 648 drv_data->n_bytes = 2;
649 drv_data->len = (transfer->len) >> 1; 649 drv_data->len = (transfer->len) >> 1;
650 cr_width = BIT_CTL_WORDSIZE; 650 cr_width = BIT_CTL_WORDSIZE;
651 drv_data->ops = &bfin_transfer_ops_u16; 651 drv_data->ops = &bfin_transfer_ops_u16;
652 } else {
653 dev_err(&drv_data->pdev->dev, "transfer: unsupported bits_per_word\n");
654 message->status = -EINVAL;
655 bfin_spi_giveback(drv_data);
656 return;
652 } 657 }
653 cr = read_CTRL(drv_data) & ~(BIT_CTL_TIMOD | BIT_CTL_WORDSIZE); 658 cr = read_CTRL(drv_data) & ~(BIT_CTL_TIMOD | BIT_CTL_WORDSIZE);
654 cr |= cr_width; 659 cr |= cr_width;