Commit 2b58a76e authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Ralf Baechle

MIPS: Octeon: Kill cvmx_helper_link_autoconf()

Kill cvmx_helper_link_autoconf(). Nobody uses this function.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Cc: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14626/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 3c2b0239
...@@ -287,8 +287,7 @@ cvmx_helper_link_info_t __cvmx_helper_rgmii_link_get(int ipd_port) ...@@ -287,8 +287,7 @@ cvmx_helper_link_info_t __cvmx_helper_rgmii_link_get(int ipd_port)
* Configure an IPD/PKO port for the specified link state. This * Configure an IPD/PKO port for the specified link state. This
* function does not influence auto negotiation at the PHY level. * function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned * The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use * by cvmx_helper_link_get().
* cvmx_helper_link_autoconf() instead.
* *
* @ipd_port: IPD/PKO port to configure * @ipd_port: IPD/PKO port to configure
* @link_info: The new link state * @link_info: The new link state
......
...@@ -500,8 +500,7 @@ cvmx_helper_link_info_t __cvmx_helper_sgmii_link_get(int ipd_port) ...@@ -500,8 +500,7 @@ cvmx_helper_link_info_t __cvmx_helper_sgmii_link_get(int ipd_port)
* Configure an IPD/PKO port for the specified link state. This * Configure an IPD/PKO port for the specified link state. This
* function does not influence auto negotiation at the PHY level. * function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned * The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use * by cvmx_helper_link_get().
* cvmx_helper_link_autoconf() instead.
* *
* @ipd_port: IPD/PKO port to configure * @ipd_port: IPD/PKO port to configure
* @link_info: The new link state * @link_info: The new link state
......
...@@ -188,8 +188,7 @@ cvmx_helper_link_info_t __cvmx_helper_spi_link_get(int ipd_port) ...@@ -188,8 +188,7 @@ cvmx_helper_link_info_t __cvmx_helper_spi_link_get(int ipd_port)
* Configure an IPD/PKO port for the specified link state. This * Configure an IPD/PKO port for the specified link state. This
* function does not influence auto negotiation at the PHY level. * function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned * The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use * by cvmx_helper_link_get().
* cvmx_helper_link_autoconf() instead.
* *
* @ipd_port: IPD/PKO port to configure * @ipd_port: IPD/PKO port to configure
* @link_info: The new link state * @link_info: The new link state
......
...@@ -295,8 +295,7 @@ cvmx_helper_link_info_t __cvmx_helper_xaui_link_get(int ipd_port) ...@@ -295,8 +295,7 @@ cvmx_helper_link_info_t __cvmx_helper_xaui_link_get(int ipd_port)
* Configure an IPD/PKO port for the specified link state. This * Configure an IPD/PKO port for the specified link state. This
* function does not influence auto negotiation at the PHY level. * function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned * The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use * by cvmx_helper_link_get().
* cvmx_helper_link_autoconf() instead.
* *
* @ipd_port: IPD/PKO port to configure * @ipd_port: IPD/PKO port to configure
* @link_info: The new link state * @link_info: The new link state
......
...@@ -69,10 +69,6 @@ void (*cvmx_override_ipd_port_setup) (int ipd_port); ...@@ -69,10 +69,6 @@ void (*cvmx_override_ipd_port_setup) (int ipd_port);
/* Port count per interface */ /* Port count per interface */
static int interface_port_count[5]; static int interface_port_count[5];
/* Port last configured link info index by IPD/PKO port */
static cvmx_helper_link_info_t
port_link_info[CVMX_PIP_NUM_INPUT_PORTS];
/** /**
* Return the number of interfaces the chip has. Each interface * Return the number of interfaces the chip has. Each interface
* may have multiple ports. Most chips support two interfaces, * may have multiple ports. Most chips support two interfaces,
...@@ -1135,41 +1131,6 @@ int cvmx_helper_initialize_packet_io_local(void) ...@@ -1135,41 +1131,6 @@ int cvmx_helper_initialize_packet_io_local(void)
return cvmx_pko_initialize_local(); return cvmx_pko_initialize_local();
} }
/**
* Auto configure an IPD/PKO port link state and speed. This
* function basically does the equivalent of:
* cvmx_helper_link_set(ipd_port, cvmx_helper_link_get(ipd_port));
*
* @ipd_port: IPD/PKO port to auto configure
*
* Returns Link state after configure
*/
cvmx_helper_link_info_t cvmx_helper_link_autoconf(int ipd_port)
{
cvmx_helper_link_info_t link_info;
int interface = cvmx_helper_get_interface_num(ipd_port);
int index = cvmx_helper_get_interface_index_num(ipd_port);
if (index >= cvmx_helper_ports_on_interface(interface)) {
link_info.u64 = 0;
return link_info;
}
link_info = cvmx_helper_link_get(ipd_port);
if (link_info.u64 == port_link_info[ipd_port].u64)
return link_info;
/* If we fail to set the link speed, port_link_info will not change */
cvmx_helper_link_set(ipd_port, link_info);
/*
* port_link_info should be the current value, which will be
* different than expect if cvmx_helper_link_set() failed.
*/
return port_link_info[ipd_port];
}
EXPORT_SYMBOL_GPL(cvmx_helper_link_autoconf);
/** /**
* Return the link state of an IPD/PKO port as returned by * Return the link state of an IPD/PKO port as returned by
* auto negotiation. The result of this function may not match * auto negotiation. The result of this function may not match
...@@ -1233,8 +1194,7 @@ EXPORT_SYMBOL_GPL(cvmx_helper_link_get); ...@@ -1233,8 +1194,7 @@ EXPORT_SYMBOL_GPL(cvmx_helper_link_get);
* Configure an IPD/PKO port for the specified link state. This * Configure an IPD/PKO port for the specified link state. This
* function does not influence auto negotiation at the PHY level. * function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned * The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use * by cvmx_helper_link_get().
* cvmx_helper_link_autoconf() instead.
* *
* @ipd_port: IPD/PKO port to configure * @ipd_port: IPD/PKO port to configure
* @link_info: The new link state * @link_info: The new link state
...@@ -1276,11 +1236,6 @@ int cvmx_helper_link_set(int ipd_port, cvmx_helper_link_info_t link_info) ...@@ -1276,11 +1236,6 @@ int cvmx_helper_link_set(int ipd_port, cvmx_helper_link_info_t link_info)
case CVMX_HELPER_INTERFACE_MODE_LOOP: case CVMX_HELPER_INTERFACE_MODE_LOOP:
break; break;
} }
/* Set the port_link_info here so that the link status is updated
no matter how cvmx_helper_link_set is called. We don't change
the value if link_set failed */
if (result == 0)
port_link_info[ipd_port].u64 = link_info.u64;
return result; return result;
} }
EXPORT_SYMBOL_GPL(cvmx_helper_link_set); EXPORT_SYMBOL_GPL(cvmx_helper_link_set);
......
...@@ -80,8 +80,7 @@ extern cvmx_helper_link_info_t __cvmx_helper_rgmii_link_get(int ipd_port); ...@@ -80,8 +80,7 @@ extern cvmx_helper_link_info_t __cvmx_helper_rgmii_link_get(int ipd_port);
* Configure an IPD/PKO port for the specified link state. This * Configure an IPD/PKO port for the specified link state. This
* function does not influence auto negotiation at the PHY level. * function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned * The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use * by cvmx_helper_link_get().
* cvmx_helper_link_autoconf() instead.
* *
* @ipd_port: IPD/PKO port to configure * @ipd_port: IPD/PKO port to configure
* @link_info: The new link state * @link_info: The new link state
......
...@@ -74,8 +74,7 @@ extern cvmx_helper_link_info_t __cvmx_helper_sgmii_link_get(int ipd_port); ...@@ -74,8 +74,7 @@ extern cvmx_helper_link_info_t __cvmx_helper_sgmii_link_get(int ipd_port);
* Configure an IPD/PKO port for the specified link state. This * Configure an IPD/PKO port for the specified link state. This
* function does not influence auto negotiation at the PHY level. * function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned * The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use * by cvmx_helper_link_get().
* cvmx_helper_link_autoconf() instead.
* *
* @ipd_port: IPD/PKO port to configure * @ipd_port: IPD/PKO port to configure
* @link_info: The new link state * @link_info: The new link state
......
...@@ -71,8 +71,7 @@ extern cvmx_helper_link_info_t __cvmx_helper_spi_link_get(int ipd_port); ...@@ -71,8 +71,7 @@ extern cvmx_helper_link_info_t __cvmx_helper_spi_link_get(int ipd_port);
* Configure an IPD/PKO port for the specified link state. This * Configure an IPD/PKO port for the specified link state. This
* function does not influence auto negotiation at the PHY level. * function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned * The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use * by cvmx_helper_link_get().
* cvmx_helper_link_autoconf() instead.
* *
* @ipd_port: IPD/PKO port to configure * @ipd_port: IPD/PKO port to configure
* @link_info: The new link state * @link_info: The new link state
......
...@@ -74,8 +74,7 @@ extern cvmx_helper_link_info_t __cvmx_helper_xaui_link_get(int ipd_port); ...@@ -74,8 +74,7 @@ extern cvmx_helper_link_info_t __cvmx_helper_xaui_link_get(int ipd_port);
* Configure an IPD/PKO port for the specified link state. This * Configure an IPD/PKO port for the specified link state. This
* function does not influence auto negotiation at the PHY level. * function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned * The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use * by cvmx_helper_link_get().
* cvmx_helper_link_autoconf() instead.
* *
* @ipd_port: IPD/PKO port to configure * @ipd_port: IPD/PKO port to configure
* @link_info: The new link state * @link_info: The new link state
......
...@@ -155,17 +155,6 @@ extern int cvmx_helper_get_number_of_interfaces(void); ...@@ -155,17 +155,6 @@ extern int cvmx_helper_get_number_of_interfaces(void);
extern cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int extern cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(int
interface); interface);
/**
* Auto configure an IPD/PKO port link state and speed. This
* function basically does the equivalent of:
* cvmx_helper_link_set(ipd_port, cvmx_helper_link_get(ipd_port));
*
* @ipd_port: IPD/PKO port to auto configure
*
* Returns Link state after configure
*/
extern cvmx_helper_link_info_t cvmx_helper_link_autoconf(int ipd_port);
/** /**
* Return the link state of an IPD/PKO port as returned by * Return the link state of an IPD/PKO port as returned by
* auto negotiation. The result of this function may not match * auto negotiation. The result of this function may not match
...@@ -182,8 +171,7 @@ extern cvmx_helper_link_info_t cvmx_helper_link_get(int ipd_port); ...@@ -182,8 +171,7 @@ extern cvmx_helper_link_info_t cvmx_helper_link_get(int ipd_port);
* Configure an IPD/PKO port for the specified link state. This * Configure an IPD/PKO port for the specified link state. This
* function does not influence auto negotiation at the PHY level. * function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned * The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use * by cvmx_helper_link_get().
* cvmx_helper_link_autoconf() instead.
* *
* @ipd_port: IPD/PKO port to configure * @ipd_port: IPD/PKO port to configure
* @link_info: The new link state * @link_info: The new link state
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment