From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alessandro Rubini Date: Tue, 1 Dec 2009 17:05:55 +0100 Subject: [U-Boot] Breakage on arm/next In-Reply-To: <4B152AAE.8090900@windriver.com> References: <4B152AAE.8090900@windriver.com> Message-ID: <20091201160555.GA4646@mail.gnudd.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > 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