GCC-4.x fixes: clean up global data pointer initialization for all boards.
diff --git a/cpu/nios2/serial.c b/cpu/nios2/serial.c
index 2d08c93..3d76603 100644
--- a/cpu/nios2/serial.c
+++ b/cpu/nios2/serial.c
@@ -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 @@
 
 void serial_setbrg (void)
 {
-	DECLARE_GLOBAL_DATA_PTR;
 	unsigned div;
 
 	div = (CONFIG_SYS_CLK_FREQ/gd->baudrate)-1;