From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: andrew@lunn.ch, vivien.didelot@savoirfairelinux.com,
jiri@resnulli.us, idosch@mellanox.com, Woojung.Huh@microchip.com,
john@phrozen.org, sean.wang@mediatek.com,
Florian Fainelli <f.fainelli@gmail.com>
Subject: [RFC net-next 2/5] net: dsa: b53: Define MAC trunking/bonding registers
Date: Sun, 1 Oct 2017 12:46:36 -0700 [thread overview]
Message-ID: <20171001194639.8647-3-f.fainelli@gmail.com> (raw)
In-Reply-To: <20171001194639.8647-1-f.fainelli@gmail.com>
Define the MAC trunking page offset and its register layout to implement
bonding in the next patches.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/dsa/b53/b53_regs.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/net/dsa/b53/b53_regs.h b/drivers/net/dsa/b53/b53_regs.h
index 2a9f421680aa..d02e4f7dda10 100644
--- a/drivers/net/dsa/b53/b53_regs.h
+++ b/drivers/net/dsa/b53/b53_regs.h
@@ -44,6 +44,9 @@
/* Port VLAN Page */
#define B53_PVLAN_PAGE 0x31
+/* Trunking Page */
+#define B53_TRUNK_PAGE 0x32
+
/* VLAN Registers */
#define B53_VLAN_PAGE 0x34
@@ -360,6 +363,21 @@
#define B53_JOIN_ALL_VLAN_EN 0x50
/*************************************************************************
+ * Trunking Registers
+ *************************************************************************/
+
+/* MAC Trunking Control Register (8 bit) */
+#define B53_MAC_TRUNK_CTRL 0x00
+#define TRK_HASH_IDX_DA_SA 0
+#define TRK_HASH_IDX_DA 1
+#define TRK_HASH_IDX_SA 2
+#define TRK_HASH_IDX_MASK 0x3
+#define MAC_BASE_TRNK_EN BIT(3)
+
+/* MAC Trunking Group Register (16 bit) */
+#define B53_MAC_TRUNK_GROUP(x) (0x10 + (x) * 2)
+
+/*************************************************************************
* 802.1Q Page Registers
*************************************************************************/
--
2.11.0
next prev parent reply other threads:[~2017-10-01 19:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-01 19:46 [RFC net-next 0/5] net: dsa: LAG support Florian Fainelli
2017-10-01 19:46 ` [RFC net-next 1/5] net: dsa: Add infrastructure to support LAG Florian Fainelli
2017-10-02 2:03 ` Andrew Lunn
2017-10-02 7:05 ` Ido Schimmel
2017-10-02 18:19 ` Florian Fainelli
2017-10-01 19:46 ` Florian Fainelli [this message]
2017-10-01 19:46 ` [RFC net-next 3/5] net: dsa: b53: Add support for LAG Florian Fainelli
2017-10-01 19:46 ` [RFC net-next 4/5] net: dsa: bcm_sf2: " Florian Fainelli
2017-10-01 19:46 ` [RFC net-next 5/5] net: dsa: loop: " Florian Fainelli
2017-10-02 6:50 ` [RFC net-next 0/5] net: dsa: LAG support Ido Schimmel
2017-10-02 12:59 ` Andrew Lunn
2017-10-02 13:05 ` Ido Schimmel
2017-10-02 12:51 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171001194639.8647-3-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=Woojung.Huh@microchip.com \
--cc=andrew@lunn.ch \
--cc=idosch@mellanox.com \
--cc=jiri@resnulli.us \
--cc=john@phrozen.org \
--cc=netdev@vger.kernel.org \
--cc=sean.wang@mediatek.com \
--cc=vivien.didelot@savoirfairelinux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).