Skip to content

Commit aefbe8d

Browse files
committed
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 1fdaf87 commit aefbe8d

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
@@ -888,7 +888,7 @@ static int atmel_qspi_sama7g5_transfer(struct spi_mem *mem,
888888

889889
/* Send/Receive data. */
890890
if (op->data.dir == SPI_MEM_DATA_IN) {
891-
if (aq->rx_chan && op->addr.nbytes &&
891+
if (aq->rx_chan &&
892892
op->data.nbytes > ATMEL_QSPI_DMA_MIN_BYTES) {
893893
ret = atmel_qspi_dma_transfer(mem, op, offset);
894894
if (ret)
@@ -906,7 +906,7 @@ static int atmel_qspi_sama7g5_transfer(struct spi_mem *mem,
906906
return ret;
907907
}
908908
} else {
909-
if (aq->tx_chan && op->addr.nbytes &&
909+
if (aq->tx_chan &&
910910
op->data.nbytes > ATMEL_QSPI_DMA_MIN_BYTES) {
911911
ret = atmel_qspi_dma_transfer(mem, op, offset);
912912
if (ret)

0 commit comments

Comments
 (0)