spi: spi-mem: Allow use of spi_mem_exec_op for all SPI modes
authorVignesh R <vigneshr@ti.com>
Tue, 5 Feb 2019 05:59:12 +0000 (11:29 +0530)
committerJagan Teki <jagan@amarulasolutions.com>
Thu, 7 Feb 2019 10:03:21 +0000 (15:33 +0530)
SPI controllers support all types of SPI modes including dual/quad bus
widths. Therefore remove constraint wrt SPI mode from spi-mem layer.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Tested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Tested-by: Stefan Roese <sr@denx.de>
Tested-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed
drivers/spi/spi-mem.c

index af9aef009a73d2169410cedb0c704900d27a2e42..1da20b8de5c43851df0e36495ce14e9d88c730cf 100644 (file)
@@ -323,15 +323,6 @@ int spi_mem_exec_op(struct spi_slave *slave, const struct spi_mem_op *op)
                return -EIO;
 #else
 
-       /* U-Boot does not support parallel SPI data lanes */
-       if ((op->cmd.buswidth != 1) ||
-           (op->addr.nbytes && op->addr.buswidth != 1) ||
-           (op->dummy.nbytes && op->dummy.buswidth != 1) ||
-           (op->data.nbytes && op->data.buswidth != 1)) {
-               printf("Dual/Quad raw SPI transfers not supported\n");
-               return -ENOTSUPP;
-       }
-
        if (op->data.nbytes) {
                if (op->data.dir == SPI_MEM_DATA_IN)
                        rx_buf = op->data.buf.in;