[U-Boot] [PATCH-ARM 1/2] Add support for the Embest SBC2440-II Board

Scott Wood scottwood at freescale.com
Tue Jun 23 18:15:08 CEST 2009


kevin.morfitt at fearnside-systems.co.uk wrote:
> These type names (and the 'const') are in the existing s3c24x0 code so I 
> just made my new code follow the same style and Lindent and checkpatch 
> didn't complain. The u-boot coding style guidelines say we should use the 
> Linux coding style and this says that 'mixed case names are frowned upon' 
> and 'It's a _mistake_ to use typedef for structures'

I love it when someone justifies their opinion by asserting that the 
alternative is "a _mistake_". :-)

> so it doesn't meet 
> the coding style, at least for the use of typedef if not for the upper 
> case names.

Upper case names are for macros in the Linux/u-boot code style.

> I ported this from the Linux s3c2410 NAND driver (which covers s3c2440
> as well as s3c2410). It worked when I tested it (after I enabled hardware
> ECC and fixed the problem below), but I don't know enough about how mtd
> hardware ecc works to understand why it was done this way in the Linux 
> kernel. A comment in the kernel code says that nand_ecclayout is 
> 'Exported to userspace for diagnosis and to allow creation of raw 
> images' so it's likely I haven't tested this bit as all I did was check 
> that NAND read/write worked. I'll have a look at it in more detail.

It's relevant for things like JFFS2, which use the free area for their 
own markers.  It looks like 8 bytes is enough for that, though -- and 
being in sync with Linux is the most important.  It may also be useful 
to reserve some bytes for alterate ECC schemes.

-Scott


More information about the U-Boot mailing list