linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: "David S. Miller" <davem@davemloft.net>, <netdev@vger.kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Murali Karicheri <m-karicheri2@ti.com>
Cc: Sekhar Nori <nsekhar@ti.com>, <linux-kernel@vger.kernel.org>,
	<linux-omap@vger.kernel.org>,
	Grygorii Strashko <grygorii.strashko@ti.com>
Subject: [PATCH net-next 9/9] net: ethernet: ti: ale: add support for multi port k3 cpsw versions
Date: Sat, 5 Sep 2020 02:09:24 +0300	[thread overview]
Message-ID: <20200904230924.9971-10-grygorii.strashko@ti.com> (raw)
In-Reply-To: <20200904230924.9971-1-grygorii.strashko@ti.com>

The TI J721E (CPSW9g) ALE version is similar, in general, to Sitara AM3/4/5
CPSW ALE, but has more extended functions and different ALE VLAN entry
format.

This patch adds support for for multi port TI J721E (CPSW9g) ALE variant.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 drivers/net/ethernet/ti/cpsw_ale.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c
index 7ca46936a36c..40b6f740d62d 100644
--- a/drivers/net/ethernet/ti/cpsw_ale.c
+++ b/drivers/net/ethernet/ti/cpsw_ale.c
@@ -191,6 +191,14 @@ const struct ale_entry_fld vlan_entry_nu[ALE_ENT_VID_LAST] = {
 	ALE_ENTRY_FLD(ALE_ENT_VID_REG_MCAST_IDX, 44, 3),
 };
 
+/* K3 j721e/j7200 cpsw9g/5g, am64x cpsw3g  */
+const struct ale_entry_fld vlan_entry_k3_cpswxg[] = {
+	ALE_ENTRY_FLD_DYN_MSK_SIZE(ALE_ENT_VID_MEMBER_LIST, 0),
+	ALE_ENTRY_FLD_DYN_MSK_SIZE(ALE_ENT_VID_UNREG_MCAST_MSK, 12),
+	ALE_ENTRY_FLD_DYN_MSK_SIZE(ALE_ENT_VID_FORCE_UNTAGGED_MSK, 24),
+	ALE_ENTRY_FLD_DYN_MSK_SIZE(ALE_ENT_VID_REG_MCAST_MSK, 36),
+};
+
 DEFINE_ALE_FIELD(entry_type,		60,	2)
 DEFINE_ALE_FIELD(vlan_id,		48,	12)
 DEFINE_ALE_FIELD(mcast_state,		62,	2)
@@ -1213,6 +1221,12 @@ static const struct cpsw_ale_dev_id cpsw_ale_id_match[] = {
 		.nu_switch_ale = true,
 		.vlan_entry_tbl = vlan_entry_nu,
 	},
+	{
+		.dev_id = "j721e-cpswxg",
+		.features = CPSW_ALE_F_STATUS_REG | CPSW_ALE_F_HW_AUTOAGING,
+		.major_ver_mask = 0x7,
+		.vlan_entry_tbl = vlan_entry_k3_cpswxg,
+	},
 	{ },
 };
 
-- 
2.17.1


  parent reply	other threads:[~2020-09-04 23:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04 23:09 [PATCH net-next 0/9] net: ethernet: ti: ale: add static configuration Grygorii Strashko
2020-09-04 23:09 ` [PATCH net-next 1/9] net: ethernet: ti: ale: add cpsw_ale_get_num_entries api Grygorii Strashko
2020-09-04 23:09 ` [PATCH net-next 2/9] net: ethernet: ti: ale: add static configuration Grygorii Strashko
2020-09-04 23:09 ` [PATCH net-next 3/9] net: ethernet: ti: cpsw: use dev_id for ale configuration Grygorii Strashko
2020-09-04 23:09 ` [PATCH net-next 4/9] net: netcp: ethss: " Grygorii Strashko
2020-09-04 23:09 ` [PATCH net-next 5/9] net: ethernet: ti: am65-cpsw: " Grygorii Strashko
2020-09-04 23:09 ` [PATCH net-next 6/9] net: ethernet: ti: ale: make usage of ale dev_id mandatory Grygorii Strashko
2020-09-04 23:09 ` [PATCH net-next 7/9] net: ethernet: ti: am65-cpsw: enable hw auto ageing Grygorii Strashko
2020-09-04 23:09 ` [PATCH net-next 8/9] net: ethernet: ti: ale: switch to use tables for vlan entry description Grygorii Strashko
2020-09-05  0:09   ` Jakub Kicinski
2020-09-04 23:09 ` Grygorii Strashko [this message]
2020-09-05  0:10   ` [PATCH net-next 9/9] net: ethernet: ti: ale: add support for multi port k3 cpsw versions Jakub Kicinski
2020-09-07 14:33     ` Grygorii Strashko

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=20200904230924.9971-10-grygorii.strashko@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=m-karicheri2@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=vigneshr@ti.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).