summaryrefslogtreecommitdiff
path: root/board/MAI/AmigaOneG3SE
diff options
context:
space:
mode:
Diffstat (limited to 'board/MAI/AmigaOneG3SE')
-rw-r--r--board/MAI/AmigaOneG3SE/AmigaOneG3SE.c3
-rw-r--r--board/MAI/AmigaOneG3SE/articiaS.c5
-rw-r--r--board/MAI/AmigaOneG3SE/articiaS_pci.c4
-rw-r--r--board/MAI/AmigaOneG3SE/cmd_boota.c3
-rw-r--r--board/MAI/AmigaOneG3SE/serial.c6
-rw-r--r--board/MAI/AmigaOneG3SE/via686.c40
-rw-r--r--board/MAI/AmigaOneG3SE/video.c3
7 files changed, 30 insertions, 34 deletions
diff --git a/board/MAI/AmigaOneG3SE/AmigaOneG3SE.c b/board/MAI/AmigaOneG3SE/AmigaOneG3SE.c
index 0934e1b..40f41c7 100644
--- a/board/MAI/AmigaOneG3SE/AmigaOneG3SE.c
+++ b/board/MAI/AmigaOneG3SE/AmigaOneG3SE.c
@@ -1,6 +1,7 @@
/*
* (C) Copyright 2002
* Hyperion Entertainment, ThomasF@hyperion-entertainment.com
+ * (C) Copyright 2006
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* See file CREDITS for list of people who contributed to this
@@ -88,8 +89,6 @@ long initdram (int board_type)
void after_reloc (ulong dest_addr, gd_t *gd)
{
-/* HJF: DECLARE_GLOBAL_DATA_PTR; */
-
board_init_r (gd, dest_addr);
}
diff --git a/board/MAI/AmigaOneG3SE/articiaS.c b/board/MAI/AmigaOneG3SE/articiaS.c
index a4dad64..3901b80 100644
--- a/board/MAI/AmigaOneG3SE/articiaS.c
+++ b/board/MAI/AmigaOneG3SE/articiaS.c
@@ -29,6 +29,8 @@
#include "smbus.h"
#include "via686.h"
+DECLARE_GLOBAL_DATA_PTR;
+
#undef DEBUG
struct dimm_bank {
@@ -82,7 +84,6 @@ static inline unsigned short NSto10PS (unsigned char spd_byte)
long detect_sdram (uint8 * rom, int dimmNum, struct dimm_bank *banks)
{
- DECLARE_GLOBAL_DATA_PTR;
int dimm_address = (dimmNum == 0) ? SM_DIMM0_ADDR : SM_DIMM1_ADDR;
uint32 busclock = gd->bus_clk;
uint32 memclock = busclock;
@@ -394,8 +395,6 @@ uint32 burst_to_len (uint32 support)
long articiaS_ram_init (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
register uint32 i;
register uint32 value1;
register uint32 value2;
diff --git a/board/MAI/AmigaOneG3SE/articiaS_pci.c b/board/MAI/AmigaOneG3SE/articiaS_pci.c
index d2e9f29..480dae5 100644
--- a/board/MAI/AmigaOneG3SE/articiaS_pci.c
+++ b/board/MAI/AmigaOneG3SE/articiaS_pci.c
@@ -26,6 +26,8 @@
#include "memio.h"
#include "articiaS.h"
+DECLARE_GLOBAL_DATA_PTR;
+
#undef ARTICIA_PCI_DEBUG
#ifdef ARTICIA_PCI_DEBUG
@@ -493,8 +495,6 @@ pci_dev_t video_dev;
int articiaS_init_vga (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
extern void shutdown_bios(void);
pci_dev_t dev = ~0;
int busnr = 0;
diff --git a/board/MAI/AmigaOneG3SE/cmd_boota.c b/board/MAI/AmigaOneG3SE/cmd_boota.c
index 3e2835a..143bba2 100644
--- a/board/MAI/AmigaOneG3SE/cmd_boota.c
+++ b/board/MAI/AmigaOneG3SE/cmd_boota.c
@@ -3,6 +3,7 @@
#include "../disk/part_amiga.h"
#include <asm/cache.h>
+DECLARE_GLOBAL_DATA_PTR;
#undef BOOTA_DEBUG
@@ -108,8 +109,6 @@ int do_boota (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
s = getenv ("autostart");
if (s && strcmp (s, "yes") == 0) {
- DECLARE_GLOBAL_DATA_PTR;
-
void (*boot) (bd_t *, char *, block_dev_desc_t *);
char *args;
diff --git a/board/MAI/AmigaOneG3SE/serial.c b/board/MAI/AmigaOneG3SE/serial.c
index e83fb46..b6f57c7 100644
--- a/board/MAI/AmigaOneG3SE/serial.c
+++ b/board/MAI/AmigaOneG3SE/serial.c
@@ -4,6 +4,8 @@
#include "memio.h"
#include "articiaS.h"
+DECLARE_GLOBAL_DATA_PTR;
+
#ifndef CFG_NS16550
static uint32 ComPort1;
@@ -150,8 +152,6 @@ const NS16550_t Com1 = (NS16550_t) CFG_NS16550_COM2;
int serial_init (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
uint32 clock_divisor = 115200 / gd->baudrate;
NS16550_init (Com0, clock_divisor);
@@ -239,8 +239,6 @@ void serial_puts (const char *string)
void serial_setbrg (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
uint32 clock_divisor = 115200 / gd->baudrate;
NS16550_init (Com0, clock_divisor);
diff --git a/board/MAI/AmigaOneG3SE/via686.c b/board/MAI/AmigaOneG3SE/via686.c
index c797e47..3606db8 100644
--- a/board/MAI/AmigaOneG3SE/via686.c
+++ b/board/MAI/AmigaOneG3SE/via686.c
@@ -28,6 +28,8 @@
#include "via686.h"
#include "i8259.h"
+DECLARE_GLOBAL_DATA_PTR;
+
#undef VIA_DEBUG
#ifdef VIA_DEBUG
@@ -226,33 +228,31 @@ __asm (" .globl via_calibrate_time_base \n"
extern unsigned long via_calibrate_time_base(void);
-void via_calibrate_bus_freq(void)
+void via_calibrate_bus_freq (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
- unsigned long tb;
+ unsigned long tb;
- /* This is 20 microseconds */
- #define CALIBRATE_TIME 28636
+ /* This is 20 microseconds */
+#define CALIBRATE_TIME 28636
+ /* Enable the timer (and disable speaker) */
+ unsigned char c;
- /* Enable the timer (and disable speaker) */
- unsigned char c;
- c = in_byte(0x61);
- out_byte(0x61, ((c & ~0x02) | 0x01));
+ c = in_byte (0x61);
+ out_byte (0x61, ((c & ~0x02) | 0x01));
- /* Set timer 2 to low/high writing */
- out_byte(0x43, 0xb0);
- out_byte(0x42, CALIBRATE_TIME & 0xff);
- out_byte(0x42, CALIBRATE_TIME >>8);
+ /* Set timer 2 to low/high writing */
+ out_byte (0x43, 0xb0);
+ out_byte (0x42, CALIBRATE_TIME & 0xff);
+ out_byte (0x42, CALIBRATE_TIME >> 8);
- /* Read the time base */
- tb = via_calibrate_time_base();
+ /* Read the time base */
+ tb = via_calibrate_time_base ();
- if (tb >= 700000)
- gd->bus_clk = 133333333;
- else
- gd->bus_clk = 100000000;
+ if (tb >= 700000)
+ gd->bus_clk = 133333333;
+ else
+ gd->bus_clk = 100000000;
}
diff --git a/board/MAI/AmigaOneG3SE/video.c b/board/MAI/AmigaOneG3SE/video.c
index 36e3c62..f6327f7 100644
--- a/board/MAI/AmigaOneG3SE/video.c
+++ b/board/MAI/AmigaOneG3SE/video.c
@@ -26,6 +26,8 @@
#include "memio.h"
#include <part.h>
+DECLARE_GLOBAL_DATA_PTR;
+
unsigned char *cursor_position;
unsigned int cursor_row;
unsigned int cursor_col;
@@ -480,7 +482,6 @@ extern char version_string[];
void video_banner(void)
{
block_dev_desc_t *ide;
- DECLARE_GLOBAL_DATA_PTR;
int i;
char *s;
int maxdev;