[U-Boot] [PATCH v5 05/14] nand: add Faraday FTNANDC021 NAND controller support

Scott Wood scottwood at freescale.com
Tue Jun 18 02:56:57 CEST 2013


On 06/17/2013 07:51:44 PM, Kuo-Jung Su wrote:
> 2013/6/18 Scott Wood <scottwood at freescale.com>:
> > On 06/17/2013 07:06:55 AM, Kuo-Jung Su wrote:
> >> +       off = 0;
> >> +       while (off < len && priv->col < mtd->writesize) {
> >> +               ftnandc021_pio_wait(priv);
> >> +               *(uint32_t *)(buf + off) = readl(&regs->dr);
> >
> >
> > This looks like illegal type-punning.  Use memcpy.
> >
> > Likewise elsewhere.
> 
> How about put_unaligned() / get_unaligned() ?
> It looks more simpler and safer to me.

That's fine too.

-Scott


More information about the U-Boot mailing list