Lines Matching full:interface
45 int __cvmx_helper_xaui_enumerate(int interface) in __cvmx_helper_xaui_enumerate() argument
50 gmx_hg2_control.u64 = cvmx_read_csr(CVMX_GMXX_HG2_CONTROL(interface)); in __cvmx_helper_xaui_enumerate()
58 * Probe a XAUI interface and determine the number of ports
59 * connected to it. The XAUI interface should still be down
62 * @interface: Interface to probe
64 * Returns Number of ports on the interface. Zero to disable.
66 int __cvmx_helper_xaui_probe(int interface) in __cvmx_helper_xaui_probe() argument
73 * interface needs to be enabled before IPD otherwise per port in __cvmx_helper_xaui_probe()
76 mode.u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface)); in __cvmx_helper_xaui_probe()
78 cvmx_write_csr(CVMX_GMXX_INF_MODE(interface), mode.u64); in __cvmx_helper_xaui_probe()
80 __cvmx_helper_setup_gmx(interface, 1); in __cvmx_helper_xaui_probe()
85 * interface to the XAUI. This allows us to use HiGig2 in __cvmx_helper_xaui_probe()
98 pko_mem_port_ptrs.s.eid = interface * 4; in __cvmx_helper_xaui_probe()
99 pko_mem_port_ptrs.s.pid = interface * 16 + i; in __cvmx_helper_xaui_probe()
102 return __cvmx_helper_xaui_enumerate(interface); in __cvmx_helper_xaui_probe()
106 * Bringup and enable a XAUI interface. After this call packet
110 * @interface: Interface to bring up
114 int __cvmx_helper_xaui_enable(int interface) in __cvmx_helper_xaui_enable() argument
126 gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(0, interface)); in __cvmx_helper_xaui_enable()
127 gmx_cfg.s.pknd = cvmx_helper_get_ipd_port(interface, 0); in __cvmx_helper_xaui_enable()
128 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(0, interface), gmx_cfg.u64); in __cvmx_helper_xaui_enable()
131 /* (1) Interface has already been enabled. */ in __cvmx_helper_xaui_enable()
134 xauiMiscCtl.u64 = cvmx_read_csr(CVMX_PCSXX_MISC_CTL_REG(interface)); in __cvmx_helper_xaui_enable()
136 cvmx_write_csr(CVMX_PCSXX_MISC_CTL_REG(interface), xauiMiscCtl.u64); in __cvmx_helper_xaui_enable()
139 gmx_rx_int_en.u64 = cvmx_read_csr(CVMX_GMXX_RXX_INT_EN(0, interface)); in __cvmx_helper_xaui_enable()
140 cvmx_write_csr(CVMX_GMXX_RXX_INT_EN(0, interface), 0x0); in __cvmx_helper_xaui_enable()
141 gmx_tx_int_en.u64 = cvmx_read_csr(CVMX_GMXX_TX_INT_EN(interface)); in __cvmx_helper_xaui_enable()
142 cvmx_write_csr(CVMX_GMXX_TX_INT_EN(interface), 0x0); in __cvmx_helper_xaui_enable()
143 pcsx_int_en_reg.u64 = cvmx_read_csr(CVMX_PCSXX_INT_EN_REG(interface)); in __cvmx_helper_xaui_enable()
144 cvmx_write_csr(CVMX_PCSXX_INT_EN_REG(interface), 0x0); in __cvmx_helper_xaui_enable()
149 gmxXauiTxCtl.u64 = cvmx_read_csr(CVMX_GMXX_TX_XAUI_CTL(interface)); in __cvmx_helper_xaui_enable()
153 cvmx_write_csr(CVMX_GMXX_TX_XAUI_CTL(interface), gmxXauiTxCtl.u64); in __cvmx_helper_xaui_enable()
156 xauiCtl.u64 = cvmx_read_csr(CVMX_PCSXX_CONTROL1_REG(interface)); in __cvmx_helper_xaui_enable()
165 cvmx_write_csr(CVMX_PCSXX_CONTROL1_REG(interface), xauiCtl.u64); in __cvmx_helper_xaui_enable()
169 (CVMX_PCSXX_CONTROL1_REG(interface), union cvmx_pcsxx_control1_reg, in __cvmx_helper_xaui_enable()
174 (CVMX_PCSXX_10GBX_STATUS_REG(interface), in __cvmx_helper_xaui_enable()
179 (CVMX_GMXX_RX_XAUI_CTL(interface), union cvmx_gmxx_rx_xaui_ctl, in __cvmx_helper_xaui_enable()
184 gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(0, interface)); in __cvmx_helper_xaui_enable()
186 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(0, interface), gmx_cfg.u64); in __cvmx_helper_xaui_enable()
190 (CVMX_GMXX_PRTX_CFG(0, interface), union cvmx_gmxx_prtx_cfg, in __cvmx_helper_xaui_enable()
195 (CVMX_GMXX_PRTX_CFG(0, interface), union cvmx_gmxx_prtx_cfg, in __cvmx_helper_xaui_enable()
200 gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(0, interface)); in __cvmx_helper_xaui_enable()
204 cvmx_write_csr(CVMX_GMXX_TX_PRTS(interface), 1); in __cvmx_helper_xaui_enable()
205 cvmx_write_csr(CVMX_GMXX_TXX_SLOT(0, interface), 512); in __cvmx_helper_xaui_enable()
206 cvmx_write_csr(CVMX_GMXX_TXX_BURST(0, interface), 8192); in __cvmx_helper_xaui_enable()
207 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(0, interface), gmx_cfg.u64); in __cvmx_helper_xaui_enable()
210 cvmx_write_csr(CVMX_GMXX_RXX_INT_REG(0, interface), in __cvmx_helper_xaui_enable()
211 cvmx_read_csr(CVMX_GMXX_RXX_INT_REG(0, interface))); in __cvmx_helper_xaui_enable()
212 cvmx_write_csr(CVMX_GMXX_TX_INT_REG(interface), in __cvmx_helper_xaui_enable()
213 cvmx_read_csr(CVMX_GMXX_TX_INT_REG(interface))); in __cvmx_helper_xaui_enable()
214 cvmx_write_csr(CVMX_PCSXX_INT_REG(interface), in __cvmx_helper_xaui_enable()
215 cvmx_read_csr(CVMX_PCSXX_INT_REG(interface))); in __cvmx_helper_xaui_enable()
219 (CVMX_PCSXX_STATUS1_REG(interface), union cvmx_pcsxx_status1_reg, in __cvmx_helper_xaui_enable()
223 (CVMX_PCSXX_STATUS2_REG(interface), union cvmx_pcsxx_status2_reg, in __cvmx_helper_xaui_enable()
227 (CVMX_PCSXX_STATUS2_REG(interface), union cvmx_pcsxx_status2_reg, in __cvmx_helper_xaui_enable()
231 cvmx_write_csr(CVMX_GMXX_RXX_INT_EN(0, interface), gmx_rx_int_en.u64); in __cvmx_helper_xaui_enable()
232 cvmx_write_csr(CVMX_GMXX_TX_INT_EN(interface), gmx_tx_int_en.u64); in __cvmx_helper_xaui_enable()
233 cvmx_write_csr(CVMX_PCSXX_INT_EN_REG(interface), pcsx_int_en_reg.u64); in __cvmx_helper_xaui_enable()
237 cvmx_write_csr(CVMX_PCSXX_MISC_CTL_REG(interface), xauiMiscCtl.u64); in __cvmx_helper_xaui_enable()
239 gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(0, interface)); in __cvmx_helper_xaui_enable()
241 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(0, interface), gmx_cfg.u64); in __cvmx_helper_xaui_enable()
243 __cvmx_interrupt_pcsx_intx_en_reg_enable(0, interface); in __cvmx_helper_xaui_enable()
244 __cvmx_interrupt_pcsx_intx_en_reg_enable(1, interface); in __cvmx_helper_xaui_enable()
245 __cvmx_interrupt_pcsx_intx_en_reg_enable(2, interface); in __cvmx_helper_xaui_enable()
246 __cvmx_interrupt_pcsx_intx_en_reg_enable(3, interface); in __cvmx_helper_xaui_enable()
247 __cvmx_interrupt_pcsxx_int_en_reg_enable(interface); in __cvmx_helper_xaui_enable()
248 __cvmx_interrupt_gmxx_enable(interface); in __cvmx_helper_xaui_enable()
265 int interface = cvmx_helper_get_interface_num(ipd_port); in __cvmx_helper_xaui_link_get() local
271 gmxx_tx_xaui_ctl.u64 = cvmx_read_csr(CVMX_GMXX_TX_XAUI_CTL(interface)); in __cvmx_helper_xaui_link_get()
272 gmxx_rx_xaui_ctl.u64 = cvmx_read_csr(CVMX_GMXX_RX_XAUI_CTL(interface)); in __cvmx_helper_xaui_link_get()
274 cvmx_read_csr(CVMX_PCSXX_STATUS1_REG(interface)); in __cvmx_helper_xaui_link_get()
285 cvmx_write_csr(CVMX_GMXX_RXX_INT_EN(0, interface), 0x0); in __cvmx_helper_xaui_link_get()
286 cvmx_write_csr(CVMX_GMXX_TX_INT_EN(interface), 0x0); in __cvmx_helper_xaui_link_get()
287 cvmx_write_csr(CVMX_PCSXX_INT_EN_REG(interface), 0x0); in __cvmx_helper_xaui_link_get()
305 int interface = cvmx_helper_get_interface_num(ipd_port); in __cvmx_helper_xaui_link_set() local
309 gmxx_tx_xaui_ctl.u64 = cvmx_read_csr(CVMX_GMXX_TX_XAUI_CTL(interface)); in __cvmx_helper_xaui_link_set()
310 gmxx_rx_xaui_ctl.u64 = cvmx_read_csr(CVMX_GMXX_RX_XAUI_CTL(interface)); in __cvmx_helper_xaui_link_set()
321 return __cvmx_helper_xaui_enable(interface); in __cvmx_helper_xaui_link_set()