summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/stmicro/stmmac/stmmac.h
diff options
context:
space:
mode:
authorXiaolei Wang <xiaolei.wang@windriver.com>2024-05-13 04:43:46 +0300
committerJakub Kicinski <kuba@kernel.org>2024-05-14 04:33:10 +0300
commitbd17382ac36ed97848f1712714488e84c93605ca (patch)
tree3a7a3889774f41f8f0b9698c0fa4901ac4f0a762 /drivers/net/ethernet/stmicro/stmmac/stmmac.h
parent36ac9e7f2e5786bd37c5cd91132e1f39c29b8197 (diff)
downloadlinux-bd17382ac36ed97848f1712714488e84c93605ca.tar.xz
net: stmmac: move the EST structure to struct stmmac_priv
Move the EST structure to struct stmmac_priv, because the EST configs don't look like platform config, but EST is enabled in runtime with the settings retrieved for the TC TAPRIO feature also in runtime. So it's better to have the EST-data preserved in the driver private data instead of the platform data storage. Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Serge Semin <fancer.lancer@gmail.com> Reviewed-by: Andrew Halaney <ahalaney@redhat.com> Link: https://lore.kernel.org/r/20240513014346.1718740-3-xiaolei.wang@windriver.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac.h')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
index 044e61a385e4..b23b920eedb1 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
@@ -221,6 +221,20 @@ struct stmmac_dma_conf {
unsigned int dma_tx_size;
};
+#define EST_GCL 1024
+struct stmmac_est {
+ int enable;
+ u32 btr_reserve[2];
+ u32 btr_offset[2];
+ u32 btr[2];
+ u32 ctr[2];
+ u32 ter;
+ u32 gcl_unaligned[EST_GCL];
+ u32 gcl[EST_GCL];
+ u32 gcl_size;
+ u32 max_sdu[MTL_MAX_TX_QUEUES];
+};
+
struct stmmac_priv {
/* Frequently used values are kept adjacent for cache effect */
u32 tx_coal_frames[MTL_MAX_TX_QUEUES];
@@ -263,6 +277,7 @@ struct stmmac_priv {
struct plat_stmmacenet_data *plat;
/* Protect est parameters */
struct mutex est_lock;
+ struct stmmac_est *est;
struct dma_features dma_cap;
struct stmmac_counters mmc;
int hw_cap_support;