summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGururaja Hebbar K R <gururajakr@sanyo.co.in>2008-08-07 13:13:27 +0530
committerWolfgang Denk <wd@denx.de>2008-08-11 00:13:27 +0200
commita9fe0c3e7ca48afa50d6a0db99fa91e7282d73d8 (patch)
tree0b1013cf443eda77fde8d148f2d4a66d4f18dad4
parent0d28f34bbe56d0971bd603789dcc6fe7adf11f14 (diff)
downloadu-boot-imx-a9fe0c3e7ca48afa50d6a0db99fa91e7282d73d8.zip
u-boot-imx-a9fe0c3e7ca48afa50d6a0db99fa91e7282d73d8.tar.gz
u-boot-imx-a9fe0c3e7ca48afa50d6a0db99fa91e7282d73d8.tar.bz2
common/cmd_load.c - Minor code & Coding Style cleanup
- os_data_header Variable is a carry over feature & unused. So removed all instance of this variable - Minor Code Style Update Signed-off-by: Gururaja Hebbar <gururajakr@sanyo.co.in> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
-rw-r--r--common/cmd_load.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/common/cmd_load.c b/common/cmd_load.c
index 1b75a7b..ab167f5 100644
--- a/common/cmd_load.c
+++ b/common/cmd_load.c
@@ -424,7 +424,6 @@ write_record (char *buf)
#define untochar(x) ((int) (((x) - SPACE) & 0xff))
extern int os_data_count;
-extern int os_data_header[8];
static void set_kerm_bin_mode(unsigned long *);
static int k_recv(void);
@@ -631,11 +630,6 @@ void send_nack (int n)
}
-/* os_data_* takes an OS Open image and puts it into memory, and
- puts the boot header in an array named os_data_header
-
- if image is binary, no header is stored in os_data_header.
-*/
void (*os_data_init) (void);
void (*os_data_char) (char new_char);
static int os_data_state, os_data_state_saved;
@@ -643,25 +637,28 @@ int os_data_count;
static int os_data_count_saved;
static char *os_data_addr, *os_data_addr_saved;
static char *bin_start_address;
-int os_data_header[8];
+
static void bin_data_init (void)
{
os_data_state = 0;
os_data_count = 0;
os_data_addr = bin_start_address;
}
+
static void os_data_save (void)
{
os_data_state_saved = os_data_state;
os_data_count_saved = os_data_count;
os_data_addr_saved = os_data_addr;
}
+
static void os_data_restore (void)
{
os_data_state = os_data_state_saved;
os_data_count = os_data_count_saved;
os_data_addr = os_data_addr_saved;
}
+
static void bin_data_char (char new_char)
{
switch (os_data_state) {
@@ -671,6 +668,7 @@ static void bin_data_char (char new_char)
break;
}
}
+
static void set_kerm_bin_mode (unsigned long *addr)
{
bin_start_address = (char *) addr;
@@ -686,16 +684,19 @@ void k_data_init (void)
k_data_escape = 0;
os_data_init ();
}
+
void k_data_save (void)
{
k_data_escape_saved = k_data_escape;
os_data_save ();
}
+
void k_data_restore (void)
{
k_data_escape = k_data_escape_saved;
os_data_restore ();
}
+
void k_data_char (char new_char)
{
if (k_data_escape) {