Skip to content

Commit 8f5a756

Browse files
rogerqdavem330
authored andcommitted
net: ethernet: am65-cpsw: Move register definitions to header file
Move register definitions to header file. No functional change. Signed-off-by: Roger Quadros <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1374841 commit 8f5a756

File tree

2 files changed

+35
-35
lines changed

2 files changed

+35
-35
lines changed

drivers/net/ethernet/ti/am65-cpsw-qos.c

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -15,41 +15,6 @@
1515
#include "am65-cpts.h"
1616
#include "cpsw_ale.h"
1717

18-
#define AM65_CPSW_REG_CTL 0x004
19-
#define AM65_CPSW_PN_REG_CTL 0x004
20-
#define AM65_CPSW_PN_REG_FIFO_STATUS 0x050
21-
#define AM65_CPSW_PN_REG_EST_CTL 0x060
22-
#define AM65_CPSW_PN_REG_PRI_CIR(pri) (0x140 + 4 * (pri))
23-
24-
/* AM65_CPSW_REG_CTL register fields */
25-
#define AM65_CPSW_CTL_EST_EN BIT(18)
26-
27-
/* AM65_CPSW_PN_REG_CTL register fields */
28-
#define AM65_CPSW_PN_CTL_EST_PORT_EN BIT(17)
29-
30-
/* AM65_CPSW_PN_REG_EST_CTL register fields */
31-
#define AM65_CPSW_PN_EST_ONEBUF BIT(0)
32-
#define AM65_CPSW_PN_EST_BUFSEL BIT(1)
33-
#define AM65_CPSW_PN_EST_TS_EN BIT(2)
34-
#define AM65_CPSW_PN_EST_TS_FIRST BIT(3)
35-
#define AM65_CPSW_PN_EST_ONEPRI BIT(4)
36-
#define AM65_CPSW_PN_EST_TS_PRI_MSK GENMASK(7, 5)
37-
38-
/* AM65_CPSW_PN_REG_FIFO_STATUS register fields */
39-
#define AM65_CPSW_PN_FST_TX_PRI_ACTIVE_MSK GENMASK(7, 0)
40-
#define AM65_CPSW_PN_FST_TX_E_MAC_ALLOW_MSK GENMASK(15, 8)
41-
#define AM65_CPSW_PN_FST_EST_CNT_ERR BIT(16)
42-
#define AM65_CPSW_PN_FST_EST_ADD_ERR BIT(17)
43-
#define AM65_CPSW_PN_FST_EST_BUFACT BIT(18)
44-
45-
/* EST FETCH COMMAND RAM */
46-
#define AM65_CPSW_FETCH_RAM_CMD_NUM 0x80
47-
#define AM65_CPSW_FETCH_CNT_MSK GENMASK(21, 8)
48-
#define AM65_CPSW_FETCH_CNT_MAX (AM65_CPSW_FETCH_CNT_MSK >> 8)
49-
#define AM65_CPSW_FETCH_CNT_OFFSET 8
50-
#define AM65_CPSW_FETCH_ALLOW_MSK GENMASK(7, 0)
51-
#define AM65_CPSW_FETCH_ALLOW_MAX AM65_CPSW_FETCH_ALLOW_MSK
52-
5318
enum timer_act {
5419
TACT_PROG, /* need program timer */
5520
TACT_NEED_STOP, /* need stop first */

drivers/net/ethernet/ti/am65-cpsw-qos.h

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,41 @@ struct am65_cpsw_qos {
3131
struct am65_cpsw_ale_ratelimit ale_mc_ratelimit;
3232
};
3333

34+
#define AM65_CPSW_REG_CTL 0x004
35+
#define AM65_CPSW_PN_REG_CTL 0x004
36+
#define AM65_CPSW_PN_REG_FIFO_STATUS 0x050
37+
#define AM65_CPSW_PN_REG_EST_CTL 0x060
38+
#define AM65_CPSW_PN_REG_PRI_CIR(pri) (0x140 + 4 * (pri))
39+
40+
/* AM65_CPSW_REG_CTL register fields */
41+
#define AM65_CPSW_CTL_EST_EN BIT(18)
42+
43+
/* AM65_CPSW_PN_REG_CTL register fields */
44+
#define AM65_CPSW_PN_CTL_EST_PORT_EN BIT(17)
45+
46+
/* AM65_CPSW_PN_REG_EST_CTL register fields */
47+
#define AM65_CPSW_PN_EST_ONEBUF BIT(0)
48+
#define AM65_CPSW_PN_EST_BUFSEL BIT(1)
49+
#define AM65_CPSW_PN_EST_TS_EN BIT(2)
50+
#define AM65_CPSW_PN_EST_TS_FIRST BIT(3)
51+
#define AM65_CPSW_PN_EST_ONEPRI BIT(4)
52+
#define AM65_CPSW_PN_EST_TS_PRI_MSK GENMASK(7, 5)
53+
54+
/* AM65_CPSW_PN_REG_FIFO_STATUS register fields */
55+
#define AM65_CPSW_PN_FST_TX_PRI_ACTIVE_MSK GENMASK(7, 0)
56+
#define AM65_CPSW_PN_FST_TX_E_MAC_ALLOW_MSK GENMASK(15, 8)
57+
#define AM65_CPSW_PN_FST_EST_CNT_ERR BIT(16)
58+
#define AM65_CPSW_PN_FST_EST_ADD_ERR BIT(17)
59+
#define AM65_CPSW_PN_FST_EST_BUFACT BIT(18)
60+
61+
/* EST FETCH COMMAND RAM */
62+
#define AM65_CPSW_FETCH_RAM_CMD_NUM 0x80
63+
#define AM65_CPSW_FETCH_CNT_MSK GENMASK(21, 8)
64+
#define AM65_CPSW_FETCH_CNT_MAX (AM65_CPSW_FETCH_CNT_MSK >> 8)
65+
#define AM65_CPSW_FETCH_CNT_OFFSET 8
66+
#define AM65_CPSW_FETCH_ALLOW_MSK GENMASK(7, 0)
67+
#define AM65_CPSW_FETCH_ALLOW_MAX AM65_CPSW_FETCH_ALLOW_MSK
68+
3469
#if IS_ENABLED(CONFIG_TI_AM65_CPSW_QOS)
3570
int am65_cpsw_qos_ndo_setup_tc(struct net_device *ndev, enum tc_setup_type type,
3671
void *type_data);

0 commit comments

Comments
 (0)