From 5c8c8671b481cbd37fb8c07d3e3df609e62523b1 Mon Sep 17 00:00:00 2001 From: John Rigby Date: Mon, 29 Aug 2011 08:17:04 -0600 Subject: Allow loading of u-boot.bin for backward compatibility Signed-off-by: John Rigby --- arch/arm/cpu/armv7/omap-common/spl.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/arch/arm/cpu/armv7/omap-common/spl.c b/arch/arm/cpu/armv7/omap-common/spl.c index d1776522b..281f3cd8c 100644 --- a/arch/arm/cpu/armv7/omap-common/spl.c +++ b/arch/arm/cpu/armv7/omap-common/spl.c @@ -145,6 +145,7 @@ static void mmc_load_image_fat(struct mmc *mmc) { s32 err; struct image_header *header; + char *payloadname; header = (struct image_header *)(CONFIG_SYS_TEXT_BASE - sizeof(struct image_header)); @@ -156,14 +157,22 @@ static void mmc_load_image_fat(struct mmc *mmc) hang(); } - err = file_fat_read(CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME, + payloadname = CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME; + + err = file_fat_read(payloadname, (u8 *)header, sizeof(struct image_header)); - if (err <= 0) - goto end; + if (err <= 0) { + payloadname = "u-boot.bin"; + err = file_fat_read(payloadname, + (u8 *)header, sizeof(struct image_header)); + if (err <= 0) { + goto end; + } + } parse_image_header(header); - err = file_fat_read(CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME, + err = file_fat_read(payloadname, (u8 *)image_load_addr, 0); end: -- cgit v1.2.3