From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Tue, 04 Jun 2013 17:30:06 -0600 Subject: [U-Boot] [PATCH v2] mmc: Update "mmc->part_num" when performing a partition switch In-Reply-To: References: <1370373446-14025-1-git-send-email-fabio.estevam@freescale.com> <51AE3E2F.9020408@wwwdotorg.org> <51AE41BF.8060206@wwwdotorg.org> <51AE6653.7060807@wwwdotorg.org> Message-ID: <51AE787E.8050604@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 06/04/2013 05:09 PM, Fabio Estevam wrote: > On Tue, Jun 4, 2013 at 7:12 PM, Stephen Warren wrote: > >> In env_mmc.c, you'll want something like: > > Thanks for the patch, but when I add these changes on top of my patch > it results in the original error: Of course; with that patch applied, there is no effective difference in the code - you've just cleaned it up to have the MMC core manage mmc->part_num, rather than requiring all callers to update it themselves. > U-Boot > save > Saving Environment to MMC... > Writing to MMC(1)... done > U-Boot > save > Saving Environment to MMC... > MMC partition switch failed > U-Boot > I have no idea why that happens. You'll simply have to debug the code. Do you have CONFIG_SYS_MMC_ENV_PART set? I wasn't aware anyone else used it, besides Tegra.