From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kim Phillips Date: Tue, 20 Jul 2010 17:00:26 -0500 Subject: [U-Boot] [PATCH 5/5] New implementation for internal handling of environment variables. In-Reply-To: <20100720214314.EA333153A7F@gemini.denx.de> References: <1279395948-25864-1-git-send-email-wd@denx.de> <1279395948-25864-6-git-send-email-wd@denx.de> <20100719193825.120ebf29.kim.phillips@freescale.com> <20100720094023.61DD111D94C@gemini.denx.de> <20100720133648.cbb95a9f.kim.phillips@freescale.com> <20100720190112.3F435153A7F@gemini.denx.de> <20100720200908.40958153780@gemini.denx.de> <20100720160808.b7ecf34c.kim.phillips@freescale.com> <20100720214314.EA333153A7F@gemini.denx.de> Message-ID: <20100720170026.fee7f593.kim.phillips@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 On Tue, 20 Jul 2010 23:43:14 +0200 Wolfgang Denk wrote: > Dear Kim, > > In message <20100720160808.b7ecf34c.kim.phillips@freescale.com> you wrote: > > > > > However, I cannot see any gentenv() use before relocation for your > > > board, so the problem there is still unclear. I think I need your > > > help to debug this... > > > > looks like arch/powerpc/cpu/mpc8xxx/ddr/options.c gets memory > > interleaving configuration from the environment, using getenv(). > > Ah! Can you please try the following patch - it's not intended to be a > fix, just to verify my hypothesis. Thanks in advance. indeed, your patch plus the following makes the 8572 boot properly again. diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/options.c b/arch/powerpc/cpu/mpc8xxx/ddr/options.c index 0b9cb1d..692669f 100644 --- a/arch/powerpc/cpu/mpc8xxx/ddr/options.c +++ b/arch/powerpc/cpu/mpc8xxx/ddr/options.c @@ -252,8 +252,7 @@ unsigned int populate_memctl_options(int all_DIMMs_registered, #endif i = getenv_r("ba_intlv_ctl", tmp, sizeof (tmp)); - if (i > 0) && (CONFIG_CHIP_SELECTS_PER_CTRL > 1)) { - (CONFIG_CHIP_SELECTS_PER_CTRL > 1)) { + if ((i > 0) && (CONFIG_CHIP_SELECTS_PER_CTRL > 1)) { if (strcmp(tmp, "cs0_cs1") == 0) popts->ba_intlv_ctl = FSL_DDR_CS0_CS1; else if (strcmp(tmp, "cs2_cs3") == 0) Kim