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()
164 cvmx_write_csr(CVMX_PCSXX_CONTROL1_REG(interface), xauiCtl.u64); in __cvmx_helper_xaui_enable()
168 (CVMX_PCSXX_CONTROL1_REG(interface), union cvmx_pcsxx_control1_reg, in __cvmx_helper_xaui_enable()
173 (CVMX_PCSXX_10GBX_STATUS_REG(interface), in __cvmx_helper_xaui_enable()
178 (CVMX_GMXX_RX_XAUI_CTL(interface), union cvmx_gmxx_rx_xaui_ctl, in __cvmx_helper_xaui_enable()
183 gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(0, interface)); in __cvmx_helper_xaui_enable()
185 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(0, interface), gmx_cfg.u64); in __cvmx_helper_xaui_enable()
189 (CVMX_GMXX_PRTX_CFG(0, interface), union cvmx_gmxx_prtx_cfg, in __cvmx_helper_xaui_enable()
194 (CVMX_GMXX_PRTX_CFG(0, interface), union cvmx_gmxx_prtx_cfg, in __cvmx_helper_xaui_enable()
199 gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(0, interface)); in __cvmx_helper_xaui_enable()
203 cvmx_write_csr(CVMX_GMXX_TX_PRTS(interface), 1); in __cvmx_helper_xaui_enable()
204 cvmx_write_csr(CVMX_GMXX_TXX_SLOT(0, interface), 512); in __cvmx_helper_xaui_enable()
205 cvmx_write_csr(CVMX_GMXX_TXX_BURST(0, interface), 8192); in __cvmx_helper_xaui_enable()
206 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(0, interface), gmx_cfg.u64); in __cvmx_helper_xaui_enable()
209 cvmx_write_csr(CVMX_GMXX_RXX_INT_REG(0, interface), in __cvmx_helper_xaui_enable()
210 cvmx_read_csr(CVMX_GMXX_RXX_INT_REG(0, interface))); in __cvmx_helper_xaui_enable()
211 cvmx_write_csr(CVMX_GMXX_TX_INT_REG(interface), in __cvmx_helper_xaui_enable()
212 cvmx_read_csr(CVMX_GMXX_TX_INT_REG(interface))); in __cvmx_helper_xaui_enable()
213 cvmx_write_csr(CVMX_PCSXX_INT_REG(interface), in __cvmx_helper_xaui_enable()
214 cvmx_read_csr(CVMX_PCSXX_INT_REG(interface))); in __cvmx_helper_xaui_enable()
218 (CVMX_PCSXX_STATUS1_REG(interface), union cvmx_pcsxx_status1_reg, in __cvmx_helper_xaui_enable()
222 (CVMX_PCSXX_STATUS2_REG(interface), union cvmx_pcsxx_status2_reg, in __cvmx_helper_xaui_enable()
226 (CVMX_PCSXX_STATUS2_REG(interface), union cvmx_pcsxx_status2_reg, in __cvmx_helper_xaui_enable()
230 cvmx_write_csr(CVMX_GMXX_RXX_INT_EN(0, interface), gmx_rx_int_en.u64); in __cvmx_helper_xaui_enable()
231 cvmx_write_csr(CVMX_GMXX_TX_INT_EN(interface), gmx_tx_int_en.u64); in __cvmx_helper_xaui_enable()
232 cvmx_write_csr(CVMX_PCSXX_INT_EN_REG(interface), pcsx_int_en_reg.u64); in __cvmx_helper_xaui_enable()
236 cvmx_write_csr(CVMX_PCSXX_MISC_CTL_REG(interface), xauiMiscCtl.u64); in __cvmx_helper_xaui_enable()
238 gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(0, interface)); in __cvmx_helper_xaui_enable()
240 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(0, interface), gmx_cfg.u64); in __cvmx_helper_xaui_enable()
242 __cvmx_interrupt_pcsx_intx_en_reg_enable(0, interface); in __cvmx_helper_xaui_enable()
243 __cvmx_interrupt_pcsx_intx_en_reg_enable(1, interface); in __cvmx_helper_xaui_enable()
244 __cvmx_interrupt_pcsx_intx_en_reg_enable(2, interface); in __cvmx_helper_xaui_enable()
245 __cvmx_interrupt_pcsx_intx_en_reg_enable(3, interface); in __cvmx_helper_xaui_enable()
246 __cvmx_interrupt_pcsxx_int_en_reg_enable(interface); in __cvmx_helper_xaui_enable()
247 __cvmx_interrupt_gmxx_enable(interface); in __cvmx_helper_xaui_enable()
264 int interface = cvmx_helper_get_interface_num(ipd_port); in __cvmx_helper_xaui_link_get() local
270 gmxx_tx_xaui_ctl.u64 = cvmx_read_csr(CVMX_GMXX_TX_XAUI_CTL(interface)); in __cvmx_helper_xaui_link_get()
271 gmxx_rx_xaui_ctl.u64 = cvmx_read_csr(CVMX_GMXX_RX_XAUI_CTL(interface)); in __cvmx_helper_xaui_link_get()
273 cvmx_read_csr(CVMX_PCSXX_STATUS1_REG(interface)); in __cvmx_helper_xaui_link_get()
284 cvmx_write_csr(CVMX_GMXX_RXX_INT_EN(0, interface), 0x0); in __cvmx_helper_xaui_link_get()
285 cvmx_write_csr(CVMX_GMXX_TX_INT_EN(interface), 0x0); in __cvmx_helper_xaui_link_get()
286 cvmx_write_csr(CVMX_PCSXX_INT_EN_REG(interface), 0x0); in __cvmx_helper_xaui_link_get()
304 int interface = cvmx_helper_get_interface_num(ipd_port); in __cvmx_helper_xaui_link_set() local
308 gmxx_tx_xaui_ctl.u64 = cvmx_read_csr(CVMX_GMXX_TX_XAUI_CTL(interface)); in __cvmx_helper_xaui_link_set()
309 gmxx_rx_xaui_ctl.u64 = cvmx_read_csr(CVMX_GMXX_RX_XAUI_CTL(interface)); in __cvmx_helper_xaui_link_set()
320 return __cvmx_helper_xaui_enable(interface); in __cvmx_helper_xaui_link_set()