GCC-4.x fixes: clean up global data pointer initialization for all boards.
[oweals/u-boot.git] / cpu / mpc5xxx / fec.c
index 2e8e54958f131bf18d111c5a8bec1f3ca3fe8f50..19737ce868dd32a84b266ce04416fdd86ced1674 100644 (file)
@@ -14,6 +14,8 @@
 #include "sdma.h"
 #include "fec.h"
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /* #define DEBUG       0x28 */
 
 #if (CONFIG_COMMANDS & CFG_CMD_NET) && defined(CONFIG_NET_MULTI) && \
@@ -242,7 +244,6 @@ static void mpc5xxx_fec_set_hwaddr(mpc5xxx_fec_priv *fec, char *mac)
 /********************************************************************/
 static int mpc5xxx_fec_init(struct eth_device *dev, bd_t * bis)
 {
-       DECLARE_GLOBAL_DATA_PTR;
        mpc5xxx_fec_priv *fec = (mpc5xxx_fec_priv *)dev->priv;
        struct mpc5xxx_sdma *sdma = (struct mpc5xxx_sdma *)MPC5XXX_SDMA;
 
@@ -393,7 +394,6 @@ static int mpc5xxx_fec_init(struct eth_device *dev, bd_t * bis)
 /********************************************************************/
 static int mpc5xxx_fec_init_phy(struct eth_device *dev, bd_t * bis)
 {
-       DECLARE_GLOBAL_DATA_PTR;
        mpc5xxx_fec_priv *fec = (mpc5xxx_fec_priv *)dev->priv;
        const uint8 phyAddr = CONFIG_PHY_ADDR;  /* Only one PHY */