Merge branch 'for-5.4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[sfrench/cifs-2.6.git] / drivers / spi / spi-mxic.c
index f48563c09b97cdb63495212f2862797f96e0958e..69491f3a515da788a6af8b64fa3b07b106297b63 100644 (file)
 #define LWR_SUSP_CTRL_EN       BIT(31)
 
 #define DMAS_CTRL              0x9c
-#define DMAS_CTRL_DIR_READ     BIT(31)
-#define DMAS_CTRL_EN           BIT(30)
+#define DMAS_CTRL_EN           BIT(31)
+#define DMAS_CTRL_DIR_READ     BIT(30)
 
 #define DATA_STROB             0xa0
 #define DATA_STROB_EDO_EN      BIT(2)
@@ -275,7 +275,7 @@ static void mxic_spi_hw_init(struct mxic_spi *mxic)
        writel(0, mxic->regs + HC_EN);
        writel(0, mxic->regs + LRD_CFG);
        writel(0, mxic->regs + LRD_CTRL);
-       writel(HC_CFG_NIO(1) | HC_CFG_TYPE(0, HC_CFG_TYPE_SPI_NAND) |
+       writel(HC_CFG_NIO(1) | HC_CFG_TYPE(0, HC_CFG_TYPE_SPI_NOR) |
               HC_CFG_SLV_ACT(0) | HC_CFG_MAN_CS_EN | HC_CFG_IDLE_SIO_LVL(1),
               mxic->regs + HC_CFG);
 }
@@ -346,7 +346,7 @@ static bool mxic_spi_mem_supports_op(struct spi_mem *mem,
        if (op->addr.nbytes > 7)
                return false;
 
-       return true;
+       return spi_mem_default_supports_op(mem, op);
 }
 
 static int mxic_spi_mem_exec_op(struct spi_mem *mem,