summaryrefslogtreecommitdiff
path: root/drivers/mmc/mmc_private.h
diff options
context:
space:
mode:
authorB, Ravi <ravibabu@ti.com>2016-09-28 14:46:18 +0530
committerTom Rini <trini@konsulko.com>2016-10-08 09:33:36 -0400
commitd2d9bdfcf9bdd6a39119c19c644189fccbe588cc (patch)
tree38578ed2cf0331eb7e8acfb017cc2e9aec62d4ab /drivers/mmc/mmc_private.h
parent6d1a718fdffc92e5d1622d6892384328f5f73d03 (diff)
spl: saveenv: adding saveenv support in SPL
By default saveenv option is not supported for SPL. This patch enable the support for save environment variable for SPL build. Enable save environment support in SPL after setenv. By default the saveenv option is not provided in SPL, but some boards need this support in 'Falcon' boot, where SPL need to boot from different images based on environment variable set by OS. For example OS may set "reboot_image" environment variable to "recovery" inorder to boot recovery image by SPL. The SPL read "reboot_image" and act accordingly and change the reboot_image to default mode using setenv and save the environemnt. Signed-off-by: Ravi Babu <ravibabu@ti.com> Reviewed-by: Simon Glass <sig@chromium.org> change in v1: - dropped SUPPORT, use CONFIG_SPL_SAVEENV - updates the comments in mmc_private.h
Diffstat (limited to 'drivers/mmc/mmc_private.h')
-rw-r--r--drivers/mmc/mmc_private.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mmc/mmc_private.h b/drivers/mmc/mmc_private.h
index 49ec022a9e..d8b399e364 100644
--- a/drivers/mmc/mmc_private.h
+++ b/drivers/mmc/mmc_private.h
@@ -28,8 +28,7 @@ ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt,
void *dst);
#endif
-#ifndef CONFIG_SPL_BUILD
-
+#if !(defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_SAVEENV))
unsigned long mmc_berase(struct blk_desc *block_dev, lbaint_t start,
lbaint_t blkcnt);
@@ -41,9 +40,9 @@ ulong mmc_bwrite(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt,
const void *src);
#endif
-#else /* CONFIG_SPL_BUILD */
+#else /* CONFIG_SPL_BUILD and CONFIG_SPL_SAVEENV is not defined */
-/* SPL will never write or erase, declare dummies to reduce code size. */
+/* declare dummies to reduce code size. */
#ifdef CONFIG_BLK
static inline unsigned long mmc_berase(struct udevice *dev,