From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Tue, 23 Jun 2009 11:15:08 -0500 Subject: [U-Boot] [PATCH-ARM 1/2] Add support for the Embest SBC2440-II Board In-Reply-To: <4A401FB3.8000300@fearnside-systems.co.uk> References: <4A3BC001.3010103@fearnside-systems.co.uk> <20090620173600.GC19715@game.jcrosoft.org> <4A3D7717.9070809@fearnside-systems.co.uk> <20090622192608.GB27745@b07421-ec1.am.freescale.net> <4A401FB3.8000300@fearnside-systems.co.uk> Message-ID: <4A40FF8C.8040905@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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