[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231219174548.3481-4-diogo.ivo@siemens.com>
Date: Tue, 19 Dec 2023 17:45:41 +0000
From: Diogo Ivo <diogo.ivo@...mens.com>
To: danishanwar@...com,
rogerq@...nel.org,
davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
andrew@...n.ch,
grygorii.strashko@...com,
linux-arm-kernel@...ts.infradead.org,
netdev@...r.kernel.org
Cc: Diogo Ivo <diogo.ivo@...mens.com>,
Jan Kiszka <jan.kiszka@...mens.com>
Subject: [RFC PATCH net-next 3/8] net: ti: icssg-prueth: add SR1.0-specific configuration bits
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@...mens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@...mens.com>
Signed-off-by: Diogo Ivo <diogo.ivo@...mens.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
Powered by blists - more mailing lists