summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRick Altherr <raltherr@google.com>2017-01-18 17:12:24 -0800
committerTom Rini <trini@konsulko.com>2017-01-20 09:15:20 -0500
commitc2e7e72bb9f0cb47d024997b381cb64786eb5402 (patch)
tree78f8f4eadcd1a11e294291178263b01f2de66066 /include
parent17fa032671f7981628fe16b30399638842a4b1bb (diff)
downloadu-boot-imx-c2e7e72bb9f0cb47d024997b381cb64786eb5402.zip
u-boot-imx-c2e7e72bb9f0cb47d024997b381cb64786eb5402.tar.gz
u-boot-imx-c2e7e72bb9f0cb47d024997b381cb64786eb5402.tar.bz2
bootm: relocate ramdisk if CONFIG_SYS_BOOT_RAMDISK_HIGH set
In 35fc84f, bootm was refactored so plain 'bootm' and 'bootm <subcommand>' shared a common implementation. The 'bootm ramdisk' command implementation is now part of the common implementation but not invoke by plain 'bootm' since the original implementation never did ramdisk relocation. Instead, ramdisk relocation happened in image_setup_linux() which is typically called during the OS portion of 'bootm'. On ARM, parameters to the Linux kernel can either be passed by FDT or ATAGS. When using FDT, image_setup_linux() is called which also triggers ramdisk relocation. When using ATAGS, image_setup_linux() is _not_ called because it mostly does FDT setup. Instead of calling image_setup_linux() in both FDT and ATAGS cases, include BOOTM_STATE_RAMDISK in the requested states during a plain 'bootm' if CONFIG_SYS_BOOT_RAMDISK_HIGH is set and remove the ramdisk relocation from image_setup_linux(). This causes ramdisk relocation to happen on any system where CONFIG_SYS_BOOT_RAMDISK_HIGH regardless of the OS being booted. Also remove IMAGE_ENABLE_RAMDISK_HIGH as it was only used by the now-removed code from image_setup_linux(). Signed-off-by: Rick Altherr <raltherr@google.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'include')
-rw-r--r--include/image.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/include/image.h b/include/image.h
index 164b584..1e686b7 100644
--- a/include/image.h
+++ b/include/image.h
@@ -99,12 +99,6 @@ struct lmb;
#endif /* IMAGE_ENABLE_FIT */
-#ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH
-# define IMAGE_ENABLE_RAMDISK_HIGH 1
-#else
-# define IMAGE_ENABLE_RAMDISK_HIGH 0
-#endif
-
#ifdef CONFIG_SYS_BOOT_GET_CMDLINE
# define IMAGE_BOOT_GET_CMDLINE 1
#else