MLK-22437-1 spi: fsl_qspi: Enable DDR mode on iMX7ULP
authorYe Li <ye.li@nxp.com>
Tue, 13 Aug 2019 10:34:57 +0000 (03:34 -0700)
committerYe Li <ye.li@nxp.com>
Wed, 14 Aug 2019 06:06:06 +0000 (23:06 -0700)
On iMX7ULP A0, PCC divider for QSPI has timing issue and it is
only possible to use the divider ratio equal to 1 (PCD=0).
This timing issue causes page program working abnormal if DDR_EN
is set. So current QSPI driver has disabled DDR mode on iMX7ULP

Since iMX7ULP B0 has fixed the issue, so re-enable the DDR mode
for iMX7ULP.

Signed-off-by: Ye Li <ye.li@nxp.com>
drivers/spi/fsl_qspi.c

index f60b4eb..547c030 100644 (file)
@@ -431,7 +431,6 @@ static inline void qspi_ahb_read(struct fsl_qspi_priv *priv, u8 *rxbuf, int len)
        qspi_write32(priv->flags, &regs->mcr, mcr_reg);
 }
 
-#ifndef CONFIG_MX7ULP
 static void qspi_enable_ddr_mode(struct fsl_qspi_priv *priv)
 {
        u32 reg, reg2;
@@ -460,7 +459,6 @@ static void qspi_enable_ddr_mode(struct fsl_qspi_priv *priv)
        reg |= BIT(16);
        qspi_write32(priv->flags, &regs->flshcr, reg);
 }
-#endif
 
 /*
  * There are two different ways to read out the data from the flash:
@@ -503,10 +501,8 @@ static void qspi_init_ahb_read(struct fsl_qspi_priv *priv)
        qspi_write32(priv->flags, &regs->bfgencr,
                     SEQID_FAST_READ << QSPI_BFGENCR_SEQID_SHIFT);
 
-#ifndef CONFIG_MX7ULP
        /*Enable DDR Mode*/
        qspi_enable_ddr_mode(priv);
-#endif
 }
 #endif