Fix cases where DECLARE_GLOBAL_DATA_PTR was not declared as global

Signed-off-by: Wolfgang Denk <wd@denx.de>
master
Wolfgang Denk 18 years ago
parent 66b3f24d66
commit 1218abf1b5
  1. 4
      board/amcc/katmai/katmai.c
  2. 4
      board/amcc/taishan/taishan.c
  3. 4
      board/amcc/yucca/yucca.c
  4. 3
      board/bf533-ezkit/bf533-ezkit.c
  5. 3
      board/bf533-stamp/bf533-stamp.c
  6. 3
      board/bf537-stamp/bf537-stamp.c
  7. 3
      board/bf561-ezkit/bf561-ezkit.c
  8. 3
      board/freescale/mpc8313erdb/sdram.c
  9. 7
      board/lpc2292sodimm/lpc2292sodimm.c
  10. 4
      board/mpc7448hpc2/mpc7448hpc2.c
  11. 4
      board/mpc7448hpc2/tsi108_init.c
  12. 4
      board/mpl/vcma9/cmd_vcma9.c
  13. 5
      board/sbc2410x/sbc2410x.c
  14. 7
      board/siemens/SMN42/smn42.c
  15. 4
      board/tqm5200/tqm5200.c
  16. 2
      cpu/arm720t/serial.c
  17. 1
      cpu/bf533/serial.c
  18. 3
      cpu/bf537/i2c.c
  19. 3
      cpu/bf537/serial.c
  20. 3
      cpu/bf561/serial.c
  21. 4
      cpu/mcf532x/cpu.c
  22. 4
      cpu/mcf532x/speed.c
  23. 3
      cpu/mpc86xx/cpu_init.c
  24. 2
      cpu/mpc86xx/speed.c
  25. 4
      cpu/mpc86xx/traps.c
  26. 7
      drivers/qe/qe.c
  27. 3
      drivers/usbdcore_mpc8xx.c
  28. 3
      include/configs/atstk1002.h
  29. 7
      lib_blackfin/board.c
  30. 10
      lib_blackfin/post.c

