[PATCH][v2] mtd: nand: ifc: update bufnum mask for ver >= 2.0.0

Boris Brezillon boris.brezillon at free-electrons.com
Thu Nov 30 13:37:51 PST 2017


On Thu, 23 Nov 2017 17:04:31 +0530
Prabhakar Kushwaha <prabhakar.kushwaha at nxp.com> wrote:

> From: Jagdish Gediya <jagdish.gediya at nxp.com>
> 
> Bufnum mask is used to calculate page position in the internal SRAM.
> 
> As IFC version 2.0.0 has 16KB of internal SRAM as compared to older
> versions which had 8KB. Hence bufnum mask needs to be updated.

Applied.

Thanks,

Boris

> 
> Signed-off-by: Jagdish Gediya <jagdish.gediya at nxp.com>
> Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha at nxp.com>
> ---
> Changes for v2: Incorporated review comments from Boris Brezillon
> http://patchwork.ozlabs.org/patch/773799/
> 
>  drivers/mtd/nand/fsl_ifc_nand.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c
> index 9e03bac..bbdd68a5 100644
> --- a/drivers/mtd/nand/fsl_ifc_nand.c
> +++ b/drivers/mtd/nand/fsl_ifc_nand.c
> @@ -916,6 +916,13 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv)
>  	if (ctrl->version >= FSL_IFC_VERSION_1_1_0)
>  		fsl_ifc_sram_init(priv);
>  
> +	/*
> +	 * As IFC version 2.0.0 has 16KB of internal SRAM as compared to older
> +	 * versions which had 8KB. Hence bufnum mask needs to be updated.
> +	 */
> +	if (ctrl->version >= FSL_IFC_VERSION_2_0_0)
> +		priv->bufnum_mask = (priv->bufnum_mask * 2) + 1;
> +
>  	return 0;
>  }
>  




More information about the linux-mtd mailing list