summaryrefslogtreecommitdiff
path: root/lib_ppc
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-06-27 21:31:46 +0000
committerwdenk <wdenk>2003-06-27 21:31:46 +0000
commit8bde7f776c77b343aca29b8c7b58464d915ac245 (patch)
tree20f1fd99975215e7c658454a15cdb4ed4694e2d4 /lib_ppc
parent993cad9364c6b87ae429d1ed1130d8153f6f027e (diff)
downloadu-boot-imx-8bde7f776c77b343aca29b8c7b58464d915ac245.zip
u-boot-imx-8bde7f776c77b343aca29b8c7b58464d915ac245.tar.gz
u-boot-imx-8bde7f776c77b343aca29b8c7b58464d915ac245.tar.bz2
* Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen)
Diffstat (limited to 'lib_ppc')
-rw-r--r--lib_ppc/board.c24
-rw-r--r--lib_ppc/extable.c18
-rw-r--r--lib_ppc/kgdb.c2
-rw-r--r--lib_ppc/time.c1
4 files changed, 21 insertions, 24 deletions
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index 9bc77b5..044d8f8 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -46,9 +46,6 @@
#include <status_led.h>
#endif
#include <net.h>
-#if (CONFIG_COMMANDS & CFG_CMD_BEDBUG)
-#include <cmd_bedbug.h>
-#endif
#ifdef CFG_ALLOC_DPRAM
#if !defined(CONFIG_8260)
#include <commproc.h>
@@ -95,9 +92,12 @@ extern flash_info_t flash_info[];
extern ulong __init_end;
extern ulong _end;
-
ulong monitor_flash_len;
+#if (CONFIG_COMMANDS & CFG_CMD_BEDBUG)
+#include <bedbug/type.h>
+#endif
+
/*
* Begin and End of memory area for malloc(), and current "brk"
*/
@@ -382,7 +382,7 @@ void board_init_f (ulong bootflag)
* relocate the code and continue running from DRAM.
*
* Reserve memory at end of RAM for (top down in that order):
- * - kernel log buffer
+ * - kernel log buffer
* - protected RAM
* - LCD framebuffer
* - monitor code
@@ -570,7 +570,6 @@ void board_init_f (ulong bootflag)
void board_init_r (gd_t *id, ulong dest_addr)
{
DECLARE_GLOBAL_DATA_PTR;
-
cmd_tbl_t *cmdtp;
char *s, *e;
bd_t *bd;
@@ -596,15 +595,14 @@ void board_init_r (gd_t *id, ulong dest_addr)
WATCHDOG_RESET ();
gd->reloc_off = dest_addr - CFG_MONITOR_BASE;
-
+
monitor_flash_len = (ulong)&__init_end - dest_addr;
/*
* We have to relocate the command table manually
*/
- for (cmdtp = &cmd_tbl[0]; cmdtp->name; cmdtp++) {
+ for (cmdtp = &__u_boot_cmd_start; cmdtp != &__u_boot_cmd_end; cmdtp++) {
ulong addr;
-
addr = (ulong) (cmdtp->cmd) + gd->reloc_off;
#if 0
printf ("Command \"%s\": 0x%08lx => 0x%08lx\n",
@@ -737,10 +735,10 @@ void board_init_r (gd_t *id, ulong dest_addr)
/*
* Fill in missing fields of bd_info.
- * We do this here, where we have "normal" access to the
- * environment; we used to do this still running from ROM,
- * where had to use getenv_r(), which can be pretty slow when
- * the environment is in EEPROM.
+ * We do this here, where we have "normal" access to the
+ * environment; we used to do this still running from ROM,
+ * where had to use getenv_r(), which can be pretty slow when
+ * the environment is in EEPROM.
*/
s = getenv ("ethaddr");
#if defined (CONFIG_MBX) || defined (CONFIG_RPXCLASSIC) || defined(CONFIG_IAD210)
diff --git a/lib_ppc/extable.c b/lib_ppc/extable.c
index 2f90df0..d92f142 100644
--- a/lib_ppc/extable.c
+++ b/lib_ppc/extable.c
@@ -50,20 +50,20 @@ search_one_table(const struct exception_table_entry *first,
const struct exception_table_entry *last,
unsigned long value)
{
- while (first <= last) {
+ while (first <= last) {
const struct exception_table_entry *mid;
long diff;
mid = (last - first) / 2 + first;
diff = mid->insn - value;
- if (diff == 0)
- return mid->fixup;
- else if (diff < 0)
- first = mid+1;
- else
- last = mid-1;
- }
- return 0;
+ if (diff == 0)
+ return mid->fixup;
+ else if (diff < 0)
+ first = mid+1;
+ else
+ last = mid-1;
+ }
+ return 0;
}
int ex_tab_message = 1;
diff --git a/lib_ppc/kgdb.c b/lib_ppc/kgdb.c
index cef35d3..4c5d79a 100644
--- a/lib_ppc/kgdb.c
+++ b/lib_ppc/kgdb.c
@@ -320,7 +320,7 @@ kgdb_breakpoint(int argc, char *argv[])
{
asm(" .globl breakinst\n\
breakinst: .long 0x7d821008\n\
- ");
+ ");
}
#endif /* CFG_CMD_KGDB */
diff --git a/lib_ppc/time.c b/lib_ppc/time.c
index 3b3c50e..51e8e840 100644
--- a/lib_ppc/time.c
+++ b/lib_ppc/time.c
@@ -97,4 +97,3 @@ int init_timebase (void)
return (0);
}
/* ------------------------------------------------------------------------- */
-