[U-Boot] fsl-ifc-nand : Corrected the programming of chip select

York Sun york.sun at nxp.com
Thu Apr 26 21:17:16 UTC 2018


On 04/17/2018 12:24 PM, Ronak Desai wrote:
> Corrected the chip selection in IFC_NAND_CSEL register. Due to this
> issue in multi-chip nand use-case, IFC was always pointing to the last
> probed chip even though user select another device through "nand device
> <dev>" command.
> 
> Also, updated the driver to remove usage of ifc_ctrl->cs_nand as it's
> the property of chip not the controller.
> 
> Signed-off-by: Ronak Desai <ronak.desai at rockwellcollins.com>
> ---
>  drivers/mtd/nand/fsl_ifc_nand.c |   15 ++++++---------
>  1 file changed, 6 insertions(+), 9 deletions(-)
> 
> --
> 1.7.9.5
> 
> diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c
> index 495e3aa..2d0ca54 100644
> --- a/drivers/mtd/nand/fsl_ifc_nand.c
> +++ b/drivers/mtd/nand/fsl_ifc_nand.c
> @@ -48,7 +48,6 @@ struct fsl_ifc_ctrl {
> 	/* device info */
> 	struct fsl_ifc regs;
> 	void __iomem *addr;      /* Address of assigned IFC buffer        */
> -	unsigned int cs_nand;    /* On which chipsel NAND is connected	  */
> 	unsigned int page;       /* Last page written to / read from      */
> 	unsigned int read_bytes; /* Number of bytes read during command   */
> 	unsigned int column;     /* Saved column from SEQIN               */
> @@ -296,7 +295,7 @@ static int fsl_ifc_run_command(struct mtd_info *mtd)
> 	int i;
> 
> 	/* set the chip select for NAND Transaction */
> -	ifc_out32(&ifc->ifc_nand.nand_csel, ifc_ctrl->cs_nand);
> +	ifc_out32(&ifc->ifc_nand.nand_csel, priv->bank << IFC_NAND_CSEL_SHIFT);
> 

Can you check your code base? Commit 99145c488f78 has some of your
change already.

York


More information about the U-Boot mailing list