Linux Kernel
3.7.1
|
This function is called by cvmx_helper_interface_probe() after it determines the number of ports Octeon can support on a specific interface. This function is the per board location to override this value. It is called with the number of ports Octeon might support and should return the number of actual ports on the board.
This function must be modifed for every new Octeon board. Internally it uses switch statements based on the cvmx_sysinfo data to determine board types and revisions. It relys on the fact that every Octeon board receives a unique board type enumeration from the bootloader.
: Number of ports Octeon supports.
Returns Number of ports the actual board supports. Many times this will simple be "support_ports".
Enable packet input/output from the hardware. This function is called after by cvmx_helper_packet_hardware_enable() to perform board specific initialization. For most boards nothing is needed.
Returns Zero on success, negative on failure
Probe a LOOP interface and determine the number of ports connected to it. The LOOP interface should still be down after this call.
Returns Number of ports on the interface. Zero to disable.
Bringup and enable a LOOP interface. After this call packet I/O should be fully functional. This is called with IPD enabled but PKO disabled.
up
Returns Zero on success, negative on failure
Probe a NPI interface and determine the number of ports connected to it. The NPI interface should still be down after this call.
Returns Number of ports on the interface. Zero to disable.
Bringup and enable a NPI interface. After this call packet I/O should be fully functional. This is called with IPD enabled but PKO disabled.
up
Returns Zero on success, negative on failure
Probe RGMII ports and determine the number present
Returns Number of RGMII/GMII/MII ports (0-4).
Workaround ASX setup errata with CN38XX pass1
: Port to setup (0..3) : Chip frequency in Hertz
Returns Zero on success, negative on failure
Perform initialization required only once for an SGMII port.
: Index of prot on the interface
Returns Zero on success, negative on failure
Initialize the SERTES link for the first time or after a loss of link.
: Index of prot on the interface
Returns Zero on success, negative on failure
Configure an SGMII link to the specified speed after the SERTES link is up.
: Index of prot on the interface : Link state to configure
Returns Zero on success, negative on failure
Bring up the SGMII interface to be ready for packet I/O but leave I/O disabled using the GMX override. This function follows the bringup documented in 10.6.3 of the manual.
: Number of ports on the interface
Returns Zero on success, negative on failure
Probe a SGMII interface and determine the number of ports connected to it. The SGMII interface should still be down after this call.
Returns Number of ports on the interface. Zero to disable.
Bringup and enable a SGMII interface. After this call packet I/O should be fully functional. This is called with IPD enabled but PKO disabled.
up
Returns Zero on success, negative on failure
Probe a SPI interface and determine the number of ports connected to it. The SPI interface should still be down after this call.
Returns Number of ports on the interface. Zero to disable.
Bringup and enable a SPI interface. After this call packet I/O should be fully functional. This is called with IPD enabled but PKO disabled.
up
Returns Zero on success, negative on failure
Setup the common GMX settings that determine the number of ports. These setting apply to almost all configurations of all chips.
: Number of ports on the interface
Returns Zero on success, negative on failure
Returns the IPD/PKO port number for a port on the given interface.
: Port on the interface
Returns IPD/PKO port number
Probe a XAUI interface and determine the number of ports connected to it. The XAUI interface should still be down after this call.
Returns Number of ports on the interface. Zero to disable.
Bringup and enable a XAUI interface. After this call packet I/O should be fully functional. This is called with IPD enabled but PKO disabled.
up
Returns Zero on success, negative on failure
Return the number of ports on an interface. Depending on the chip and configuration, this can be 1-16. A value of 0 specifies that the interface doesn't exist or isn't usable.
the port count for
Returns Number of ports on interface. Can be Zero.
Get the operating mode of an interface. Depending on the Octeon chip and configuration, this function returns an enumeration of the type of packet I/O supported by an interface.
Returns Mode of the interface. Unknown or unsupported interfaces return DISABLED.
This function sets the interface_port_count[interface] correctly, without modifying any hardware configuration. Hardware setup of the ports will be performed later.
Returns Zero on success, negative on failure
This function probes an interface to determine the actual number of hardware ports connected to it. It doesn't setup the ports or enable them. The main goal here is to set the global interface_port_count[interface] correctly. Hardware setup of the ports will be performed later.
Returns Zero on success, negative on failure
Setup the IPD/PIP for the ports on an interface. Packet classification and tagging are set for every port on the interface. The number of ports on the interface must already have been probed.
IPD/PIP for
Returns Zero on success, negative on failure
Setup the PKO for the ports on an interface. The number of queues per port and the priority of each PKO output queue is set here. PKO must be disabled when this function is called.
PKO for
Returns Zero on success, negative on failure
Enable packet input/output from the hardware. This function is called after all internal setup is complete and IPD is enabled. After this function completes, packets will be accepted from the hardware ports. PKO should still be disabled to make sure packets aren't sent out partially setup hardware.
Returns Zero on success, negative on failure
Enable GMX error reporting for the supplied interface
Returns the IPD/PKO port number for the first port on the given interface.
Returns IPD/PKO port number
Returns the IPD/PKO port number for the last port on the given interface.
Returns IPD/PKO port number
Configure the hardware CRC engine
(0 or 1) : Invert the result of the CRC : Reflect : CRC initialization vector
Return true if the supplied interface is configured for SPI
Returns True if interface is SPI
Poll all the SPI4000 port and check its speed
is on : Port to poll (0-9) Returns Status of the port. 0=down. All other values the port is up.