aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/microchip/ksz9477_reg.h
diff options
context:
space:
mode:
authorArun Ramadoss <arun.ramadoss@microchip.com>2022-07-01 20:31:01 +0530
committerDavid S. Miller <davem@davemloft.net>2022-07-02 16:34:05 +0100
commit457c182af597a5a2a9c1c4d12beac1ff35ee76e2 (patch)
treed86d84031004ae3d38460a26f17d745c80f66d1e /drivers/net/dsa/microchip/ksz9477_reg.h
parentnet: dsa: tag_ksz: add tag handling for Microchip LAN937x (diff)
downloadlinux-dev-457c182af597a5a2a9c1c4d12beac1ff35ee76e2.tar.xz
linux-dev-457c182af597a5a2a9c1c4d12beac1ff35ee76e2.zip
net: dsa: microchip: generic access to ksz9477 static and reserved table
The ksz9477 and lan937x has few difference in the static and reserved table register 0x041C. For the ksz9477 if the bit 0 is 1 - read operation and 0 - write operation. But for lan937x bit 1:0 used for selecting the read/write operation, 01 - write and 10 - read. To use ksz9477 mdb add/del and enable_stp_addr for the lan937x, masks & shifts are introduced for ksz9477 & lan937x in ksz_common.c. Then updated the function with masks & shifts based on the switch instead of hard coding it. Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz9477_reg.h')
-rw-r--r--drivers/net/dsa/microchip/ksz9477_reg.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/dsa/microchip/ksz9477_reg.h b/drivers/net/dsa/microchip/ksz9477_reg.h
index 2ba0f4449130..d0cce4ca3cf9 100644
--- a/drivers/net/dsa/microchip/ksz9477_reg.h
+++ b/drivers/net/dsa/microchip/ksz9477_reg.h
@@ -419,12 +419,9 @@
#define REG_SW_ALU_STAT_CTRL__4 0x041C
-#define ALU_STAT_INDEX_M (BIT(4) - 1)
-#define ALU_STAT_INDEX_S 16
#define ALU_RESV_MCAST_INDEX_M (BIT(6) - 1)
#define ALU_STAT_START BIT(7)
#define ALU_RESV_MCAST_ADDR BIT(1)
-#define ALU_STAT_READ BIT(0)
#define REG_SW_ALU_VAL_A 0x0420