summaryrefslogtreecommitdiff
path: root/board/mpl
diff options
context:
space:
mode:
Diffstat (limited to 'board/mpl')
-rw-r--r--board/mpl/common/common_util.c4
-rw-r--r--board/mpl/common/memtst.c7
-rw-r--r--board/mpl/common/pci.c3
-rw-r--r--board/mpl/mip405/mip405.c8
-rw-r--r--board/mpl/pip405/pip405.c10
-rw-r--r--board/mpl/vcma9/vcma9.c5
6 files changed, 14 insertions, 23 deletions
diff --git a/board/mpl/common/common_util.c b/board/mpl/common/common_util.c
index b331d6e..06d021a 100644
--- a/board/mpl/common/common_util.c
+++ b/board/mpl/common/common_util.c
@@ -42,6 +42,9 @@
#include "../mip405/mip405.h"
#include <405gp_pci.h>
#endif
+
+DECLARE_GLOBAL_DATA_PTR;
+
#if defined(CONFIG_PATI)
#define FIRM_START 0xFFF00000
#endif
@@ -584,7 +587,6 @@ extern int get_boot_mode(void);
void video_get_info_str (int line_number, char *info)
{
/* init video info strings for graphic console */
- DECLARE_GLOBAL_DATA_PTR;
PPC405_SYS_INFO sys_info;
char rev;
int i,boot;
diff --git a/board/mpl/common/memtst.c b/board/mpl/common/memtst.c
index 2c77d37..ff1190a 100644
--- a/board/mpl/common/memtst.c
+++ b/board/mpl/common/memtst.c
@@ -50,13 +50,15 @@ int testdram (void)
#include <asm/processor.h>
#include <405gp_i2c.h>
+DECLARE_GLOBAL_DATA_PTR;
+
#define FALSE 0
#define TRUE 1
-#define TEST_QUIET 8
+#define TEST_QUIET 8
#define TEST_SHOW_PROG 4
#define TEST_SHOW_ERR 2
-#define TEST_SHOW_ALL 1
+#define TEST_SHOW_ALL 1
#define TESTPAT1 0xAA55AA55
#define TESTPAT2 0x55AA55AA
@@ -468,7 +470,6 @@ static RAM_MEMTEST_FUNC test_stage[TEST_STAGES] = {
void mem_test_reloc(void)
{
- DECLARE_GLOBAL_DATA_PTR;
unsigned long addr;
int i;
for (i=0; i< TEST_STAGES; i++) {
diff --git a/board/mpl/common/pci.c b/board/mpl/common/pci.c
index 692930b..bde14be 100644
--- a/board/mpl/common/pci.c
+++ b/board/mpl/common/pci.c
@@ -32,7 +32,7 @@
#ifdef CONFIG_405GP
#ifdef CONFIG_PCI
-#undef DEBUG
+DECLARE_GLOBAL_DATA_PTR;
#include "piix4_pci.h"
#include "pci_parts.h"
@@ -94,7 +94,6 @@ static struct pci_controller hose = {
static void reloc_pci_cfg_table(struct pci_config_table *table)
{
- DECLARE_GLOBAL_DATA_PTR;
unsigned long addr;
for (; table && table->vendor; table++) {
diff --git a/board/mpl/mip405/mip405.c b/board/mpl/mip405/mip405.c
index 9c469b0..34f3289 100644
--- a/board/mpl/mip405/mip405.c
+++ b/board/mpl/mip405/mip405.c
@@ -70,6 +70,9 @@
#include "../common/common_util.h"
#include <i2c.h>
#include <rtc.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
extern block_dev_desc_t * scsi_get_dev(int dev);
extern block_dev_desc_t * ide_get_dev(int dev);
@@ -189,8 +192,6 @@ const sdram_t sdram_table[] = {
void SDRAM_err (const char *s)
{
#ifndef SDRAM_DEBUG
- DECLARE_GLOBAL_DATA_PTR;
-
(void) get_clocks ();
gd->baudrate = 9600;
serial_init ();
@@ -241,8 +242,6 @@ void write_4hex (unsigned long val)
int init_sdram (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
unsigned long tmp, baseaddr;
unsigned short i;
unsigned char trp_clocks,
@@ -681,7 +680,6 @@ extern flash_info_t flash_info[]; /* info for FLASH chips */
int misc_init_r (void)
{
- DECLARE_GLOBAL_DATA_PTR;
/* adjust flash start and size as well as the offset */
gd->bd->bi_flashstart=0-flash_info[0].size;
gd->bd->bi_flashsize=flash_info[0].size-CFG_MONITOR_LEN;
diff --git a/board/mpl/pip405/pip405.c b/board/mpl/pip405/pip405.c
index a398362..3828608 100644
--- a/board/mpl/pip405/pip405.c
+++ b/board/mpl/pip405/pip405.c
@@ -31,6 +31,8 @@
#include "../common/isa.h"
#include "../common/common_util.h"
+DECLARE_GLOBAL_DATA_PTR;
+
#undef SDRAM_DEBUG
#define FALSE 0
@@ -134,8 +136,6 @@ unsigned short NSto10PS (unsigned char spd_byte)
void SDRAM_err (const char *s)
{
#ifndef SDRAM_DEBUG
- DECLARE_GLOBAL_DATA_PTR;
-
(void) get_clocks ();
gd->baudrate = 9600;
serial_init ();
@@ -191,9 +191,6 @@ int board_early_init_f (void)
trc_clocks, tctp_clocks;
unsigned char cal_index, cal_val, spd_version, spd_chksum;
unsigned char buf[8];
-#ifdef SDRAM_DEBUG
- DECLARE_GLOBAL_DATA_PTR;
-#endif
/* set up the config port */
mtdcr (ebccfga, pb7ap);
mtdcr (ebccfgd, CONFIG_PORT_AP);
@@ -613,8 +610,6 @@ static int test_dram (unsigned long ramsize);
long int initdram (int board_type)
{
- DECLARE_GLOBAL_DATA_PTR;
-
unsigned long bank_reg[4], tmp, bank_size;
int i, ds;
unsigned long TotalSize;
@@ -666,7 +661,6 @@ extern flash_info_t flash_info[]; /* info for FLASH chips */
int misc_init_r (void)
{
- DECLARE_GLOBAL_DATA_PTR;
/* adjust flash start and size as well as the offset */
gd->bd->bi_flashstart=0-flash_info[0].size;
gd->bd->bi_flashsize=flash_info[0].size-CFG_MONITOR_LEN;
diff --git a/board/mpl/vcma9/vcma9.c b/board/mpl/vcma9/vcma9.c
index ffdba5d..0d2003d 100644
--- a/board/mpl/vcma9/vcma9.c
+++ b/board/mpl/vcma9/vcma9.c
@@ -32,7 +32,7 @@
#include "vcma9.h"
#include "../common/common_util.h"
-/* ------------------------------------------------------------------------- */
+DECLARE_GLOBAL_DATA_PTR;
#define FCLK_SPEED 1
@@ -71,7 +71,6 @@ static inline void delay(unsigned long loops)
int board_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER();
S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
@@ -275,8 +274,6 @@ static void Show_VCMA9_Info(char *board_name, char *serial)
int dram_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
gd->bd->bi_dram[0].size = Get_SDRAM_ChipSize() * Get_SDRAM_ChipNr();