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

Scott Wood scottwood at freescale.com
Tue Jun 18 02:08:44 CEST 2013


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.

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

-Scott


More information about the U-Boot mailing list