From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Mon, 07 Dec 2009 11:26:51 -0600 Subject: [U-Boot] Breakage on arm/next In-Reply-To: <8CE7BC89E9714BB78EAB55CFF51076AD@sisodomain.com> References: <4B152AAE.8090900@windriver.com> <20091201160555.GA4646@mail.gnudd.com> <4B169EE0.9060400@freescale.com> <8CE7BC89E9714BB78EAB55CFF51076AD@sisodomain.com> Message-ID: <4B1D3ADB.6000603@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de apgmoorthy wrote: > Hi Scott, > >> Are they going to be the same on all boards? We let the >> board determine the environment location for other types of storage. >> > OK > >> How about just using CONFIG_ENV_ADDR/CONFIG_ENV_SIZE? On >> boards that must dynamically support multiple possibilities, >> define it as an expression that returns the right thing. >> > > If the macros are not favoured to get consensus , let the code > use CONFIG_ENV_ADDR/CONFIG_ENV_SIZE and incase of Flex-OneNAND > increase it by one more fold. > > something Like > > Hunk 1: > env_addr = CONFIG_ENV_ADDR; > + if (FLEXONENAND(this)) > + env_addr <<= 1; > > Hunk 2: > + if (FLEXONENAND(this)) { > + env_addr <<= 1; > + instr.len <<= onenand_mtd.eraseregions[0].numblocks == 1 ? > + 2 : 1; > + } > > This should not break any other Board with OneNAND support. Please comment. > (Somehow I still feel Macros can be Cleaner way.) Why is the address automatically doubled on flex? I think this really needs to be something board-specified. -Scott