common: move extern char console_buffer[] to common.h

Extract all extern declarations for console_buffer[] out of c files into
the common.h header.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Cc: Frank Gottschling <fgottschling@eltec.de>
Cc: Murray Jensen <Murray.Jensen@csiro.au>
This commit is contained in:
Igor Grinberg 2011-11-07 01:13:56 +00:00 committed by Stefano Babic
parent 507651d611
commit e3150460a4
14 changed files with 1 additions and 17 deletions

View File

@ -51,7 +51,6 @@ static int setBootStrapClock(cmd_tbl_t *cmdtp, int incrflag, int flag,
uchar chip; uchar chip;
ulong data; ulong data;
int nbytes; int nbytes;
extern char console_buffer[];
char sysClock[4]; char sysClock[4];
char cpuClock[4]; char cpuClock[4];

View File

@ -31,7 +31,6 @@
#include "srom.h" #include "srom.h"
/* imports */ /* imports */
extern char console_buffer[CONFIG_SYS_CBSIZE];
extern int l2_cache_enable (int l2control); extern int l2_cache_enable (int l2control);
extern void *nvram_read (void *dest, const short src, size_t count); extern void *nvram_read (void *dest, const short src, size_t count);
extern void nvram_write (short dest, const void *src, size_t count); extern void nvram_write (short dest, const void *src, size_t count);

View File

@ -29,7 +29,6 @@
#include "srom.h" #include "srom.h"
/* imports */ /* imports */
extern char console_buffer[CONFIG_SYS_CBSIZE];
extern int l2_cache_enable (int l2control); extern int l2_cache_enable (int l2control);
extern int eepro100_write_eeprom (struct eth_device *dev, int location, extern int eepro100_write_eeprom (struct eth_device *dev, int location,
int addr_len, unsigned short data); int addr_len, unsigned short data);

View File

@ -35,9 +35,6 @@
#include "mpc8xx.h" #include "mpc8xx.h"
#include <video_fb.h> #include <video_fb.h>
/* imports from common/main.c */
extern char console_buffer[CONFIG_SYS_CBSIZE];
extern void eeprom_init (void); extern void eeprom_init (void);
extern int eeprom_read (unsigned dev_addr, unsigned offset, extern int eeprom_read (unsigned dev_addr, unsigned offset,
unsigned char *buffer, unsigned cnt); unsigned char *buffer, unsigned cnt);

View File

@ -23,9 +23,6 @@
#include <common.h> #include <common.h>
/* imports from common/main.c */
extern char console_buffer[CONFIG_SYS_CBSIZE];
int int
hymod_get_serno (const char *prompt) hymod_get_serno (const char *prompt)
{ {

View File

@ -15,7 +15,6 @@ DECLARE_GLOBAL_DATA_PTR;
extern void show_regs __P ((struct pt_regs *)); extern void show_regs __P ((struct pt_regs *));
extern int run_command __P ((const char *, int)); extern int run_command __P ((const char *, int));
extern char console_buffer[];
ulong dis_last_addr = 0; /* Last address disassembled */ ulong dis_last_addr = 0; /* Last address disassembled */
ulong dis_last_len = 20; /* Default disassembler length */ ulong dis_last_len = 20; /* Default disassembler length */

View File

@ -68,7 +68,6 @@ int do_setdcr (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
/* DCR's value */ /* DCR's value */
int nbytes; int nbytes;
extern char console_buffer[];
/* Validate arguments */ /* Validate arguments */
if (argc < 2) if (argc < 2)

View File

@ -449,7 +449,6 @@ mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const arg
ulong data; ulong data;
int size = 1; int size = 1;
int nbytes; int nbytes;
extern char console_buffer[];
if (argc != 3) if (argc != 3)
return cmd_usage(cmdtp); return cmd_usage(cmdtp);

View File

@ -977,7 +977,6 @@ mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[])
{ {
ulong addr, i; ulong addr, i;
int nbytes, size; int nbytes, size;
extern char console_buffer[];
if (argc != 2) if (argc != 2)
return cmd_usage(cmdtp); return cmd_usage(cmdtp);

View File

@ -423,7 +423,6 @@ int do_env_set(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#if defined(CONFIG_CMD_ASKENV) #if defined(CONFIG_CMD_ASKENV)
int do_env_ask(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) int do_env_ask(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{ {
extern char console_buffer[CONFIG_SYS_CBSIZE];
char message[CONFIG_SYS_CBSIZE]; char message[CONFIG_SYS_CBSIZE];
int size = CONFIG_SYS_CBSIZE - 1; int size = CONFIG_SYS_CBSIZE - 1;
int i, len, pos; int i, len, pos;

View File

@ -341,7 +341,6 @@ pci_cfg_modify (pci_dev_t bdf, ulong addr, ulong size, ulong value, int incrflag
{ {
ulong i; ulong i;
int nbytes; int nbytes;
extern char console_buffer[];
uint val4; uint val4;
ushort val2; ushort val2;
u_char val1; u_char val1;

View File

@ -1000,7 +1000,6 @@ static void get_user_input(struct in_str *i)
fflush(stdout); fflush(stdout);
i->p = the_command; i->p = the_command;
#else #else
extern char console_buffer[];
int n; int n;
static char the_command[CONFIG_SYS_CBSIZE]; static char the_command[CONFIG_SYS_CBSIZE];

View File

@ -62,7 +62,6 @@ int mdm_init (void)
char env_str[16]; char env_str[16];
char *init_str; char *init_str;
int i; int i;
extern char console_buffer[];
extern void enable_putc(void); extern void enable_putc(void);
extern int hwflow_onoff(int); extern int hwflow_onoff(int);

View File

@ -272,6 +272,7 @@ void reset_cmd_timeout(void);
#ifdef CONFIG_MENU #ifdef CONFIG_MENU
int abortboot(int bootdelay); int abortboot(int bootdelay);
#endif #endif
extern char console_buffer[];
/* arch/$(ARCH)/lib/board.c */ /* arch/$(ARCH)/lib/board.c */
void board_init_f (ulong) __attribute__ ((noreturn)); void board_init_f (ulong) __attribute__ ((noreturn));