#include <fsl-mc/fsl_mc_cmd.h>
#include <fsl-mc/fsl_dpni.h>
-int dpni_open(struct fsl_mc_io *mc_io, int dpni_id, uint16_t *token)
+int dpni_open(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
+ int dpni_id,
+ uint16_t *token)
{
struct mc_command cmd = { 0 };
int err;
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_OPEN,
- MC_CMD_PRI_LOW, 0);
+ cmd_flags,
+ 0);
DPNI_CMD_OPEN(cmd, dpni_id);
/* send command to mc*/
return 0;
}
-int dpni_close(struct fsl_mc_io *mc_io, uint16_t token)
+int dpni_close(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_CLOSE,
- MC_CMD_PRI_HIGH, token);
+ cmd_flags,
+ token);
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
}
int dpni_set_pools(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
const struct dpni_pools_cfg *cfg)
{
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_POOLS,
- MC_CMD_PRI_LOW,
+ cmd_flags,
token);
DPNI_CMD_SET_POOLS(cmd, cfg);
return mc_send_command(mc_io, &cmd);
}
-int dpni_enable(struct fsl_mc_io *mc_io, uint16_t token)
+int dpni_enable(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_ENABLE,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
}
-int dpni_disable(struct fsl_mc_io *mc_io, uint16_t token)
+int dpni_disable(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_DISABLE,
- MC_CMD_PRI_LOW,
+ cmd_flags,
token);
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
}
-int dpni_reset(struct fsl_mc_io *mc_io, uint16_t token)
+int dpni_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(DPNI_CMDID_RESET,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
}
int dpni_get_attributes(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
struct dpni_attr *attr)
{
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_ATTR,
- MC_CMD_PRI_LOW,
+ cmd_flags,
token);
/* send command to mc*/
}
int dpni_get_rx_buffer_layout(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
struct dpni_buffer_layout *layout)
{
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_RX_BUFFER_LAYOUT,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
/* send command to mc*/
err = mc_send_command(mc_io, &cmd);
}
int dpni_set_rx_buffer_layout(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
const struct dpni_buffer_layout *layout)
{
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_RX_BUFFER_LAYOUT,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
DPNI_CMD_SET_RX_BUFFER_LAYOUT(cmd, layout);
/* send command to mc*/
}
int dpni_get_tx_buffer_layout(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
struct dpni_buffer_layout *layout)
{
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_TX_BUFFER_LAYOUT,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
/* send command to mc*/
err = mc_send_command(mc_io, &cmd);
}
int dpni_set_tx_buffer_layout(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
const struct dpni_buffer_layout *layout)
{
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_TX_BUFFER_LAYOUT,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
DPNI_CMD_SET_TX_BUFFER_LAYOUT(cmd, layout);
/* send command to mc*/
}
int dpni_get_tx_conf_buffer_layout(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
struct dpni_buffer_layout *layout)
{
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_TX_CONF_BUFFER_LAYOUT,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
/* send command to mc*/
err = mc_send_command(mc_io, &cmd);
}
int dpni_set_tx_conf_buffer_layout(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
const struct dpni_buffer_layout *layout)
{
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_TX_CONF_BUFFER_LAYOUT,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
DPNI_CMD_SET_TX_CONF_BUFFER_LAYOUT(cmd, layout);
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
}
-int dpni_get_qdid(struct fsl_mc_io *mc_io, uint16_t token, uint16_t *qdid)
+int dpni_get_qdid(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
+ uint16_t token,
+ uint16_t *qdid)
{
struct mc_command cmd = { 0 };
int err;
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_QDID,
- MC_CMD_PRI_LOW,
+ cmd_flags,
token);
/* send command to mc*/
}
int dpni_get_tx_data_offset(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
uint16_t *data_offset)
{
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_TX_DATA_OFFSET,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
/* send command to mc*/
err = mc_send_command(mc_io, &cmd);
}
int dpni_get_counter(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
enum dpni_counter counter,
uint64_t *value)
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_COUNTER,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
DPNI_CMD_GET_COUNTER(cmd, counter);
/* send command to mc*/
}
int dpni_set_counter(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
enum dpni_counter counter,
uint64_t value)
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_COUNTER,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
DPNI_CMD_SET_COUNTER(cmd, counter, value);
/* send command to mc*/
}
int dpni_set_link_cfg(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
- const struct dpni_link_cfg *cfg)
+ const struct dpni_link_cfg *cfg)
{
struct mc_command cmd = { 0 };
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_LINK_CFG,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
DPNI_CMD_SET_LINK_CFG(cmd, cfg);
/* send command to mc*/
}
int dpni_get_link_state(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
struct dpni_link_state *state)
{
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_LINK_STATE,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
/* send command to mc*/
err = mc_send_command(mc_io, &cmd);
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])
{
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_PRIM_MAC,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
DPNI_CMD_SET_PRIMARY_MAC_ADDR(cmd, mac_addr);
/* send command to mc*/
}
int dpni_get_primary_mac_addr(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
uint8_t mac_addr[6])
{
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_PRIM_MAC,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
/* send command to mc*/
err = mc_send_command(mc_io, &cmd);
}
int dpni_add_mac_addr(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
const uint8_t mac_addr[6])
{
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_ADD_MAC_ADDR,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
DPNI_CMD_ADD_MAC_ADDR(cmd, mac_addr);
/* send command to mc*/
}
int dpni_remove_mac_addr(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
const uint8_t mac_addr[6])
{
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_REMOVE_MAC_ADDR,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
DPNI_CMD_REMOVE_MAC_ADDR(cmd, mac_addr);
/* send command to mc*/
}
int dpni_set_tx_flow(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
uint16_t *flow_id,
const struct dpni_tx_flow_cfg *cfg)
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_TX_FLOW,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
DPNI_CMD_SET_TX_FLOW(cmd, *flow_id, cfg);
/* send command to mc*/
}
int dpni_get_tx_flow(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
uint16_t flow_id,
struct dpni_tx_flow_attr *attr)
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_TX_FLOW,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
DPNI_CMD_GET_TX_FLOW(cmd, flow_id);
/* send command to mc*/
}
int dpni_set_rx_flow(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
uint8_t tc_id,
uint16_t flow_id,
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_RX_FLOW,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
DPNI_CMD_SET_RX_FLOW(cmd, tc_id, flow_id, cfg);
/* send command to mc*/
}
int dpni_get_rx_flow(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
uint16_t token,
uint8_t tc_id,
uint16_t flow_id,
int err;
/* prepare command */
cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_RX_FLOW,
- MC_CMD_PRI_LOW, token);
+ cmd_flags,
+ token);
DPNI_CMD_GET_RX_FLOW(cmd, tc_id, flow_id);
/* send command to mc*/