| /* SPDX-License-Identifier: GPL-2.0+ */ |
| * Copyright 2014-2017 Broadcom. |
| /* RX_BUF_NUM must be power of 2 */ |
| /* TX_BUF_NUM must be power of 2 */ |
| /* Support 2 Ethernet ports now */ |
| #define BCM_ETH_MAX_PORT_NUM 2 |
| int (*tx_packet)(struct eth_dma *dma, void *packet, int length); |
| bool (*check_tx_done)(struct eth_dma *dma); |
| int (*check_rx_done)(struct eth_dma *dma, uint8_t *buf); |
| int (*enable_dma)(struct eth_dma *dma, int dir); |
| int (*disable_dma)(struct eth_dma *dma, int dir); |
| phy_interface_t phy_interface; |
| struct phy_device *port[BCM_ETH_MAX_PORT_NUM]; |
| int (*miiphy_read)(struct mii_dev *bus, int phyaddr, int devad, |
| int (*miiphy_write)(struct mii_dev *bus, int phyaddr, int devad, |
| int (*mac_init)(struct eth_device *dev); |
| int (*disable_mac)(void); |
| int (*set_mac_addr)(unsigned char *mac); |
| int (*set_mac_speed)(int speed, int duplex); |
| #endif /* _BCM_SF2_ETH_H_ */ |