aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorEdgar E. Iglesias <edgar.iglesias@gmail.com>2010-07-31 00:50:17 +0200
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>2010-07-31 00:50:17 +0200
commit872a91b49f4d6220fd0ca5f8084b24e621139c7a (patch)
tree496f63e9587fd4b94ad7cbc29e147cf2ac021283 /hw
parent811976dcd36e87adab53bb3eb0efb0fe8a4f41ba (diff)
xilinx-s3adsp: Add support for loading u-boot images.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/petalogix_s3adsp1800_mmu.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/hw/petalogix_s3adsp1800_mmu.c b/hw/petalogix_s3adsp1800_mmu.c
index cd043d3713..fcbb825d71 100644
--- a/hw/petalogix_s3adsp1800_mmu.c
+++ b/hw/petalogix_s3adsp1800_mmu.c
@@ -179,8 +179,18 @@ petalogix_s3adsp1800_init(ram_addr_t ram_size,
}
/* Always boot into physical ram. */
boot_info.bootstrap_pc = ddr_base + (entry & 0x0fffffff);
+
+ /* If it wasn't an ELF image, try an u-boot image. */
+ if (kernel_size < 0) {
+ target_phys_addr_t uentry, loadaddr;
+
+ kernel_size = load_uimage(kernel_filename, &uentry, &loadaddr, 0);
+ boot_info.bootstrap_pc = uentry;
+ high = (loadaddr + kernel_size + 3) & ~3;
+ }
+
+ /* Not an ELF image nor an u-boot image, try a RAW image. */
if (kernel_size < 0) {
- /* If we failed loading ELF's try a raw image. */
kernel_size = load_image_targphys(kernel_filename, ddr_base,
ram_size);
boot_info.bootstrap_pc = ddr_base;