aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Rigby <john.rigby@linaro.org>2011-08-29 08:17:04 -0600
committerJohn Rigby <john.rigby@linaro.org>2011-09-28 19:34:43 -0600
commit5c8c8671b481cbd37fb8c07d3e3df609e62523b1 (patch)
treeed8956dd41e504bbc3184605dd0318c6fb0ab237
parent7da712c61fbdeb0fdd1b1c8c3f9005128c004378 (diff)
downloadu-boot-linaro-5c8c8671b481cbd37fb8c07d3e3df609e62523b1.tar.gz
Allow loading of u-boot.bin for backward compatibility
Signed-off-by: John Rigby <john.rigby@linaro.org>
-rw-r--r--arch/arm/cpu/armv7/omap-common/spl.c17
1 files 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 d177652..281f3cd 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: