Skip to content

Commit

Permalink
MIPS: Octeon: Kill cvmx_helper_link_autoconf()
Browse files Browse the repository at this point in the history
Kill cvmx_helper_link_autoconf(). Nobody uses this function.

Signed-off-by: Aaro 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: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
aakoskin authored and ralfbaechle committed Jan 3, 2017
1 parent 3c2b023 commit 2b58a76
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 75 deletions.
3 changes: 1 addition & 2 deletions arch/mips/cavium-octeon/executive/cvmx-helper-rgmii.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use
* cvmx_helper_link_autoconf() instead.
* by cvmx_helper_link_get().
*
* @ipd_port: IPD/PKO port to configure
* @link_info: The new link state
Expand Down
3 changes: 1 addition & 2 deletions arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use
* cvmx_helper_link_autoconf() instead.
* by cvmx_helper_link_get().
*
* @ipd_port: IPD/PKO port to configure
* @link_info: The new link state
Expand Down
3 changes: 1 addition & 2 deletions arch/mips/cavium-octeon/executive/cvmx-helper-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use
* cvmx_helper_link_autoconf() instead.
* by cvmx_helper_link_get().
*
* @ipd_port: IPD/PKO port to configure
* @link_info: The new link state
Expand Down
3 changes: 1 addition & 2 deletions arch/mips/cavium-octeon/executive/cvmx-helper-xaui.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use
* cvmx_helper_link_autoconf() instead.
* by cvmx_helper_link_get().
*
* @ipd_port: IPD/PKO port to configure
* @link_info: The new link state
Expand Down
47 changes: 1 addition & 46 deletions arch/mips/cavium-octeon/executive/cvmx-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ void (*cvmx_override_ipd_port_setup) (int ipd_port);
/* Port count per interface */
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
* may have multiple ports. Most chips support two interfaces,
Expand Down Expand Up @@ -1135,41 +1131,6 @@ int cvmx_helper_initialize_packet_io_local(void)
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
* auto negotiation. The result of this function may not match
Expand Down Expand Up @@ -1233,8 +1194,7 @@ EXPORT_SYMBOL_GPL(cvmx_helper_link_get);
* Configure an IPD/PKO port for the specified link state. This
* function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use
* cvmx_helper_link_autoconf() instead.
* by cvmx_helper_link_get().
*
* @ipd_port: IPD/PKO port to configure
* @link_info: The new link state
Expand Down Expand Up @@ -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:
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;
}
EXPORT_SYMBOL_GPL(cvmx_helper_link_set);
Expand Down
3 changes: 1 addition & 2 deletions arch/mips/include/asm/octeon/cvmx-helper-rgmii.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
* function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use
* cvmx_helper_link_autoconf() instead.
* by cvmx_helper_link_get().
*
* @ipd_port: IPD/PKO port to configure
* @link_info: The new link state
Expand Down
3 changes: 1 addition & 2 deletions arch/mips/include/asm/octeon/cvmx-helper-sgmii.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
* function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use
* cvmx_helper_link_autoconf() instead.
* by cvmx_helper_link_get().
*
* @ipd_port: IPD/PKO port to configure
* @link_info: The new link state
Expand Down
3 changes: 1 addition & 2 deletions arch/mips/include/asm/octeon/cvmx-helper-spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
* function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use
* cvmx_helper_link_autoconf() instead.
* by cvmx_helper_link_get().
*
* @ipd_port: IPD/PKO port to configure
* @link_info: The new link state
Expand Down
3 changes: 1 addition & 2 deletions arch/mips/include/asm/octeon/cvmx-helper-xaui.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
* function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use
* cvmx_helper_link_autoconf() instead.
* by cvmx_helper_link_get().
*
* @ipd_port: IPD/PKO port to configure
* @link_info: The new link state
Expand Down
14 changes: 1 addition & 13 deletions arch/mips/include/asm/octeon/cvmx-helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
* auto negotiation. The result of this function may not match
Expand All @@ -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
* function does not influence auto negotiation at the PHY level.
* The passed link state must always match the link state returned
* by cvmx_helper_link_get(). It is normally best to use
* cvmx_helper_link_autoconf() instead.
* by cvmx_helper_link_get().
*
* @ipd_port: IPD/PKO port to configure
* @link_info: The new link state
Expand Down

0 comments on commit 2b58a76

Please sign in to comment.