summaryrefslogtreecommitdiffstats
path: root/common/hush.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-10-14 19:43:55 +0000
committerwdenk <wdenk>2003-10-14 19:43:55 +0000
commit2d5b561e2bfdee8552a99b2cf93016cce2a74895 (patch)
tree33a47c8393624e338d0cc8914c773ab9613cb385 /common/hush.c
parentf72da3406bf6f1c1bce9aa03b07d070413a916af (diff)
downloadblackbird-obmc-uboot-2d5b561e2bfdee8552a99b2cf93016cce2a74895.tar.gz
blackbird-obmc-uboot-2d5b561e2bfdee8552a99b2cf93016cce2a74895.zip
* Make sure HUSH is initialized for running auto-update scripts
* Make 5200 reset command _really_ reset the board, without running any other code after it * Fix flash mapping and display on P3G4 board * Patch by Kyle Harris, 15 Jul 2003: - add support for Intel IXP425 CPU - add support for IXDP425 eval board
Diffstat (limited to 'common/hush.c')
-rw-r--r--common/hush.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/common/hush.c b/common/hush.c
index dbb952ddba..7e8a80deb9 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -313,7 +313,7 @@ struct variables *top_vars = &shell_ver;
#else
static int flag_repeat = 0;
static int do_repeat = 0;
-static struct variables *top_vars ;
+static struct variables *top_vars = NULL ;
#endif /*__U_BOOT__ */
#define B_CHUNK (100)
@@ -3194,13 +3194,15 @@ static void u_boot_hush_reloc(void)
int u_boot_hush_start(void)
{
- top_vars = malloc(sizeof(struct variables));
- top_vars->name = "HUSH_VERSION";
- top_vars->value = "0.01";
- top_vars->next = 0;
- top_vars->flg_export = 0;
- top_vars->flg_read_only = 1;
- u_boot_hush_reloc();
+ if (top_vars == NULL) {
+ top_vars = malloc(sizeof(struct variables));
+ top_vars->name = "HUSH_VERSION";
+ top_vars->value = "0.01";
+ top_vars->next = 0;
+ top_vars->flg_export = 0;
+ top_vars->flg_read_only = 1;
+ u_boot_hush_reloc();
+ }
return 0;
}
OpenPOWER on IntegriCloud