]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spi: atmel-quadspi: Fix the buswidth adjustment between spi-mem and controller
authorTudor Ambarus <tudor.ambarus@microchip.com>
Fri, 8 Apr 2022 08:40:26 +0000 (11:40 +0300)
committerEugen Hristev <eugen.hristev@microchip.com>
Tue, 26 Apr 2022 06:54:41 +0000 (09:54 +0300)
Use the spi_mem_default_supports_op() core helper in order to take into
account the buswidth specified by the user in device tree.

Fixes: 24c8ff4684 ("spi: Add Atmel QuadSPI driver")
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
drivers/spi/atmel-quadspi.c

index 098298336da31dd50a8b580a97e42d37dc577d19..cb64119f9726cc57bd2c81086e064a5fcd594e5d 100644 (file)
@@ -438,6 +438,9 @@ static bool atmel_qspi_supports_op(struct spi_slave *slave,
 {
        struct atmel_qspi *aq = dev_get_priv(slave->dev->parent);
 
+       if (!spi_mem_default_supports_op(slave, op))
+               return false;
+
        if (aq->caps->octal) {
                if (atmel_qspi_sama7g5_find_mode(op) < 0)
                        return false;