Lines Matching full:interface

48  * @interface: Interface to probe
52 int __cvmx_helper_rgmii_probe(int interface) in __cvmx_helper_rgmii_probe() argument
56 mode.u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface)); in __cvmx_helper_rgmii_probe()
62 "SPI interface\n"); in __cvmx_helper_rgmii_probe()
92 * Put an RGMII interface in loopback mode. Internal packets sent
100 int interface = (port >> 4) & 1; in cvmx_helper_rgmii_internal_loopback() local
109 cvmx_write_csr(CVMX_GMXX_TXX_CLK(index, interface), 1); in cvmx_helper_rgmii_internal_loopback()
110 cvmx_write_csr(CVMX_GMXX_TXX_SLOT(index, interface), 0x200); in cvmx_helper_rgmii_internal_loopback()
111 cvmx_write_csr(CVMX_GMXX_TXX_BURST(index, interface), 0x2000); in cvmx_helper_rgmii_internal_loopback()
112 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmx_cfg.u64); in cvmx_helper_rgmii_internal_loopback()
113 tmp = cvmx_read_csr(CVMX_ASXX_PRT_LOOP(interface)); in cvmx_helper_rgmii_internal_loopback()
114 cvmx_write_csr(CVMX_ASXX_PRT_LOOP(interface), (1 << index) | tmp); in cvmx_helper_rgmii_internal_loopback()
115 tmp = cvmx_read_csr(CVMX_ASXX_TX_PRT_EN(interface)); in cvmx_helper_rgmii_internal_loopback()
116 cvmx_write_csr(CVMX_ASXX_TX_PRT_EN(interface), (1 << index) | tmp); in cvmx_helper_rgmii_internal_loopback()
117 tmp = cvmx_read_csr(CVMX_ASXX_RX_PRT_EN(interface)); in cvmx_helper_rgmii_internal_loopback()
118 cvmx_write_csr(CVMX_ASXX_RX_PRT_EN(interface), (1 << index) | tmp); in cvmx_helper_rgmii_internal_loopback()
120 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmx_cfg.u64); in cvmx_helper_rgmii_internal_loopback()
126 * @interface: Interface to setup
133 static int __cvmx_helper_errata_asx_pass1(int interface, int port, in __cvmx_helper_errata_asx_pass1() argument
138 cvmx_write_csr(CVMX_ASXX_TX_HI_WATERX(port, interface), 12); in __cvmx_helper_errata_asx_pass1()
140 cvmx_write_csr(CVMX_ASXX_TX_HI_WATERX(port, interface), 11); in __cvmx_helper_errata_asx_pass1()
142 cvmx_write_csr(CVMX_ASXX_TX_HI_WATERX(port, interface), 10); in __cvmx_helper_errata_asx_pass1()
144 cvmx_write_csr(CVMX_ASXX_TX_HI_WATERX(port, interface), 9); in __cvmx_helper_errata_asx_pass1()
153 * to get RGMII to function on the supplied interface.
155 * @interface: PKO Interface to configure (0 or 1)
159 int __cvmx_helper_rgmii_enable(int interface) in __cvmx_helper_rgmii_enable() argument
161 int num_ports = cvmx_helper_ports_on_interface(interface); in __cvmx_helper_rgmii_enable()
168 mode.u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface)); in __cvmx_helper_rgmii_enable()
180 cvmx_write_csr(CVMX_ASXX_TX_PRT_EN(interface), asx_tx.u64); in __cvmx_helper_rgmii_enable()
184 cvmx_write_csr(CVMX_ASXX_RX_PRT_EN(interface), asx_rx.u64); in __cvmx_helper_rgmii_enable()
192 __cvmx_helper_errata_asx_pass1(interface, port, in __cvmx_helper_rgmii_enable()
204 (port, interface)); in __cvmx_helper_rgmii_enable()
207 cvmx_write_csr(CVMX_GMXX_RXX_FRM_CTL(port, interface), in __cvmx_helper_rgmii_enable()
218 cvmx_write_csr(CVMX_GMXX_TXX_PAUSE_PKT_TIME(port, interface), in __cvmx_helper_rgmii_enable()
221 (port, interface), 19000); in __cvmx_helper_rgmii_enable()
224 cvmx_write_csr(CVMX_ASXX_TX_CLK_SETX(port, interface), in __cvmx_helper_rgmii_enable()
226 cvmx_write_csr(CVMX_ASXX_RX_CLK_SETX(port, interface), in __cvmx_helper_rgmii_enable()
229 cvmx_write_csr(CVMX_ASXX_TX_CLK_SETX(port, interface), in __cvmx_helper_rgmii_enable()
231 cvmx_write_csr(CVMX_ASXX_RX_CLK_SETX(port, interface), in __cvmx_helper_rgmii_enable()
236 __cvmx_helper_setup_gmx(interface, num_ports); in __cvmx_helper_rgmii_enable()
243 cvmx_read_csr(CVMX_GMXX_PRTX_CFG(port, interface)); in __cvmx_helper_rgmii_enable()
245 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(port, interface), in __cvmx_helper_rgmii_enable()
248 __cvmx_interrupt_asxx_enable(interface); in __cvmx_helper_rgmii_enable()
249 __cvmx_interrupt_gmxx_enable(interface); in __cvmx_helper_rgmii_enable()
266 int interface = cvmx_helper_get_interface_num(ipd_port); in __cvmx_helper_rgmii_link_get() local
270 asxx_prt_loop.u64 = cvmx_read_csr(CVMX_ASXX_PRT_LOOP(interface)); in __cvmx_helper_rgmii_link_get()
298 int interface = cvmx_helper_get_interface_num(ipd_port); in __cvmx_helper_rgmii_link_set() local
314 cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface)); in __cvmx_helper_rgmii_link_set()
318 cvmx_write_csr(CVMX_ASXX_RX_PRT_EN(interface), in __cvmx_helper_rgmii_link_set()
319 cvmx_read_csr(CVMX_ASXX_RX_PRT_EN(interface)) & in __cvmx_helper_rgmii_link_set()
336 gmx_tx_ovr_bp.u64 = cvmx_read_csr(CVMX_GMXX_TX_OVR_BP(interface)); in __cvmx_helper_rgmii_link_set()
340 cvmx_write_csr(CVMX_GMXX_TX_OVR_BP(interface), gmx_tx_ovr_bp.u64); in __cvmx_helper_rgmii_link_set()
341 cvmx_read_csr(CVMX_GMXX_TX_OVR_BP(interface)); in __cvmx_helper_rgmii_link_set()
351 interface * 0x800 + index * 0x100 + 0x880); in __cvmx_helper_rgmii_link_set()
359 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), new_gmx_cfg.u64); in __cvmx_helper_rgmii_link_set()
360 cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface)); in __cvmx_helper_rgmii_link_set()
386 cvmx_write_csr(CVMX_GMXX_TXX_CLK(index, interface), 50); in __cvmx_helper_rgmii_link_set()
387 cvmx_write_csr(CVMX_GMXX_TXX_SLOT(index, interface), 0x40); in __cvmx_helper_rgmii_link_set()
388 cvmx_write_csr(CVMX_GMXX_TXX_BURST(index, interface), 0); in __cvmx_helper_rgmii_link_set()
390 cvmx_write_csr(CVMX_GMXX_TXX_CLK(index, interface), 5); in __cvmx_helper_rgmii_link_set()
391 cvmx_write_csr(CVMX_GMXX_TXX_SLOT(index, interface), 0x40); in __cvmx_helper_rgmii_link_set()
392 cvmx_write_csr(CVMX_GMXX_TXX_BURST(index, interface), 0); in __cvmx_helper_rgmii_link_set()
394 cvmx_write_csr(CVMX_GMXX_TXX_CLK(index, interface), 1); in __cvmx_helper_rgmii_link_set()
395 cvmx_write_csr(CVMX_GMXX_TXX_SLOT(index, interface), 0x200); in __cvmx_helper_rgmii_link_set()
396 cvmx_write_csr(CVMX_GMXX_TXX_BURST(index, interface), 0x2000); in __cvmx_helper_rgmii_link_set()
402 mode.u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface)); in __cvmx_helper_rgmii_link_set()
419 (index, interface), 1); in __cvmx_helper_rgmii_link_set()
425 cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface)); in __cvmx_helper_rgmii_link_set()
428 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), new_gmx_cfg.u64); in __cvmx_helper_rgmii_link_set()
431 cvmx_write_csr(CVMX_ASXX_RX_PRT_EN(interface), in __cvmx_helper_rgmii_link_set()
432 cvmx_read_csr(CVMX_ASXX_RX_PRT_EN(interface)) | (1 << in __cvmx_helper_rgmii_link_set()
444 cvmx_write_csr(CVMX_GMXX_TX_OVR_BP(interface), gmx_tx_ovr_bp_save.u64); in __cvmx_helper_rgmii_link_set()
448 cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), new_gmx_cfg.u64); in __cvmx_helper_rgmii_link_set()