spi: atmel-quadspi: Remove default mode setting at probe time
authorAlexander Dahl <ada@thorsis.com>
Thu, 23 Jan 2025 12:12:12 +0000 (13:12 +0100)
committerEugen Hristev <eugen.hristev@linaro.org>
Wed, 12 Feb 2025 08:29:33 +0000 (10:29 +0200)
The Serial Memory Mode (SMM) is enabled with atmel_qspi_set_cfg() on
each invocation of atmel_qspi_exec_op().  Setting SMM through
atmel_qspi_init() at probe time is redundant.

Removing the SMM setting at probe time should therefore 1) be safe to do
and 2) allows for setting it to a different value in a future
implementation of .xfer() which needs to disable SMM.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
drivers/spi/atmel-quadspi.c

index 9e596b7..467f29c 100644 (file)
@@ -1052,11 +1052,6 @@ static int atmel_qspi_init(struct atmel_qspi *aq)
        /* Reset the QSPI controller */
        atmel_qspi_write(QSPI_CR_SWRST, aq, QSPI_CR);
 
-       /* Set the QSPI controller by default in Serial Memory Mode */
-       ret = atmel_qspi_set_serial_memory_mode(aq);
-       if (ret < 0)
-               return ret;
-
        /* Enable the QSPI controller */
        atmel_qspi_write(QSPI_CR_QSPIEN, aq, QSPI_CR);