On Wed, Jul 15, 2009 at 05:18:40PM +0200, Eric Benard wrote:
>  static int __init imxnd_probe(struct device_d *dev)
>  {
>       struct nand_chip *this;
> @@ -969,7 +978,7 @@ static int __init imxnd_probe(struct device_d *dev)
>       struct imx_nand_host *host;
>       u16 tmp;
>       int err = 0;
> -#ifdef CONFIG_ARCH_MX27
> +#ifdef CONFIG_ARCH_IMX27
>       PCCR1 |= PCCR1_NFC_BAUDEN;
>  #endif
>       /* Allocate memory for MTD device structure and private data */
> @@ -1050,7 +1059,12 @@ static int __init imxnd_probe(struct device_d *dev)
>               this->ecc.layout = &nand_hw_eccoob_16;
>       }
>  
> -     host->pagesize_2k = 0;
> +     if (pdata->is2k) {
> +             host->pagesize_2k = 1;
> +             NFMS |= (1 << NFMS_BIT);
> +             this->badblock_pattern = &smallpage_memorybased;

Why are you using the small-page badblock pattern with large pages?

> +     } else 
> +             host->pagesize_2k = 0;

If you use braces on one side of if/else, use them on the other.

> diff --git a/include/asm-arm/arch-imx/imx-nand.h 
> b/include/asm-arm/arch-imx/imx-nand.h
> index 5ebe0be..500bb1a 100644
> --- a/include/asm-arm/arch-imx/imx-nand.h
> +++ b/include/asm-arm/arch-imx/imx-nand.h
> @@ -8,6 +8,7 @@ void imx_nand_load_image(void *dest, int size, int pagesize, 
> int blocksize);
>  struct imx_nand_platform_data {
>       int width;
>       int hw_ecc;
> -};
> +     int is2k;
> +     };

That last brace should not be indented.

-Scott
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to