On Tuesday 12 February 2008, Wolfgang Denk wrote:
> > #if (CFG_NAND_PAGE_SIZE > 512)
>
> Please use an explicit test instead, i. e. for example
>
>       #if (CFG_NAND_PAGE_SIZE == 2048)
>
> unless you are absolutley sure that all future devices (say, with 8k
> or 8k page sizes) will behave identical. Otherwise it will be a mess
> to clean up that code later.

I got my idea from the current Linux MTD NAND drivers (and U-Boot btw). Here 
the distinction between small page and large page devices is done this way:

if (mtd->writesize > 512)
        lp..
else
        sp..

That's why I still prefer my suggestion.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: [EMAIL PROTECTED]
=====================================================================

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to