summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorHan Xu <han.xu@nxp.com>2017-08-11 14:48:25 -0500
committerYe Li <ye.li@nxp.com>2018-04-27 02:32:29 -0700
commit71368855b63c16998ca5681984e70a913e1f4d84 (patch)
tree66077f3ee21db378ce1ced1464c90d096770a9b2 /drivers/spi
parent24c5cdaa45fda19b885783054820f309c05bab16 (diff)
MLK-16186: spi: flexspi: reset the flexspi DLL register to default value
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> (cherry picked from commit da3c2a9f09afa45a428809b7bf3f981a1ccb7f2e)
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/fsl_fspi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/spi/fsl_fspi.c b/drivers/spi/fsl_fspi.c
index b3c6209585..06369d0a9b 100644
--- a/drivers/spi/fsl_fspi.c
+++ b/drivers/spi/fsl_fspi.c
@@ -1178,6 +1178,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;