mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-08-18 02:22:47 -07:00
stmmac: support new GMAC4
This patch adds the whole GMAC4 support inside the stmmac d.d. now able to use the new HW and some new features i.e.: TSO. It is missing the multi-queue and split Header support at this stage. This patch also updates the driver version and the stmmac.txt. Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
1 parent
ee2ae1ed46
commit
f748be531d
4 files changed
+444
-54
No files matched your search
@@ -169,6 +169,9 @@ struct stmmac_extra_stats {
|
||||
unsigned long mtl_rx_fifo_ctrl_active;
|
||||
unsigned long mac_rx_frame_ctrl_fifo;
|
||||
unsigned long mac_gmii_rx_proto_engine;
|
||||
/* TSO */
|
||||
unsigned long tx_tso_frames;
|
||||
unsigned long tx_tso_nfrags;
|
||||
};
|
||||
|
||||
/* CSR Frequency Access Defines*/
|
||||
@@ -545,6 +548,7 @@ void stmmac_dwmac4_set_mac(void __iomem *ioaddr, bool enable);
|
||||
void dwmac_dma_flush_tx_fifo(void __iomem *ioaddr);
|
||||
extern const struct stmmac_mode_ops ring_mode_ops;
|
||||
extern const struct stmmac_mode_ops chain_mode_ops;
|
||||
extern const struct stmmac_desc_ops dwmac4_desc_ops;
|
||||
|
||||
/**
|
||||
* stmmac_get_synopsys_id - return the SYINID.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#define __STMMAC_H__
|
||||
|
||||
#define STMMAC_RESOURCE_NAME "stmmaceth"
|
||||
#define DRV_MODULE_VERSION "Oct_2015"
|
||||
#define DRV_MODULE_VERSION "Dec_2015"
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/stmmac.h>
|
||||
@@ -67,6 +67,7 @@ struct stmmac_priv {
|
||||
spinlock_t tx_lock;
|
||||
bool tx_path_in_lpi_mode;
|
||||
struct timer_list txtimer;
|
||||
bool tso;
|
||||
|
||||
struct dma_desc *dma_rx ____cacheline_aligned_in_smp;
|
||||
struct dma_extended_desc *dma_erx;
|
||||
@@ -129,6 +130,9 @@ struct stmmac_priv {
|
||||
int irq_wake;
|
||||
spinlock_t ptp_lock;
|
||||
void __iomem *mmcaddr;
|
||||
u32 rx_tail_addr;
|
||||
u32 tx_tail_addr;
|
||||
u32 mss;
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
struct dentry *dbgfs_dir;
|
||||
|
||||
@@ -161,6 +161,9 @@ static const struct stmmac_stats stmmac_gstrings_stats[] = {
|
||||
STMMAC_STAT(mtl_rx_fifo_ctrl_active),
|
||||
STMMAC_STAT(mac_rx_frame_ctrl_fifo),
|
||||
STMMAC_STAT(mac_gmii_rx_proto_engine),
|
||||
/* TSO */
|
||||
STMMAC_STAT(tx_tso_frames),
|
||||
STMMAC_STAT(tx_tso_nfrags),
|
||||
};
|
||||
#define STMMAC_STATS_LEN ARRAY_SIZE(stmmac_gstrings_stats)
|
||||
|
||||
@@ -499,7 +502,7 @@ static void stmmac_get_ethtool_stats(struct net_device *dev,
|
||||
int i, j = 0;
|
||||
|
||||
/* Update the DMA HW counters for dwmac10/100 */
|
||||
if (!priv->plat->has_gmac)
|
||||
if (priv->hw->dma->dma_diagnostic_fr)
|
||||
priv->hw->dma->dma_diagnostic_fr(&dev->stats,
|
||||
(void *) &priv->xstats,
|
||||
priv->ioaddr);
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user