diff options
Diffstat (limited to 'drivers/net/altera_tse.h')
-rw-r--r-- | drivers/net/altera_tse.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/net/altera_tse.h b/drivers/net/altera_tse.h index 471a880..fae2378 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_ */ |