Commit cba04456 authored by Ioana Ciornei's avatar Ioana Ciornei Committed by David S. Miller

dpaa2-switch: remove unused ABI functions

Cleanup the dpaa2-switch driver a bit by removing any unused MC firmware
ABI definitions.
Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 91306d1d
......@@ -75,8 +75,6 @@
#define DPSW_CMDID_FDB_DUMP DPSW_CMD_ID(0x08A)
#define DPSW_CMDID_IF_GET_PORT_MAC_ADDR DPSW_CMD_ID(0x0A7)
#define DPSW_CMDID_IF_GET_PRIMARY_MAC_ADDR DPSW_CMD_ID(0x0A8)
#define DPSW_CMDID_IF_SET_PRIMARY_MAC_ADDR DPSW_CMD_ID(0x0A9)
#define DPSW_CMDID_CTRL_IF_GET_ATTR DPSW_CMD_ID(0x0A0)
#define DPSW_CMDID_CTRL_IF_SET_POOLS DPSW_CMD_ID(0x0A1)
......@@ -443,11 +441,6 @@ struct dpsw_rsp_if_get_mac_addr {
u8 mac_addr[6];
};
struct dpsw_cmd_if_set_mac_addr {
__le16 if_id;
u8 mac_addr[6];
};
struct dpsw_cmd_set_egress_flood {
__le16 fdb_id;
u8 flood_type;
......
......@@ -397,7 +397,7 @@ int dpsw_if_set_link_cfg(struct fsl_mc_io *mc_io,
* @if_id: Interface id
* @state: Link state 1 - linkup, 0 - link down or disconnected
*
* @Return '0' on Success; Error code otherwise.
* Return: '0' on Success; Error code otherwise.
*/
int dpsw_if_get_link_state(struct fsl_mc_io *mc_io,
u32 cmd_flags,
......@@ -1356,74 +1356,6 @@ int dpsw_if_get_port_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token,
return 0;
}
/**
* dpsw_if_get_primary_mac_addr()
* @mc_io: Pointer to MC portal's I/O object
* @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
* @token: Token of DPSW object
* @if_id: Interface Identifier
* @mac_addr: MAC address of the physical port, if any, otherwise 0
*
* Return: Completion status. '0' on Success; Error code otherwise.
*/
int dpsw_if_get_primary_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags,
u16 token, u16 if_id, u8 mac_addr[6])
{
struct dpsw_rsp_if_get_mac_addr *rsp_params;
struct fsl_mc_command cmd = { 0 };
struct dpsw_cmd_if *cmd_params;
int err, i;
/* prepare command */
cmd.header = mc_encode_cmd_header(DPSW_CMDID_IF_SET_PRIMARY_MAC_ADDR,
cmd_flags,
token);
cmd_params = (struct dpsw_cmd_if *)cmd.params;
cmd_params->if_id = cpu_to_le16(if_id);
/* send command to mc*/
err = mc_send_command(mc_io, &cmd);
if (err)
return err;
/* retrieve response parameters */
rsp_params = (struct dpsw_rsp_if_get_mac_addr *)cmd.params;
for (i = 0; i < 6; i++)
mac_addr[5 - i] = rsp_params->mac_addr[i];
return 0;
}
/**
* dpsw_if_set_primary_mac_addr()
* @mc_io: Pointer to MC portal's I/O object
* @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
* @token: Token of DPSW object
* @if_id: Interface Identifier
* @mac_addr: MAC address of the physical port, if any, otherwise 0
*
* Return: Completion status. '0' on Success; Error code otherwise.
*/
int dpsw_if_set_primary_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags,
u16 token, u16 if_id, u8 mac_addr[6])
{
struct dpsw_cmd_if_set_mac_addr *cmd_params;
struct fsl_mc_command cmd = { 0 };
int i;
/* prepare command */
cmd.header = mc_encode_cmd_header(DPSW_CMDID_IF_SET_PRIMARY_MAC_ADDR,
cmd_flags,
token);
cmd_params = (struct dpsw_cmd_if_set_mac_addr *)cmd.params;
cmd_params->if_id = cpu_to_le16(if_id);
for (i = 0; i < 6; i++)
cmd_params->mac_addr[i] = mac_addr[5 - i];
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
}
/**
* dpsw_ctrl_if_enable() - Enable control interface
* @mc_io: Pointer to MC portal's I/O object
......
......@@ -707,12 +707,6 @@ int dpsw_get_api_version(struct fsl_mc_io *mc_io,
int dpsw_if_get_port_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token,
u16 if_id, u8 mac_addr[6]);
int dpsw_if_get_primary_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags,
u16 token, u16 if_id, u8 mac_addr[6]);
int dpsw_if_set_primary_mac_addr(struct fsl_mc_io *mc_io, u32 cmd_flags,
u16 token, u16 if_id, u8 mac_addr[6]);
/**
* struct dpsw_fdb_cfg - FDB Configuration
* @num_fdb_entries: Number of FDB entries
......
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