diff options
author | Andrew Halaney <ahalaney@redhat.com> | 2023-04-11 15:04:06 -0500 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-04-13 12:50:46 +0200 |
commit | 33719b57f52e5b761234373f98f55f4e036d61c9 (patch) | |
tree | e665c5714538f6b449aafac969b59c810113e450 /include | |
parent | net: stmmac: Pass stmmac_priv in some callbacks (diff) | |
download | linux-33719b57f52e5b761234373f98f55f4e036d61c9.tar.gz linux-33719b57f52e5b761234373f98f55f4e036d61c9.tar.bz2 linux-33719b57f52e5b761234373f98f55f4e036d61c9.zip |
net: stmmac: dwmac4: Allow platforms to specify some DMA/MTL offsets
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/stmmac.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index dafa001e9e7a..225751a8fd8e 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -186,6 +186,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 |