summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHan Xu <b45815@freescale.com>2015-06-11 14:50:47 -0500
committerHan Xu <b45815@freescale.com>2015-06-11 15:15:08 -0500
commit0d373abd5734eb3b8adcee0c09136c1a4e712fd2 (patch)
tree5b106d557ab5ff4c34dbee97570e060f33f41c27 /drivers
parent374e8f4b518e8c9a307d3208550dfedd69d266a4 (diff)
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 <b45815@freescale.com> (cherry picked from commit bde382480e9c3ba3ba1f0f4c73f77df894482699)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/spi-nor/fsl-quadspi.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
index 7a5e25262199..7ab261f03ae3 100644
--- a/drivers/mtd/spi-nor/fsl-quadspi.c
+++ b/drivers/mtd/spi-nor/fsl-quadspi.c
@@ -780,6 +780,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 */
writel(QUADSPI_MCR_SWRSTSD_MASK | QUADSPI_MCR_SWRSTHD_MASK,
base + QUADSPI_MCR);