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

Wolfgang Grandegger wg at grandegger.com
Fri Feb 13 22:22:10 CET 2009


Scott Wood wrote:
> 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?

No, apart from saving some space. Should I send an updated patch?

Wolfgang.



More information about the U-Boot mailing list