Lines Matching +full:port +full:- +full:number
7 * Copyright (c) 2003-2008 Cavium Networks
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
35 #include <asm/octeon/cvmx-config.h>
37 #include <asm/octeon/cvmx-fpa.h>
38 #include <asm/octeon/cvmx-pip.h>
39 #include <asm/octeon/cvmx-pko.h>
40 #include <asm/octeon/cvmx-ipd.h>
41 #include <asm/octeon/cvmx-spi.h>
43 #include <asm/octeon/cvmx-helper.h>
44 #include <asm/octeon/cvmx-helper-util.h>
46 #include <asm/octeon/cvmx-ipd-defs.h>
86 * @queue: Input queue to setup RED on (0-7)
112 (255ul << 24) / (red_marks.s.pass - red_marks.s.drop); in cvmx_helper_setup_red_queue()
138 int port; in cvmx_helper_setup_red() local
145 for (port = cvmx_helper_get_first_ipd_port(interface); in cvmx_helper_setup_red()
146 port < cvmx_helper_get_last_ipd_port(interface); port++) in cvmx_helper_setup_red()
147 cvmx_write_csr(CVMX_IPD_PORTX_BP_PAGE_CNT(port), in cvmx_helper_setup_red()
154 /* Shutoff the dropping based on the per port page count. SW isn't in cvmx_helper_setup_red()
171 * Setup the common GMX settings that determine the number of
176 * @num_ports: Number of ports on the interface
188 /* Tell GMX the number of TX ports on this interface */ in __cvmx_helper_setup_gmx()
193 /* Tell GMX the number of RX ports on this interface. This only in __cvmx_helper_setup_gmx()
206 return -1; in __cvmx_helper_setup_gmx()
217 /* Tell PKO the number of ports on this interface */ in __cvmx_helper_setup_gmx()
258 /* Choose the max value for the number of ports */ in __cvmx_helper_setup_gmx()
280 * Returns the IPD/PKO port number for a port on the given
284 * @port: Port on the interface
286 * Returns IPD/PKO port number
288 int cvmx_helper_get_ipd_port(int interface, int port) in cvmx_helper_get_ipd_port() argument
292 return port; in cvmx_helper_get_ipd_port()
294 return port + 16; in cvmx_helper_get_ipd_port()
296 return port + 32; in cvmx_helper_get_ipd_port()
298 return port + 36; in cvmx_helper_get_ipd_port()
300 return port + 40; in cvmx_helper_get_ipd_port()
302 return port + 44; in cvmx_helper_get_ipd_port()
304 return -1; in cvmx_helper_get_ipd_port()
309 * Returns the interface number for an IPD/PKO port number.
311 * @ipd_port: IPD/PKO port number
313 * Returns Interface number
331 "port number\n"); in cvmx_helper_get_interface_num()
333 return -1; in cvmx_helper_get_interface_num()
338 * Returns the interface index number for an IPD/PKO port
339 * number.
341 * @ipd_port: IPD/PKO port number
343 * Returns Interface index number
359 "Illegal IPD port number\n"); in cvmx_helper_get_interface_index_num()
361 return -1; in cvmx_helper_get_interface_index_num()