[U-Boot] [PATCH v2 2/2] env_mmc: default to 0 if CONFIG_SYS_MMC_ENV_DEV not defined
Since function mmc_get_env_devno is __weak and can be overridden by board code, boards do not need to mandatory define CONFIG_SYS_MMC_ENV_DEV. If the constant is not defined, define it to 0 by default. Signed-off-by: Hector Palacios hector.palac...@digi.com --- Notes: Changes since v1: - Use default define if not set common/env_mmc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/common/env_mmc.c b/common/env_mmc.c index 570caf63aeae..c9df4c49e2b8 100644 --- a/common/env_mmc.c +++ b/common/env_mmc.c @@ -61,9 +61,14 @@ __weak int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr) return 0; } +#if !defined(CONFIG_SYS_MMC_ENV_DEV) +#define CONFIG_SYS_MMC_ENV_DEV 0 +#endif + __weak int mmc_get_env_devno(void) { return CONFIG_SYS_MMC_ENV_DEV; +} #if !defined(CONFIG_SYS_MMC_ENV_PART) #define CONFIG_SYS_MMC_ENV_PART 0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] env_mmc: default to 0 if CONFIG_SYS_MMC_ENV_DEV not defined
Hello Hector, On Fri, Jan 17, 2014 at 7:14 AM, Hector Palacios hector.palac...@digi.comwrote: Since function mmc_get_env_devno is __weak and can be overridden by board code, boards do not need to mandatory define CONFIG_SYS_MMC_ENV_DEV. If the constant is not defined, define it to 0 by default. Signed-off-by: Hector Palacios hector.palac...@digi.com --- Notes: Changes since v1: - Use default define if not set common/env_mmc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/common/env_mmc.c b/common/env_mmc.c index 570caf63aeae..c9df4c49e2b8 100644 --- a/common/env_mmc.c +++ b/common/env_mmc.c @@ -61,9 +61,14 @@ __weak int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr) return 0; } +#if !defined(CONFIG_SYS_MMC_ENV_DEV) +#define CONFIG_SYS_MMC_ENV_DEV 0 +#endif + Please move this to include/config_fallbacks.h __weak int mmc_get_env_devno(void) { return CONFIG_SYS_MMC_ENV_DEV; +} #if !defined(CONFIG_SYS_MMC_ENV_PART) #define CONFIG_SYS_MMC_ENV_PART 0 -- Otavio Salvador O.S. Systems http://www.ossystems.com.brhttp://code.ossystems.com.br Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] env_mmc: default to 0 if CONFIG_SYS_MMC_ENV_DEV not defined
On 01/17/2014 02:14 AM, Hector Palacios wrote: Since function mmc_get_env_devno is __weak and can be overridden by board code, boards do not need to mandatory define CONFIG_SYS_MMC_ENV_DEV. If the constant is not defined, define it to 0 by default. diff --git a/common/env_mmc.c b/common/env_mmc.c +#if !defined(CONFIG_SYS_MMC_ENV_DEV) +#define CONFIG_SYS_MMC_ENV_DEV 0 +#endif + __weak int mmc_get_env_devno(void) { return CONFIG_SYS_MMC_ENV_DEV; +} Oh, I guess your fixup got squashed into the wrong patch? Aside from that issue, and those Otavio raised, the series, Reviewed-by: Stephen Warren swar...@nvidia.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot