summaryrefslogtreecommitdiff
path: root/drivers/net/altera_tse.h
diff options
context:
space:
mode:
authorThomas Chou <thomas@wytron.com.tw>2015-11-09 11:02:15 +0800
committerThomas Chou <thomas@wytron.com.tw>2015-11-12 08:26:59 +0800
commit38fa4aca8a70b71edab2d4df473253d9c4582f39 (patch)
tree5ad8b76be333c7e9465252b58c75786d47e6ab95 /drivers/net/altera_tse.h
parent577662f0845d5fa701261879c7d18c8073cf9e7d (diff)
net: altera_tse: add priv ops to prepare msgdma support
Add priv ops to prepare msgdma support. These ops are dma type specific. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers/net/altera_tse.h')
-rw-r--r--drivers/net/altera_tse.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/net/altera_tse.h b/drivers/net/altera_tse.h
index 471a880138..fae2378dbb 100644
--- a/drivers/net/altera_tse.h
+++ b/drivers/net/altera_tse.h
@@ -13,6 +13,9 @@
#define __packed_1_ __packed __aligned(1)
+/* dma type */
+#define ALT_SGDMA 0
+
/* SGDMA Stuff */
#define ALT_SGDMA_STATUS_BUSY_MSK BIT(4)
@@ -141,19 +144,28 @@ struct alt_tse_mac {
u32 reserved3[0x38];
};
+struct tse_ops {
+ int (*send)(struct udevice *dev, void *packet, int length);
+ int (*recv)(struct udevice *dev, int flags, uchar **packetp);
+ int (*free_pkt)(struct udevice *dev, uchar *packet, int length);
+ void (*stop)(struct udevice *dev);
+};
+
struct altera_tse_priv {
struct alt_tse_mac *mac_dev;
- struct alt_sgdma_registers *sgdma_rx;
- struct alt_sgdma_registers *sgdma_tx;
+ void *sgdma_rx;
+ void *sgdma_tx;
unsigned int rx_fifo_depth;
unsigned int tx_fifo_depth;
- struct alt_sgdma_descriptor *rx_desc;
- struct alt_sgdma_descriptor *tx_desc;
+ void *rx_desc;
+ void *tx_desc;
unsigned char *rx_buf;
unsigned int phyaddr;
unsigned int interface;
struct phy_device *phydev;
struct mii_dev *bus;
+ const struct tse_ops *ops;
+ int dma_type;
};
#endif /* _ALTERA_TSE_H_ */