From 6dd2709514d0f5d151529681efa3430adf09a513 Mon Sep 17 00:00:00 2001 From: Terry Lv Date: Mon, 29 Mar 2010 12:01:00 +0800 Subject: ENGR00119033: System can not find MMC/SD card in SD slot 1 System can not find MMC/SD card in SD slot 1 when booting from Uboot. Signed-off-by: Terry Lv --- common/env_mmc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'common') diff --git a/common/env_mmc.c b/common/env_mmc.c index 8c98ad2..79b5ed3 100644 --- a/common/env_mmc.c +++ b/common/env_mmc.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2008-2009 Freescale Semiconductor, Inc. + * (C) Copyright 2008-2010 Freescale Semiconductor, Inc. * (C) Copyright 2000-2006 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. @@ -112,12 +112,12 @@ inline int write_env(struct mmc *mmc, unsigned long size, int saveenv(void) { - struct mmc *mmc = find_mmc_device(0); + struct mmc *mmc = find_mmc_device(CONFIG_SYS_MMC_ENV_DEV); if (init_mmc_for_env(mmc)) return 1; - puts("Writing to MMC... "); + printf("Writing to MMC(%d)... ", CONFIG_SYS_MMC_ENV_DEV); if (write_env(mmc, CONFIG_ENV_SIZE, \ CONFIG_ENV_OFFSET, env_ptr)) { puts("failed\n"); @@ -147,7 +147,7 @@ inline int read_env(struct mmc *mmc, unsigned long size, void env_relocate_spec(void) { #if !defined(ENV_IS_EMBEDDED) - struct mmc *mmc = find_mmc_device(0); + struct mmc *mmc = find_mmc_device(CONFIG_SYS_MMC_ENV_DEV); if (init_mmc_for_env(mmc)) return; -- cgit v1.1