net: mscc: ocelot: convert SYS_PAUSE_CFG register access to regfield
Seville has a different bitwise layout than Ocelot and Felix. Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
b39648079d
commit
541132f096
@@ -511,6 +511,9 @@ enum ocelot_regfield {
|
||||
GCB_SOFT_RST_SWC_RST,
|
||||
GCB_MIIM_MII_STATUS_PENDING,
|
||||
GCB_MIIM_MII_STATUS_BUSY,
|
||||
SYS_PAUSE_CFG_PAUSE_START,
|
||||
SYS_PAUSE_CFG_PAUSE_STOP,
|
||||
SYS_PAUSE_CFG_PAUSE_ENA,
|
||||
REGFIELD_MAX
|
||||
};
|
||||
|
||||
|
@@ -43,16 +43,6 @@
|
||||
#define SYS_TIMESTAMP_OFFSET_TIMESTAMP_OFFSET(x) ((x) & GENMASK(5, 0))
|
||||
#define SYS_TIMESTAMP_OFFSET_TIMESTAMP_OFFSET_M GENMASK(5, 0)
|
||||
|
||||
#define SYS_PAUSE_CFG_RSZ 0x4
|
||||
|
||||
#define SYS_PAUSE_CFG_PAUSE_START(x) (((x) << 10) & GENMASK(18, 10))
|
||||
#define SYS_PAUSE_CFG_PAUSE_START_M GENMASK(18, 10)
|
||||
#define SYS_PAUSE_CFG_PAUSE_START_X(x) (((x) & GENMASK(18, 10)) >> 10)
|
||||
#define SYS_PAUSE_CFG_PAUSE_STOP(x) (((x) << 1) & GENMASK(9, 1))
|
||||
#define SYS_PAUSE_CFG_PAUSE_STOP_M GENMASK(9, 1)
|
||||
#define SYS_PAUSE_CFG_PAUSE_STOP_X(x) (((x) & GENMASK(9, 1)) >> 1)
|
||||
#define SYS_PAUSE_CFG_PAUSE_ENA BIT(0)
|
||||
|
||||
#define SYS_PAUSE_TOT_CFG_PAUSE_TOT_START(x) (((x) << 9) & GENMASK(17, 9))
|
||||
#define SYS_PAUSE_TOT_CFG_PAUSE_TOT_START_M GENMASK(17, 9)
|
||||
#define SYS_PAUSE_TOT_CFG_PAUSE_TOT_START_X(x) (((x) & GENMASK(17, 9)) >> 9)
|
||||
|
Reference in New Issue
Block a user