* Remove the AR7240 register defines and reuse the AR8x16 defines.

* Include a new register define to represent "disable port mirroring
  to CPU port".

Obtained from:	Patrick Kelsey <kelsey@ieee.org>
This commit is contained in:
Adrian Chadd 2012-05-12 06:24:21 +00:00
parent 9d9690e93b
commit 67a8db4dba
2 changed files with 5 additions and 8 deletions

View File

@ -66,11 +66,6 @@
/* XXX belongs in arswitch_7240_reg.h */
#define AR7240_REG_CPU_PORT 0x78
#define AR7240_MIRROR_PORT_MASK 0x000000f0
#define AR7240_MIRROR_PORT_S 4
#define AR7240_CPU_PORT_EN 0x00000100
#define AR7240_REG_TAG_PRIORITY 0x70
/*
@ -81,9 +76,8 @@ ar7240_hw_setup(struct arswitch_softc *sc)
{
/* Enable CPU port; disable mirror port */
arswitch_writereg(sc->sc_dev, AR7240_REG_CPU_PORT,
AR7240_CPU_PORT_EN |
(15 << AR7240_MIRROR_PORT_S));
arswitch_writereg(sc->sc_dev, AR8X16_REG_CPU_PORT,
AR8X16_CPU_PORT_EN | AR8X16_CPU_MIRROR_DIS);
/*
* Let things settle; probing PHY4 doesn't seem reliable

View File

@ -122,6 +122,9 @@
#define AR8X16_REG_CPU_PORT 0x0078
#define AR8X16_MIRROR_PORT_SHIFT 4
#define AR8X16_MIRROR_PORT_MASK (0xf << AR8X16_MIRROR_PORT_SHIFT)
#define AR8X16_CPU_MIRROR_PORT(_p) ((_p) << AR8X16_MIRROR_PORT_SHIFT)
#define AR8X16_CPU_MIRROR_DIS AR8X16_CPU_MIRROR_PORT(0xf)
#define AR8X16_CPU_PORT_EN (1 << 8)
#define AR8X16_REG_MIB_FUNC0 0x0080