diff options
Diffstat (limited to 'post')
-rw-r--r-- | post/ether.c | 3 | ||||
-rw-r--r-- | post/memory.c | 3 | ||||
-rw-r--r-- | post/post.c | 10 | ||||
-rw-r--r-- | post/sysmon.c | 6 | ||||
-rw-r--r-- | post/uart.c | 6 |
5 files changed, 10 insertions, 18 deletions
diff --git a/post/ether.c b/post/ether.c index 660620e..8c87b59 100644 --- a/post/ether.c +++ b/post/ether.c @@ -51,6 +51,8 @@ #include <net.h> #include <serial.h> +DECLARE_GLOBAL_DATA_PTR; + #define MIN_PACKET_LENGTH 64 #define MAX_PACKET_LENGTH 256 #define TEST_NUM 1 @@ -109,7 +111,6 @@ static RTXBD *rtx; static void scc_init (int scc_index) { - DECLARE_GLOBAL_DATA_PTR; bd_t *bd = gd->bd; static int proff[] = diff --git a/post/memory.c b/post/memory.c index a10bc50..a2c088b 100644 --- a/post/memory.c +++ b/post/memory.c @@ -157,6 +157,8 @@ #if CONFIG_POST & CFG_POST_MEMORY +DECLARE_GLOBAL_DATA_PTR; + /* * Define INJECT_*_ERRORS for testing error detection in the presence of * _good_ hardware. @@ -455,7 +457,6 @@ static int memory_post_tests (unsigned long start, unsigned long size) int memory_post_test (int flags) { int ret = 0; - DECLARE_GLOBAL_DATA_PTR; bd_t *bd = gd->bd; unsigned long memsize = (bd->bi_memsize >= 256 << 20 ? 256 << 20 : bd->bi_memsize) - (1 << 20); diff --git a/post/post.c b/post/post.c index b3df91a..e1066da 100644 --- a/post/post.c +++ b/post/post.c @@ -32,14 +32,14 @@ #ifdef CONFIG_POST +DECLARE_GLOBAL_DATA_PTR; + #define POST_MAX_NUMBER 32 #define BOOTMODE_MAGIC 0xDEAD0000 int post_init_f (void) { - DECLARE_GLOBAL_DATA_PTR; - int res = 0; unsigned int i; @@ -62,7 +62,6 @@ int post_init_f (void) void post_bootmode_init (void) { - DECLARE_GLOBAL_DATA_PTR; int bootmode = post_bootmode_get (0); int newword; @@ -110,20 +109,17 @@ int post_bootmode_get (unsigned int *last_test) /* POST tests run before relocation only mark status bits .... */ static void post_log_mark_start ( unsigned long testid ) { - DECLARE_GLOBAL_DATA_PTR; gd->post_log_word |= (testid)<<16; } static void post_log_mark_succ ( unsigned long testid ) { - DECLARE_GLOBAL_DATA_PTR; gd->post_log_word |= testid; } /* ... and the messages are output once we are relocated */ void post_output_backlog ( void ) { - DECLARE_GLOBAL_DATA_PTR; int j; for (j = 0; j < post_list_size; j++) { @@ -379,8 +375,6 @@ int post_log (char *format, ...) void post_reloc (void) { - DECLARE_GLOBAL_DATA_PTR; - unsigned int i; /* diff --git a/post/sysmon.c b/post/sysmon.c index 72fcac3..f61d598 100644 --- a/post/sysmon.c +++ b/post/sysmon.c @@ -52,6 +52,8 @@ #if CONFIG_POST & CFG_POST_SYSMON +DECLARE_GLOBAL_DATA_PTR; + static int sysmon_temp_invalid = 0; /* #define DEBUG */ @@ -159,8 +161,6 @@ int sysmon_init_f (void) void sysmon_reloc (void) { - DECLARE_GLOBAL_DATA_PTR; - sysmon_t ** l; sysmon_table_t * t; @@ -281,8 +281,6 @@ static void sysmon_ccfl_enable (sysmon_table_t * this) int sysmon_post_test (int flags) { - DECLARE_GLOBAL_DATA_PTR; - int res = 0; sysmon_table_t * t; uint val; diff --git a/post/uart.c b/post/uart.c index 23bf036..fd97e38 100644 --- a/post/uart.c +++ b/post/uart.c @@ -50,6 +50,8 @@ #include <command.h> #include <serial.h> +DECLARE_GLOBAL_DATA_PTR; + #define CTLR_SMC 0 #define CTLR_SCC 1 @@ -82,8 +84,6 @@ static int proff_scc[] = static void smc_init (int smc_index) { - DECLARE_GLOBAL_DATA_PTR; - static int cpm_cr_ch[] = { CPM_CR_CH_SMC1, CPM_CR_CH_SMC2 }; volatile immap_t *im = (immap_t *) CFG_IMMR; @@ -288,8 +288,6 @@ static int smc_getc (int smc_index) static void scc_init (int scc_index) { - DECLARE_GLOBAL_DATA_PTR; - static int cpm_cr_ch[] = { CPM_CR_CH_SCC1, CPM_CR_CH_SCC2, |