From 34e48383636f61152dcc38eb6ec4396b8daa39b4 Mon Sep 17 00:00:00 2001 From: Arun Ramadoss Date: Tue, 28 Jun 2022 22:43:25 +0530 Subject: net: dsa: microchip: move ksz8->shifts to ksz_common This patch moves ksz8->shifts from ksz8795.c to ksz_common.c. The shifts are dereferenced using dev->info->shifts. Signed-off-by: Arun Ramadoss Signed-off-by: David S. Miller --- drivers/net/dsa/microchip/ksz_common.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'drivers/net/dsa/microchip/ksz_common.h') diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h index b1e4732357a1..c11adf67757d 100644 --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -49,6 +49,7 @@ struct ksz_chip_data { u8 reg_mib_cnt; const u8 *regs; const u32 *masks; + const u8 *shifts; int stp_ctrl_reg; int broadcast_ctrl_reg; int multicast_ctrl_reg; @@ -187,6 +188,18 @@ enum ksz_masks { DYNAMIC_MAC_TABLE_TIMESTAMP, }; +enum ksz_shifts { + VLAN_TABLE_MEMBERSHIP_S, + VLAN_TABLE, + STATIC_MAC_FWD_PORTS, + STATIC_MAC_FID, + DYNAMIC_MAC_ENTRIES_H, + DYNAMIC_MAC_ENTRIES, + DYNAMIC_MAC_FID, + DYNAMIC_MAC_TIMESTAMP, + DYNAMIC_MAC_SRC_PORT, +}; + struct alu_struct { /* entry 1 */ u8 is_static:1; -- cgit