diff options
author | David S. Miller <davem@davemloft.net> | 2009-03-23 16:35:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-23 16:35:04 -0400 |
commit | 8be7cdccacfbfc707e7370cad9bb168defed636f (patch) | |
tree | 8416607b62ec352176c81afd6f4e7b571ceb957f /drivers/net/ucc_geth.c | |
parent | ecd4137320b59759bbe57eef89040ee3e5e66039 (diff) | |
parent | 61fa9dcf9329cb92c220f7b656410fbe5e72f933 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/ucc_geth.c
Diffstat (limited to 'drivers/net/ucc_geth.c')
-rw-r--r-- | drivers/net/ucc_geth.c | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 1c095c63f98f..8f0ac442c907 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -1536,32 +1536,15 @@ static void adjust_link(struct net_device *dev) | |||
1536 | static int init_phy(struct net_device *dev) | 1536 | static int init_phy(struct net_device *dev) |
1537 | { | 1537 | { |
1538 | struct ucc_geth_private *priv = netdev_priv(dev); | 1538 | struct ucc_geth_private *priv = netdev_priv(dev); |
1539 | struct device_node *np = priv->node; | 1539 | struct ucc_geth_info *ug_info = priv->ug_info; |
1540 | struct device_node *phy, *mdio; | ||
1541 | const phandle *ph; | ||
1542 | char bus_name[MII_BUS_ID_SIZE]; | ||
1543 | const unsigned int *id; | ||
1544 | struct phy_device *phydev; | 1540 | struct phy_device *phydev; |
1545 | char phy_id[BUS_ID_SIZE]; | ||
1546 | 1541 | ||
1547 | priv->oldlink = 0; | 1542 | priv->oldlink = 0; |
1548 | priv->oldspeed = 0; | 1543 | priv->oldspeed = 0; |
1549 | priv->oldduplex = -1; | 1544 | priv->oldduplex = -1; |
1550 | 1545 | ||
1551 | ph = of_get_property(np, "phy-handle", NULL); | 1546 | phydev = phy_connect(dev, ug_info->phy_bus_id, &adjust_link, 0, |
1552 | phy = of_find_node_by_phandle(*ph); | 1547 | priv->phy_interface); |
1553 | mdio = of_get_parent(phy); | ||
1554 | |||
1555 | id = of_get_property(phy, "reg", NULL); | ||
1556 | |||
1557 | of_node_put(phy); | ||
1558 | of_node_put(mdio); | ||
1559 | |||
1560 | fsl_pq_mdio_bus_name(bus_name, mdio); | ||
1561 | snprintf(phy_id, sizeof(phy_id), "%s:%02x", | ||
1562 | bus_name, *id); | ||
1563 | |||
1564 | phydev = phy_connect(dev, phy_id, &adjust_link, 0, priv->phy_interface); | ||
1565 | 1548 | ||
1566 | if (IS_ERR(phydev)) { | 1549 | if (IS_ERR(phydev)) { |
1567 | printk("%s: Could not attach to PHY\n", dev->name); | 1550 | printk("%s: Could not attach to PHY\n", dev->name); |
@@ -3629,10 +3612,12 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
3629 | ug_info->uf_info.irq = irq_of_parse_and_map(np, 0); | 3612 | ug_info->uf_info.irq = irq_of_parse_and_map(np, 0); |
3630 | fixed_link = of_get_property(np, "fixed-link", NULL); | 3613 | fixed_link = of_get_property(np, "fixed-link", NULL); |
3631 | if (fixed_link) { | 3614 | if (fixed_link) { |
3632 | snprintf(ug_info->mdio_bus, MII_BUS_ID_SIZE, "0"); | 3615 | snprintf(ug_info->phy_bus_id, sizeof(ug_info->phy_bus_id), |
3633 | ug_info->phy_address = fixed_link[0]; | 3616 | PHY_ID_FMT, "0", fixed_link[0]); |
3634 | phy = NULL; | 3617 | phy = NULL; |
3635 | } else { | 3618 | } else { |
3619 | char bus_name[MII_BUS_ID_SIZE]; | ||
3620 | |||
3636 | ph = of_get_property(np, "phy-handle", NULL); | 3621 | ph = of_get_property(np, "phy-handle", NULL); |
3637 | phy = of_find_node_by_phandle(*ph); | 3622 | phy = of_find_node_by_phandle(*ph); |
3638 | 3623 | ||
@@ -3643,7 +3628,6 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
3643 | prop = of_get_property(phy, "reg", NULL); | 3628 | prop = of_get_property(phy, "reg", NULL); |
3644 | if (prop == NULL) | 3629 | if (prop == NULL) |
3645 | return -1; | 3630 | return -1; |
3646 | ug_info->phy_address = *prop; | ||
3647 | 3631 | ||
3648 | /* Set the bus id */ | 3632 | /* Set the bus id */ |
3649 | mdio = of_get_parent(phy); | 3633 | mdio = of_get_parent(phy); |
@@ -3657,8 +3641,14 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
3657 | if (err) | 3641 | if (err) |
3658 | return -1; | 3642 | return -1; |
3659 | 3643 | ||
3644 | <<<<<<< HEAD:drivers/net/ucc_geth.c | ||
3660 | snprintf(ug_info->mdio_bus, MII_BUS_ID_SIZE, "%x", | 3645 | snprintf(ug_info->mdio_bus, MII_BUS_ID_SIZE, "%x", |
3661 | res.start&0xfffff); | 3646 | res.start&0xfffff); |
3647 | ======= | ||
3648 | uec_mdio_bus_name(bus_name, mdio); | ||
3649 | snprintf(ug_info->phy_bus_id, sizeof(ug_info->phy_bus_id), | ||
3650 | "%s:%02x", bus_name, *prop); | ||
3651 | >>>>>>> 61fa9dcf9329cb92c220f7b656410fbe5e72f933:drivers/net/ucc_geth.c | ||
3662 | } | 3652 | } |
3663 | 3653 | ||
3664 | /* get the phy interface type, or default to MII */ | 3654 | /* get the phy interface type, or default to MII */ |