]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: ti: icssg-prueth: Add SR1.0-specific description bits
authorDiogo Ivo <diogo.ivo@siemens.com>
Wed, 3 Apr 2024 10:48:15 +0000 (11:48 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 9 Apr 2024 07:47:29 +0000 (09:47 +0200)
Add a field to distinguish between SR1.0 and SR2.0 in the driver
as well as the necessary structures 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>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: MD Danish Anwar <danishanwar@ti.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/ti/icssg/icssg_prueth.h

index 5d792e9bade050302200387e21f78b9d5851b2dd..4632d83d47326f7125062b3a1d29b3a244d71aab 100644 (file)
@@ -129,6 +129,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;
@@ -157,6 +158,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 */
@@ -167,7 +172,7 @@ struct prueth_emac {
 
        u8 cmd_seq;
        /* shutdown related */
-       u32 cmd_data[4];
+       __le32 cmd_data[4];
        struct completion cmd_complete;
        /* Mutex to serialize access to firmware command interface */
        struct mutex cmd_lock;
@@ -251,6 +256,13 @@ struct emac_tx_ts_response {
        u32 hi_ts;
 };
 
+struct emac_tx_ts_response_sr1 {
+       __le32 lo_ts;
+       __le32 hi_ts;
+       __le32 reserved;
+       __le32 cookie;
+};
+
 /* get PRUSS SLICE number from prueth_emac */
 static inline int prueth_emac_slice(struct prueth_emac *emac)
 {