Skip to content

Commit 4ed5950

Browse files
grygoriySdavem330
authored andcommitted
net: ethernet: ti: ale: am65: add support for default thread cfg
Add support for default thread configuration for AM65x CPSW NUSS ALE to allow route all ingress packets to one default RX UDMA flow. Signed-off-by: Grygorii Strashko <[email protected]> Tested-by: Murali Karicheri <[email protected]> Tested-by: Peter Ujfalusi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6c0b849 commit 4ed5950

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

drivers/net/ethernet/ti/cpsw_ale.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
#define ALE_UNKNOWNVLAN_FORCE_UNTAG_EGRESS 0x9C
4545
#define ALE_VLAN_MASK_MUX(reg) (0xc0 + (0x4 * (reg)))
4646

47+
#define AM65_CPSW_ALE_THREAD_DEF_REG 0x134
48+
4749
#define ALE_TABLE_WRITE BIT(31)
4850

4951
#define ALE_TYPE_FREE 0
@@ -843,6 +845,22 @@ static struct ale_control_info ale_controls[ALE_NUM_CONTROLS] = {
843845
.port_shift = 0,
844846
.bits = 6,
845847
},
848+
[ALE_DEFAULT_THREAD_ID] = {
849+
.name = "default_thread_id",
850+
.offset = AM65_CPSW_ALE_THREAD_DEF_REG,
851+
.port_offset = 0,
852+
.shift = 0,
853+
.port_shift = 0,
854+
.bits = 6,
855+
},
856+
[ALE_DEFAULT_THREAD_ENABLE] = {
857+
.name = "default_thread_id_enable",
858+
.offset = AM65_CPSW_ALE_THREAD_DEF_REG,
859+
.port_offset = 0,
860+
.shift = 15,
861+
.port_shift = 0,
862+
.bits = 1,
863+
},
846864
};
847865

848866
int cpsw_ale_control_set(struct cpsw_ale *ale, int port, int control,

drivers/net/ethernet/ti/cpsw_ale.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ enum cpsw_ale_control {
6666
ALE_PORT_MACONLY_CAF,
6767
ALE_PORT_BCAST_LIMIT,
6868
ALE_PORT_MCAST_LIMIT,
69+
ALE_DEFAULT_THREAD_ID,
70+
ALE_DEFAULT_THREAD_ENABLE,
6971
ALE_NUM_CONTROLS,
7072
};
7173

0 commit comments

Comments
 (0)