]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/serial.c
GCC-4.x fixes: clean up global data pointer initialization for all boards.
[karo-tx-uboot.git] / drivers / serial.c
index 057a1ab0174ec9566bdc630f549b086fb0d4d1d7..228781b46a63409c2565e3751f2c0c8022644c96 100644 (file)
@@ -30,6 +30,8 @@
 #include <ns87308.h>
 #endif
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #if !defined(CONFIG_CONS_INDEX)
 #error "No console index specified."
 #elif (CONFIG_CONS_INDEX < 1) || (CONFIG_CONS_INDEX > 4)
@@ -77,7 +79,6 @@ static NS16550_t serial_ports[4] = {
 
 static int calc_divisor (NS16550_t port)
 {
-       DECLARE_GLOBAL_DATA_PTR;
 #ifdef CONFIG_OMAP1510
        /* If can't cleanly clock 115200 set div to 1 */
        if ((CFG_NS16550_CLK == 12000000) && (gd->baudrate == 115200)) {