aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/lib/bootm.c
diff options
context:
space:
mode:
authorJeffy Chen2016-01-14 10:19:36 +0800
committerSimon Glass2016-01-21 20:03:59 -0700
commitf7ee071a22df69e919c9829bbd800cb5e9c1703c (patch)
tree73706e9a8832ae0e4d0d9ec188b0148e33d12ef5 /arch/arm/lib/bootm.c
parente70cc438311c753edc1f19214ffc090061e60880 (diff)
ARM: bootm: Try to use relocated ramdisk
After boot_ramdisk_high(), ramdisk would be relocated to initrd_start & initrd_end, so use them instead of rd_start & rd_end. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm/lib/bootm.c')
-rw-r--r--arch/arm/lib/bootm.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index a477cae010d..0838d89907b 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -225,7 +225,17 @@ static void boot_prep_linux(bootm_headers_t *images)
if (BOOTM_ENABLE_MEMORY_TAGS)
setup_memory_tags(gd->bd);
if (BOOTM_ENABLE_INITRD_TAG) {
- if (images->rd_start && images->rd_end) {
+ /*
+ * In boot_ramdisk_high(), it may relocate ramdisk to
+ * a specified location. And set images->initrd_start &
+ * images->initrd_end to relocated ramdisk's start/end
+ * addresses. So use them instead of images->rd_start &
+ * images->rd_end when possible.
+ */
+ if (images->initrd_start && images->initrd_end) {
+ setup_initrd_tag(gd->bd, images->initrd_start,
+ images->initrd_end);
+ } else if (images->rd_start && images->rd_end) {
setup_initrd_tag(gd->bd, images->rd_start,
images->rd_end);
}