[U-Boot] Breakage on arm/next
Alessandro Rubini
rubini-list at gnudd.com
Tue Dec 1 17:05:55 CET 2009
> 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.
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.
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.
/alessandro
More information about the U-Boot
mailing list