Lines Matching +full:link +full:- +full:loss +full:- +full:low

7  * Copyright (C) 2003-2018 Cavium, Inc.
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
35 #include <asm/octeon/cvmx-config.h>
37 #include <asm/octeon/cvmx-helper.h>
38 #include <asm/octeon/cvmx-helper-board.h>
40 #include <asm/octeon/cvmx-gmxx-defs.h>
41 #include <asm/octeon/cvmx-pcsx-defs.h>
42 #include <asm/octeon/cvmx-pcsxx-defs.h>
54 const uint64_t clock_mhz = cvmx_sysinfo_get()->cpu_clock_hz / 1000000; in __cvmx_helper_sgmii_hardware_init_one_time()
66 * appropriate value. 1000BASE-X specifies a 10ms in __cvmx_helper_sgmii_hardware_init_one_time()
74 /* 1000BASE-X */ in __cvmx_helper_sgmii_hardware_init_one_time()
88 * 1000BASE-X mode, tx_Config_Reg<D15:D0> is PCS*_AN*_ADV_REG. in __cvmx_helper_sgmii_hardware_init_one_time()
95 /* 1000BASE-X */ in __cvmx_helper_sgmii_hardware_init_one_time()
115 pcsx_sgmx_an_adv_reg.s.link = 1; in __cvmx_helper_sgmii_hardware_init_one_time()
122 /* MAC Mode - Nothing to do */ in __cvmx_helper_sgmii_hardware_init_one_time()
129 * Initialize the SERTES link for the first time or after a loss
130 * of link.
151 if (cvmx_sysinfo_get()->board_type != CVMX_BOARD_TYPE_SIM) { in __cvmx_helper_sgmii_hardware_init_link()
161 return -1; in __cvmx_helper_sgmii_hardware_init_link()
178 * isn't an ethernet link, but a link between Octeon and the in __cvmx_helper_sgmii_hardware_init_link()
181 if ((cvmx_sysinfo_get()->board_type != CVMX_BOARD_TYPE_SIM) && in __cvmx_helper_sgmii_hardware_init_link()
185 /* cvmx_dprintf("SGMII%d: Port %d link timeout\n", interface, index); */ in __cvmx_helper_sgmii_hardware_init_link()
186 return -1; in __cvmx_helper_sgmii_hardware_init_link()
192 * Configure an SGMII link to the specified speed after the SERTES
193 * link is up.
197 * @link_info: Link state to configure
226 return -1; in __cvmx_helper_sgmii_hardware_init_link_speed()
240 * Use GMXENO to force the link down if the status we get says in __cvmx_helper_sgmii_hardware_init_link_speed()
245 /* Only change the duplex setting if the link is up */ in __cvmx_helper_sgmii_hardware_init_link_speed()
255 /* Setting from GMX-603 */ in __cvmx_helper_sgmii_hardware_init_link_speed()
317 * proper link state. In the simulator there is no in __cvmx_helper_sgmii_hardware_init()
318 * link state polling and hence it is set from in __cvmx_helper_sgmii_hardware_init()
321 if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_SIM) in __cvmx_helper_sgmii_hardware_init()
347 * Due to errata GMX-700 on CN56XXp1.x and CN52XXp1.x, the in __cvmx_helper_sgmii_probe()
388 * Return the link state of an IPD/PKO port as returned by
390 * Octeon's link config if auto negotiation has changed since
395 * Returns Link state
407 if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_SIM) { in __cvmx_helper_sgmii_link_get()
408 /* The simulator gives you a simulated 1Gbps full duplex link */ in __cvmx_helper_sgmii_link_get()
418 /* Force 1Gbps full duplex link for internal loopback */ in __cvmx_helper_sgmii_link_get()
428 /* 1000BASE-X */ in __cvmx_helper_sgmii_link_get()
440 * Don't bother continuing if the SERTES low in __cvmx_helper_sgmii_link_get()
441 * level link is down in __cvmx_helper_sgmii_link_get()
483 * complete. Return link down. in __cvmx_helper_sgmii_link_get()
497 * Configure an IPD/PKO port for the specified link state. This
499 * The passed link state must always match the link state returned
503 * @link_info: The new link state