From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Jos=E9_Miguel_Gon=E7alves?= Date: Wed, 19 Sep 2012 17:34:21 +0100 Subject: [U-Boot] [PATCH v4 09/11] S3C24XX: Add NAND Flash driver In-Reply-To: <1348071541.22800.2@snotra> References: <1348071541.22800.2@snotra> Message-ID: <5059F40D.7070208@inov.pt> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 19-09-2012 17:19, Scott Wood wrote: > On 09/19/2012 06:25:25 AM, Jos? Miguel Gon?alves wrote: >> NAND Flash driver with HW ECC for the S3C24XX SoCs. >> Currently it only supports SLC NAND chips. >> >> Signed-off-by: Jos? Miguel Gon?alves >> --- >> Changes for v2: >> - Coding style cleanup >> - Use of clrsetbits_le32() >> - Use of register bit macros instead of magic numbers >> >> Changes for v3: >> - Removed magic numbers >> - Removed a macro to declare a void printf() >> - Replaced one printf() with a puts() >> >> Changes for v4: >> - Coding style cleanup >> - Use of a struct to store chip private data >> - Replaced u_long by u32 >> - Replaced u_char by uint8_t >> - Added error message in s3c_nand_select_chip() >> - Optimization of s3c_nand_hwcontrol() >> --- >> drivers/mtd/nand/Makefile | 1 + >> drivers/mtd/nand/s3c24xx_nand.c | 255 +++++++++++++++++++++++++++++++++++++++ >> 2 files changed, 256 insertions(+) >> create mode 100644 drivers/mtd/nand/s3c24xx_nand.c > > Acked-by: Scott Wood > >> + nand->priv = (void *)&chip_info[chip_n++]; > > Hmm, I was going to say that the cast could be dropped, but I guess it's because > of the const. Yes, it's needed because of the declaration of the private struct as const. > It doesn't need to hold up acceptance of the patch, but it'd probably be better > to drop the const instead (more flexible too if additional private data needs to > be declared). I think a better option would be to drop the const in the struct and set only the 'cs' member to const. Jos? Gon?alves