diff options
author | Tudor Ambarus <tudor.ambarus@microchip.com> | 2020-12-07 15:59:59 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-12-07 14:18:07 +0000 |
commit | c066efb07d1e8b801ea9d0727119958c9904e63d (patch) | |
tree | 05b2f9ac436dba20e4de1bd9724c038178c2a60c /drivers/spi/atmel-quadspi.c | |
parent | d00364b6a60475cd75fd07e847ad6f955952638b (diff) |
spi: atmel-quadspi: Move common code outside of if else
QSPI_IFR is set as the last QSPI Instruction Frame register
regardless of the sama5d2 or sam9x60 version of the IP. Move
the writing of QSPI_IFR outside of the IP specific code.
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20201207135959.154124-5-tudor.ambarus@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/atmel-quadspi.c')
-rw-r--r-- | drivers/spi/atmel-quadspi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c index 3a978ee8b70f..f56640d63982 100644 --- a/drivers/spi/atmel-quadspi.c +++ b/drivers/spi/atmel-quadspi.c @@ -394,15 +394,15 @@ static int atmel_qspi_set_cfg(struct atmel_qspi *aq, atmel_qspi_write(icr, aq, QSPI_RICR); else atmel_qspi_write(icr, aq, QSPI_WICR); - atmel_qspi_write(ifr, aq, QSPI_IFR); } else { if (op->data.nbytes && op->data.dir == SPI_MEM_DATA_OUT) ifr |= QSPI_IFR_SAMA5D2_WRITE_TRSFR; atmel_qspi_write(icr, aq, QSPI_ICR); - atmel_qspi_write(ifr, aq, QSPI_IFR); } + atmel_qspi_write(ifr, aq, QSPI_IFR); + return 0; } |