diff options
author | Luka Perkov <luka@openwrt.org> | 2013-10-03 02:50:00 +0000 |
---|---|---|
committer | Luka Perkov <luka@openwrt.org> | 2013-10-03 02:50:00 +0000 |
commit | a948ae90c210260106dcb411ed006d2ee13ade21 (patch) | |
tree | 8d013582ea989c45b94bd78cc7c5d7ab1c058854 /target/linux/kirkwood/patches-3.10/0023-net-mv643xx_eth-use-of_phy_connect-if-phy_node-prese.patch | |
parent | 32654ebc00d0fa87951da1187ff3de0fc3a9b21c (diff) | |
download | master-187ad058-a948ae90c210260106dcb411ed006d2ee13ade21.tar.gz master-187ad058-a948ae90c210260106dcb411ed006d2ee13ade21.tar.bz2 master-187ad058-a948ae90c210260106dcb411ed006d2ee13ade21.zip |
kirkwood: update patches and configuration (3.10)
Signed-off-by: Luka Perkov <luka@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38295 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/kirkwood/patches-3.10/0023-net-mv643xx_eth-use-of_phy_connect-if-phy_node-prese.patch')
-rw-r--r-- | target/linux/kirkwood/patches-3.10/0023-net-mv643xx_eth-use-of_phy_connect-if-phy_node-prese.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/target/linux/kirkwood/patches-3.10/0023-net-mv643xx_eth-use-of_phy_connect-if-phy_node-prese.patch b/target/linux/kirkwood/patches-3.10/0023-net-mv643xx_eth-use-of_phy_connect-if-phy_node-prese.patch new file mode 100644 index 0000000000..71e1a398ae --- /dev/null +++ b/target/linux/kirkwood/patches-3.10/0023-net-mv643xx_eth-use-of_phy_connect-if-phy_node-prese.patch @@ -0,0 +1,60 @@ +From db22a1196162f981444d241f92d02e2e50d12ed7 Mon Sep 17 00:00:00 2001 +From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> +Date: Wed, 29 May 2013 09:32:46 +0000 +Subject: [PATCH 23/29] net: mv643xx_eth: use of_phy_connect if phy_node + present + +This connects to a phy node passed to the port device instead of probing +the phy by phy_addr. + +Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + drivers/net/ethernet/marvell/mv643xx_eth.c | 25 ++++++++++++++++++------- + 1 file changed, 18 insertions(+), 7 deletions(-) + +--- a/drivers/net/ethernet/marvell/mv643xx_eth.c ++++ b/drivers/net/ethernet/marvell/mv643xx_eth.c +@@ -60,6 +60,7 @@ + #include <linux/types.h> + #include <linux/slab.h> + #include <linux/clk.h> ++#include <linux/of_mdio.h> + + static char mv643xx_eth_driver_name[] = "mv643xx_eth"; + static char mv643xx_eth_driver_version[] = "1.4"; +@@ -2715,17 +2716,27 @@ static int mv643xx_eth_probe(struct plat + netif_set_real_num_tx_queues(dev, mp->txq_count); + netif_set_real_num_rx_queues(dev, mp->rxq_count); + +- if (pd->phy_addr != MV643XX_ETH_PHY_NONE) { ++ err = 0; ++ if (pd->phy_node) { ++ mp->phy = of_phy_connect(mp->dev, pd->phy_node, ++ mv643xx_eth_adjust_link, 0, ++ PHY_INTERFACE_MODE_GMII); ++ if (!mp->phy) ++ err = -ENODEV; ++ } else if (pd->phy_addr != MV643XX_ETH_PHY_NONE) { + mp->phy = phy_scan(mp, pd->phy_addr); + +- if (IS_ERR(mp->phy)) { ++ if (IS_ERR(mp->phy)) + err = PTR_ERR(mp->phy); +- if (err == -ENODEV) +- err = -EPROBE_DEFER; +- goto out; +- } +- phy_init(mp, pd->speed, pd->duplex); ++ else ++ phy_init(mp, pd->speed, pd->duplex); + } ++ if (err == -ENODEV) { ++ err = -EPROBE_DEFER; ++ goto out; ++ } ++ if (err) ++ goto out; + + SET_ETHTOOL_OPS(dev, &mv643xx_eth_ethtool_ops); + |