diff options
author | Tom Rini <trini@konsulko.com> | 2015-05-26 10:38:01 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-05-26 10:38:01 -0400 |
commit | 9bea236b3402a262772b66d055ec6431cbd3ba87 (patch) | |
tree | 8347dda9cb6ec9ad0d1bb15040257e01f8f31fc0 /common | |
parent | d43e15421014c17b90c3e288e3eff18ad8aaf346 (diff) | |
parent | 1022b85cb0e143b4f3a8e6c7d9258d516920d464 (diff) | |
download | u-boot-imx-9bea236b3402a262772b66d055ec6431cbd3ba87.zip u-boot-imx-9bea236b3402a262772b66d055ec6431cbd3ba87.tar.gz u-boot-imx-9bea236b3402a262772b66d055ec6431cbd3ba87.tar.bz2 |
Merge branch 'master' of git://www.denx.de/git/u-boot-imx
Diffstat (limited to 'common')
-rw-r--r-- | common/env_nand.c | 7 | ||||
-rw-r--r-- | common/spl/spl_mmc.c | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/common/env_nand.c b/common/env_nand.c index 9c9bb82..92e0e05 100644 --- a/common/env_nand.c +++ b/common/env_nand.c @@ -233,6 +233,12 @@ int saveenv(void) } #endif /* CMD_SAVEENV */ +#if defined(CONFIG_SPL_BUILD) +static int readenv(size_t offset, u_char *buf) +{ + return nand_spl_load_image(offset, CONFIG_ENV_SIZE, buf); +} +#else static int readenv(size_t offset, u_char *buf) { size_t end = offset + CONFIG_ENV_RANGE; @@ -266,6 +272,7 @@ static int readenv(size_t offset, u_char *buf) return 0; } +#endif /* #if defined(CONFIG_SPL_BUILD) */ #ifdef CONFIG_ENV_OFFSET_OOB int get_nand_env_oob(nand_info_t *nand, unsigned long *result) diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index 5d688d6..c96345e 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -76,7 +76,7 @@ static int mmc_load_image_raw_os(struct mmc *mmc) CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR, CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS, (void *)CONFIG_SYS_SPL_ARGS_ADDR); - if (err) { + if (err == 0) { #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT printf("spl: mmc block read error\n"); #endif |