[U-Boot] Breakage on arm/next

apgmoorthy moorthy.apg at samsung.com
Wed Dec 2 13:13:59 CET 2009


 
Hi,

> -----Original Message-----
> From: rubini at gnudd.com [mailto:rubini at gnudd.com] On Behalf Of 
> Alessandro Rubini
> Sent: Tuesday, December 01, 2009 9:36 PM
> To: Tom.Rix at windriver.com
> Cc: moorthy.apg at samsung.com; scottwood at freescale.com; 
> u-boot at lists.denx.de; kyungmin.park at samsung.com
> Subject: Re: [U-Boot] Breakage on arm/next
> 
> > Could the macros defined in apollo.h also be defined in the other 
> > target board's config file ?
> 
> I don't think so (my board is one of the affected ones).
> 
> The macros are CONFIG_ENV_ADDR_FLEX and CONFIG_ENV_SIZE_FLEX 
> . I just don't have the flex device.
   
I get u.
       
> 
> In the commit that introduced the problem, I see  code like this:
> 
> 
>            env_addr = CONFIG_ENV_ADDR;
>    +       if (FLEXONENAND(this))
>    +               env_addr = CONFIG_ENV_ADDR_FLEX;
> 
> So why should CONFIG_ENV_ADDR_FLEX have a different name from 
> CONFIG_ENV_ADDR ?
> Same applies to CONFIG_ENV_SIZE_FLEX.
> 
Erasesizes differ in Flex-OneNAND from OneNAND.
So Default Macros cannot be used.

> I think c758e947aa7d39a2be607ecdedd818ad300807b2 should be 
> reverted and done differently. If I got my reasoning right, 
> the first hunk should go and the next one:
> 
>         instr.len = CONFIG_ENV_SIZE;
> +       if (FLEXONENAND(this)) {
> +               env_addr = CONFIG_ENV_ADDR_FLEX;
> +               instr.len = CONFIG_ENV_SIZE_FLEX;
> +               instr.len <<= 
> onenand_mtd.eraseregions[0].numblocks == 1 ?
> +                               1 : 0;
> +       }
> 
> 
> Shoul just become
> 
> +       if (FLEXONENAND(this))
> +               instr.len <<= 
> onenand_mtd.eraseregions[0].numblocks == 1 
> + ? 1 : 0;
> 
> This has no adverse effect on other boards and handles the 
> flex specifics, withouth adding two unneeded macros.
> 

The Erase Sizes of Flex-OneNAND are 256K for SLC and 512K for MLC regions.
And always 0th Block belongs to SLC region whereas, 1st Block can be of SLC or
MLC region in a Die.
So without these Macros Flex-OneNAND specifics cannot be handled.

I felt moving these macros "include/linux/mtd/onenand.h" will be ideal in this
scenario.

With Regards
 Moorthy



More information about the U-Boot mailing list