53 gmx_hg2_control.
u64 = cvmx_read_csr(CVMX_GMXX_HG2_CONTROL(interface));
54 if (gmx_hg2_control.
s.hg2tx_en)
79 mode.
u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface));
81 cvmx_write_csr(CVMX_GMXX_INF_MODE(interface), mode.
u64);
91 for (i = 0; i < 16; i++) {
93 pko_mem_port_ptrs.
u64 = 0;
98 pko_mem_port_ptrs.
s.static_p = 0;
99 pko_mem_port_ptrs.
s.qos_mask = 0xff;
101 pko_mem_port_ptrs.
s.eid =
interface * 4;
102 pko_mem_port_ptrs.
s.pid =
interface * 16 +
i;
130 xauiMiscCtl.
u64 = cvmx_read_csr(CVMX_PCSXX_MISC_CTL_REG(interface));
131 xauiMiscCtl.
s.gmxeno = 1;
132 cvmx_write_csr(CVMX_PCSXX_MISC_CTL_REG(interface), xauiMiscCtl.
u64);
135 gmx_rx_int_en.
u64 = cvmx_read_csr(CVMX_GMXX_RXX_INT_EN(0, interface));
136 cvmx_write_csr(CVMX_GMXX_RXX_INT_EN(0, interface), 0x0);
137 gmx_tx_int_en.
u64 = cvmx_read_csr(CVMX_GMXX_TX_INT_EN(interface));
138 cvmx_write_csr(CVMX_GMXX_TX_INT_EN(interface), 0x0);
139 pcsx_int_en_reg.
u64 = cvmx_read_csr(CVMX_PCSXX_INT_EN_REG(interface));
140 cvmx_write_csr(CVMX_PCSXX_INT_EN_REG(interface), 0x0);
145 gmxXauiTxCtl.
u64 = cvmx_read_csr(CVMX_GMXX_TX_XAUI_CTL(interface));
147 gmxXauiTxCtl.
s.dic_en = 1;
148 gmxXauiTxCtl.
s.uni_en = 0;
149 cvmx_write_csr(CVMX_GMXX_TX_XAUI_CTL(interface), gmxXauiTxCtl.
u64);
152 xauiCtl.
u64 = cvmx_read_csr(CVMX_PCSXX_CONTROL1_REG(interface));
153 xauiCtl.
s.lo_pwr = 0;
155 cvmx_write_csr(CVMX_PCSXX_CONTROL1_REG(interface), xauiCtl.
u64);
160 reset, ==, 0, 10000))
164 (CVMX_PCSXX_10GBX_STATUS_REG(interface),
174 gmx_cfg.
u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(0, interface));
176 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(0, interface), gmx_cfg.
u64);
181 rx_idle, ==, 1, 10000))
186 tx_idle, ==, 1, 10000))
190 gmx_cfg.
u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(0, interface));
192 gmx_cfg.
s.speed_msb = 0;
193 gmx_cfg.
s.slottime = 1;
194 cvmx_write_csr(CVMX_GMXX_TX_PRTS(interface), 1);
195 cvmx_write_csr(CVMX_GMXX_TXX_SLOT(0, interface), 512);
196 cvmx_write_csr(CVMX_GMXX_TXX_BURST(0, interface), 8192);
197 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(0, interface), gmx_cfg.
u64);
200 cvmx_write_csr(CVMX_GMXX_RXX_INT_REG(0, interface),
201 cvmx_read_csr(CVMX_GMXX_RXX_INT_REG(0, interface)));
202 cvmx_write_csr(CVMX_GMXX_TX_INT_REG(interface),
203 cvmx_read_csr(CVMX_GMXX_TX_INT_REG(interface)));
204 cvmx_write_csr(CVMX_PCSXX_INT_REG(interface),
205 cvmx_read_csr(CVMX_PCSXX_INT_REG(interface)));
210 rcv_lnk, ==, 1, 10000))
214 xmtflt, ==, 0, 10000))
218 rcvflt, ==, 0, 10000))
221 cvmx_write_csr(CVMX_GMXX_RXX_INT_EN(0, interface), gmx_rx_int_en.
u64);
222 cvmx_write_csr(CVMX_GMXX_TX_INT_EN(interface), gmx_tx_int_en.
u64);
223 cvmx_write_csr(CVMX_PCSXX_INT_EN_REG(interface), pcsx_int_en_reg.
u64);
228 xauiMiscCtl.
s.gmxeno = 0;
229 cvmx_write_csr(CVMX_PCSXX_MISC_CTL_REG(interface), xauiMiscCtl.
u64);
231 gmx_cfg.
u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(0, interface));
233 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(0, interface), gmx_cfg.
u64);
257 int interface = cvmx_helper_get_interface_num(ipd_port);
263 gmxx_tx_xaui_ctl.
u64 = cvmx_read_csr(CVMX_GMXX_TX_XAUI_CTL(
interface));
264 gmxx_rx_xaui_ctl.
u64 = cvmx_read_csr(CVMX_GMXX_RX_XAUI_CTL(
interface));
265 pcsxx_status1_reg.
u64 =
266 cvmx_read_csr(CVMX_PCSXX_STATUS1_REG(
interface));
270 if ((gmxx_tx_xaui_ctl.
s.ls == 0) && (gmxx_rx_xaui_ctl.
s.status == 0) &&
271 (pcsxx_status1_reg.
s.rcv_lnk == 1)) {
277 cvmx_write_csr(CVMX_GMXX_RXX_INT_EN(0,
interface), 0x0);
278 cvmx_write_csr(CVMX_GMXX_TX_INT_EN(
interface), 0x0);
279 cvmx_write_csr(CVMX_PCSXX_INT_EN_REG(
interface), 0x0);
298 int interface = cvmx_helper_get_interface_num(ipd_port);
302 gmxx_tx_xaui_ctl.
u64 = cvmx_read_csr(CVMX_GMXX_TX_XAUI_CTL(
interface));
303 gmxx_rx_xaui_ctl.
u64 = cvmx_read_csr(CVMX_GMXX_RX_XAUI_CTL(
interface));
306 if (!link_info.
s.link_up)
310 if ((gmxx_tx_xaui_ctl.
s.ls == 0) && (gmxx_rx_xaui_ctl.
s.status == 0))
334 int interface = cvmx_helper_get_interface_num(ipd_port);
339 pcsxx_control1_reg.
u64 =
340 cvmx_read_csr(CVMX_PCSXX_CONTROL1_REG(
interface));
341 pcsxx_control1_reg.
s.loopbck1 = enable_internal;
342 cvmx_write_csr(CVMX_PCSXX_CONTROL1_REG(
interface),
343 pcsxx_control1_reg.
u64);
346 gmxx_xaui_ext_loopback.
u64 =
347 cvmx_read_csr(CVMX_GMXX_XAUI_EXT_LOOPBACK(
interface));
348 gmxx_xaui_ext_loopback.
s.en = enable_external;
349 cvmx_write_csr(CVMX_GMXX_XAUI_EXT_LOOPBACK(
interface),
350 gmxx_xaui_ext_loopback.
u64);