summaryrefslogtreecommitdiff
path: root/common/bootm.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-04-24 09:04:23 -0400
committerTom Rini <trini@konsulko.com>2019-04-24 09:04:23 -0400
commit3fbd2dce351ab5d40d3244f26bd713caa4f826e2 (patch)
tree4a8e5c2fd2dee4abed674da4ce0312af06f97bc1 /common/bootm.c
parent8a94262435ca559a5e2dad79f2dc3c130e9047a8 (diff)
parent74a7e0018a97a0e7318c4c7a3b473fd9ebbb5ad1 (diff)
Merge branch '2019-04-22-master-imports'
- Add and enable brcmnand driver on a number of relevant platforms. Also add and enable LED drivers on more bcm platforms. - Various ARMv8 fixes/improvements, including extending PSCI functionality. - fs_loader improvments - Various FIT/SPL improvements - PCI bugfixes - Poplar platform ethernet support - MediaTek MMC improvements - Android boot improvements
Diffstat (limited to 'common/bootm.c')
-rw-r--r--common/bootm.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/common/bootm.c b/common/bootm.c
index 3adbceaa38..b5d37d38db 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -154,7 +154,7 @@ static int bootm_find_os(cmd_tbl_t *cmdtp, int flag, int argc,
#ifdef CONFIG_ANDROID_BOOT_IMAGE
case IMAGE_FORMAT_ANDROID:
images.os.type = IH_TYPE_KERNEL;
- images.os.comp = IH_COMP_NONE;
+ images.os.comp = android_image_get_kcomp(os_hdr);
images.os.os = IH_OS_LINUX;
images.os.end = android_image_get_end(os_hdr);
@@ -450,7 +450,6 @@ static int bootm_load_os(bootm_headers_t *images, int boot_progress)
ulong image_start = os.image_start;
ulong image_len = os.image_len;
ulong flush_start = ALIGN_DOWN(load, ARCH_DMA_MINALIGN);
- ulong flush_len;
bool no_overlap;
void *load_buf, *image_buf;
int err;
@@ -465,11 +464,7 @@ static int bootm_load_os(bootm_headers_t *images, int boot_progress)
return err;
}
- flush_len = load_end - load;
- if (flush_start < load)
- flush_len += load - flush_start;
-
- flush_cache(flush_start, ALIGN(flush_len, ARCH_DMA_MINALIGN));
+ flush_cache(flush_start, ALIGN(load_end, ARCH_DMA_MINALIGN) - flush_start);
debug(" kernel loaded at 0x%08lx, end = 0x%08lx\n", load, load_end);
bootstage_mark(BOOTSTAGE_ID_KERNEL_LOADED);