aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/cavium-octeon/executive
diff options
context:
space:
mode:
authorDavid Daney <david.daney@cavium.com>2014-05-29 06:10:02 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-19 18:24:52 -0400
commitec3a2207c322e518f7f42c80e54b8ecaf8a6f03e (patch)
tree5a0783b7013cab2d9c8327d54884b798c8d41e9d /arch/mips/cavium-octeon/executive
parent91177d53a394a982735262428d2c876df0aaa38d (diff)
staging: octeon-ethernet: Move PHY activation to .ndo_open().
This prevents PHY not found types of errors for PHY drivers that are probed after the Ethernet driver is probed, because the ifconfig UP is done from userspace after all drivers have been probed. Also avoid the cvmx-helper-board.c PHY code if a real PHY driver is present, this allows a bootloader supplied device tree to specify the PHY information rather than having to modify the code for each different board. Tested-by: Alex Smith <alex.smith@imgtec.com> Signed-off-by: David Daney <david.daney@cavium.com> Signed-off-by: Alex Smith <alex.smith@imgtec.com> Cc: devel@driverdev.osuosl.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/mips/cavium-octeon/executive')
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c b/arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c
index 45f18cce31a9..6f9609e63a65 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c
@@ -317,10 +317,14 @@ static int __cvmx_helper_sgmii_hardware_init(int interface, int num_ports)
317 for (index = 0; index < num_ports; index++) { 317 for (index = 0; index < num_ports; index++) {
318 int ipd_port = cvmx_helper_get_ipd_port(interface, index); 318 int ipd_port = cvmx_helper_get_ipd_port(interface, index);
319 __cvmx_helper_sgmii_hardware_init_one_time(interface, index); 319 __cvmx_helper_sgmii_hardware_init_one_time(interface, index);
320 __cvmx_helper_sgmii_link_set(ipd_port, 320 /* Linux kernel driver will call ....link_set with the
321 __cvmx_helper_sgmii_link_get 321 * proper link state. In the simulator there is no
322 (ipd_port)); 322 * link state polling and hence it is set from
323 323 * here.
324 */
325 if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_SIM)
326 __cvmx_helper_sgmii_link_set(ipd_port,
327 __cvmx_helper_sgmii_link_get(ipd_port));
324 } 328 }
325 329
326 return 0; 330 return 0;