aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorIoana Ciornei2023-05-31 19:04:29 +0300
committerPeng Fan2023-06-15 17:58:53 +0800
commitf21d326be420e2710673974d85debd2c345cc0c7 (patch)
tree1f57bb8d6676d64077565a1be53033c9dbadd5a9 /drivers
parentc761028e34fe18e0cd63fd80d1317cf17c8895bf (diff)
net: fsl-mc: remove unused MC APIs
There are multiple MC APIs which were added years ago but they are not used at all in the u-boot source code. Remove all these APIs. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/fsl-mc/dpio/dpio.c15
-rw-r--r--drivers/net/fsl-mc/dpmac.c89
-rw-r--r--drivers/net/fsl-mc/dpni.c100
-rw-r--r--drivers/net/fsl-mc/dprc.c173
4 files changed, 0 insertions, 377 deletions
diff --git a/drivers/net/fsl-mc/dpio/dpio.c b/drivers/net/fsl-mc/dpio/dpio.c
index 8884455963d..30ecc9124b2 100644
--- a/drivers/net/fsl-mc/dpio/dpio.c
+++ b/drivers/net/fsl-mc/dpio/dpio.c
@@ -123,21 +123,6 @@ int dpio_disable(struct fsl_mc_io *mc_io,
return mc_send_command(mc_io, &cmd);
}
-int dpio_reset(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token)
-{
- struct mc_command cmd = { 0 };
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPIO_CMDID_RESET,
- cmd_flags,
- token);
-
- /* send command to mc*/
- return mc_send_command(mc_io, &cmd);
-}
-
int dpio_get_attributes(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
diff --git a/drivers/net/fsl-mc/dpmac.c b/drivers/net/fsl-mc/dpmac.c
index 43a2ff43f88..f6def987c10 100644
--- a/drivers/net/fsl-mc/dpmac.c
+++ b/drivers/net/fsl-mc/dpmac.c
@@ -95,95 +95,6 @@ int dpmac_destroy(struct fsl_mc_io *mc_io,
return mc_send_command(mc_io, &cmd);
}
-int dpmac_get_attributes(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- struct dpmac_attr *attr)
-{
- struct mc_command cmd = { 0 };
- int err;
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPMAC_CMDID_GET_ATTR,
- cmd_flags,
- token);
-
- /* send command to mc*/
- err = mc_send_command(mc_io, &cmd);
- if (err)
- return err;
-
- /* retrieve response parameters */
- DPMAC_RSP_GET_ATTRIBUTES(cmd, attr);
-
- return 0;
-}
-
-int dpmac_mdio_read(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- struct dpmac_mdio_cfg *cfg)
-{
- struct mc_command cmd = { 0 };
- int err;
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPMAC_CMDID_MDIO_READ,
- cmd_flags,
- token);
- DPMAC_CMD_MDIO_READ(cmd, cfg);
-
- /* send command to mc*/
- err = mc_send_command(mc_io, &cmd);
- if (err)
- return err;
-
- /* retrieve response parameters */
- DPMAC_RSP_MDIO_READ(cmd, cfg->data);
-
- return 0;
-}
-
-int dpmac_mdio_write(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- struct dpmac_mdio_cfg *cfg)
-{
- struct mc_command cmd = { 0 };
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPMAC_CMDID_MDIO_WRITE,
- cmd_flags,
- token);
- DPMAC_CMD_MDIO_WRITE(cmd, cfg);
-
- /* send command to mc*/
- return mc_send_command(mc_io, &cmd);
-}
-
-int dpmac_get_link_cfg(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- struct dpmac_link_cfg *cfg)
-{
- struct mc_command cmd = { 0 };
- int err = 0;
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPMAC_CMDID_GET_LINK_CFG,
- cmd_flags,
- token);
-
- /* send command to mc*/
- err = mc_send_command(mc_io, &cmd);
- if (err)
- return err;
-
- DPMAC_RSP_GET_LINK_CFG(cmd, cfg);
-
- return 0;
-}
-
int dpmac_set_link_state(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
diff --git a/drivers/net/fsl-mc/dpni.c b/drivers/net/fsl-mc/dpni.c
index a31abbff71b..d0596a8e38d 100644
--- a/drivers/net/fsl-mc/dpni.c
+++ b/drivers/net/fsl-mc/dpni.c
@@ -18,16 +18,6 @@ int dpni_prepare_cfg(const struct dpni_cfg *cfg,
return 0;
}
-int dpni_extract_cfg(struct dpni_cfg *cfg,
- const uint8_t *cfg_buf)
-{
- uint64_t *params = (uint64_t *)cfg_buf;
-
- DPNI_EXT_CFG(params, cfg);
-
- return 0;
-}
-
int dpni_open(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
int dpni_id,
@@ -198,23 +188,6 @@ int dpni_get_attributes(struct fsl_mc_io *mc_io,
return 0;
}
-int dpni_set_errors_behavior(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- struct dpni_error_cfg *cfg)
-{
- struct mc_command cmd = { 0 };
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_ERRORS_BEHAVIOR,
- cmd_flags,
- token);
- DPNI_CMD_SET_ERRORS_BEHAVIOR(cmd, cfg);
-
- /* send command to mc*/
- return mc_send_command(mc_io, &cmd);
-}
-
int dpni_set_buffer_layout(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
@@ -322,48 +295,6 @@ int dpni_get_link_state(struct fsl_mc_io *mc_io,
return 0;
}
-
-int dpni_set_primary_mac_addr(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- const uint8_t mac_addr[6])
-{
- struct mc_command cmd = { 0 };
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_PRIM_MAC,
- cmd_flags,
- token);
- DPNI_CMD_SET_PRIMARY_MAC_ADDR(cmd, mac_addr);
-
- /* send command to mc*/
- return mc_send_command(mc_io, &cmd);
-}
-
-int dpni_get_primary_mac_addr(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- uint8_t mac_addr[6])
-{
- struct mc_command cmd = { 0 };
- int err;
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_PRIM_MAC,
- cmd_flags,
- token);
-
- /* send command to mc*/
- err = mc_send_command(mc_io, &cmd);
- if (err)
- return err;
-
- /* retrieve response parameters */
- DPNI_RSP_GET_PRIMARY_MAC_ADDR(cmd, mac_addr);
-
- return 0;
-}
-
int dpni_add_mac_addr(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
@@ -381,23 +312,6 @@ int dpni_add_mac_addr(struct fsl_mc_io *mc_io,
return mc_send_command(mc_io, &cmd);
}
-int dpni_remove_mac_addr(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- const uint8_t mac_addr[6])
-{
- struct mc_command cmd = { 0 };
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPNI_CMDID_REMOVE_MAC_ADDR,
- cmd_flags,
- token);
- DPNI_CMD_REMOVE_MAC_ADDR(cmd, mac_addr);
-
- /* send command to mc*/
- return mc_send_command(mc_io, &cmd);
-}
-
int dpni_get_api_version(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 *major_ver,
@@ -511,17 +425,3 @@ int dpni_get_statistics(struct fsl_mc_io *mc_io,
return 0;
}
-
-int dpni_reset_statistics(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token)
-{
- struct mc_command cmd = { 0 };
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPNI_CMDID_RESET_STATISTICS,
- cmd_flags, token);
-
- /* send command to mc*/
- return mc_send_command(mc_io, &cmd);
-}
diff --git a/drivers/net/fsl-mc/dprc.c b/drivers/net/fsl-mc/dprc.c
index e0a2865ab8f..2be56e24a18 100644
--- a/drivers/net/fsl-mc/dprc.c
+++ b/drivers/net/fsl-mc/dprc.c
@@ -117,179 +117,6 @@ int dprc_destroy_container(struct fsl_mc_io *mc_io,
return mc_send_command(mc_io, &cmd);
}
-int dprc_reset_container(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- int child_container_id)
-{
- struct mc_command cmd = { 0 };
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPRC_CMDID_RESET_CONT,
- cmd_flags,
- token);
- DPRC_CMD_RESET_CONTAINER(cmd, child_container_id);
-
- /* send command to mc*/
- return mc_send_command(mc_io, &cmd);
-}
-
-int dprc_get_attributes(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- struct dprc_attributes *attr)
-{
- struct mc_command cmd = { 0 };
- int err;
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_ATTR,
- cmd_flags,
- token);
-
- /* send command to mc*/
- err = mc_send_command(mc_io, &cmd);
- if (err)
- return err;
-
- /* retrieve response parameters */
- DPRC_RSP_GET_ATTRIBUTES(cmd, attr);
-
- return 0;
-}
-
-int dprc_get_obj_count(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- int *obj_count)
-{
- struct mc_command cmd = { 0 };
- int err;
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_OBJ_COUNT,
- cmd_flags,
- token);
-
- /* send command to mc*/
- err = mc_send_command(mc_io, &cmd);
- if (err)
- return err;
-
- /* retrieve response parameters */
- DPRC_RSP_GET_OBJ_COUNT(cmd, *obj_count);
-
- return 0;
-}
-
-int dprc_get_obj(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- int obj_index,
- struct dprc_obj_desc *obj_desc)
-{
- struct mc_command cmd = { 0 };
- int err;
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_OBJ,
- cmd_flags,
- token);
- DPRC_CMD_GET_OBJ(cmd, obj_index);
-
- /* send command to mc*/
- err = mc_send_command(mc_io, &cmd);
- if (err)
- return err;
-
- /* retrieve response parameters */
- DPRC_RSP_GET_OBJ(cmd, obj_desc);
-
- return 0;
-}
-
-int dprc_get_res_count(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- char *type,
- int *res_count)
-{
- struct mc_command cmd = { 0 };
- int err;
-
- *res_count = 0;
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_RES_COUNT,
- cmd_flags,
- token);
- DPRC_CMD_GET_RES_COUNT(cmd, type);
-
- /* send command to mc*/
- err = mc_send_command(mc_io, &cmd);
- if (err)
- return err;
-
- /* retrieve response parameters */
- DPRC_RSP_GET_RES_COUNT(cmd, *res_count);
-
- return 0;
-}
-
-int dprc_get_res_ids(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- char *type,
- struct dprc_res_ids_range_desc *range_desc)
-{
- struct mc_command cmd = { 0 };
- int err;
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_RES_IDS,
- cmd_flags,
- token);
- DPRC_CMD_GET_RES_IDS(cmd, range_desc, type);
-
- /* send command to mc*/
- err = mc_send_command(mc_io, &cmd);
- if (err)
- return err;
-
- /* retrieve response parameters */
- DPRC_RSP_GET_RES_IDS(cmd, range_desc);
-
- return 0;
-}
-
-int dprc_get_obj_region(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- char *obj_type,
- int obj_id,
- uint8_t region_index,
- struct dprc_region_desc *region_desc)
-{
- struct mc_command cmd = { 0 };
- int err;
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_OBJ_REG,
- cmd_flags,
- token);
- DPRC_CMD_GET_OBJ_REGION(cmd, obj_type, obj_id, region_index);
-
- /* send command to mc*/
- err = mc_send_command(mc_io, &cmd);
- if (err)
- return err;
-
- /* retrieve response parameters */
- DPRC_RSP_GET_OBJ_REGION(cmd, region_desc);
-
- return 0;
-}
-
int dprc_connect(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,