public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] NAND: Add 16bit NAND support for the NDFC
@ 2011-05-27 14:00 Alex Waterman
  2011-06-06 20:38 ` Scott Wood
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Waterman @ 2011-05-27 14:00 UTC (permalink / raw)
  To: u-boot



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH v2] NAND: Add 16bit NAND support for the NDFC
  2011-05-27 14:00 [U-Boot] [PATCH v2] NAND: Add 16bit NAND support for the NDFC Alex Waterman
@ 2011-06-06 20:38 ` Scott Wood
  2011-06-07 12:33   ` Alex Waterman
  0 siblings, 1 reply; 4+ messages in thread
From: Scott Wood @ 2011-06-06 20:38 UTC (permalink / raw)
  To: u-boot

On Fri, May 27, 2011 at 10:00:07AM -0400, Alex Waterman wrote:
> diff --git a/nand_spl/nand_boot.c b/nand_spl/nand_boot.c
> index 9545a9a..725356f 100644
> --- a/nand_spl/nand_boot.c
> +++ b/nand_spl/nand_boot.c
> @@ -80,9 +80,10 @@ static int nand_command(struct mtd_info *mtd, int block, int page, int offs, u8
>  		cmd = NAND_CMD_READ0;
>  	}
>  
> +#ifdef CONFIG_SYS_NDFC_16BIT
>  	/* Shift the offset from byte addressing to word addressing. */
> -	if (this->options & NAND_BUSWIDTH_16)
> -		offs >>= 1;
> +	offs >>= 1;
> +#endif

This is not an NDFC-specific file.

-Scott

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH v2] NAND: Add 16bit NAND support for the NDFC
  2011-06-06 20:38 ` Scott Wood
@ 2011-06-07 12:33   ` Alex Waterman
  2011-06-07 16:32     ` Scott Wood
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Waterman @ 2011-06-07 12:33 UTC (permalink / raw)
  To: u-boot


>> +#ifdef CONFIG_SYS_NDFC_16BIT
>>  	/* Shift the offset from byte addressing to word addressing. */
>> -	if (this->options & NAND_BUSWIDTH_16)
>> -		offs >>= 1;
>> +	offs >>= 1;
>> +#endif
> 
> This is not an NDFC-specific file.

Oh, yeah, I see. This should not have been swapped to a preprocessor
condition. Could we make a general define for 16 bit NAND not just limited
to the NDFC? Or would you rather just have the extra if condition despite
the extra code space it takes up?

Regards,
Alex

-- 
Alex Waterman
Computer Engineer
Phone: 215-896-4920
Email: awaterman at dawning.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH v2] NAND: Add 16bit NAND support for the NDFC
  2011-06-07 12:33   ` Alex Waterman
@ 2011-06-07 16:32     ` Scott Wood
  0 siblings, 0 replies; 4+ messages in thread
From: Scott Wood @ 2011-06-07 16:32 UTC (permalink / raw)
  To: u-boot

On Tue, 7 Jun 2011 08:33:25 -0400
Alex Waterman <awaterman@dawning.com> wrote:

> 
> >> +#ifdef CONFIG_SYS_NDFC_16BIT
> >>  	/* Shift the offset from byte addressing to word addressing. */
> >> -	if (this->options & NAND_BUSWIDTH_16)
> >> -		offs >>= 1;
> >> +	offs >>= 1;
> >> +#endif
> > 
> > This is not an NDFC-specific file.
> 
> Oh, yeah, I see. This should not have been swapped to a preprocessor
> condition. Could we make a general define for 16 bit NAND not just limited
> to the NDFC? Or would you rather just have the extra if condition despite
> the extra code space it takes up?

I'm fine with either way.  If you make it compile-time, make sure you update
all boards that use SPL with 16-bit, and document that it's limited to SPL
(unless you really want to update all the boards using 16-bit, SPL or not,
and update the main NAND code to take advantage of this, and there's enough
advantage to be gained to make it worthwhile).

-Scott

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-06-07 16:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-27 14:00 [U-Boot] [PATCH v2] NAND: Add 16bit NAND support for the NDFC Alex Waterman
2011-06-06 20:38 ` Scott Wood
2011-06-07 12:33   ` Alex Waterman
2011-06-07 16:32     ` Scott Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox