summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ti/icssg/icssg_config.h
diff options
context:
space:
mode:
authorMD Danish Anwar <danishanwar@ti.com>2024-05-28 14:37:32 +0300
committerPaolo Abeni <pabeni@redhat.com>2024-05-30 16:37:26 +0300
commit487f7323f39a9d45a31c59e909de4a626f02d34f (patch)
tree3104bd182aaf7268075d2dde718eaf836f7e3b7f /drivers/net/ethernet/ti/icssg/icssg_config.h
parentc53a46b16ce2605181688ea6af5f6c8d7fb3c9c1 (diff)
downloadlinux-487f7323f39a9d45a31c59e909de4a626f02d34f.tar.xz
net: ti: icssg-prueth: Add helper functions to configure FDB
Introduce helper functions to configure firmware FDB tables, VLAN tables and Port VLAN ID settings to aid adding Switch mode support. Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ethernet/ti/icssg/icssg_config.h')
-rw-r--r--drivers/net/ethernet/ti/icssg/icssg_config.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/icssg/icssg_config.h b/drivers/net/ethernet/ti/icssg/icssg_config.h
index cf2ea4bd22a2..4a9721aa6057 100644
--- a/drivers/net/ethernet/ti/icssg/icssg_config.h
+++ b/drivers/net/ethernet/ti/icssg/icssg_config.h
@@ -35,6 +35,8 @@ struct icssg_flow_cfg {
(2 * (PRUETH_EMAC_BUF_POOL_SIZE * PRUETH_NUM_BUF_POOLS + \
PRUETH_EMAC_RX_CTX_BUF_SIZE * 2))
+#define PRUETH_SWITCH_FDB_MASK ((SIZE_OF_FDB / NUMBER_OF_FDB_BUCKET_ENTRIES) - 1)
+
struct icssg_rxq_ctx {
__le32 start[3];
__le32 end;
@@ -202,6 +204,23 @@ struct icssg_setclock_desc {
#define ICSSG_TS_PUSH_SLICE0 40
#define ICSSG_TS_PUSH_SLICE1 41
+struct mgmt_cmd {
+ u8 param;
+ u8 seqnum;
+ u8 type;
+ u8 header;
+ u32 cmd_args[3];
+};
+
+struct mgmt_cmd_rsp {
+ u32 reserved;
+ u8 status;
+ u8 seqnum;
+ u8 type;
+ u8 header;
+ u32 cmd_args[3];
+};
+
/* FDB FID_C2 flag definitions */
/* Indicates host port membership.*/
#define ICSSG_FDB_ENTRY_P0_MEMBERSHIP BIT(0)