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

Kuo-Jung Su
2013-06-18T00:51:44Z

2013/6/18 Scott Wood <scottwood@freescale.com>:
> On 06/17/2013 07:06:55 AM, Kuo-Jung Su wrote:
>>
>> diff --git a/README b/README
>> index ac1ec44..3dbb7cc 100644
>> --- a/README
>> +++ b/README
>> @@ -3930,6 +3930,12 @@ Low Level (hardware related) configuration options:
>> - drivers/mtd/nand/ndfc.c
>> - drivers/mtd/nand/mxc_nand.c
>>
>> +- CONFIG_SYS_FTNANDC021_TIMING
>> + This option specifies an array of customized timing
>> parameters
>> + for Faraday FTNANDC021 NAND flash controller.
>> + e.g.
>> + #define CONFIG_SYS_FTNANDC021_TIMING { 0x02240264,
>> 0x42054209 }
>
>
> But what does 0x02240264 mean? What does 0x42054209 mean? I wasn't looking
> for an example, but rather the name of the register you're going to use each
> array element to initialize.
>

Got it, thanks

>> + 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.

--
Best wishes,
Kuo-Jung Su