summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-05-26 10:38:01 -0400
committerTom Rini <trini@konsulko.com>2015-05-26 10:38:01 -0400
commit9bea236b3402a262772b66d055ec6431cbd3ba87 (patch)
tree8347dda9cb6ec9ad0d1bb15040257e01f8f31fc0 /common
parentd43e15421014c17b90c3e288e3eff18ad8aaf346 (diff)
parent1022b85cb0e143b4f3a8e6c7d9258d516920d464 (diff)
downloadtalos-obmc-uboot-9bea236b3402a262772b66d055ec6431cbd3ba87.tar.gz
talos-obmc-uboot-9bea236b3402a262772b66d055ec6431cbd3ba87.zip
Merge branch 'master' of git://www.denx.de/git/u-boot-imx
Diffstat (limited to 'common')
-rw-r--r--common/env_nand.c7
-rw-r--r--common/spl/spl_mmc.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/common/env_nand.c b/common/env_nand.c
index 9c9bb82c0f..92e0e053df 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 5d688d6f0f..c96345eff2 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
OpenPOWER on IntegriCloud