@ -34,6 +34,8 @@
#undef PCIE_ENDPOINT #undef PCIE_ENDPOINT
/* #define PCIE_ENDPOINT 1 */ /* #define PCIE_ENDPOINT 1 */
DECLARE_GLOBAL_DATA_PTR;
int ppc440spe_init_pcie_rootport(int port); int ppc440spe_init_pcie_rootport(int port);
void ppc440spe_setup_pcie(struct pci_controller *hose, int port); void ppc440spe_setup_pcie(struct pci_controller *hose, int port);
@ -322,8 +324,6 @@ int pci_pre_init(struct pci_controller * hose )
#if defined(CONFIG_PCI) && defined(CFG_PCI_TARGET_INIT) #if defined(CONFIG_PCI) && defined(CFG_PCI_TARGET_INIT)
void pci_target_init(struct pci_controller * hose ) void pci_target_init(struct pci_controller * hose )
{ {
DECLARE_GLOBAL_DATA_PTR;
/*-------------------------------------------------------------------+ /*-------------------------------------------------------------------+
* Disable everything * Disable everything
*-------------------------------------------------------------------*/ *-------------------------------------------------------------------*/

@ -32,6 +32,8 @@
void show_reset_reg(void); void show_reset_reg(void);
#endif #endif
DECLARE_GLOBAL_DATA_PTR;
int lcd_init(void); int lcd_init(void);
int board_early_init_f (void) int board_early_init_f (void)
@ -266,8 +268,6 @@ int pci_pre_init(struct pci_controller * hose )
#if defined(CONFIG_PCI) && defined(CFG_PCI_TARGET_INIT) #if defined(CONFIG_PCI) && defined(CFG_PCI_TARGET_INIT)
void pci_target_init(struct pci_controller * hose ) void pci_target_init(struct pci_controller * hose )
{ {
DECLARE_GLOBAL_DATA_PTR;
/*--------------------------------------------------------------------------+ /*--------------------------------------------------------------------------+
* Disable everything * Disable everything
*--------------------------------------------------------------------------*/ *--------------------------------------------------------------------------*/

@ -34,6 +34,8 @@
#include "yucca.h" #include "yucca.h"
#include "../cpu/ppc4xx/440spe_pcie.h" #include "../cpu/ppc4xx/440spe_pcie.h"
DECLARE_GLOBAL_DATA_PTR;
#undef PCIE_ENDPOINT #undef PCIE_ENDPOINT
/* #define PCIE_ENDPOINT 1 */ /* #define PCIE_ENDPOINT 1 */
@ -668,8 +670,6 @@ int pci_pre_init(struct pci_controller * hose )
#if defined(CONFIG_PCI) && defined(CFG_PCI_TARGET_INIT) #if defined(CONFIG_PCI) && defined(CFG_PCI_TARGET_INIT)
void pci_target_init(struct pci_controller * hose ) void pci_target_init(struct pci_controller * hose )
{ {
DECLARE_GLOBAL_DATA_PTR;
/*-------------------------------------------------------------------+ /*-------------------------------------------------------------------+
* Disable everything * Disable everything
*-------------------------------------------------------------------*/ *-------------------------------------------------------------------*/

@ -30,6 +30,8 @@
#include "psd4256.h" #include "psd4256.h"
#endif #endif
DECLARE_GLOBAL_DATA_PTR;
int checkboard(void) int checkboard(void)
{ {
#if (BFIN_CPU == ADSP_BF531) #if (BFIN_CPU == ADSP_BF531)
@ -46,7 +48,6 @@ int checkboard(void)
long int initdram(int board_type) long int initdram(int board_type)
{ {
DECLARE_GLOBAL_DATA_PTR;
#ifdef DEBUG #ifdef DEBUG
int brate; int brate;
char *tmp = getenv("baudrate"); char *tmp = getenv("baudrate");

@ -30,6 +30,8 @@
#include <asm/io.h> #include <asm/io.h>
#include "bf533-stamp.h" #include "bf533-stamp.h"
DECLARE_GLOBAL_DATA_PTR;
#define STATUS_LED_OFF 0 #define STATUS_LED_OFF 0
#define STATUS_LED_ON 1 #define STATUS_LED_ON 1
@ -55,7 +57,6 @@ int checkboard(void)
long int initdram(int board_type) long int initdram(int board_type)
{ {
DECLARE_GLOBAL_DATA_PTR;
#ifdef DEBUG #ifdef DEBUG
printf("SDRAM attributes:\n"); printf("SDRAM attributes:\n");
printf printf

@ -32,6 +32,8 @@
#include <asm/io.h> #include <asm/io.h>
#include "ether_bf537.h" #include "ether_bf537.h"
DECLARE_GLOBAL_DATA_PTR;
#define POST_WORD_ADDR 0xFF903FFC #define POST_WORD_ADDR 0xFF903FFC
/* /*
@ -132,7 +134,6 @@ void cf_outsw(unsigned short *addr, unsigned short *sect_buf, int words)
long int initdram(int board_type) long int initdram(int board_type)
{ {
DECLARE_GLOBAL_DATA_PTR;
#ifdef DEBUG #ifdef DEBUG
int brate; int brate;
char *tmp = getenv("baudrate"); char *tmp = getenv("baudrate");

@ -29,6 +29,8 @@
#include <common.h> #include <common.h>
#include <asm/io.h> #include <asm/io.h>
DECLARE_GLOBAL_DATA_PTR;
int checkboard(void) int checkboard(void)
{ {
printf("CPU: ADSP BF561\n"); printf("CPU: ADSP BF561\n");
@ -39,7 +41,6 @@ int checkboard(void)
long int initdram(int board_type) long int initdram(int board_type)
{ {
DECLARE_GLOBAL_DATA_PTR;
#ifdef DEBUG #ifdef DEBUG
int brate; int brate;
char *tmp = getenv("baudrate"); char *tmp = getenv("baudrate");

@ -33,10 +33,11 @@
#include <asm/processor.h> #include <asm/processor.h>
DECLARE_GLOBAL_DATA_PTR;
#ifndef CFG_8313ERDB_BROKEN_PMC #ifndef CFG_8313ERDB_BROKEN_PMC
static void resume_from_sleep(void) static void resume_from_sleep(void)
{ {
DECLARE_GLOBAL_DATA_PTR;
u32 magic = *(u32 *)0; u32 magic = *(u32 *)0;
typedef void (*func_t)(void); typedef void (*func_t)(void);

@ -28,8 +28,7 @@
#include <common.h> #include <common.h>
#include <clps7111.h> #include <clps7111.h>
/* ------------------------------------------------------------------------- */ DECLARE_GLOBAL_DATA_PTR;
/* /*
* Miscelaneous platform dependent initialisations * Miscelaneous platform dependent initialisations
@ -37,8 +36,6 @@
int board_init (void) int board_init (void)
{ {
DECLARE_GLOBAL_DATA_PTR;
/* Activate LED flasher */ /* Activate LED flasher */
IO_LEDFLSH = 0x40; IO_LEDFLSH = 0x40;
@ -53,8 +50,6 @@ int board_init (void)
int dram_init (void) int dram_init (void)
{ {
DECLARE_GLOBAL_DATA_PTR;
gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;

@ -38,6 +38,8 @@ extern void ft_cpu_setup (void *blob, bd_t *bd);
#undef DEBUG #undef DEBUG
DECLARE_GLOBAL_DATA_PTR;
extern void flush_data_cache (void); extern void flush_data_cache (void);
extern void invalidate_l1_instruction_cache (void); extern void invalidate_l1_instruction_cache (void);
extern void tsi108_init_f (void); extern void tsi108_init_f (void);
@ -46,8 +48,6 @@ int display_mem_map (void);
void after_reloc (ulong dest_addr) void after_reloc (ulong dest_addr)
{ {
DECLARE_GLOBAL_DATA_PTR;
/* /*
* Jump to the main U-Boot board init code * Jump to the main U-Boot board init code
*/ */

@ -33,6 +33,8 @@
#include <asm/processor.h> #include <asm/processor.h>
#include <tsi108.h> #include <tsi108.h>
DECLARE_GLOBAL_DATA_PTR;
extern void mpicInit (int verbose); extern void mpicInit (int verbose);
/* /*
@ -141,7 +143,6 @@ unsigned long get_board_bus_clk (void)
int board_early_init_f (void) int board_early_init_f (void)
{ {
DECLARE_GLOBAL_DATA_PTR;
ulong i; ulong i;
gd->mem_clk = 0; gd->mem_clk = 0;
@ -583,7 +584,6 @@ unsigned long get_l2cr (void)
int misc_init_r (void) int misc_init_r (void)
{ {
DECLARE_GLOBAL_DATA_PTR;
#ifdef CFG_CLK_SPREAD /* Initialize Spread-Spectrum Clock generation */ #ifdef CFG_CLK_SPREAD /* Initialize Spread-Spectrum Clock generation */
ulong i; ulong i;

@ -40,6 +40,8 @@ static uchar cs8900_chksum(ushort data)
#endif #endif
DECLARE_GLOBAL_DATA_PTR;
extern void print_vcma9_info(void); extern void print_vcma9_info(void);
extern int vcma9_cantest(int); extern int vcma9_cantest(int);
extern int vcma9_nandtest(void); extern int vcma9_nandtest(void);
@ -53,8 +55,6 @@ extern int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
int do_vcma9(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) int do_vcma9(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{ {
DECLARE_GLOBAL_DATA_PTR;
if (strcmp(argv[1], "info") == 0) if (strcmp(argv[1], "info") == 0)
{ {
print_vcma9_info(); print_vcma9_info();

@ -35,7 +35,7 @@
#include <linux/mtd/nand.h> #include <linux/mtd/nand.h>
#endif #endif
/* ------------------------------------------------------------------------- */ DECLARE_GLOBAL_DATA_PTR;
#define FCLK_SPEED 1 #define FCLK_SPEED 1
@ -74,7 +74,6 @@ static inline void delay (unsigned long loops)
int board_init (void) int board_init (void)
{ {
DECLARE_GLOBAL_DATA_PTR;
S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER();
S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
@ -128,8 +127,6 @@ int board_init (void)
int dram_init (void) int dram_init (void)
{ {
DECLARE_GLOBAL_DATA_PTR;
gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;

@ -31,8 +31,7 @@
#include <common.h> #include <common.h>
#include <clps7111.h> #include <clps7111.h>
/* ------------------------------------------------------------------------- */ DECLARE_GLOBAL_DATA_PTR;
/* /*
* Miscellaneous platform dependent initialisations * Miscellaneous platform dependent initialisations
@ -40,8 +39,6 @@
int board_init (void) int board_init (void)
{ {
DECLARE_GLOBAL_DATA_PTR;
/* arch number MACH_TYPE_ARMADILLO - not official*/ /* arch number MACH_TYPE_ARMADILLO - not official*/
gd->bd->bi_arch_number = 83; gd->bd->bi_arch_number = 83;
@ -53,8 +50,6 @@ int board_init (void)
int dram_init (void) int dram_init (void)
{ {
DECLARE_GLOBAL_DATA_PTR;
gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;

@ -43,6 +43,8 @@
#include "mt48lc16m16a2-75.h" #include "mt48lc16m16a2-75.h"
#endif #endif
DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_PS2MULT #ifdef CONFIG_PS2MULT
void ps2mult_early_init(void); void ps2mult_early_init(void);
#endif #endif
@ -477,8 +479,6 @@ int silent_boot (void)
int board_early_init_f (void) int board_early_init_f (void)
{ {
DECLARE_GLOBAL_DATA_PTR;
if (silent_boot()) if (silent_boot())
gd->flags |= GD_FLG_SILENT; gd->flags |= GD_FLG_SILENT;

@ -129,8 +129,6 @@ serial_puts (const char *s)
void serial_setbrg (void) void serial_setbrg (void)
{ {
DECLARE_GLOBAL_DATA_PTR;
unsigned short divisor = 0; unsigned short divisor = 0;
switch (gd->baudrate) { switch (gd->baudrate) {

@ -76,7 +76,6 @@ void calc_baud(void)
void serial_setbrg(void) void serial_setbrg(void)
{ {
int i; int i;
DECLARE_GLOBAL_DATA_PTR;
calc_baud(); calc_baud();

@ -22,6 +22,8 @@
#include <i2c.h> #include <i2c.h>
#include <asm/io.h> #include <asm/io.h>
DECLARE_GLOBAL_DATA_PTR;
#define bfin_read16(addr) ({ unsigned __v; \ #define bfin_read16(addr) ({ unsigned __v; \
__asm__ __volatile__ (\ __asm__ __volatile__ (\
"%0 = w[%1] (z);\n\t"\ "%0 = w[%1] (z);\n\t"\
@ -68,7 +70,6 @@
#ifdef DEBUG_I2C #ifdef DEBUG_I2C
#define PRINTD(fmt,args...) do { \ #define PRINTD(fmt,args...) do { \
DECLARE_GLOBAL_DATA_PTR; \
if (gd->have_console) \ if (gd->have_console) \
printf(fmt ,##args); \ printf(fmt ,##args); \
} while (0) } while (0)

@ -52,6 +52,8 @@
#include <asm/io.h> #include <asm/io.h>
#include "serial.h" #include "serial.h"
DECLARE_GLOBAL_DATA_PTR;
unsigned long pll_div_fact; unsigned long pll_div_fact;
void calc_baud(void) void calc_baud(void)
@ -74,7 +76,6 @@ void calc_baud(void)
void serial_setbrg(void) void serial_setbrg(void)
{ {
int i; int i;
DECLARE_GLOBAL_DATA_PTR;
calc_baud(); calc_baud();

@ -52,6 +52,8 @@
#include "serial.h" #include "serial.h"
#include <asm/io.h> #include <asm/io.h>
DECLARE_GLOBAL_DATA_PTR;
unsigned long pll_div_fact; unsigned long pll_div_fact;
void calc_baud(void) void calc_baud(void)
@ -74,7 +76,6 @@ void calc_baud(void)
void serial_setbrg(void) void serial_setbrg(void)
{ {
int i; int i;
DECLARE_GLOBAL_DATA_PTR;
calc_baud(); calc_baud();

@ -31,6 +31,8 @@
#include <asm/immap.h> #include <asm/immap.h>
DECLARE_GLOBAL_DATA_PTR;
int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[])
{ {
volatile wdog_t *wdp = (wdog_t *) (MMAP_WDOG); volatile wdog_t *wdp = (wdog_t *) (MMAP_WDOG);
@ -48,8 +50,6 @@ int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[])
int checkcpu(void) int checkcpu(void)
{ {
DECLARE_GLOBAL_DATA_PTR;
volatile ccm_t *ccm = (ccm_t *) MMAP_CCM; volatile ccm_t *ccm = (ccm_t *) MMAP_CCM;
u16 msk; u16 msk;
u16 id = 0; u16 id = 0;

@ -30,6 +30,8 @@
#include <asm/immap.h> #include <asm/immap.h>
DECLARE_GLOBAL_DATA_PTR;
/* PLL min/max specifications */ /* PLL min/max specifications */
#define MAX_FVCO 500000 /* KHz */ #define MAX_FVCO 500000 /* KHz */
#define MAX_FSYS 80000 /* KHz */ #define MAX_FSYS 80000 /* KHz */
@ -208,8 +210,6 @@ int clock_pll(int fsys, int flags)
*/ */
int get_clocks(void) int get_clocks(void)
{ {
DECLARE_GLOBAL_DATA_PTR;
gd->bus_clk = clock_pll(CFG_CLK / 1000, 0) * 1000; gd->bus_clk = clock_pll(CFG_CLK / 1000, 0) * 1000;
gd->cpu_clk = (gd->bus_clk * 3); gd->cpu_clk = (gd->bus_clk * 3);
return (0); return (0);

@ -29,6 +29,8 @@
#include <common.h> #include <common.h>
#include <mpc86xx.h> #include <mpc86xx.h>
DECLARE_GLOBAL_DATA_PTR;
/* /*
* Breathe some life into the CPU... * Breathe some life into the CPU...
* *
@ -38,7 +40,6 @@
void cpu_init_f(void) void cpu_init_f(void)
{ {
DECLARE_GLOBAL_DATA_PTR;
volatile immap_t *immap = (immap_t *)CFG_IMMR; volatile immap_t *immap = (immap_t *)CFG_IMMR;
volatile ccsr_lbc_t *memctl = &immap->im_lbc; volatile ccsr_lbc_t *memctl = &immap->im_lbc;

@ -29,6 +29,7 @@
#include <mpc86xx.h> #include <mpc86xx.h>
#include <asm/processor.h> #include <asm/processor.h>
DECLARE_GLOBAL_DATA_PTR;
void get_sys_info(sys_info_t *sysInfo) void get_sys_info(sys_info_t *sysInfo)
{ {
@ -96,7 +97,6 @@ void get_sys_info(sys_info_t *sysInfo)
int get_clocks(void) int get_clocks(void)
{ {
DECLARE_GLOBAL_DATA_PTR;
sys_info_t sys_info; sys_info_t sys_info;
get_sys_info(&sys_info); get_sys_info(&sys_info);

@ -34,6 +34,8 @@
#include <command.h> #include <command.h>
#include <asm/processor.h> #include <asm/processor.h>
DECLARE_GLOBAL_DATA_PTR;
#if defined(CONFIG_CMD_KGDB) #if defined(CONFIG_CMD_KGDB)
int (*debugger_exception_handler)(struct pt_regs *) = 0; int (*debugger_exception_handler)(struct pt_regs *) = 0;
#endif #endif
@ -50,8 +52,6 @@ extern unsigned long search_exception_table(unsigned long);
void void
print_backtrace(unsigned long *sp) print_backtrace(unsigned long *sp)
{ {
DECLARE_GLOBAL_DATA_PTR;
int cnt = 0; int cnt = 0;
unsigned long i; unsigned long i;

@ -30,6 +30,8 @@
qe_map_t *qe_immr = NULL; qe_map_t *qe_immr = NULL;
static qe_snum_t snums[QE_NUM_OF_SNUM]; static qe_snum_t snums[QE_NUM_OF_SNUM];
DECLARE_GLOBAL_DATA_PTR;
void qe_issue_cmd(uint cmd, uint sbc, u8 mcn, u32 cmd_data) void qe_issue_cmd(uint cmd, uint sbc, u8 mcn, u32 cmd_data)
{ {
u32 cecr; u32 cecr;
@ -51,8 +53,6 @@ void qe_issue_cmd(uint cmd, uint sbc, u8 mcn, u32 cmd_data)
uint qe_muram_alloc(uint size, uint align) uint qe_muram_alloc(uint size, uint align)
{ {
DECLARE_GLOBAL_DATA_PTR;
uint retloc; uint retloc;
uint align_mask, off; uint align_mask, off;
uint savebase; uint savebase;
@ -158,8 +158,6 @@ void qe_put_snum(u8 snum)
void qe_init(uint qe_base) void qe_init(uint qe_base)
{ {
DECLARE_GLOBAL_DATA_PTR;
/* Init the QE IMMR base */ /* Init the QE IMMR base */
qe_immr = (qe_map_t *)qe_base; qe_immr = (qe_map_t *)qe_base;
@ -204,7 +202,6 @@ void qe_assign_page(uint snum, uint para_ram_base)
int qe_set_brg(uint brg, uint rate) int qe_set_brg(uint brg, uint rate)
{ {
DECLARE_GLOBAL_DATA_PTR;
volatile uint *bp; volatile uint *bp;
u32 divisor; u32 divisor;
int div16 = 0; int div16 = 0;

@ -64,6 +64,8 @@
#include "usbdcore_mpc8xx.h" #include "usbdcore_mpc8xx.h"
#include "usbdcore_ep0.h" #include "usbdcore_ep0.h"
DECLARE_GLOBAL_DATA_PTR;
#define ERR(fmt, args...)\ #define ERR(fmt, args...)\
serial_printf("ERROR : [%s] %s:%d: "fmt,\ serial_printf("ERROR : [%s] %s:%d: "fmt,\
__FILE__,__FUNCTION__,__LINE__, ##args) __FILE__,__FUNCTION__,__LINE__, ##args)
@ -1216,7 +1218,6 @@ static void mpc8xx_udc_clock_init (volatile immap_t * immr,
#elif defined(CFG_USB_BRGCLK) #elif defined(CFG_USB_BRGCLK)
/* This has been tested with brgclk == 50MHz */ /* This has been tested with brgclk == 50MHz */
DECLARE_GLOBAL_DATA_PTR;
int divisor = 0; int divisor = 0;
if (gd->cpu_clk < 48000000L) { if (gd->cpu_clk < 48000000L) {

@ -183,10 +183,9 @@
#define CFG_LONGHELP 1 #define CFG_LONGHELP 1
#define CFG_MEMTEST_START \ #define CFG_MEMTEST_START \
({ DECLARE_GLOBAL_DATA_PTR; gd->bd->bi_dram[0].start; }) ({ gd->bd->bi_dram[0].start; })
#define CFG_MEMTEST_END \ #define CFG_MEMTEST_END \
({ \ ({ \
DECLARE_GLOBAL_DATA_PTR; \
gd->bd->bi_dram[0].start + gd->bd->bi_dram[0].size; \ gd->bd->bi_dram[0].start + gd->bd->bi_dram[0].size; \
}) })
#define CFG_BAUDRATE_TABLE { 115200, 38400, 19200, 9600, 2400 } #define CFG_BAUDRATE_TABLE { 115200, 38400, 19200, 9600, 2400 }

@ -42,6 +42,8 @@
int post_flag; int post_flag;
#endif #endif
DECLARE_GLOBAL_DATA_PTR;
#ifndef CFG_NO_FLASH #ifndef CFG_NO_FLASH
extern flash_info_t flash_info[]; extern flash_info_t flash_info[];
#endif #endif
@ -126,8 +128,6 @@ static void display_flash_config(ulong size)
static int init_baudrate(void) static int init_baudrate(void)
{ {
DECLARE_GLOBAL_DATA_PTR;
char tmp[64]; char tmp[64];
int i = getenv_r("baudrate", tmp, sizeof(tmp)); int i = getenv_r("baudrate", tmp, sizeof(tmp));
gd->bd->bi_baudrate = gd->baudrate = (i > 0) gd->bd->bi_baudrate = gd->baudrate = (i > 0)
@ -139,7 +139,6 @@ static int init_baudrate(void)
#ifdef DEBUG #ifdef DEBUG
static void display_global_data(void) static void display_global_data(void)
{ {
DECLARE_GLOBAL_DATA_PTR;
bd_t *bd; bd_t *bd;
bd = gd->bd; bd = gd->bd;
printf("--flags:%x\n", gd->flags); printf("--flags:%x\n", gd->flags);
@ -256,7 +255,6 @@ void init_cplbtables(void)
void board_init_f(ulong bootflag) void board_init_f(ulong bootflag)
{ {
DECLARE_GLOBAL_DATA_PTR;
ulong addr; ulong addr;
bd_t *bd; bd_t *bd;
int i; int i;
@ -325,7 +323,6 @@ static int init_func_i2c(void)
void board_init_r(gd_t * id, ulong dest_addr) void board_init_r(gd_t * id, ulong dest_addr)
{ {
DECLARE_GLOBAL_DATA_PTR;
ulong size; ulong size;
extern void malloc_bin_reloc(void); extern void malloc_bin_reloc(void);
char *s, *e; char *s, *e;

@ -32,14 +32,14 @@
#ifdef CONFIG_POST #ifdef CONFIG_POST
DECLARE_GLOBAL_DATA_PTR;
#define POST_MAX_NUMBER 32 #define POST_MAX_NUMBER 32
#define BOOTMODE_MAGIC 0xDEAD0000 #define BOOTMODE_MAGIC 0xDEAD0000
int post_init_f(void) int post_init_f(void)
{ {
DECLARE_GLOBAL_DATA_PTR;
int res = 0; int res = 0;
unsigned int i; unsigned int i;
@ -62,7 +62,6 @@ int post_init_f(void)
void post_bootmode_init(void) void post_bootmode_init(void)
{ {
DECLARE_GLOBAL_DATA_PTR;
int bootmode = post_bootmode_get(0); int bootmode = post_bootmode_get(0);
int newword; int newword;
@ -109,20 +108,17 @@ int post_bootmode_get(unsigned int *last_test)
/* POST tests run before relocation only mark status bits .... */ /* POST tests run before relocation only mark status bits .... */
static void post_log_mark_start(unsigned long testid) static void post_log_mark_start(unsigned long testid)
{ {
DECLARE_GLOBAL_DATA_PTR;
gd->post_log_word |= (testid) << 16; gd->post_log_word |= (testid) << 16;
} }
static void post_log_mark_succ(unsigned long testid) static void post_log_mark_succ(unsigned long testid)
{ {
DECLARE_GLOBAL_DATA_PTR;
gd->post_log_word |= testid; gd->post_log_word |= testid;
} }
/* ... and the messages are output once we are relocated */ /* ... and the messages are output once we are relocated */
void post_output_backlog(void) void post_output_backlog(void)
{ {
DECLARE_GLOBAL_DATA_PTR;
int j; int j;
for (j = 0; j < post_list_size; j++) { for (j = 0; j < post_list_size; j++) {
@ -372,8 +368,6 @@ int post_log(char *format, ...)
void post_reloc(void) void post_reloc(void)
{ {
DECLARE_GLOBAL_DATA_PTR;
unsigned int i; unsigned int i;
/* /*

Loading…
Cancel
Save