Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1669177
| From | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH net-next v2 04/10] net: dsa: mv88e6xxx: prefix Global 2 Device Mapping macros |
| Date | 2017-06-19 17:10 +0200 |
| Message-ID | <tU6ts-4hT-31@gated-at.bofh.it> (permalink) |
| References | <tU6jM-3YD-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Prefix and document the Global 2 Device Mapping macros.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
drivers/net/dsa/mv88e6xxx/global2.c | 2 +-
drivers/net/dsa/mv88e6xxx/global2.h | 10 ++++++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/global2.c b/drivers/net/dsa/mv88e6xxx/global2.c
index d821b9591a8f..d5239c4f3a9b 100644
--- a/drivers/net/dsa/mv88e6xxx/global2.c
+++ b/drivers/net/dsa/mv88e6xxx/global2.c
@@ -73,7 +73,7 @@ static int mv88e6xxx_g2_device_mapping_write(struct mv88e6xxx_chip *chip,
{
u16 val = (target << 8) | (port & 0xf);
- return mv88e6xxx_g2_update(chip, GLOBAL2_DEVICE_MAPPING, val);
+ return mv88e6xxx_g2_update(chip, MV88E6XXX_G2_DEVICE_MAPPING, val);
}
static int mv88e6xxx_g2_set_device_mapping(struct mv88e6xxx_chip *chip)
diff --git a/drivers/net/dsa/mv88e6xxx/global2.h b/drivers/net/dsa/mv88e6xxx/global2.h
index c838c51cb2a1..dd9b243309a0 100644
--- a/drivers/net/dsa/mv88e6xxx/global2.h
+++ b/drivers/net/dsa/mv88e6xxx/global2.h
@@ -31,10 +31,12 @@
#define GLOBAL2_SWITCH_MGMT_FLOW_CONTROL_MSG BIT(13)
#define GLOBAL2_SWITCH_MGMT_FORCE_FLOW_CTRL_PRI BIT(7)
#define GLOBAL2_SWITCH_MGMT_RSVD2CPU BIT(3)
-#define GLOBAL2_DEVICE_MAPPING 0x06
-#define GLOBAL2_DEVICE_MAPPING_UPDATE BIT(15)
-#define GLOBAL2_DEVICE_MAPPING_TARGET_SHIFT 8
-#define GLOBAL2_DEVICE_MAPPING_PORT_MASK 0x0f
+
+/* Offset 0x06: Device Mapping Table Register */
+#define MV88E6XXX_G2_DEVICE_MAPPING 0x06
+#define MV88E6XXX_G2_DEVICE_MAPPING_UPDATE 0x8000
+#define MV88E6XXX_G2_DEVICE_MAPPING_DEV_MASK 0x1f00
+#define MV88E6XXX_G2_DEVICE_MAPPING_PORT_MASK 0x000f
/* Offset 0x07: Trunk Mask Table Register */
#define MV88E6XXX_G2_TRUNK_MASK 0x07
--
2.13.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next v2 00/10] net: dsa: Global 2 cosmetics Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-06-19 17:10 +0200 [PATCH net-next v2 01/10] net: dsa: mv88e6xxx: add irl_init_all op Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-06-19 17:10 +0200 [PATCH net-next v2 04/10] net: dsa: mv88e6xxx: prefix Global 2 Device Mapping macros Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-06-19 17:10 +0200 [PATCH net-next v2 03/10] net: dsa: mv88e6xxx: prefix Global 2 Trunk macros Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-06-19 17:10 +0200 [PATCH net-next v2 02/10] net: dsa: mv88e6xxx: clarify SMI PHY functions Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-06-19 17:10 +0200 [PATCH net-next v2 05/10] net: dsa: mv88e6xxx: prefix Global 2 MGMT macros Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-06-19 17:10 +0200 [PATCH net-next v2 06/10] net: dsa: mv88e6xxx: prefix Global 2 PVT macros Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-06-19 17:10 +0200
csiph-web