]> git.sur5r.net Git - u-boot/blobdiff - board/bmw/serial.c
CHECKPATCH: ./board/esd/apc405/fpgadata.c
[u-boot] / board / bmw / serial.c
index f36a41b9ffaa4dcc457de8eb4a6b28e51f94e98f..0c97f1288f12662ffdd38668ae3d0d28d9609bcf 100644 (file)
 #include <common.h>
 #include "ns16550.h"
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #if CONFIG_CONS_INDEX == 1
 static struct NS16550 *console =
-               (struct NS16550 *) (CFG_EUMB_ADDR + 0x4500);
+               (struct NS16550 *) (CONFIG_SYS_EUMB_ADDR + 0x4500);
 #elif CONFIG_CONS_INDEX == 2
 static struct NS16550 *console =
-               (struct NS16550 *) (CFG_EUMB_ADDR + 0x4500);
+               (struct NS16550 *) (CONFIG_SYS_EUMB_ADDR + 0x4500);
 #else
 #error no valid console defined
 #endif
@@ -38,8 +40,6 @@ extern ulong get_bus_freq (ulong);
 
 int serial_init (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        int clock_divisor = gd->bus_clk / 16 / gd->baudrate;
 
        NS16550_init (CONFIG_CONS_INDEX - 1, clock_divisor);
@@ -75,8 +75,6 @@ int serial_tstc (void)
 
 void serial_setbrg (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        int clock_divisor = get_bus_freq (0) / 16 / gd->baudrate;
 
        NS16550_reinit (console, clock_divisor);