summaryrefslogtreecommitdiffstats
path: root/lib_mips
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_mips
parent993cad9364c6b87ae429d1ed1130d8153f6f027e (diff)
downloadblackbird-obmc-uboot-8bde7f776c77b343aca29b8c7b58464d915ac245.tar.gz
blackbird-obmc-uboot-8bde7f776c77b343aca29b8c7b58464d915ac245.zip
* 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_mips')
-rw-r--r--lib_mips/Makefile2
-rw-r--r--lib_mips/board.c8
-rw-r--r--lib_mips/mips_linux.c33
-rw-r--r--lib_mips/time.c2
4 files changed, 21 insertions, 24 deletions
diff --git a/lib_mips/Makefile b/lib_mips/Makefile
index 540383ddf7..d5980e6dcd 100644
--- a/lib_mips/Makefile
+++ b/lib_mips/Makefile
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
LIB = lib$(ARCH).a
-AOBJS =
+AOBJS =
COBJS = board.o time.o mips_linux.o
diff --git a/lib_mips/board.c b/lib_mips/board.c
index 2bbf029d2e..11e5011e70 100644
--- a/lib_mips/board.c
+++ b/lib_mips/board.c
@@ -212,7 +212,7 @@ void board_init_f(ulong bootflag)
#ifdef DEBUG
printf ("Top of RAM usable for U-Boot at: %08lx\n", addr);
#endif
-
+
/* Reserve memory for U-Boot code, data & bss
* round down to next 16 kB limit
*/
@@ -304,7 +304,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;
ulong size;
extern void malloc_bin_reloc (void);
@@ -329,7 +328,7 @@ void board_init_r (gd_t *id, ulong 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;
@@ -358,7 +357,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
#ifndef CFG_ENV_IS_NOWHERE
env_name_spec += gd->reloc_off;
#endif
-
+
/* configure available FLASH banks */
size = flash_init();
display_flash_config (size);
@@ -434,4 +433,3 @@ void hang (void)
puts ("### ERROR ### Please RESET the board ###\n");
for (;;);
}
-
diff --git a/lib_mips/mips_linux.c b/lib_mips/mips_linux.c
index e73d4d8527..5469d506d9 100644
--- a/lib_mips/mips_linux.c
+++ b/lib_mips/mips_linux.c
@@ -23,7 +23,6 @@
#include <common.h>
#include <command.h>
-#include <cmd_boot.h>
#include <image.h>
#include <zlib.h>
#include <asm/byteorder.h>
@@ -41,6 +40,8 @@
extern image_header_t header; /* from cmd_bootm.c */
+extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+
static int linux_argc;
static char ** linux_argv;
@@ -112,7 +113,7 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
csum = crc32 (0, (char *)data, len);
if (csum != ntohl(hdr->ih_dcrc)) {
printf ("Bad Data CRC\n");
- SHOW_BOOT_PROGRESS (-12);
+ SHOW_BOOT_PROGRESS (-12);
do_reset (cmdtp, flag, argc, argv);
}
printf ("OK\n");
@@ -154,7 +155,7 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
/*
* no initrd image
*/
- SHOW_BOOT_PROGRESS (14);
+ SHOW_BOOT_PROGRESS (14);
data = 0;
}
@@ -219,19 +220,19 @@ static void linux_params_init (ulong start, char * line)
quote = strchr (line, '"');
next = strchr (line, ' ');
- while (next != NULL && quote != NULL && quote < next)
+ while (next != NULL && quote != NULL && quote < next)
{
/* we found a left quote before the next blank
- * now we have to find the matching right quote
- */
- next = strchr (quote + 1, '"');
- if (next != NULL)
+ * now we have to find the matching right quote
+ */
+ next = strchr (quote + 1, '"');
+ if (next != NULL)
{
- quote = strchr (next + 1, '"');
- next = strchr (next + 1, ' ');
- }
- }
-
+ quote = strchr (next + 1, '"');
+ next = strchr (next + 1, ' ');
+ }
+ }
+
if (next == NULL)
{
next = line + strlen (line);
@@ -243,9 +244,9 @@ static void linux_params_init (ulong start, char * line)
argp += next - line + 1;
linux_argc ++;
-
+
if (*next) next ++;
-
+
line = next;
}
@@ -269,7 +270,7 @@ static void linux_env_set (char * env_name, char * env_val)
strcpy (linux_env_p, env_val);
linux_env_p += strlen (env_val);
-
+
linux_env_p ++;
linux_env [++ linux_env_idx] = 0;
}
diff --git a/lib_mips/time.c b/lib_mips/time.c
index 9e6138da96..0cb733cb06 100644
--- a/lib_mips/time.c
+++ b/lib_mips/time.c
@@ -99,5 +99,3 @@ ulong get_tbclk(void)
{
return CFG_HZ;
}
-
-
OpenPOWER on IntegriCloud