aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-bfin5xx.c
diff options
context:
space:
mode:
authorScott Jiang <scott.jiang.linux@gmail.com>2012-04-23 18:18:13 -0400
committerGrant Likely <grant.likely@secretlab.ca>2012-04-27 14:20:39 -0400
commit2431a8154634027ce3915200699f26fb3725a1f2 (patch)
tree836dc408c6bfc8af24a5b9c5f0f46b7c23001438 /drivers/spi/spi-bfin5xx.c
parent128465ca7c0775609b1c24f66cd6bddac5f59c9b (diff)
spi/spi-bfin5xx: Fix flush of last bit after each spi transfer
This patch ensures that the last bit of a transfer gets correctly flushed out of the register. Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi/spi-bfin5xx.c')
-rw-r--r--drivers/spi/spi-bfin5xx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/spi/spi-bfin5xx.c b/drivers/spi/spi-bfin5xx.c
index 432d0190e6ba..9bb4d4af8547 100644
--- a/drivers/spi/spi-bfin5xx.c
+++ b/drivers/spi/spi-bfin5xx.c
@@ -587,6 +587,7 @@ static void bfin_spi_pump_transfers(unsigned long data)
587 if (message->state == DONE_STATE) { 587 if (message->state == DONE_STATE) {
588 dev_dbg(&drv_data->pdev->dev, "transfer: all done!\n"); 588 dev_dbg(&drv_data->pdev->dev, "transfer: all done!\n");
589 message->status = 0; 589 message->status = 0;
590 bfin_spi_flush(drv_data);
590 bfin_spi_giveback(drv_data); 591 bfin_spi_giveback(drv_data);
591 return; 592 return;
592 } 593 }
@@ -870,8 +871,10 @@ static void bfin_spi_pump_transfers(unsigned long data)
870 message->actual_length += drv_data->len_in_bytes; 871 message->actual_length += drv_data->len_in_bytes;
871 /* Move to next transfer of this msg */ 872 /* Move to next transfer of this msg */
872 message->state = bfin_spi_next_transfer(drv_data); 873 message->state = bfin_spi_next_transfer(drv_data);
873 if (drv_data->cs_change) 874 if (drv_data->cs_change && message->state != DONE_STATE) {
875 bfin_spi_flush(drv_data);
874 bfin_spi_cs_deactive(drv_data, chip); 876 bfin_spi_cs_deactive(drv_data, chip);
877 }
875 } 878 }
876 879
877 /* Schedule next transfer tasklet */ 880 /* Schedule next transfer tasklet */