]> git.sur5r.net Git - u-boot/blobdiff - drivers/net/lpc32xx_eth.c
Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTR
[u-boot] / drivers / net / lpc32xx_eth.c
index 36af79511105cfc4ec856fc4c691371f9057c02f..1efe625c5fb1ed252271e210609ce8463f5af7ea 100644 (file)
@@ -12,7 +12,7 @@
 #include <malloc.h>
 #include <miiphy.h>
 #include <asm/io.h>
-#include <asm/errno.h>
+#include <linux/errno.h>
 #include <asm/types.h>
 #include <asm/system.h>
 #include <asm/byteorder.h>
@@ -218,8 +218,6 @@ struct lpc32xx_eth_device {
 
 #define MII_MAX_PHY (MADR_PHY_MASK >> MADR_PHY_OFFSET)
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #if defined(CONFIG_PHYLIB) || defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
 /*
  * mii_reg_read - miiphy_read callback function.
@@ -336,25 +334,6 @@ static int mii_reg_write(struct mii_dev *bus, int phy_adr, int devad,
 }
 #endif
 
-#if defined(CONFIG_PHYLIB)
-int lpc32xx_eth_phy_read(struct mii_dev *bus, int phy_addr, int dev_addr,
-       int reg_addr)
-{
-       u16 data;
-       int ret;
-       ret = mii_reg_read(bus->name, phy_addr, reg_addr, &data);
-       if (ret)
-               return ret;
-       return data;
-}
-
-int lpc32xx_eth_phy_write(struct mii_dev *bus, int phy_addr, int dev_addr,
-       int reg_addr, u16 data)
-{
-       return mii_reg_write(bus->name, phy_addr, reg_addr, data);
-}
-#endif
-
 /*
  * Provide default Ethernet buffers base address if target did not.
  * Locate buffers in SRAM at 0x00001000 to avoid cache issues and
@@ -583,8 +562,8 @@ int lpc32xx_eth_phylib_init(struct eth_device *dev, int phyid)
                printf("mdio_alloc failed\n");
                return -ENOMEM;
        }
-       bus->read = lpc32xx_eth_phy_read;
-       bus->write = lpc32xx_eth_phy_write;
+       bus->read = mii_reg_read;
+       bus->write = mii_reg_write;
        strcpy(bus->name, dev->name);
 
        ret = mdio_register(bus);