diff options
author | wdenk <wdenk> | 2003-06-28 23:11:04 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2003-06-28 23:11:04 +0000 |
commit | 9d2b18a0f9df38cfe15e10766b1302f10d426355 (patch) | |
tree | e7230d603e7dda19f3ef962b974aa8ba7d4a75fe /lib_ppc | |
parent | d1cbe85b084ce543ba0b09def03a1b20940e6c03 (diff) | |
download | u-boot-midas-9d2b18a0f9df38cfe15e10766b1302f10d426355.tar.gz u-boot-midas-9d2b18a0f9df38cfe15e10766b1302f10d426355.tar.bz2 u-boot-midas-9d2b18a0f9df38cfe15e10766b1302f10d426355.zip |
Rewrite command lookup and help command (fix problems with bubble
sort when sorting command name list). Minor cleanup here and there.
Diffstat (limited to 'lib_ppc')
-rw-r--r-- | lib_ppc/board.c | 48 |
1 files changed, 12 insertions, 36 deletions
diff --git a/lib_ppc/board.c b/lib_ppc/board.c index 044d8f87c4..daa2a6df44 100644 --- a/lib_ppc/board.c +++ b/lib_ppc/board.c @@ -401,9 +401,7 @@ void board_init_f (ulong bootflag) #ifdef CONFIG_LOGBUFFER /* reserve kernel log buffer */ addr -= (LOGBUFF_RESERVE); -# ifdef DEBUG - printf ("Reserving %ldk for kernel logbuffer at %08lx\n", LOGBUFF_LEN, addr); -# endif + debug ("Reserving %dk for kernel logbuffer at %08lx\n", LOGBUFF_LEN, addr); #endif #ifdef CONFIG_PRAM @@ -413,16 +411,12 @@ void board_init_f (ulong bootflag) i = getenv_r ("pram", tmp, sizeof (tmp)); reg = (i > 0) ? simple_strtoul (tmp, NULL, 10) : CONFIG_PRAM; addr -= (reg << 10); /* size is in kB */ -# ifdef DEBUG - printf ("Reserving %ldk for protected RAM at %08lx\n", reg, addr); -# endif + debug ("Reserving %ldk for protected RAM at %08lx\n", reg, addr); #endif /* CONFIG_PRAM */ /* round down to next 4 kB limit */ addr &= ~(4096 - 1); -#ifdef DEBUG - printf ("Top of RAM usable for U-Boot at: %08lx\n", addr); -#endif + debug ("Top of RAM usable for U-Boot at: %08lx\n", addr); #ifdef CONFIG_LCD /* reserve memory for LCD display (always full pages) */ @@ -443,9 +437,7 @@ void board_init_f (ulong bootflag) addr -= len; addr &= ~(4096 - 1); -#ifdef DEBUG - printf ("Reserving %ldk for U-Boot at: %08lx\n", len >> 10, addr); -#endif + debug ("Reserving %ldk for U-Boot at: %08lx\n", len >> 10, addr); #ifdef CONFIG_AMIGAONEG3SE gd->relocaddr = addr; @@ -455,10 +447,8 @@ void board_init_f (ulong bootflag) * reserve memory for malloc() arena */ addr_sp = addr - TOTAL_MALLOC_LEN; -#ifdef DEBUG - printf ("Reserving %dk for malloc() at: %08lx\n", + debug ("Reserving %dk for malloc() at: %08lx\n", TOTAL_MALLOC_LEN >> 10, addr_sp); -#endif /* * (permanently) allocate a Board Info struct @@ -467,16 +457,12 @@ void board_init_f (ulong bootflag) addr_sp -= sizeof (bd_t); bd = (bd_t *) addr_sp; gd->bd = bd; -#ifdef DEBUG - printf ("Reserving %d Bytes for Board Info at: %08lx\n", + debug ("Reserving %d Bytes for Board Info at: %08lx\n", sizeof (bd_t), addr_sp); -#endif addr_sp -= sizeof (gd_t); id = (gd_t *) addr_sp; -#ifdef DEBUG - printf ("Reserving %d Bytes for Global Data at: %08lx\n", + debug ("Reserving %d Bytes for Global Data at: %08lx\n", sizeof (gd_t), addr_sp); -#endif /* * Finally, we set up a new (bigger) stack. @@ -488,9 +474,7 @@ void board_init_f (ulong bootflag) addr_sp &= ~0xF; *((ulong *) addr_sp)-- = 0; *((ulong *) addr_sp)-- = 0; -#ifdef DEBUG - printf ("Stack Pointer at: %08lx\n", addr_sp); -#endif + debug ("Stack Pointer at: %08lx\n", addr_sp); /* * Save local variables to board info struct @@ -536,9 +520,7 @@ void board_init_f (ulong bootflag) #endif #endif -#ifdef DEBUG - printf ("New Stack Pointer is: %08lx\n", addr_sp); -#endif + debug ("New Stack Pointer is: %08lx\n", addr_sp); WATCHDOG_RESET (); @@ -588,9 +570,7 @@ void board_init_r (gd_t *id, ulong dest_addr) gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */ -#ifdef DEBUG - printf ("Now running in RAM - U-Boot at: %08lx\n", dest_addr); -#endif + debug ("Now running in RAM - U-Boot at: %08lx\n", dest_addr); WATCHDOG_RESET (); @@ -847,9 +827,7 @@ void board_init_r (gd_t *id, ulong dest_addr) defined(CONFIG_SPD823TS) ) WATCHDOG_RESET (); -# ifdef DEBUG - puts ("Reset Ethernet PHY\n"); -# endif + debug ("Reset Ethernet PHY\n"); reset_phy (); #endif @@ -859,9 +837,7 @@ void board_init_r (gd_t *id, ulong dest_addr) kgdb_init (); #endif -#ifdef DEBUG - printf ("U-Boot relocated to %08lx\n", dest_addr); -#endif + debug ("U-Boot relocated to %08lx\n", dest_addr); /* * Enable Interrupts |