From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Grinberg Date: Wed, 30 Jul 2014 09:15:23 +0300 Subject: [U-Boot] [PATCH 1/1] env_mmc: support env partition setup in runtime In-Reply-To: <53D7DD77.8080305@myspectrum.nl> References: <1406627169-21616-1-git-send-email-lifshitz@compulab.co.il> <53D7DD77.8080305@myspectrum.nl> Message-ID: <53D88D7B.2080902@compulab.co.il> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Jeroen, On 07/29/14 20:44, Jeroen Hofstee wrote: > Hello Dmitry, > > On 29-07-14 11:46, Dmitry Lifshitz wrote: >> Add callback with __weak annotation to allow setup of environment >> partition number in runtime from a board file. >> >> Propagate mmc_switch_part() return value into init_mmc_for_env() instead >> of -1 in case of failure. >> >> Signed-off-by: Dmitry Lifshitz >> Signed-off-by: Igor Grinberg >> --- >> common/env_mmc.c | 35 +++++++++++++++++++++++------------ >> 1 files changed, 23 insertions(+), 12 deletions(-) >> >> diff --git a/common/env_mmc.c b/common/env_mmc.c >> index 7da10e6..a7621a8 100644 >> --- a/common/env_mmc.c >> +++ b/common/env_mmc.c >> @@ -62,16 +62,36 @@ int env_init(void) >> return 0; >> } >> -static int init_mmc_for_env(struct mmc *mmc) >> -{ >> #ifdef CONFIG_SYS_MMC_ENV_PART >> +__weak uint mmc_get_env_part(struct mmc *mmc) >> +{ >> + return CONFIG_SYS_MMC_ENV_PART; >> +} >> + > > mmc_get_env_part lacks a prototype and there seems to be no > "strong version" / user of this code. Thanks for finding this one. Indeed we forgot to add a prototype - will fix that shortly. As to the strong version - it is already upstream: 1c8c36f (cm-t54: add environment partition runtime detection) -- Regards, Igor.