summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2005-10-06 01:50:50 +0200
committerWolfgang Denk <wd@pollux.denx.de>2005-10-06 01:50:50 +0200
commitbccae9039e59ac09a776429119389a6a4e679fd7 (patch)
tree9361bea6cc2bca3d22876433406886cfc1e359de
parent6ebc79211420cd856c9825cf3ade8bd6fd54fee5 (diff)
downloadu-boot-imx-bccae9039e59ac09a776429119389a6a4e679fd7.zip
u-boot-imx-bccae9039e59ac09a776429119389a6a4e679fd7.tar.gz
u-boot-imx-bccae9039e59ac09a776429119389a6a4e679fd7.tar.bz2
Fix booting from serial dataflash on AT91RM9200
Patch by Peter Menzebach, 29 Aug 2005
-rw-r--r--CHANGELOG3
-rw-r--r--common/cmd_bootm.c16
2 files changed, 12 insertions, 7 deletions
diff --git a/CHANGELOG b/CHANGELOG
index f558718..802f5d3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,9 @@
Changes for U-Boot 1.1.4:
======================================================================
+* Fix booting from serial dataflash on AT91RM9200
+ Patch by Peter Menzebach, 29 Aug 2005
+
* Add JFFS2 support for TRAB board
Patch by Martin Krause, 25 Aug 2005
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index c200fd8..ab6ccbb 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -204,19 +204,21 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
SHOW_BOOT_PROGRESS (3);
+#ifdef CONFIG_HAS_DATAFLASH
+ if (addr_dataflash(addr)){
+ len = ntohl(hdr->ih_size) + sizeof(image_header_t);
+ read_dataflash(addr, len, (char *)CFG_LOAD_ADDR);
+ addr = CFG_LOAD_ADDR;
+ }
+#endif
+
+
/* for multi-file images we need the data part, too */
print_image_hdr ((image_header_t *)addr);
data = addr + sizeof(image_header_t);
len = ntohl(hdr->ih_size);
-#ifdef CONFIG_HAS_DATAFLASH
- if (addr_dataflash(addr)){
- read_dataflash(data, len, (char *)CFG_LOAD_ADDR);
- data = CFG_LOAD_ADDR;
- }
-#endif
-
if (verify) {
puts (" Verifying Checksum ... ");
if (crc32 (0, (char *)data, len) != ntohl(hdr->ih_dcrc)) {