summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Halaney <ahalaney@redhat.com>2023-04-11 23:04:06 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-01-11 17:19:02 +0300
commitf4b91e169513d0b625820181b596c90ac2fdc0f4 (patch)
tree860c5926e42746f80fee4b824261760f244530f9 /include/linux
parent7ff66be3686a3203fd13f4675e7c3e1e059c4707 (diff)
downloadlinux-f4b91e169513d0b625820181b596c90ac2fdc0f4.tar.xz
net: stmmac: dwmac4: Allow platforms to specify some DMA/MTL offsets
[ Upstream commit 33719b57f52e5b761234373f98f55f4e036d61c9 ] Some platforms have dwmac4 implementations that have a different address space layout than the default, resulting in the need to define their own DMA/MTL offsets. Extend the functions to allow a platform driver to indicate what its addresses are, overriding the defaults. Signed-off-by: Andrew Halaney <ahalaney@redhat.com> Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Brian Masney <bmasney@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Stable-dep-of: a48e23221000 ("net: stmmac: fix the crash issue for zero copy XDP_TX action") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/stmmac.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index c97df9464f90..7c7553efa698 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -187,6 +187,24 @@ struct stmmac_safety_feature_cfg {
u32 tmouten;
};
+/* Addresses that may be customized by a platform */
+struct dwmac4_addrs {
+ u32 dma_chan;
+ u32 dma_chan_offset;
+ u32 mtl_chan;
+ u32 mtl_chan_offset;
+ u32 mtl_ets_ctrl;
+ u32 mtl_ets_ctrl_offset;
+ u32 mtl_txq_weight;
+ u32 mtl_txq_weight_offset;
+ u32 mtl_send_slp_cred;
+ u32 mtl_send_slp_cred_offset;
+ u32 mtl_high_cred;
+ u32 mtl_high_cred_offset;
+ u32 mtl_low_cred;
+ u32 mtl_low_cred_offset;
+};
+
struct plat_stmmacenet_data {
int bus_id;
int phy_addr;
@@ -274,5 +292,6 @@ struct plat_stmmacenet_data {
bool use_phy_wol;
bool sph_disable;
bool serdes_up_after_phy_linkup;
+ const struct dwmac4_addrs *dwmac4_addrs;
};
#endif