]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - cpu/nios2/serial.c
GCC-4.x fixes: clean up global data pointer initialization for all boards.
[karo-tx-uboot.git] / cpu / nios2 / serial.c
index 2d08c93d09f9867530984dcb1107eff73f920238..3d766037a14f9e33447176e339529aa1f10abb55 100644 (file)
@@ -27,6 +27,8 @@
 #include <nios2.h>
 #include <nios2-io.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /*------------------------------------------------------------------
  * JTAG acts as the serial port
  *-----------------------------------------------------------------*/
@@ -93,7 +95,6 @@ int serial_init (void) { return (0);}
 
 void serial_setbrg (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
        unsigned div;
 
        div = (CONFIG_SYS_CLK_FREQ/gd->baudrate)-1;