On 07/11/2016 08:00 PM, Yunhui Cui wrote:
> From: Yunhui Cui <yunhui....@nxp.com>
>
> Errata: A-009282: QuadSPI data pre-fetch can result in incorrect data
> We need this errata workaround when CONFIG_SYS_FSL_QSPI_AHB is enabled.
>
> Signed-off-by: Yunhui Cui <yunhui....@nxp.com>
> ---
>  drivers/spi/fsl_qspi.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c
> index 75cbab2..0354e20 100644
> --- a/drivers/spi/fsl_qspi.c
> +++ b/drivers/spi/fsl_qspi.c
> @@ -438,13 +438,23 @@ static void qspi_enable_ddr_mode(struct fsl_qspi_priv 
> *priv)
>  static void qspi_init_ahb_read(struct fsl_qspi_priv *priv)
>  {
>       struct fsl_qspi_regs *regs = priv->regs;
> +     int rx_size = 0x80;
>
>       /* AHB configuration for access buffer 0/1/2 .*/
>       qspi_write32(priv->flags, &regs->buf0cr, QSPI_BUFXCR_INVALID_MSTRID);
>       qspi_write32(priv->flags, &regs->buf1cr, QSPI_BUFXCR_INVALID_MSTRID);
>       qspi_write32(priv->flags, &regs->buf2cr, QSPI_BUFXCR_INVALID_MSTRID);
> +
> +#ifdef CONFIG_SYS_FSL_ERRATUM_A009282
> +     /*A-009282: QuadSPI data pre-fetch can result in incorrect data
> +      *Workaround: Keep the read data size to 64 bits (8 Bytes), which
> +      *disables the prefetch on the AHB buffer,and prevents this issue
> +      *from occurring.
> +     */

Please fix the multi-line comment style, and address Prabhakar's comment.

York

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to