make show_boot_progress () weak.

Signed-off-by: Heiko Schocher <hs@denx.de>
master
Heiko Schocher 17 years ago
parent 9079024723
commit fad6340715
  1. 69
      common/cmd_bootm.c
  2. 33
      common/cmd_doc.c
  3. 49
      common/cmd_ide.c
  4. 66
      common/cmd_nand.c
  5. 28
      common/cmd_net.c
  6. 9
      common/env_common.c
  7. 6
      common/main.c
  8. 7
      drivers/nand_legacy/nand_legacy.c
  9. 8
      include/common.h
  10. 27
      lib_arm/armlinux.c
  11. 27
      lib_avr32/avr32_linux.c
  12. 7
      lib_blackfin/bf533_linux.c
  13. 8
      lib_blackfin/post.c
  14. 27
      lib_m68k/m68k_linux.c
  15. 27
      lib_microblaze/microblaze_linux.c
  16. 27
      lib_mips/mips_linux.c
  17. 2
      lib_ppc/board.c
  18. 14
      net/eth.c
  19. 8
      post/post.c

@ -56,13 +56,6 @@ DECLARE_GLOBAL_DATA_PTR;
#include <hush.h> #include <hush.h>
#endif #endif
#ifdef CONFIG_SHOW_BOOT_PROGRESS
# include <status_led.h>
# define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg)
#else
# define SHOW_BOOT_PROGRESS(arg)
#endif
#ifdef CFG_INIT_RAM_LOCK #ifdef CFG_INIT_RAM_LOCK
#include <asm/cache.h> #include <asm/cache.h>
#endif #endif
@ -176,7 +169,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
addr = simple_strtoul(argv[1], NULL, 16); addr = simple_strtoul(argv[1], NULL, 16);
} }
SHOW_BOOT_PROGRESS (1); show_boot_progress (1);
printf ("## Booting image at %08lx ...\n", addr); printf ("## Booting image at %08lx ...\n", addr);
/* Copy header so we can blank CRC field for re-calculation */ /* Copy header so we can blank CRC field for re-calculation */
@ -200,11 +193,11 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#endif /* __I386__ */ #endif /* __I386__ */
{ {
puts ("Bad Magic Number\n"); puts ("Bad Magic Number\n");
SHOW_BOOT_PROGRESS (-1); show_boot_progress (-1);
return 1; return 1;
} }
} }
SHOW_BOOT_PROGRESS (2); show_boot_progress (2);
data = (ulong)&header; data = (ulong)&header;
len = sizeof(image_header_t); len = sizeof(image_header_t);
@ -214,10 +207,10 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (crc32 (0, (uchar *)data, len) != checksum) { if (crc32 (0, (uchar *)data, len) != checksum) {
puts ("Bad Header Checksum\n"); puts ("Bad Header Checksum\n");
SHOW_BOOT_PROGRESS (-2); show_boot_progress (-2);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (3); show_boot_progress (3);
#ifdef CONFIG_HAS_DATAFLASH #ifdef CONFIG_HAS_DATAFLASH
if (addr_dataflash(addr)){ if (addr_dataflash(addr)){
@ -238,12 +231,12 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
puts (" Verifying Checksum ... "); puts (" Verifying Checksum ... ");
if (crc32 (0, (uchar *)data, len) != ntohl(hdr->ih_dcrc)) { if (crc32 (0, (uchar *)data, len) != ntohl(hdr->ih_dcrc)) {
printf ("Bad Data CRC\n"); printf ("Bad Data CRC\n");
SHOW_BOOT_PROGRESS (-3); show_boot_progress (-3);
return 1; return 1;
} }
puts ("OK\n"); puts ("OK\n");
} }
SHOW_BOOT_PROGRESS (4); show_boot_progress (4);
len_ptr = (ulong *)data; len_ptr = (ulong *)data;
@ -272,10 +265,10 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#endif #endif
{ {
printf ("Unsupported Architecture 0x%x\n", hdr->ih_arch); printf ("Unsupported Architecture 0x%x\n", hdr->ih_arch);
SHOW_BOOT_PROGRESS (-4); show_boot_progress (-4);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (5); show_boot_progress (5);
switch (hdr->ih_type) { switch (hdr->ih_type) {
case IH_TYPE_STANDALONE: case IH_TYPE_STANDALONE:
@ -297,10 +290,10 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
data += 4; data += 4;
break; break;
default: printf ("Wrong Image Type for %s command\n", cmdtp->name); default: printf ("Wrong Image Type for %s command\n", cmdtp->name);
SHOW_BOOT_PROGRESS (-5); show_boot_progress (-5);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (6); show_boot_progress (6);
/* /*
* We have reached the point of no return: we are going to * We have reached the point of no return: we are going to
@ -351,7 +344,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (gunzip ((void *)ntohl(hdr->ih_load), unc_len, if (gunzip ((void *)ntohl(hdr->ih_load), unc_len,
(uchar *)data, &len) != 0) { (uchar *)data, &len) != 0) {
puts ("GUNZIP ERROR - must RESET board to recover\n"); puts ("GUNZIP ERROR - must RESET board to recover\n");
SHOW_BOOT_PROGRESS (-6); show_boot_progress (-6);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
break; break;
@ -368,7 +361,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
CFG_MALLOC_LEN < (4096 * 1024), 0); CFG_MALLOC_LEN < (4096 * 1024), 0);
if (i != BZ_OK) { if (i != BZ_OK) {
printf ("BUNZIP2 ERROR %d - must RESET board to recover\n", i); printf ("BUNZIP2 ERROR %d - must RESET board to recover\n", i);
SHOW_BOOT_PROGRESS (-6); show_boot_progress (-6);
udelay(100000); udelay(100000);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
@ -378,11 +371,11 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (iflag) if (iflag)
enable_interrupts(); enable_interrupts();
printf ("Unimplemented compression type %d\n", hdr->ih_comp); printf ("Unimplemented compression type %d\n", hdr->ih_comp);
SHOW_BOOT_PROGRESS (-7); show_boot_progress (-7);
return 1; return 1;
} }
puts ("OK\n"); puts ("OK\n");
SHOW_BOOT_PROGRESS (7); show_boot_progress (7);
switch (hdr->ih_type) { switch (hdr->ih_type) {
case IH_TYPE_STANDALONE: case IH_TYPE_STANDALONE:
@ -409,10 +402,10 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (iflag) if (iflag)
enable_interrupts(); enable_interrupts();
printf ("Can't boot image type %d\n", hdr->ih_type); printf ("Can't boot image type %d\n", hdr->ih_type);
SHOW_BOOT_PROGRESS (-8); show_boot_progress (-8);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (8); show_boot_progress (8);
switch (hdr->ih_os) { switch (hdr->ih_os) {
default: /* handled by (original) Linux case */ default: /* handled by (original) Linux case */
@ -458,7 +451,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#endif #endif
} }
SHOW_BOOT_PROGRESS (-9); show_boot_progress (-9);
#ifdef DEBUG #ifdef DEBUG
puts ("\n## Control returned to monitor - resetting...\n"); puts ("\n## Control returned to monitor - resetting...\n");
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
@ -637,7 +630,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
#endif #endif
if (argc >= 3) { if (argc >= 3) {
debug ("Not skipping initrd\n"); debug ("Not skipping initrd\n");
SHOW_BOOT_PROGRESS (9); show_boot_progress (9);
addr = simple_strtoul(argv[2], NULL, 16); addr = simple_strtoul(argv[2], NULL, 16);
@ -648,7 +641,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
if (ntohl(hdr->ih_magic) != IH_MAGIC) { if (ntohl(hdr->ih_magic) != IH_MAGIC) {
puts ("Bad Magic Number\n"); puts ("Bad Magic Number\n");
SHOW_BOOT_PROGRESS (-10); show_boot_progress (-10);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
@ -660,11 +653,11 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
if (crc32 (0, (uchar *)data, len) != checksum) { if (crc32 (0, (uchar *)data, len) != checksum) {
puts ("Bad Header Checksum\n"); puts ("Bad Header Checksum\n");
SHOW_BOOT_PROGRESS (-11); show_boot_progress (-11);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
SHOW_BOOT_PROGRESS (10); show_boot_progress (10);
print_image_hdr (hdr); print_image_hdr (hdr);
@ -697,19 +690,19 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
if (csum != ntohl(hdr->ih_dcrc)) { if (csum != ntohl(hdr->ih_dcrc)) {
puts ("Bad Data CRC\n"); puts ("Bad Data CRC\n");
SHOW_BOOT_PROGRESS (-12); show_boot_progress (-12);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
puts ("OK\n"); puts ("OK\n");
} }
SHOW_BOOT_PROGRESS (11); show_boot_progress (11);
if ((hdr->ih_os != IH_OS_LINUX) || if ((hdr->ih_os != IH_OS_LINUX) ||
(hdr->ih_arch != IH_CPU_PPC) || (hdr->ih_arch != IH_CPU_PPC) ||
(hdr->ih_type != IH_TYPE_RAMDISK) ) { (hdr->ih_type != IH_TYPE_RAMDISK) ) {
puts ("No Linux PPC Ramdisk Image\n"); puts ("No Linux PPC Ramdisk Image\n");
SHOW_BOOT_PROGRESS (-13); show_boot_progress (-13);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
@ -720,7 +713,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
u_long tail = ntohl(len_ptr[0]) % 4; u_long tail = ntohl(len_ptr[0]) % 4;
int i; int i;
SHOW_BOOT_PROGRESS (13); show_boot_progress (13);
/* skip kernel length and terminator */ /* skip kernel length and terminator */
data = (ulong)(&len_ptr[2]); data = (ulong)(&len_ptr[2]);
@ -739,7 +732,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
/* /*
* no initrd image * no initrd image
*/ */
SHOW_BOOT_PROGRESS (14); show_boot_progress (14);
len = data = 0; len = data = 0;
} }
@ -890,7 +883,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
initrd_start = nsp; initrd_start = nsp;
} }
SHOW_BOOT_PROGRESS (12); show_boot_progress (12);
debug ("## initrd at 0x%08lX ... 0x%08lX (len=%ld=0x%lX)\n", debug ("## initrd at 0x%08lX ... 0x%08lX (len=%ld=0x%lX)\n",
data, data + len - 1, len, len); data, data + len - 1, len, len);
@ -926,7 +919,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
debug ("## Transferring control to Linux (at address %08lx) ...\n", debug ("## Transferring control to Linux (at address %08lx) ...\n",
(ulong)kernel); (ulong)kernel);
SHOW_BOOT_PROGRESS (15); show_boot_progress (15);
#if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500) #if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500)
unlock_ram_in_cache(); unlock_ram_in_cache();
@ -1115,7 +1108,7 @@ do_bootm_netbsd (cmd_tbl_t *cmdtp, int flag,
printf ("## Transferring control to NetBSD stage-2 loader (at address %08lx) ...\n", printf ("## Transferring control to NetBSD stage-2 loader (at address %08lx) ...\n",
(ulong)loader); (ulong)loader);
SHOW_BOOT_PROGRESS (15); show_boot_progress (15);
/* /*
* NetBSD Stage-2 Loader Parameters: * NetBSD Stage-2 Loader Parameters:
@ -1578,7 +1571,7 @@ do_bootm_rtems (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
printf ("## Transferring control to RTEMS (at address %08lx) ...\n", printf ("## Transferring control to RTEMS (at address %08lx) ...\n",
(ulong)entry_point); (ulong)entry_point);
SHOW_BOOT_PROGRESS (15); show_boot_progress (15);
/* /*
* RTEMS Parameters: * RTEMS Parameters:

@ -12,13 +12,6 @@
#include <malloc.h> #include <malloc.h>
#include <asm/io.h> #include <asm/io.h>
#ifdef CONFIG_SHOW_BOOT_PROGRESS
# include <status_led.h>
# define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg)
#else
# define SHOW_BOOT_PROGRESS(arg)
#endif
#if (CONFIG_COMMANDS & CFG_CMD_DOC) #if (CONFIG_COMMANDS & CFG_CMD_DOC)
#include <linux/mtd/nftl.h> #include <linux/mtd/nftl.h>
@ -216,7 +209,7 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
image_header_t *hdr; image_header_t *hdr;
int rcode = 0; int rcode = 0;
SHOW_BOOT_PROGRESS (34); show_boot_progress (34);
switch (argc) { switch (argc) {
case 1: case 1:
addr = CFG_LOAD_ADDR; addr = CFG_LOAD_ADDR;
@ -237,27 +230,27 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
break; break;
default: default:
printf ("Usage:\n%s\n", cmdtp->usage); printf ("Usage:\n%s\n", cmdtp->usage);
SHOW_BOOT_PROGRESS (-35); show_boot_progress (-35);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (35); show_boot_progress (35);
if (!boot_device) { if (!boot_device) {
puts ("\n** No boot device **\n"); puts ("\n** No boot device **\n");
SHOW_BOOT_PROGRESS (-36); show_boot_progress (-36);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (36); show_boot_progress (36);
dev = simple_strtoul(boot_device, &ep, 16); dev = simple_strtoul(boot_device, &ep, 16);
if ((dev >= CFG_MAX_DOC_DEVICE) || if ((dev >= CFG_MAX_DOC_DEVICE) ||
(doc_dev_desc[dev].ChipID == DOC_ChipID_UNKNOWN)) { (doc_dev_desc[dev].ChipID == DOC_ChipID_UNKNOWN)) {
printf ("\n** Device %d not available\n", dev); printf ("\n** Device %d not available\n", dev);
SHOW_BOOT_PROGRESS (-37); show_boot_progress (-37);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (37); show_boot_progress (37);
printf ("\nLoading from device %d: %s at 0x%lX (offset 0x%lX)\n", printf ("\nLoading from device %d: %s at 0x%lX (offset 0x%lX)\n",
dev, doc_dev_desc[dev].name, doc_dev_desc[dev].physadr, dev, doc_dev_desc[dev].name, doc_dev_desc[dev].physadr,
@ -266,10 +259,10 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (doc_rw (doc_dev_desc + dev, 1, offset, if (doc_rw (doc_dev_desc + dev, 1, offset,
SECTORSIZE, NULL, (u_char *)addr)) { SECTORSIZE, NULL, (u_char *)addr)) {
printf ("** Read error on %d\n", dev); printf ("** Read error on %d\n", dev);
SHOW_BOOT_PROGRESS (-38); show_boot_progress (-38);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (38); show_boot_progress (38);
hdr = (image_header_t *)addr; hdr = (image_header_t *)addr;
@ -281,18 +274,18 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
cnt -= SECTORSIZE; cnt -= SECTORSIZE;
} else { } else {
puts ("\n** Bad Magic Number **\n"); puts ("\n** Bad Magic Number **\n");
SHOW_BOOT_PROGRESS (-39); show_boot_progress (-39);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (39); show_boot_progress (39);
if (doc_rw (doc_dev_desc + dev, 1, offset + SECTORSIZE, cnt, if (doc_rw (doc_dev_desc + dev, 1, offset + SECTORSIZE, cnt,
NULL, (u_char *)(addr+SECTORSIZE))) { NULL, (u_char *)(addr+SECTORSIZE))) {
printf ("** Read error on %d\n", dev); printf ("** Read error on %d\n", dev);
SHOW_BOOT_PROGRESS (-40); show_boot_progress (-40);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (40); show_boot_progress (40);
/* Loading ok, update default load address */ /* Loading ok, update default load address */

@ -59,13 +59,6 @@ unsigned long mips_io_port_base = 0;
#endif #endif
#endif #endif
#ifdef CONFIG_SHOW_BOOT_PROGRESS
# include <status_led.h>
# define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg)
#else
# define SHOW_BOOT_PROGRESS(arg)
#endif
#ifdef CONFIG_IDE_8xx_DIRECT #ifdef CONFIG_IDE_8xx_DIRECT
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
#endif #endif
@ -385,7 +378,7 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
image_header_t *hdr; image_header_t *hdr;
int rcode = 0; int rcode = 0;
SHOW_BOOT_PROGRESS (41); show_boot_progress (41);
switch (argc) { switch (argc) {
case 1: case 1:
addr = CFG_LOAD_ADDR; addr = CFG_LOAD_ADDR;
@ -401,50 +394,50 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
break; break;
default: default:
printf ("Usage:\n%s\n", cmdtp->usage); printf ("Usage:\n%s\n", cmdtp->usage);
SHOW_BOOT_PROGRESS (-42); show_boot_progress (-42);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (42); show_boot_progress (42);
if (!boot_device) { if (!boot_device) {
puts ("\n** No boot device **\n"); puts ("\n** No boot device **\n");
SHOW_BOOT_PROGRESS (-43); show_boot_progress (-43);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (43); show_boot_progress (43);
dev = simple_strtoul(boot_device, &ep, 16); dev = simple_strtoul(boot_device, &ep, 16);
if (ide_dev_desc[dev].type==DEV_TYPE_UNKNOWN) { if (ide_dev_desc[dev].type==DEV_TYPE_UNKNOWN) {
printf ("\n** Device %d not available\n", dev); printf ("\n** Device %d not available\n", dev);
SHOW_BOOT_PROGRESS (-44); show_boot_progress (-44);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (44); show_boot_progress (44);
if (*ep) { if (*ep) {
if (*ep != ':') { if (*ep != ':') {
puts ("\n** Invalid boot device, use `dev[:part]' **\n"); puts ("\n** Invalid boot device, use `dev[:part]' **\n");
SHOW_BOOT_PROGRESS (-45); show_boot_progress (-45);
return 1; return 1;
} }
part = simple_strtoul(++ep, NULL, 16); part = simple_strtoul(++ep, NULL, 16);
} }
SHOW_BOOT_PROGRESS (45); show_boot_progress (45);
if (get_partition_info (&ide_dev_desc[dev], part, &info)) { if (get_partition_info (&ide_dev_desc[dev], part, &info)) {
SHOW_BOOT_PROGRESS (-46); show_boot_progress (-46);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (46); show_boot_progress (46);
if ((strncmp((char *)info.type, BOOT_PART_TYPE, sizeof(info.type)) != 0) && if ((strncmp((char *)info.type, BOOT_PART_TYPE, sizeof(info.type)) != 0) &&
(strncmp((char *)info.type, BOOT_PART_COMP, sizeof(info.type)) != 0)) { (strncmp((char *)info.type, BOOT_PART_COMP, sizeof(info.type)) != 0)) {
printf ("\n** Invalid partition type \"%.32s\"" printf ("\n** Invalid partition type \"%.32s\""
" (expect \"" BOOT_PART_TYPE "\")\n", " (expect \"" BOOT_PART_TYPE "\")\n",
info.type); info.type);
SHOW_BOOT_PROGRESS (-47); show_boot_progress (-47);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (47); show_boot_progress (47);
printf ("\nLoading from IDE device %d, partition %d: " printf ("\nLoading from IDE device %d, partition %d: "
"Name: %.32s Type: %.32s\n", "Name: %.32s Type: %.32s\n",
@ -455,29 +448,29 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (ide_dev_desc[dev].block_read (dev, info.start, 1, (ulong *)addr) != 1) { if (ide_dev_desc[dev].block_read (dev, info.start, 1, (ulong *)addr) != 1) {
printf ("** Read error on %d:%d\n", dev, part); printf ("** Read error on %d:%d\n", dev, part);
SHOW_BOOT_PROGRESS (-48); show_boot_progress (-48);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (48); show_boot_progress (48);
hdr = (image_header_t *)addr; hdr = (image_header_t *)addr;
if (ntohl(hdr->ih_magic) != IH_MAGIC) { if (ntohl(hdr->ih_magic) != IH_MAGIC) {
printf("\n** Bad Magic Number **\n"); printf("\n** Bad Magic Number **\n");
SHOW_BOOT_PROGRESS (-49); show_boot_progress (-49);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (49); show_boot_progress (49);
checksum = ntohl(hdr->ih_hcrc); checksum = ntohl(hdr->ih_hcrc);
hdr->ih_hcrc = 0; hdr->ih_hcrc = 0;
if (crc32 (0, (uchar *)hdr, sizeof(image_header_t)) != checksum) { if (crc32 (0, (uchar *)hdr, sizeof(image_header_t)) != checksum) {
puts ("\n** Bad Header Checksum **\n"); puts ("\n** Bad Header Checksum **\n");
SHOW_BOOT_PROGRESS (-50); show_boot_progress (-50);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (50); show_boot_progress (50);
hdr->ih_hcrc = htonl(checksum); /* restore checksum for later use */ hdr->ih_hcrc = htonl(checksum); /* restore checksum for later use */
print_image_hdr (hdr); print_image_hdr (hdr);
@ -490,10 +483,10 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (ide_dev_desc[dev].block_read (dev, info.start+1, cnt, if (ide_dev_desc[dev].block_read (dev, info.start+1, cnt,
(ulong *)(addr+info.blksz)) != cnt) { (ulong *)(addr+info.blksz)) != cnt) {
printf ("** Read error on %d:%d\n", dev, part); printf ("** Read error on %d:%d\n", dev, part);
SHOW_BOOT_PROGRESS (-51); show_boot_progress (-51);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS (51); show_boot_progress (51);
/* Loading ok, update default load address */ /* Loading ok, update default load address */

@ -25,14 +25,6 @@
#include <watchdog.h> #include <watchdog.h>
#include <malloc.h> #include <malloc.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#ifdef CONFIG_SHOW_BOOT_PROGRESS
# include <status_led.h>
# define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg)
#else
# define SHOW_BOOT_PROGRESS(arg)
#endif
#include <jffs2/jffs2.h> #include <jffs2/jffs2.h>
#include <nand.h> #include <nand.h>
@ -486,19 +478,19 @@ static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand,
r = nand_read(nand, offset, &cnt, (u_char *) addr); r = nand_read(nand, offset, &cnt, (u_char *) addr);
if (r) { if (r) {
puts("** Read error\n"); puts("** Read error\n");
SHOW_BOOT_PROGRESS(-56); show_boot_progress (-56);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS(56); show_boot_progress (56);
hdr = (image_header_t *) addr; hdr = (image_header_t *) addr;
if (ntohl(hdr->ih_magic) != IH_MAGIC) { if (ntohl(hdr->ih_magic) != IH_MAGIC) {
printf("\n** Bad Magic Number 0x%x **\n", hdr->ih_magic); printf("\n** Bad Magic Number 0x%x **\n", hdr->ih_magic);
SHOW_BOOT_PROGRESS(-57); show_boot_progress (-57);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS(57); show_boot_progress (57);
print_image_hdr(hdr); print_image_hdr(hdr);
@ -507,10 +499,10 @@ static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand,
r = nand_read(nand, offset, &cnt, (u_char *) addr); r = nand_read(nand, offset, &cnt, (u_char *) addr);
if (r) { if (r) {
puts("** Read error\n"); puts("** Read error\n");
SHOW_BOOT_PROGRESS(-58); show_boot_progress (-58);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS(58); show_boot_progress (58);
/* Loading ok, update default load address */ /* Loading ok, update default load address */
@ -562,7 +554,7 @@ int do_nandboot(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
} }
#endif #endif
SHOW_BOOT_PROGRESS(52); show_boot_progress(52);
switch (argc) { switch (argc) {
case 1: case 1:
addr = CFG_LOAD_ADDR; addr = CFG_LOAD_ADDR;
@ -586,26 +578,26 @@ int do_nandboot(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
usage: usage:
#endif #endif
printf("Usage:\n%s\n", cmdtp->usage); printf("Usage:\n%s\n", cmdtp->usage);
SHOW_BOOT_PROGRESS(-53); show_boot_progress(-53);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS(53); show_boot_progress(53);
if (!boot_device) { if (!boot_device) {
puts("\n** No boot device **\n"); puts("\n** No boot device **\n");
SHOW_BOOT_PROGRESS(-54); show_boot_progress(-54);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS(54); show_boot_progress(54);
idx = simple_strtoul(boot_device, NULL, 16); idx = simple_strtoul(boot_device, NULL, 16);
if (idx < 0 || idx >= CFG_MAX_NAND_DEVICE || !nand_info[idx].name) { if (idx < 0 || idx >= CFG_MAX_NAND_DEVICE || !nand_info[idx].name) {
printf("\n** Device %d not available\n", idx); printf("\n** Device %d not available\n", idx);
SHOW_BOOT_PROGRESS(-55); show_boot_progress(-55);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS(55); show_boot_progress(55);
return nand_load_image(cmdtp, &nand_info[idx], offset, addr, argv[0]); return nand_load_image(cmdtp, &nand_info[idx], offset, addr, argv[0]);
} }
@ -627,11 +619,11 @@ U_BOOT_CMD(nboot, 4, 1, do_nandboot,
#include <asm/io.h> #include <asm/io.h>
#include <watchdog.h> #include <watchdog.h>
#ifdef CONFIG_SHOW_BOOT_PROGRESS #ifdef CONFIG_show_boot_progress
# include <status_led.h> # include <status_led.h>
# define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg) # define show_boot_progress(arg) show_boot_progress(arg)
#else #else
# define SHOW_BOOT_PROGRESS(arg) # define show_boot_progress(arg)
#endif #endif
#if (CONFIG_COMMANDS & CFG_CMD_NAND) #if (CONFIG_COMMANDS & CFG_CMD_NAND)
@ -894,7 +886,7 @@ int do_nandboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
ulong offset = 0; ulong offset = 0;
image_header_t *hdr; image_header_t *hdr;
int rcode = 0; int rcode = 0;
SHOW_BOOT_PROGRESS(52); show_boot_progress (52);
switch (argc) { switch (argc) {
case 1: case 1:
addr = CFG_LOAD_ADDR; addr = CFG_LOAD_ADDR;
@ -915,27 +907,27 @@ int do_nandboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
break; break;
default: default:
printf ("Usage:\n%s\n", cmdtp->usage); printf ("Usage:\n%s\n", cmdtp->usage);
SHOW_BOOT_PROGRESS (-53); show_boot_progress (-53);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS(53); show_boot_progress (53);
if (!boot_device) { if (!boot_device) {
puts ("\n** No boot device **\n"); puts ("\n** No boot device **\n");
SHOW_BOOT_PROGRESS (-54); show_boot_progress (-54);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS(54); show_boot_progress (54);
dev = simple_strtoul(boot_device, &ep, 16); dev = simple_strtoul(boot_device, &ep, 16);
if ((dev >= CFG_MAX_NAND_DEVICE) || if ((dev >= CFG_MAX_NAND_DEVICE) ||
(nand_dev_desc[dev].ChipID == NAND_ChipID_UNKNOWN)) { (nand_dev_desc[dev].ChipID == NAND_ChipID_UNKNOWN)) {
printf ("\n** Device %d not available\n", dev); printf ("\n** Device %d not available\n", dev);
SHOW_BOOT_PROGRESS (-55); show_boot_progress (-55);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS(55); show_boot_progress (55);
printf ("\nLoading from device %d: %s at 0x%lx (offset 0x%lx)\n", printf ("\nLoading from device %d: %s at 0x%lx (offset 0x%lx)\n",
dev, nand_dev_desc[dev].name, nand_dev_desc[dev].IO_ADDR, dev, nand_dev_desc[dev].name, nand_dev_desc[dev].IO_ADDR,
@ -944,10 +936,10 @@ int do_nandboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (nand_legacy_rw (nand_dev_desc + dev, NANDRW_READ, offset, if (nand_legacy_rw (nand_dev_desc + dev, NANDRW_READ, offset,
SECTORSIZE, NULL, (u_char *)addr)) { SECTORSIZE, NULL, (u_char *)addr)) {
printf ("** Read error on %d\n", dev); printf ("** Read error on %d\n", dev);
SHOW_BOOT_PROGRESS (-56); show_boot_progress (-56);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS(56); show_boot_progress (56);
hdr = (image_header_t *)addr; hdr = (image_header_t *)addr;
@ -959,19 +951,19 @@ int do_nandboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
cnt -= SECTORSIZE; cnt -= SECTORSIZE;
} else { } else {
printf ("\n** Bad Magic Number 0x%x **\n", ntohl(hdr->ih_magic)); printf ("\n** Bad Magic Number 0x%x **\n", ntohl(hdr->ih_magic));
SHOW_BOOT_PROGRESS (-57); show_boot_progress (-57);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS(57); show_boot_progress (57);
if (nand_legacy_rw (nand_dev_desc + dev, NANDRW_READ, if (nand_legacy_rw (nand_dev_desc + dev, NANDRW_READ,
offset + SECTORSIZE, cnt, NULL, offset + SECTORSIZE, cnt, NULL,
(u_char *)(addr+SECTORSIZE))) { (u_char *)(addr+SECTORSIZE))) {
printf ("** Read error on %d\n", dev); printf ("** Read error on %d\n", dev);
SHOW_BOOT_PROGRESS (-58); show_boot_progress (-58);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS(58); show_boot_progress (58);
/* Loading ok, update default load address */ /* Loading ok, update default load address */

@ -30,14 +30,6 @@
#if (CONFIG_COMMANDS & CFG_CMD_NET) #if (CONFIG_COMMANDS & CFG_CMD_NET)
#ifdef CONFIG_SHOW_BOOT_PROGRESS
# include <status_led.h>
extern void show_boot_progress (int val);
# define SHOW_BOOT_PROGRESS(arg) show_boot_progress (arg)
#else
# define SHOW_BOOT_PROGRESS(arg)
#endif
extern int do_bootm (cmd_tbl_t *, int, int, char *[]); extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
static int netboot_common (proto_t, cmd_tbl_t *, int , char *[]); static int netboot_common (proto_t, cmd_tbl_t *, int , char *[]);
@ -191,23 +183,23 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
break; break;
default: printf ("Usage:\n%s\n", cmdtp->usage); default: printf ("Usage:\n%s\n", cmdtp->usage);
SHOW_BOOT_PROGRESS(-80); show_boot_progress (-80);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS(80); show_boot_progress (80);
if ((size = NetLoop(proto)) < 0) { if ((size = NetLoop(proto)) < 0) {
SHOW_BOOT_PROGRESS(-81); show_boot_progress (-81);
return 1; return 1;
} }
SHOW_BOOT_PROGRESS(81); show_boot_progress (81);
/* NetLoop ok, update environment */ /* NetLoop ok, update environment */
netboot_update_env(); netboot_update_env();
/* done if no file was loaded (no errors though) */ /* done if no file was loaded (no errors though) */
if (size == 0) { if (size == 0) {
SHOW_BOOT_PROGRESS(-82); show_boot_progress (-82);
return 0; return 0;
} }
@ -222,23 +214,21 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
printf ("Automatic boot of image at addr 0x%08lX ...\n", printf ("Automatic boot of image at addr 0x%08lX ...\n",
load_addr); load_addr);
SHOW_BOOT_PROGRESS(82); show_boot_progress (82);
rcode = do_bootm (cmdtp, 0, 1, local_args); rcode = do_bootm (cmdtp, 0, 1, local_args);
} }
#ifdef CONFIG_AUTOSCRIPT #ifdef CONFIG_AUTOSCRIPT
if (((s = getenv("autoscript")) != NULL) && (strcmp(s,"yes") == 0)) { if (((s = getenv("autoscript")) != NULL) && (strcmp(s,"yes") == 0)) {
printf("Running autoscript at addr 0x%08lX ...\n", load_addr); printf("Running autoscript at addr 0x%08lX ...\n", load_addr);
SHOW_BOOT_PROGRESS(83); show_boot_progress (83);
rcode = autoscript (load_addr); rcode = autoscript (load_addr);
} }
#endif #endif
#if defined(CONFIG_SHOW_BOOT_PROGRESS)
if (rcode < 0) if (rcode < 0)
SHOW_BOOT_PROGRESS(-83); show_boot_progress (-83);
else else
SHOW_BOOT_PROGRESS(84); show_boot_progress (84);
#endif
return rcode; return rcode;
} }

@ -30,13 +30,6 @@
#include <linux/stddef.h> #include <linux/stddef.h>
#include <malloc.h> #include <malloc.h>
#ifdef CONFIG_SHOW_BOOT_PROGRESS
# include <status_led.h>
# define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg)
#else
# define SHOW_BOOT_PROGRESS(arg)
#endif
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_AMIGAONEG3SE #ifdef CONFIG_AMIGAONEG3SE
@ -232,7 +225,7 @@ void env_relocate (void)
puts ("Using default environment\n\n"); puts ("Using default environment\n\n");
#else #else
puts ("*** Warning - bad CRC, using default environment\n\n"); puts ("*** Warning - bad CRC, using default environment\n\n");
SHOW_BOOT_PROGRESS (-60); show_boot_progress (-60);
#endif #endif
if (sizeof(default_environment) > ENV_SIZE) if (sizeof(default_environment) > ENV_SIZE)

@ -44,6 +44,12 @@
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
#endif #endif
/*
* Board-specific Platform code can reimplement show_boot_progress () if needed
*/
void inline __show_boot_progress (int val) {}
void inline show_boot_progress (int val) __attribute__((weak, alias("__show_boot_progress")));
#if defined(CONFIG_BOOT_RETRY_TIME) && defined(CONFIG_RESET_TO_RETRY) #if defined(CONFIG_BOOT_RETRY_TIME) && defined(CONFIG_RESET_TO_RETRY)
extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); /* for do_reset() prototype */ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); /* for do_reset() prototype */
#endif #endif

@ -15,13 +15,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <watchdog.h> #include <watchdog.h>
#ifdef CONFIG_SHOW_BOOT_PROGRESS
# include <status_led.h>
# define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg)
#else
# define SHOW_BOOT_PROGRESS(arg)
#endif
#if (CONFIG_COMMANDS & CFG_CMD_NAND) && defined(CFG_NAND_LEGACY) #if (CONFIG_COMMANDS & CFG_CMD_NAND) && defined(CFG_NAND_LEGACY)
#include <linux/mtd/nand_legacy.h> #include <linux/mtd/nand_legacy.h>

@ -626,9 +626,13 @@ int fgetc(int file);
int pcmcia_init (void); int pcmcia_init (void);
#ifdef CONFIG_SHOW_BOOT_PROGRESS #ifdef CONFIG_STATUS_LED
void show_boot_progress (int status); # include <status_led.h>
#endif #endif
/*
* Board-specific Platform code can reimplement show_boot_progress () if needed
*/
void inline show_boot_progress (int val);
#ifdef CONFIG_INIT_CRITICAL #ifdef CONFIG_INIT_CRITICAL
#error CONFIG_INIT_CRITICAL is deprecated! #error CONFIG_INIT_CRITICAL is deprecated!

@ -66,13 +66,6 @@ static void setup_videolfb_tag (gd_t *gd);
static struct tag *params; static struct tag *params;
#endif /* CONFIG_SETUP_MEMORY_TAGS || CONFIG_CMDLINE_TAG || CONFIG_INITRD_TAG */ #endif /* CONFIG_SETUP_MEMORY_TAGS || CONFIG_CMDLINE_TAG || CONFIG_INITRD_TAG */
#ifdef CONFIG_SHOW_BOOT_PROGRESS
# include <status_led.h>
# define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg)
#else
# define SHOW_BOOT_PROGRESS(arg)
#endif
extern image_header_t header; /* from cmd_bootm.c */ extern image_header_t header; /* from cmd_bootm.c */
@ -96,7 +89,7 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
* Check if there is an initrd image * Check if there is an initrd image
*/ */
if (argc >= 3) { if (argc >= 3) {
SHOW_BOOT_PROGRESS (9); show_boot_progress (9);
addr = simple_strtoul (argv[2], NULL, 16); addr = simple_strtoul (argv[2], NULL, 16);
@ -114,7 +107,7 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
if (ntohl (hdr->ih_magic) != IH_MAGIC) { if (ntohl (hdr->ih_magic) != IH_MAGIC) {
printf ("Bad Magic Number\n"); printf ("Bad Magic Number\n");
SHOW_BOOT_PROGRESS (-10); show_boot_progress (-10);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
@ -126,11 +119,11 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
if (crc32 (0, (unsigned char *) data, len) != checksum) { if (crc32 (0, (unsigned char *) data, len) != checksum) {
printf ("Bad Header Checksum\n"); printf ("Bad Header Checksum\n");
SHOW_BOOT_PROGRESS (-11); show_boot_progress (-11);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
SHOW_BOOT_PROGRESS (10); show_boot_progress (10);
print_image_hdr (hdr); print_image_hdr (hdr);
@ -151,19 +144,19 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
csum = crc32 (0, (unsigned char *) data, len); csum = crc32 (0, (unsigned char *) data, len);
if (csum != ntohl (hdr->ih_dcrc)) { if (csum != ntohl (hdr->ih_dcrc)) {
printf ("Bad Data CRC\n"); printf ("Bad Data CRC\n");
SHOW_BOOT_PROGRESS (-12); show_boot_progress (-12);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
printf ("OK\n"); printf ("OK\n");
} }
SHOW_BOOT_PROGRESS (11); show_boot_progress (11);
if ((hdr->ih_os != IH_OS_LINUX) || if ((hdr->ih_os != IH_OS_LINUX) ||
(hdr->ih_arch != IH_CPU_ARM) || (hdr->ih_arch != IH_CPU_ARM) ||
(hdr->ih_type != IH_TYPE_RAMDISK)) { (hdr->ih_type != IH_TYPE_RAMDISK)) {
printf ("No Linux ARM Ramdisk Image\n"); printf ("No Linux ARM Ramdisk Image\n");
SHOW_BOOT_PROGRESS (-13); show_boot_progress (-13);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
@ -182,7 +175,7 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
ulong tail = ntohl (len_ptr[0]) % 4; ulong tail = ntohl (len_ptr[0]) % 4;
int i; int i;
SHOW_BOOT_PROGRESS (13); show_boot_progress (13);
/* skip kernel length and terminator */ /* skip kernel length and terminator */
data = (ulong) (&len_ptr[2]); data = (ulong) (&len_ptr[2]);
@ -201,7 +194,7 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
/* /*
* no initrd image * no initrd image
*/ */
SHOW_BOOT_PROGRESS (14); show_boot_progress (14);
len = data = 0; len = data = 0;
} }
@ -220,7 +213,7 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
initrd_end = 0; initrd_end = 0;
} }
SHOW_BOOT_PROGRESS (15); show_boot_progress (15);
debug ("## Transferring control to Linux (at address %08lx) ...\n", debug ("## Transferring control to Linux (at address %08lx) ...\n",
(ulong) theKernel); (ulong) theKernel);

@ -36,13 +36,6 @@ extern int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
/* CPU-specific hook to allow flushing of caches, etc. */ /* CPU-specific hook to allow flushing of caches, etc. */
extern void prepare_to_boot(void); extern void prepare_to_boot(void);
#ifdef CONFIG_SHOW_BOOT_PROGRESS
# include <status_led.h>
# define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg)
#else
# define SHOW_BOOT_PROGRESS(arg)
#endif
extern image_header_t header; /* from cmd_bootm.c */ extern image_header_t header; /* from cmd_bootm.c */
static struct tag *setup_start_tag(struct tag *params) static struct tag *setup_start_tag(struct tag *params)
@ -204,7 +197,7 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
* Check if there is an initrd image * Check if there is an initrd image
*/ */
if (argc >= 3) { if (argc >= 3) {
SHOW_BOOT_PROGRESS(9); show_boot_progress (9);
addr = simple_strtoul(argv[2], NULL, 16); addr = simple_strtoul(argv[2], NULL, 16);
@ -215,7 +208,7 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
if (ntohl(hdr->ih_magic) != IH_MAGIC) { if (ntohl(hdr->ih_magic) != IH_MAGIC) {
puts("Bad Magic Number\n"); puts("Bad Magic Number\n");
SHOW_BOOT_PROGRESS(-10); show_boot_progress (-10);
do_reset(cmdtp, flag, argc, argv); do_reset(cmdtp, flag, argc, argv);
} }
@ -226,11 +219,11 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
if (crc32(0, (unsigned char *)data, len) != checksum) { if (crc32(0, (unsigned char *)data, len) != checksum) {
puts("Bad Header Checksum\n"); puts("Bad Header Checksum\n");
SHOW_BOOT_PROGRESS(-11); show_boot_progress (-11);
do_reset(cmdtp, flag, argc, argv); do_reset(cmdtp, flag, argc, argv);
} }
SHOW_BOOT_PROGRESS(10); show_boot_progress (10);
print_image_hdr(hdr); print_image_hdr(hdr);
@ -244,26 +237,26 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
csum = crc32(0, (unsigned char *)data, len); csum = crc32(0, (unsigned char *)data, len);
if (csum != ntohl(hdr->ih_dcrc)) { if (csum != ntohl(hdr->ih_dcrc)) {
puts("Bad Data CRC\n"); puts("Bad Data CRC\n");
SHOW_BOOT_PROGRESS(-12); show_boot_progress (-12);
do_reset(cmdtp, flag, argc, argv); do_reset(cmdtp, flag, argc, argv);
} }
puts("OK\n"); puts("OK\n");
} }
SHOW_BOOT_PROGRESS(11); show_boot_progress (11);
if ((hdr->ih_os != IH_OS_LINUX) || if ((hdr->ih_os != IH_OS_LINUX) ||
(hdr->ih_arch != IH_CPU_AVR32) || (hdr->ih_arch != IH_CPU_AVR32) ||
(hdr->ih_type != IH_TYPE_RAMDISK)) { (hdr->ih_type != IH_TYPE_RAMDISK)) {
puts("Not a Linux/AVR32 RAMDISK image\n"); puts("Not a Linux/AVR32 RAMDISK image\n");
SHOW_BOOT_PROGRESS(-13); show_boot_progress (-13);
do_reset(cmdtp, flag, argc, argv); do_reset(cmdtp, flag, argc, argv);
} }
} else if ((hdr->ih_type == IH_TYPE_MULTI) && (len_ptr[1])) { } else if ((hdr->ih_type == IH_TYPE_MULTI) && (len_ptr[1])) {
ulong tail = ntohl (len_ptr[0]) % 4; ulong tail = ntohl (len_ptr[0]) % 4;
int i; int i;
SHOW_BOOT_PROGRESS (13); show_boot_progress (13);
/* skip kernel length and terminator */ /* skip kernel length and terminator */
data = (ulong) (&len_ptr[2]); data = (ulong) (&len_ptr[2]);
@ -279,7 +272,7 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
len = ntohl (len_ptr[1]); len = ntohl (len_ptr[1]);
} else { } else {
/* no initrd image */ /* no initrd image */
SHOW_BOOT_PROGRESS(14); show_boot_progress (14);
len = data = 0; len = data = 0;
} }
@ -291,7 +284,7 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
initrd_end = 0; initrd_end = 0;
} }
SHOW_BOOT_PROGRESS(15); show_boot_progress (15);
params = params_start = (struct tag *)gd->bd->bi_boot_params; params = params_start = (struct tag *)gd->bd->bi_boot_params;
params = setup_start_tag(params); params = setup_start_tag(params);

@ -36,13 +36,6 @@
#define LINUX_MAX_ENVS 256 #define LINUX_MAX_ENVS 256
#define LINUX_MAX_ARGS 256 #define LINUX_MAX_ARGS 256
#ifdef CONFIG_SHOW_BOOT_PROGRESS
#include <status_led.h>
#define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg)
#else
#define SHOW_BOOT_PROGRESS(arg)
#endif
#define CMD_LINE_ADDR 0xFF900000 /* L1 scratchpad */ #define CMD_LINE_ADDR 0xFF900000 /* L1 scratchpad */
#ifdef SHARED_RESOURCES #ifdef SHARED_RESOURCES

@ -132,9 +132,7 @@ void post_output_backlog(void)
post_log("PASSED\n"); post_log("PASSED\n");
else { else {
post_log("FAILED\n"); post_log("FAILED\n");
#ifdef CONFIG_SHOW_BOOT_PROGRESS show_boot_progress (-31);
show_boot_progress(-31);
#endif
} }
} }
} }
@ -245,9 +243,7 @@ static int post_run_single(struct post_test *test,
} else { } else {
if ((*test->test) (flags) != 0) { if ((*test->test) (flags) != 0) {
post_log("FAILED\n"); post_log("FAILED\n");
#ifdef CONFIG_SHOW_BOOT_PROGRESS show_boot_progress (-32);
show_boot_progress(-32);
#endif
} else } else
post_log("PASSED\n"); post_log("PASSED\n");
} }

@ -34,13 +34,6 @@ DECLARE_GLOBAL_DATA_PTR;
#define LINUX_MAX_ENVS 256 #define LINUX_MAX_ENVS 256
#define LINUX_MAX_ARGS 256 #define LINUX_MAX_ARGS 256
#ifdef CONFIG_SHOW_BOOT_PROGRESS
# include <status_led.h>
# define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg)
#else
# define SHOW_BOOT_PROGRESS(arg)
#endif
extern image_header_t header; /* from cmd_bootm.c */ extern image_header_t header; /* from cmd_bootm.c */
extern int do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]); extern int do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]);
@ -73,7 +66,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
* Check if there is an initrd image * Check if there is an initrd image
*/ */
if (argc >= 3) { if (argc >= 3) {
SHOW_BOOT_PROGRESS (9); show_boot_progress (9);
addr = simple_strtoul (argv[2], NULL, 16); addr = simple_strtoul (argv[2], NULL, 16);
@ -84,7 +77,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
if (ntohl (hdr->ih_magic) != IH_MAGIC) { if (ntohl (hdr->ih_magic) != IH_MAGIC) {
printf ("Bad Magic Number\n"); printf ("Bad Magic Number\n");
SHOW_BOOT_PROGRESS (-10); show_boot_progress (-10);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
@ -96,11 +89,11 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
if (crc32 (0, (char *) data, len) != checksum) { if (crc32 (0, (char *) data, len) != checksum) {
printf ("Bad Header Checksum\n"); printf ("Bad Header Checksum\n");
SHOW_BOOT_PROGRESS (-11); show_boot_progress (-11);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
SHOW_BOOT_PROGRESS (10); show_boot_progress (10);
print_image_hdr (hdr); print_image_hdr (hdr);
@ -114,19 +107,19 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
csum = crc32 (0, (char *) data, len); csum = crc32 (0, (char *) data, len);
if (csum != ntohl (hdr->ih_dcrc)) { if (csum != ntohl (hdr->ih_dcrc)) {
printf ("Bad Data CRC\n"); printf ("Bad Data CRC\n");
SHOW_BOOT_PROGRESS (-12); show_boot_progress (-12);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
printf ("OK\n"); printf ("OK\n");
} }
SHOW_BOOT_PROGRESS (11); show_boot_progress (11);
if ((hdr->ih_os != IH_OS_LINUX) || if ((hdr->ih_os != IH_OS_LINUX) ||
(hdr->ih_arch != IH_CPU_M68K) || (hdr->ih_arch != IH_CPU_M68K) ||
(hdr->ih_type != IH_TYPE_RAMDISK)) { (hdr->ih_type != IH_TYPE_RAMDISK)) {
printf ("No Linux M68K Ramdisk Image\n"); printf ("No Linux M68K Ramdisk Image\n");
SHOW_BOOT_PROGRESS (-13); show_boot_progress (-13);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
@ -137,7 +130,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
ulong tail = ntohl (len_ptr[0]) % 4; ulong tail = ntohl (len_ptr[0]) % 4;
int i; int i;
SHOW_BOOT_PROGRESS (13); show_boot_progress (13);
/* skip kernel length and terminator */ /* skip kernel length and terminator */
data = (ulong) (&len_ptr[2]); data = (ulong) (&len_ptr[2]);
@ -156,7 +149,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
/* /*
* no initrd image * no initrd image
*/ */
SHOW_BOOT_PROGRESS (14); show_boot_progress (14);
data = 0; data = 0;
} }
@ -175,7 +168,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
initrd_end = 0; initrd_end = 0;
} }
SHOW_BOOT_PROGRESS (15); show_boot_progress (15);
#ifdef DEBUG #ifdef DEBUG
printf ("## Transferring control to Linux (at address %08lx) ...\n", printf ("## Transferring control to Linux (at address %08lx) ...\n",

@ -32,13 +32,6 @@
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_SHOW_BOOT_PROGRESS
# include <status_led.h>
# define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg)
#else
# define SHOW_BOOT_PROGRESS(arg)
#endif
extern image_header_t header; /* from cmd_bootm.c */ extern image_header_t header; /* from cmd_bootm.c */
/*cmd_boot.c*/ /*cmd_boot.c*/
extern int do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]); extern int do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]);
@ -59,7 +52,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
/* Check if there is an initrd image */ /* Check if there is an initrd image */
if (argc >= 3) { if (argc >= 3) {
SHOW_BOOT_PROGRESS (9); show_boot_progress (9);
addr = simple_strtoul (argv[2], NULL, 16); addr = simple_strtoul (argv[2], NULL, 16);
@ -70,7 +63,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
if (ntohl (hdr->ih_magic) != IH_MAGIC) { if (ntohl (hdr->ih_magic) != IH_MAGIC) {
printf ("Bad Magic Number\n"); printf ("Bad Magic Number\n");
SHOW_BOOT_PROGRESS (-10); show_boot_progress (-10);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
@ -82,11 +75,11 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
if (crc32 (0, (char *)data, len) != checksum) { if (crc32 (0, (char *)data, len) != checksum) {
printf ("Bad Header Checksum\n"); printf ("Bad Header Checksum\n");
SHOW_BOOT_PROGRESS (-11); show_boot_progress (-11);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
SHOW_BOOT_PROGRESS (10); show_boot_progress (10);
print_image_hdr (hdr); print_image_hdr (hdr);
@ -100,19 +93,19 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
csum = crc32 (0, (char *)data, len); csum = crc32 (0, (char *)data, len);
if (csum != ntohl (hdr->ih_dcrc)) { if (csum != ntohl (hdr->ih_dcrc)) {
printf ("Bad Data CRC\n"); printf ("Bad Data CRC\n");
SHOW_BOOT_PROGRESS (-12); show_boot_progress (-12);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
printf ("OK\n"); printf ("OK\n");
} }
SHOW_BOOT_PROGRESS (11); show_boot_progress (11);
if ((hdr->ih_os != IH_OS_LINUX) || if ((hdr->ih_os != IH_OS_LINUX) ||
(hdr->ih_arch != IH_CPU_MICROBLAZE) || (hdr->ih_arch != IH_CPU_MICROBLAZE) ||
(hdr->ih_type != IH_TYPE_RAMDISK)) { (hdr->ih_type != IH_TYPE_RAMDISK)) {
printf ("No Linux Microblaze Ramdisk Image\n"); printf ("No Linux Microblaze Ramdisk Image\n");
SHOW_BOOT_PROGRESS (-13); show_boot_progress (-13);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
@ -122,7 +115,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
} else if ((hdr->ih_type == IH_TYPE_MULTI) && (len_ptr[1])) { } else if ((hdr->ih_type == IH_TYPE_MULTI) && (len_ptr[1])) {
ulong tail = ntohl (len_ptr[0]) % 4; ulong tail = ntohl (len_ptr[0]) % 4;
SHOW_BOOT_PROGRESS (13); show_boot_progress (13);
/* skip kernel length and terminator */ /* skip kernel length and terminator */
data = (ulong) (&len_ptr[2]); data = (ulong) (&len_ptr[2]);
@ -141,7 +134,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
/* /*
* no initrd image * no initrd image
*/ */
SHOW_BOOT_PROGRESS (14); show_boot_progress (14);
data = 0; data = 0;
} }
@ -160,7 +153,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
initrd_end = 0; initrd_end = 0;
} }
SHOW_BOOT_PROGRESS (15); show_boot_progress (15);
#ifdef DEBUG #ifdef DEBUG
printf ("## Transferring control to Linux (at address %08lx) ...\n", printf ("## Transferring control to Linux (at address %08lx) ...\n",

@ -33,13 +33,6 @@ DECLARE_GLOBAL_DATA_PTR;
#define LINUX_MAX_ENVS 256 #define LINUX_MAX_ENVS 256
#define LINUX_MAX_ARGS 256 #define LINUX_MAX_ARGS 256
#ifdef CONFIG_SHOW_BOOT_PROGRESS
# include <status_led.h>
# define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg)
#else
# define SHOW_BOOT_PROGRESS(arg)
#endif
extern image_header_t header; /* from cmd_bootm.c */ extern image_header_t header; /* from cmd_bootm.c */
extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
@ -73,7 +66,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
* Check if there is an initrd image * Check if there is an initrd image
*/ */
if (argc >= 3) { if (argc >= 3) {
SHOW_BOOT_PROGRESS (9); show_boot_progress (9);
addr = simple_strtoul (argv[2], NULL, 16); addr = simple_strtoul (argv[2], NULL, 16);
@ -84,7 +77,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
if (ntohl (hdr->ih_magic) != IH_MAGIC) { if (ntohl (hdr->ih_magic) != IH_MAGIC) {
printf ("Bad Magic Number\n"); printf ("Bad Magic Number\n");
SHOW_BOOT_PROGRESS (-10); show_boot_progress (-10);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
@ -96,11 +89,11 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
if (crc32 (0, (uchar *) data, len) != checksum) { if (crc32 (0, (uchar *) data, len) != checksum) {
printf ("Bad Header Checksum\n"); printf ("Bad Header Checksum\n");
SHOW_BOOT_PROGRESS (-11); show_boot_progress (-11);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
SHOW_BOOT_PROGRESS (10); show_boot_progress (10);
print_image_hdr (hdr); print_image_hdr (hdr);
@ -114,19 +107,19 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
csum = crc32 (0, (uchar *) data, len); csum = crc32 (0, (uchar *) data, len);
if (csum != ntohl (hdr->ih_dcrc)) { if (csum != ntohl (hdr->ih_dcrc)) {
printf ("Bad Data CRC\n"); printf ("Bad Data CRC\n");
SHOW_BOOT_PROGRESS (-12); show_boot_progress (-12);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
printf ("OK\n"); printf ("OK\n");
} }
SHOW_BOOT_PROGRESS (11); show_boot_progress (11);
if ((hdr->ih_os != IH_OS_LINUX) || if ((hdr->ih_os != IH_OS_LINUX) ||
(hdr->ih_arch != IH_CPU_MIPS) || (hdr->ih_arch != IH_CPU_MIPS) ||
(hdr->ih_type != IH_TYPE_RAMDISK)) { (hdr->ih_type != IH_TYPE_RAMDISK)) {
printf ("No Linux MIPS Ramdisk Image\n"); printf ("No Linux MIPS Ramdisk Image\n");
SHOW_BOOT_PROGRESS (-13); show_boot_progress (-13);
do_reset (cmdtp, flag, argc, argv); do_reset (cmdtp, flag, argc, argv);
} }
@ -137,7 +130,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
ulong tail = ntohl (len_ptr[0]) % 4; ulong tail = ntohl (len_ptr[0]) % 4;
int i; int i;
SHOW_BOOT_PROGRESS (13); show_boot_progress (13);
/* skip kernel length and terminator */ /* skip kernel length and terminator */
data = (ulong) (&len_ptr[2]); data = (ulong) (&len_ptr[2]);
@ -156,7 +149,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
/* /*
* no initrd image * no initrd image
*/ */
SHOW_BOOT_PROGRESS (14); show_boot_progress (14);
data = 0; data = 0;
} }
@ -175,7 +168,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
initrd_end = 0; initrd_end = 0;
} }
SHOW_BOOT_PROGRESS (15); show_boot_progress (15);
#ifdef DEBUG #ifdef DEBUG
printf ("## Transferring control to Linux (at address %08lx) ...\n", printf ("## Transferring control to Linux (at address %08lx) ...\n",

@ -1117,9 +1117,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
void hang (void) void hang (void)
{ {
puts ("### ERROR ### Please RESET the board ###\n"); puts ("### ERROR ### Please RESET the board ###\n");
#ifdef CONFIG_SHOW_BOOT_PROGRESS
show_boot_progress(-30); show_boot_progress(-30);
#endif
for (;;); for (;;);
} }

@ -28,14 +28,6 @@
#if (CONFIG_COMMANDS & CFG_CMD_NET) && defined(CONFIG_NET_MULTI) #if (CONFIG_COMMANDS & CFG_CMD_NET) && defined(CONFIG_NET_MULTI)
#if defined(CONFIG_SHOW_BOOT_PROGRESS)
# include <status_led.h>
extern void show_ethcfg_progress (int arg);
# define SHOW_BOOT_PROGRESS(arg) show_boot_progress (arg)
#else
# define SHOW_BOOT_PROGRESS(arg)
#endif
#ifdef CFG_GT_6426x #ifdef CFG_GT_6426x
extern int gt6426x_eth_initialize(bd_t *bis); extern int gt6426x_eth_initialize(bd_t *bis);
#endif #endif
@ -150,7 +142,7 @@ int eth_initialize(bd_t *bis)
eth_devices = NULL; eth_devices = NULL;
eth_current = NULL; eth_current = NULL;
SHOW_BOOT_PROGRESS(64); show_boot_progress (64);
#if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII) #if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII)
miiphy_init(); miiphy_init();
#endif #endif
@ -256,12 +248,12 @@ int eth_initialize(bd_t *bis)
if (!eth_devices) { if (!eth_devices) {
puts ("No ethernet found.\n"); puts ("No ethernet found.\n");
SHOW_BOOT_PROGRESS(-64); show_boot_progress (-64);
} else { } else {
struct eth_device *dev = eth_devices; struct eth_device *dev = eth_devices;
char *ethprime = getenv ("ethprime"); char *ethprime = getenv ("ethprime");
SHOW_BOOT_PROGRESS(65); show_boot_progress (65);
do { do {
if (eth_number) if (eth_number)
puts (", "); puts (", ");

@ -129,9 +129,7 @@ void post_output_backlog ( void )
post_log ("PASSED\n"); post_log ("PASSED\n");
else { else {
post_log ("FAILED\n"); post_log ("FAILED\n");
#ifdef CONFIG_SHOW_BOOT_PROGRESS show_boot_progress (-31);
show_boot_progress(-31);
#endif
} }
} }
} }
@ -241,9 +239,7 @@ static int post_run_single (struct post_test *test,
} else { } else {
if ((*test->test) (flags) != 0) { if ((*test->test) (flags) != 0) {
post_log ("FAILED\n"); post_log ("FAILED\n");
#ifdef CONFIG_SHOW_BOOT_PROGRESS show_boot_progress (-32);
show_boot_progress(-32);
#endif
} }
else else
post_log ("PASSED\n"); post_log ("PASSED\n");

Loading…
Cancel
Save