diff options
| author | Wolfgang Denk <wd@pollux.denx.de> | 2006-03-31 18:32:53 +0200 | 
|---|---|---|
| committer | Wolfgang Denk <wd@pollux.denx.de> | 2006-03-31 18:32:53 +0200 | 
| commit | d87080b721e4f8dca977af7571c5338ae7bb8db7 (patch) | |
| tree | 514fc21eec39a2dd57f7aea516844a4400f8f140 /common/console.c | |
| parent | f6dbbe986481cff01334c64cacb971a5f237a9a9 (diff) | |
| download | olio-uboot-2014.01-d87080b721e4f8dca977af7571c5338ae7bb8db7.tar.xz olio-uboot-2014.01-d87080b721e4f8dca977af7571c5338ae7bb8db7.zip | |
GCC-4.x fixes: clean up global data pointer initialization for all boards.
Diffstat (limited to 'common/console.c')
| -rw-r--r-- | common/console.c | 18 | 
1 files changed, 2 insertions, 16 deletions
| diff --git a/common/console.c b/common/console.c index 3c535d23d..e9f23bec1 100644 --- a/common/console.c +++ b/common/console.c @@ -27,6 +27,8 @@  #include <console.h>  #include <exports.h> +DECLARE_GLOBAL_DATA_PTR; +  #ifdef CONFIG_AMIGAONEG3SE  int console_changed = 0;  #endif @@ -48,7 +50,6 @@ extern int overwrite_console (void);  static int console_setfile (int file, device_t * dev)  { -	DECLARE_GLOBAL_DATA_PTR;  	int error = 0;  	if (dev == NULL) @@ -161,8 +162,6 @@ void fprintf (int file, const char *fmt, ...)  int getc (void)  { -	DECLARE_GLOBAL_DATA_PTR; -  	if (gd->flags & GD_FLG_DEVINIT) {  		/* Get from the standard input */  		return fgetc (stdin); @@ -174,8 +173,6 @@ int getc (void)  int tstc (void)  { -	DECLARE_GLOBAL_DATA_PTR; -  	if (gd->flags & GD_FLG_DEVINIT) {  		/* Test the standard input */  		return ftstc (stdin); @@ -187,8 +184,6 @@ int tstc (void)  void putc (const char c)  { -	DECLARE_GLOBAL_DATA_PTR; -  #ifdef CONFIG_SILENT_CONSOLE  	if (gd->flags & GD_FLG_SILENT)  		return; @@ -205,8 +200,6 @@ void putc (const char c)  void puts (const char *s)  { -	DECLARE_GLOBAL_DATA_PTR; -  #ifdef CONFIG_SILENT_CONSOLE  	if (gd->flags & GD_FLG_SILENT)  		return; @@ -258,8 +251,6 @@ static int ctrlc_disabled = 0;	/* see disable_ctrl() */  static int ctrlc_was_pressed = 0;  int ctrlc (void)  { -	DECLARE_GLOBAL_DATA_PTR; -  	if (!ctrlc_disabled && gd->have_console) {  		if (tstc ()) {  			switch (getc ()) { @@ -370,8 +361,6 @@ int console_assign (int file, char *devname)  /* Called before relocation - use serial functions */  int console_init_f (void)  { -	DECLARE_GLOBAL_DATA_PTR; -  	gd->have_console = 1;  #ifdef CONFIG_SILENT_CONSOLE @@ -407,7 +396,6 @@ device_t *search_device (int flags, char *name)  /* Called after the relocation - use desired console functions */  int console_init_r (void)  { -	DECLARE_GLOBAL_DATA_PTR;  	char *stdinname, *stdoutname, *stderrname;  	device_t *inputdev = NULL, *outputdev = NULL, *errdev = NULL;  #ifdef CFG_CONSOLE_ENV_OVERWRITE @@ -499,8 +487,6 @@ int console_init_r (void)  /* Called after the relocation - use desired console functions */  int console_init_r (void)  { -	DECLARE_GLOBAL_DATA_PTR; -  	device_t *inputdev = NULL, *outputdev = NULL;  	int i, items = ListNumItems (devlist); |