spi: atmel-quadspi: rework transfer macros
authorTudor Ambarus <tudor.ambarus@microchip.com>
Tue, 5 Feb 2019 17:33:25 +0000 (17:33 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 6 Feb 2019 17:20:40 +0000 (17:20 +0000)
commitb456fd18ca69f3e6f0c846322ffa4def5379dd4a
tree322d429618f28a6c36c8d65a346c6b8c0b3a14f8
parentcae417b2a89b40480bf4f259417ba7148bf4c8e2
spi: atmel-quadspi: rework transfer macros

Split the TFRTYP_TRSFR_ bitfields in 2: one bit encoding the
mem/reg transfer type and one bit encoding the direction of
the transfer (read/write).

Remove NOP when setting read transfer type. Remove useless
setting of write transfer type when
op->data.dir == SPI_MEM_DATA_IN && !op->data.nbytes.

QSPI_IFR_TFRTYP_TRSFR_WRITE is specific just to sama5d2 qspi,
rename it to QSPI_IFR_SAMA5D2_WRITE_TRSFR.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/atmel-quadspi.c