diff options
author | Mark Brown <broonie@kernel.org> | 2018-12-20 17:01:28 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-12-20 17:01:28 +0100 |
commit | b3fc4e0e966eaaf2f8afa1de3280770acd838b87 (patch) | |
tree | efa455a809e81a404010db0fa7b2886f1a324af9 /drivers/spi/spi-pl022.c | |
parent | Merge branch 'spi-4.20' into spi-linus (diff) | |
parent | spi: sh-msiof: Reduce the number of times write to and perform the transmissi... (diff) | |
download | linux-b3fc4e0e966eaaf2f8afa1de3280770acd838b87.tar.xz linux-b3fc4e0e966eaaf2f8afa1de3280770acd838b87.zip |
Merge branch 'spi-4.21' into spi-next
Diffstat (limited to 'drivers/spi/spi-pl022.c')
-rw-r--r-- | drivers/spi/spi-pl022.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index 6120e6abcd96..0c793e31d60f 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -861,11 +861,10 @@ static void dma_callback(void *data) /* Update total bytes transferred */ msg->actual_length += pl022->cur_transfer->len; - if (pl022->cur_transfer->cs_change) - pl022_cs_control(pl022, SSP_CHIP_DESELECT); - /* Move to next transfer */ msg->state = next_transfer(pl022); + if (msg->state != STATE_DONE && pl022->cur_transfer->cs_change) + pl022_cs_control(pl022, SSP_CHIP_DESELECT); tasklet_schedule(&pl022->pump_transfers); } @@ -1333,10 +1332,10 @@ static irqreturn_t pl022_interrupt_handler(int irq, void *dev_id) } /* Update total bytes transferred */ msg->actual_length += pl022->cur_transfer->len; - if (pl022->cur_transfer->cs_change) - pl022_cs_control(pl022, SSP_CHIP_DESELECT); /* Move to next transfer */ msg->state = next_transfer(pl022); + if (msg->state != STATE_DONE && pl022->cur_transfer->cs_change) + pl022_cs_control(pl022, SSP_CHIP_DESELECT); tasklet_schedule(&pl022->pump_transfers); return IRQ_HANDLED; } @@ -1544,10 +1543,11 @@ static void do_polling_transfer(struct pl022 *pl022) /* Update total byte transferred */ message->actual_length += pl022->cur_transfer->len; - if (pl022->cur_transfer->cs_change) - pl022_cs_control(pl022, SSP_CHIP_DESELECT); /* Move to next transfer */ message->state = next_transfer(pl022); + if (message->state != STATE_DONE + && pl022->cur_transfer->cs_change) + pl022_cs_control(pl022, SSP_CHIP_DESELECT); } out: /* Handle end of message */ |