Skip to content

Commit 1a6273c

Browse files
ambarusduraikvddp
authored andcommitted
spi: atmel-quadspi: Fix suspend
At suspend the mx flash tries to disable the octal DTR mode, thus it issues a ReadID which does not contain any address bytes. mmiocpy is used and the same bus error is hit. Unhandled fault: external abort on non-linefetch (0x1008) at 0xe1000000 Use DMA also for ReadID opcode, and avoid mmiocpy. Fixes: 1fdaf87 ("spi: atmel-quadspi: (workaround) Always use DMA on sama7g5") Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Tested-by: Claudiu Beznea <claudiu.beznea@microchip.com>
1 parent 35c17f0 commit 1a6273c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/spi/atmel-quadspi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ static int atmel_qspi_sama7g5_transfer(struct spi_mem *mem,
885885

886886
/* Send/Receive data. */
887887
if (op->data.dir == SPI_MEM_DATA_IN) {
888-
if (aq->rx_chan && op->addr.nbytes &&
888+
if (aq->rx_chan &&
889889
op->data.nbytes > ATMEL_QSPI_DMA_MIN_BYTES) {
890890
ret = atmel_qspi_dma_transfer(mem, op, offset);
891891
if (ret)
@@ -903,7 +903,7 @@ static int atmel_qspi_sama7g5_transfer(struct spi_mem *mem,
903903
return ret;
904904
}
905905
} else {
906-
if (aq->tx_chan && op->addr.nbytes &&
906+
if (aq->tx_chan &&
907907
op->data.nbytes > ATMEL_QSPI_DMA_MIN_BYTES) {
908908
ret = atmel_qspi_dma_transfer(mem, op, offset);
909909
if (ret)

0 commit comments

Comments
 (0)