Skip to content

Commit 7082b0a

Browse files
ambarusduraikvddp
authored andcommitted
spi: atmel-quadspi: Set endianness on 8D-8D-8D mode according to the flash requirements
Macronix swaps bytes on a 16-bit boundary when configured in Octal DTR. The byte order of 16-bit words is swapped when read or write written in 8D-8D-8D mode compared to STR modes. Set the endianness flash requirements to avoid endianness problems during. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
1 parent 3f9c5d9 commit 7082b0a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/spi/atmel-quadspi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,8 @@ static int atmel_qspi_sama7g5_set_cfg(struct atmel_qspi *aq,
694694
ifr |= QSPI_IFR_DDREN;
695695
if (op->cmd.dtr)
696696
ifr |= QSPI_IFR_DDRCMDEN;
697+
if (op->data.dtr_bswap16)
698+
ifr |= QSPI_IFR_END;
697699

698700
ifr |= QSPI_IFR_DQSEN;
699701
}

0 commit comments

Comments
 (0)