]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_immap.c
GCC-4.x fixes: clean up global data pointer initialization for all boards.
[karo-tx-uboot.git] / common / cmd_immap.c
index 559d7b4c300dacfd2826f146c0a33447203f6387..fa79b45a3cc6182e5dbaf21185c07712691b72bf 100644 (file)
 #include <asm/iopin_8260.h>
 #endif
 
+#if defined(CONFIG_8xx) || defined(CONFIG_8260)
+DECLARE_GLOBAL_DATA_PTR;
+#endif
+
 static void
 unimplemented ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
@@ -450,10 +454,8 @@ static void prbrg (int n, uint val)
        uint div16 = (val & CPM_BRG_DIV16) != 0;
 
 #if defined(CONFIG_8xx)
-       DECLARE_GLOBAL_DATA_PTR;
        ulong clock = gd->cpu_clk;
 #elif defined(CONFIG_8260)
-       DECLARE_GLOBAL_DATA_PTR;
        ulong clock = gd->brg_clk;
 #endif