This patch series cleans up the Altera TSE driver and adds support
for the newer msgdma prefetcher as well as ptp support when using
the msgdma prefetcher.
v2: Rename altera_ptp to intel_fpga_tod, modify msgdma and sgdma tx_buffer
functions to be of type netdev_tx_t, and minor suggested edits
Dalon Westergreen (10):
net: eth: altera: tse_start_xmit ignores tx_buffer call response
net: eth: altera: set rx and tx ring size before init_dma call
net: eth: altera: fix altera_dmaops declaration
net: eth: altera: add optional function to start tx dma
net: eth: altera: Move common functions to altera_utils
net: eth: altera: Add missing identifier names to function
declarations
net: eth: altera: change tx functions to type netdev_tx_t
net: eth: altera: add support for ptp and timestamping
net: eth: altera: add msgdma prefetcher
net: eth: altera: update devicetree bindings documentation
.../devicetree/bindings/net/altera_tse.txt | 103 ++++-
drivers/net/ethernet/altera/Kconfig | 1 +
drivers/net/ethernet/altera/Makefile | 3 +-
drivers/net/ethernet/altera/altera_msgdma.c | 5 +-
drivers/net/ethernet/altera/altera_msgdma.h | 30 +-
.../net/ethernet/altera/altera_msgdma_prefetcher.c | 428 +++++++++++++++++++++
.../net/ethernet/altera/altera_msgdma_prefetcher.h | 30 ++
.../ethernet/altera/altera_msgdmahw_prefetcher.h | 87 +++++
drivers/net/ethernet/altera/altera_sgdma.c | 17 +-
drivers/net/ethernet/altera/altera_sgdma.h | 32 +-
drivers/net/ethernet/altera/altera_tse.h | 98 ++---
drivers/net/ethernet/altera/altera_tse_ethtool.c | 29 ++
drivers/net/ethernet/altera/altera_tse_main.c | 218 +++++++++--
drivers/net/ethernet/altera/altera_utils.c | 29 ++
drivers/net/ethernet/altera/altera_utils.h | 51 +++
drivers/net/ethernet/altera/intel_fpga_tod.c | 358 +++++++++++++++++
drivers/net/ethernet/altera/intel_fpga_tod.h | 56 +++
17 files changed, 1422 insertions(+), 153 deletions(-)
create mode 100644 drivers/net/ethernet/altera/altera_msgdma_prefetcher.c
create mode 100644 drivers/net/ethernet/altera/altera_msgdma_prefetcher.h
create mode 100644 drivers/net/ethernet/altera/altera_msgdmahw_prefetcher.h
create mode 100644 drivers/net/ethernet/altera/intel_fpga_tod.c
create mode 100644 drivers/net/ethernet/altera/intel_fpga_tod.h
--
2.13.0
From: Dalon Westergreen <[email protected]>
It is more appropriate to set the rx and tx ring size before calling
the init function for the dma.
Signed-off-by: Dalon Westergreen <[email protected]>
Signed-off-by: Joyce Ooi <[email protected]>
---
v2: no change
---
drivers/net/ethernet/altera/altera_tse_main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c
index 2a9e6157a8a1..539e744e23f7 100644
--- a/drivers/net/ethernet/altera/altera_tse_main.c
+++ b/drivers/net/ethernet/altera/altera_tse_main.c
@@ -1154,6 +1154,10 @@ static int tse_open(struct net_device *dev)
int i;
unsigned long int flags;
+ /* set tx and rx ring size */
+ priv->rx_ring_size = dma_rx_num;
+ priv->tx_ring_size = dma_tx_num;
+
/* Reset and configure TSE MAC and probe associated PHY */
ret = priv->dmaops->init_dma(priv);
if (ret != 0) {
@@ -1196,8 +1200,6 @@ static int tse_open(struct net_device *dev)
priv->dmaops->reset_dma(priv);
/* Create and initialize the TX/RX descriptors chains. */
- priv->rx_ring_size = dma_rx_num;
- priv->tx_ring_size = dma_tx_num;
ret = alloc_init_skbufs(priv);
if (ret) {
netdev_err(dev, "DMA descriptors initialization failed\n");
--
2.13.0