summaryrefslogtreecommitdiff
path: root/common/image.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/image.c')
-rw-r--r--common/image.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/common/image.c b/common/image.c
index 0b718119f..9e446faa7 100644
--- a/common/image.c
+++ b/common/image.c
@@ -132,6 +132,32 @@ int getenv_autostart (void)
return (s && (*s == 'n')) ? 0 : 1;
}
+ulong getenv_bootm_low(void)
+{
+ char *s = getenv ("bootm_low");
+ if (s) {
+ ulong tmp = simple_strtoul (s, NULL, 16);
+ return tmp;
+ }
+
+#ifdef CFG_SDRAM_BASE
+ return CFG_SDRAM_BASE;
+#else
+ return 0;
+#endif
+}
+
+ulong getenv_bootm_size(void)
+{
+ char *s = getenv ("bootm_size");
+ if (s) {
+ ulong tmp = simple_strtoul (s, NULL, 16);
+ return tmp;
+ }
+
+ return gd->bd->bi_memsize;
+}
+
void memmove_wd (void *to, void *from, size_t len, ulong chunksz)
{
#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)