From d752f1426ca559b950bf956990da4386e662e55a Mon Sep 17 00:00:00 2001 From: Han Xu Date: Thu, 11 Jun 2015 14:50:47 -0500 Subject: [PATCH] MLK-11095: mtd:qspi: clear the DDR_EN bit on 6UL and 7D the obsolete bit DDR_EN on 6UL and 7D should be clear in case other program set the bit and cause qspi probe fail. Signed-off-by: Han Xu (cherry picked from commit d8b51cc358780f68e732522ee9bd6bd578dd6771) --- drivers/mtd/spi-nor/fsl-quadspi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c index 0a1f8641d3bc..1b04099c5ab5 100644 --- a/drivers/mtd/spi-nor/fsl-quadspi.c +++ b/drivers/mtd/spi-nor/fsl-quadspi.c @@ -807,6 +807,14 @@ static int fsl_qspi_nor_setup(struct fsl_qspi *q) if (ret) return ret; + if ((q->devtype_data->devtype == FSL_QUADSPI_IMX6UL) || + (q->devtype_data->devtype == FSL_QUADSPI_IMX7D)) { + /* clear the DDR_EN bit for 6UL and 7D */ + reg = readl(base + QUADSPI_MCR); + writel(~(QUADSPI_MCR_DDR_EN_MASK) & reg, base + QUADSPI_MCR); + udelay(1); + } + /* Reset the module */ qspi_writel(q, QUADSPI_MCR_SWRSTSD_MASK | QUADSPI_MCR_SWRSTHD_MASK, base + QUADSPI_MCR); -- 2.17.1