MLK-16186: spi: flexspi: reset the flexspi DLL register to default value
authorHan Xu <han.xu@nxp.com>
Fri, 11 Aug 2017 19:48:25 +0000 (14:48 -0500)
committerJason Liu <jason.hui.liu@nxp.com>
Thu, 2 Nov 2017 18:37:08 +0000 (02:37 +0800)
i.MX8QM ROM didn't calculate the DLL correctly in some cases, to avoid
the wrong DLL setting impact the following functions, reset them to the
default value when probe.

Signed-off-by: Han Xu <han.xu@nxp.com>
drivers/spi/fsl_fspi.c

index 19bb68e..b7b2d92 100644 (file)
@@ -1186,6 +1186,10 @@ static int fsl_fspi_probe(struct udevice *bus)
        fspi_write32(priv->flags, &priv->regs->mcr0,
                     0xFFFF0000);
 
+       /* Reset the DLL register to default value */
+       fspi_write32(priv->flags, &priv->regs->dllacr, 0x0100);
+       fspi_write32(priv->flags, &priv->regs->dllbcr, 0x0100);
+
        /* Flash Size in KByte */
        total_size = FSL_FSPI_FLASH_SIZE * FSL_FSPI_FLASH_NUM >> 10;