[U-Boot] [PATCH v2 3/4] mtd: nand: add Freescale NFC driver

Scott Wood scottwood at freescale.com
Thu Aug 14 21:49:52 CEST 2014


On Thu, 2014-08-14 at 18:30 +0200, Stefan Agner wrote:
> +#define	DRV_NAME		"fsl_nfc"

DRV_NAME doesn't match filename (neither does the patch title), and it
doesn't seem all that useful anyway -- the one place that uses it would
be better off using __func__.

> +static int vf610_nfc_nand_init(int devnum, u8 *addr)

Why u8?  Either use void or u32.  Also should have __iomem.

...OK, I see you copied that from the examples I pointed out.  I have no
idea why those use u8 either. :-(

> +	chip->IO_ADDR_R = chip->IO_ADDR_W = nfc->regs = (void __iomem *)addr;

Don't set IO_ADDR_R/IO_ADDR_W if they're not going to be used.

-Scott




More information about the U-Boot mailing list