summaryrefslogtreecommitdiff
path: root/board/MAI/AmigaOneG3SE/via686.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-03-31 18:32:53 +0200
committerWolfgang Denk <wd@pollux.denx.de>2006-03-31 18:32:53 +0200
commitd87080b721e4f8dca977af7571c5338ae7bb8db7 (patch)
tree514fc21eec39a2dd57f7aea516844a4400f8f140 /board/MAI/AmigaOneG3SE/via686.c
parentf6dbbe986481cff01334c64cacb971a5f237a9a9 (diff)
downloadu-boot-imx-d87080b721e4f8dca977af7571c5338ae7bb8db7.zip
u-boot-imx-d87080b721e4f8dca977af7571c5338ae7bb8db7.tar.gz
u-boot-imx-d87080b721e4f8dca977af7571c5338ae7bb8db7.tar.bz2
GCC-4.x fixes: clean up global data pointer initialization for all boards.
Diffstat (limited to 'board/MAI/AmigaOneG3SE/via686.c')
-rw-r--r--board/MAI/AmigaOneG3SE/via686.c40
1 files changed, 20 insertions, 20 deletions
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;
}