net: dsa: b53: Move Broadcom header setup to b53

The code to enable Broadcom tags/headers is largely switch independent,
and in preparation for enabling it for multiple devices with b53, move
the code we have in bcm_sf2.c to b53_common.c

Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Florian Fainelli
2017-09-19 10:46:48 -07:00
committed by David S. Miller
parent 5345862e9a
commit b409a9efa1
5 changed files with 57 additions and 49 deletions

View File

@@ -210,6 +210,7 @@
#define B53_BRCM_HDR 0x03
#define BRCM_HDR_P8_EN BIT(0) /* Enable tagging on port 8 */
#define BRCM_HDR_P5_EN BIT(1) /* Enable tagging on port 5 */
#define BRCM_HDR_P7_EN BIT(2) /* Enable tagging on port 7 */
/* Mirror capture control register (16 bit) */
#define B53_MIR_CAP_CTL 0x10
@@ -249,6 +250,12 @@
/* Revision ID register (8 bit) */
#define B53_REV_ID 0x40
/* Broadcom header RX control (16 bit) */
#define B53_BRCM_HDR_RX_DIS 0x60
/* Broadcom header TX control (16 bit) */
#define B53_BRCM_HDR_TX_DIS 0x62
/*************************************************************************
* ARL Access Page Registers
*************************************************************************/