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

Scott Wood
2013-06-18T00:56:57Z

On 06/17/2013 07:51:44 PM, Kuo-Jung Su wrote:
> 2013/6/18 Scott Wood <scottwood@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