From 1577ecef766650a57fceb171acee2b13cbfaf1d3 Mon Sep 17 00:00:00 2001 From: Andy Fleming Date: Wed, 4 Feb 2009 16:42:12 -0800 Subject: netdev: Merge UCC and gianfar MDIO bus drivers The MDIO bus drivers for the UCC and gianfar ethernet controllers are essentially the same. There's no reason to duplicate that much code. Signed-off-by: Andy Fleming Signed-off-by: David S. Miller --- drivers/net/ucc_geth.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'drivers/net/ucc_geth.c') diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 4a8d574..1c095c6 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c @@ -39,7 +39,7 @@ #include #include "ucc_geth.h" -#include "ucc_geth_mii.h" +#include "fsl_pq_mdio.h" #undef DEBUG @@ -1557,7 +1557,7 @@ static int init_phy(struct net_device *dev) of_node_put(phy); of_node_put(mdio); - uec_mdio_bus_name(bus_name, mdio); + fsl_pq_mdio_bus_name(bus_name, mdio); snprintf(phy_id, sizeof(phy_id), "%s:%02x", bus_name, *id); @@ -3657,7 +3657,8 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma if (err) return -1; - snprintf(ug_info->mdio_bus, MII_BUS_ID_SIZE, "%x", res.start); + snprintf(ug_info->mdio_bus, MII_BUS_ID_SIZE, "%x", + res.start&0xfffff); } /* get the phy interface type, or default to MII */ @@ -3803,11 +3804,6 @@ static int __init ucc_geth_init(void) { int i, ret; - ret = uec_mdio_init(); - - if (ret) - return ret; - if (netif_msg_drv(&debug)) printk(KERN_INFO "ucc_geth: " DRV_DESC "\n"); for (i = 0; i < 8; i++) @@ -3816,16 +3812,12 @@ static int __init ucc_geth_init(void) ret = of_register_platform_driver(&ucc_geth_driver); - if (ret) - uec_mdio_exit(); - return ret; } static void __exit ucc_geth_exit(void) { of_unregister_platform_driver(&ucc_geth_driver); - uec_mdio_exit(); } module_init(ucc_geth_init); -- cgit v1.1