The uboot may run the QuadSpi controler with command:
#sf probe
So we should reset the module in the probe.
This patch also clear the pending interrupts which arised by the uboot
code.
Signed-off-by: Huang Shijie <b32955@freescale.com>
if (ret)
return ret;
+ /* Reset the module */
+ writel(QUADSPI_MCR_SWRSTSD_MASK | QUADSPI_MCR_SWRSTHD_MASK,
+ base + QUADSPI_MCR);
+ udelay(1);
+
/* Init the LUT table. */
fsl_qspi_init_lut(q);
base + QUADSPI_MCR);
/* enable the interrupt */
+ writel(0xffffffff, q->iobase + QUADSPI_FR);
writel(QUADSPI_RSER_TFIE, q->iobase + QUADSPI_RSER);
return 0;