]> git.sur5r.net Git - u-boot/blobdiff - cpu/mpc8260/i2c.c
GCC-4.x fixes: clean up global data pointer initialization for all boards.
[u-boot] / cpu / mpc8260 / i2c.c
index ea97ab85fbc091944b6c4a7707dfa253778751d5..34bd3897f6d8fe302614dd002426345d37bac081 100644 (file)
@@ -34,6 +34,8 @@
 /* define to enable debug messages */
 #undef  DEBUG_I2C
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /* uSec to wait between polls of the i2c */
 #define DELAY_US       100
 /* uSec to wait for the CPM to start processing the buffer */
@@ -213,8 +215,6 @@ static int i2c_setrate(int hz, int speed)
 
 void i2c_init(int speed, int slaveadd)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        volatile immap_t *immap = (immap_t *)CFG_IMMR ;
        volatile cpm8260_t *cp = (cpm8260_t *)&immap->im_cpm;
        volatile i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c;