[U-Boot] [PATCH v2 3/5] Add support for TQM-specific chip select logic to FSL-UPM

Scott Wood scottwood at freescale.com
Fri Feb 13 21:59:52 CET 2009


On Wed, Feb 11, 2009 at 06:38:22PM +0100, Wolfgang Grandegger wrote:
> Index: u-boot/drivers/mtd/nand/fsl_upm.c
> ===================================================================
> --- u-boot.orig/drivers/mtd/nand/fsl_upm.c
> +++ u-boot/drivers/mtd/nand/fsl_upm.c
> @@ -90,8 +90,11 @@ static void fun_cmd_ctrl(struct mtd_info
>  	mar = cmd << (32 - fun->width);
>  	io_addr = fun->upm.io_addr;
>  #if CONFIG_SYS_NAND_MAX_CHIPS > 1
> -	if (fun->chip_nr > 0)
> +	if (fun->chip_nr > 0) {
>  		io_addr += fun->chip_offset * fun->chip_nr;
> +		if (fun->upm_mar_chip_offset)
> +			mar |= fun->upm_mar_chip_offset * fun->chip_nr;
> +	}

Any particular reason not to drop the > 0 conditional?

-Scott


More information about the U-Boot mailing list