netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Diogo Ivo <diogo.ivo@siemens.com>
To: danishanwar@ti.com, rogerq@kernel.org, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	andrew@lunn.ch, grygorii.strashko@ti.com,
	linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org
Cc: Diogo Ivo <diogo.ivo@siemens.com>, Jan Kiszka <jan.kiszka@siemens.com>
Subject: [PATCH v2 3/8] net: ti: icssg-prueth: add SR1.0-specific configuration bits
Date: Wed, 17 Jan 2024 16:14:57 +0000	[thread overview]
Message-ID: <20240117161602.153233-4-diogo.ivo@siemens.com> (raw)
In-Reply-To: <20240117161602.153233-1-diogo.ivo@siemens.com>

Add fields to differentiate between SR1.0 and SR2.0 in the driver
as well as the structures necessary to program SR1.0.

Based on the work of Roger Quadros in TI's 5.10 SDK [1].

[1]: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/?h=ti-linux-5.10.y

Co-developed-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Diogo Ivo <diogo.ivo@siemens.com>
---
 drivers/net/ethernet/ti/icssg/icssg_prueth.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.h b/drivers/net/ethernet/ti/icssg/icssg_prueth.h
index 8b6d6b497010..1bdd3d301fde 100644
--- a/drivers/net/ethernet/ti/icssg/icssg_prueth.h
+++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.h
@@ -127,6 +127,7 @@ struct prueth_rx_chn {
 
 /* data for each emac port */
 struct prueth_emac {
+	bool is_sr1;
 	bool fw_running;
 	struct prueth *prueth;
 	struct net_device *ndev;
@@ -155,6 +156,10 @@ struct prueth_emac {
 	int rx_flow_id_base;
 	int tx_ch_num;
 
+	/* SR1.0 Management channel */
+	struct prueth_rx_chn rx_mgm_chn;
+	int rx_mgm_flow_id_base;
+
 	spinlock_t lock;	/* serialize access */
 
 	/* TX HW Timestamping */
@@ -182,10 +187,12 @@ struct prueth_emac {
  * struct prueth_pdata - PRUeth platform data
  * @fdqring_mode: Free desc queue mode
  * @quirk_10m_link_issue: 10M link detect errata
+ * @is_sr1: device is SR1.0
  */
 struct prueth_pdata {
 	enum k3_ring_mode fdqring_mode;
 	u32	quirk_10m_link_issue:1;
+	u32	is_sr1:1;
 };
 
 /**
@@ -224,6 +231,7 @@ struct prueth {
 	struct device_node *eth_node[PRUETH_NUM_MACS];
 	struct prueth_emac *emac[PRUETH_NUM_MACS];
 	struct net_device *registered_netdevs[PRUETH_NUM_MACS];
+	struct icssg_config_sr1 config[PRUSS_NUM_PRUS];
 	struct regmap *miig_rt;
 	struct regmap *mii_rt;
 
@@ -236,6 +244,13 @@ struct prueth {
 	struct icss_iep *iep1;
 };
 
+struct emac_tx_ts_response_sr1 {
+	u32 lo_ts;
+	u32 hi_ts;
+	u32 reserved;
+	u32 cookie;
+};
+
 struct emac_tx_ts_response {
 	u32 reserved[2];
 	u32 cookie;
-- 
2.43.0


  parent reply	other threads:[~2024-01-17 16:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-17 16:14 [PATCH v2 0/8] Add support for ICSSG-based Ethernet on SR1.0 devices Diogo Ivo
2024-01-17 16:14 ` [PATCH v2 1/8] dt-bindings: net: Add support for AM65x SR1.0 in ICSSG Diogo Ivo
2024-01-17 17:35   ` Rob Herring
2024-01-17 16:14 ` Diogo Ivo [this message]
2024-01-17 16:14 ` [PATCH v2 4/8] net: ti: icssg-classifier: Add support for SR1.0 Diogo Ivo
2024-01-17 20:48   ` Andrew Lunn
2024-01-17 16:14 ` [PATCH v2 5/8] net: ti: icssg-config: Add SR1.0 configuration functions Diogo Ivo
2024-01-17 16:15 ` [PATCH v2 6/8] net: ti: icssg-ethtool: Adjust channel count for SR1.0 Diogo Ivo
2024-01-22 13:42   ` Roger Quadros
2024-01-17 16:15 ` [PATCH v2 7/8] net: ti: iccsg-prueth: Add necessary functions for SR1.0 support Diogo Ivo
2024-01-17 20:56   ` Andrew Lunn
2024-01-17 16:15 ` [PATCH v2 8/8] net: ti: icssg-prueth: Wire up support for SR1.0 Diogo Ivo
2024-01-18  1:16 ` [PATCH v2 0/8] Add support for ICSSG-based Ethernet on SR1.0 devices Jakub Kicinski
2024-01-23 12:15 ` Roger Quadros
2024-01-24  9:24   ` Diogo Ivo

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=20240117161602.153233-4-diogo.ivo@siemens.com \
    --to=diogo.ivo@siemens.com \
    --cc=andrew@lunn.ch \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=grygorii.strashko@ti.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rogerq@kernel.org \
    /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).