summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorHan Xu <b45815@freescale.com>2015-06-11 14:50:47 -0500
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:20:42 +0300
commitd7f1fea79c12ad0595850e5c576a23a81d546856 (patch)
treeb3b9cfd9120cae68059e3087cd5885bca2d9edbc /drivers/mtd
parentb166f3645ef7d89eec58ac1e51e4e4bb4fa1835a (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 d8b51cc358780f68e732522ee9bd6bd578dd6771)
Diffstat (limited to 'drivers/mtd')
-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 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);