Lines Matching defs:index
45 void __cvmx_interrupt_pcsx_intx_en_reg_enable(int index, int block);
46 void __cvmx_interrupt_pcsxx_int_en_reg_enable(int index);
52 * @index: Index of prot on the interface
56 static int __cvmx_helper_sgmii_hardware_init_one_time(int interface, int index)
64 gmxx_prtx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface));
66 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmxx_prtx_cfg.u64);
74 cvmx_read_csr(CVMX_PCSX_MISCX_CTL_REG(index, interface));
76 cvmx_read_csr(CVMX_PCSX_LINKX_TIMER_COUNT_REG(index, interface));
86 cvmx_write_csr(CVMX_PCSX_LINKX_TIMER_COUNT_REG(index, interface),
102 cvmx_read_csr(CVMX_PCSX_ANX_ADV_REG(index, interface));
107 cvmx_write_csr(CVMX_PCSX_ANX_ADV_REG(index, interface),
112 cvmx_read_csr(CVMX_PCSX_MISCX_CTL_REG(index, interface));
118 (index, interface));
123 (index, interface),
137 * @index: Index of prot on the interface
141 static int __cvmx_helper_sgmii_hardware_init_link(int interface, int index)
154 cvmx_read_csr(CVMX_PCSX_MRX_CONTROL_REG(index, interface));
157 cvmx_write_csr(CVMX_PCSX_MRX_CONTROL_REG(index, interface),
160 (CVMX_PCSX_MRX_CONTROL_REG(index, interface),
164 interface, index);
176 cvmx_write_csr(CVMX_PCSX_MRX_CONTROL_REG(index, interface),
186 CVMX_WAIT_FOR_FIELD64(CVMX_PCSX_MRX_STATUS_REG(index, interface),
189 /* cvmx_dprintf("SGMII%d: Port %d link timeout\n", interface, index); */
200 * @index: Index of prot on the interface
206 int index,
215 gmxx_prtx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface));
218 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmxx_prtx_cfg.u64);
222 (CVMX_GMXX_PRTX_CFG(index, interface), union cvmx_gmxx_prtx_cfg,
224 || CVMX_WAIT_FOR_FIELD64(CVMX_GMXX_PRTX_CFG(index, interface),
229 interface, index);
234 gmxx_prtx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface));
241 cvmx_read_csr(CVMX_PCSX_MISCX_CTL_REG(index, interface));
261 cvmx_write_csr(CVMX_GMXX_TXX_SLOT(index, interface), 64);
262 cvmx_write_csr(CVMX_GMXX_TXX_BURST(index, interface), 0);
269 cvmx_write_csr(CVMX_GMXX_TXX_SLOT(index, interface), 64);
270 cvmx_write_csr(CVMX_GMXX_TXX_BURST(index, interface), 0);
277 cvmx_write_csr(CVMX_GMXX_TXX_SLOT(index, interface), 512);
278 cvmx_write_csr(CVMX_GMXX_TXX_BURST(index, interface), 8192);
285 cvmx_write_csr(CVMX_PCSX_MISCX_CTL_REG(index, interface),
289 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmxx_prtx_cfg.u64);
292 gmxx_prtx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface));
296 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmxx_prtx_cfg.u64);
313 int index;
317 for (index = 0; index < num_ports; index++) {
318 int ipd_port = cvmx_helper_get_ipd_port(interface, index);
319 __cvmx_helper_sgmii_hardware_init_one_time(interface, index);
365 int index;
369 for (index = 0; index < num_ports; index++) {
372 cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface));
374 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface),
376 __cvmx_interrupt_pcsx_intx_en_reg_enable(index, interface);
398 int index = cvmx_helper_get_interface_index_num(ipd_port);
412 cvmx_read_csr(CVMX_PCSX_MRX_CONTROL_REG(index, interface));
422 cvmx_read_csr(CVMX_PCSX_MISCX_CTL_REG(index, interface));
428 cvmx_read_csr(CVMX_PCSX_MISCX_CTL_REG(index, interface));
440 (index, interface));
443 (interface, index) != 0)
450 (index, interface));
507 int index = cvmx_helper_get_interface_index_num(ipd_port);
508 __cvmx_helper_sgmii_hardware_init_link(interface, index);
509 return __cvmx_helper_sgmii_hardware_init_link_speed(interface, index,
531 int index = cvmx_helper_get_interface_index_num(ipd_port);
536 cvmx_read_csr(CVMX_PCSX_MRX_CONTROL_REG(index, interface));
538 cvmx_write_csr(CVMX_PCSX_MRX_CONTROL_REG(index, interface),
542 cvmx_read_csr(CVMX_PCSX_MISCX_CTL_REG(index, interface));
544 cvmx_write_csr(CVMX_PCSX_MISCX_CTL_REG(index, interface),
547 __cvmx_helper_sgmii_hardware_init_link(interface, index);