5 * SPDX-License-Identifier: GPL-2.0+
9 * eth.h - header file for the polled mode GT ethernet driver
12 #ifndef __GT6426x_ETH_H__
13 #define __GT6426x_ETH_H__
15 #include <asm/types.h>
17 #include <asm/byteorder.h>
20 typedef struct eth0_tx_desc_struct {
21 volatile __u32 bytecount_reserved;
22 volatile __u32 command_status;
23 volatile struct eth0_tx_desc_struct * next_desc;
24 /* Note - the following will not work for 64 bit addressing */
25 volatile unsigned char * buff_pointer;
26 } __attribute__ ((packed)) eth0_tx_desc_single;
28 typedef struct eth0_rx_desc_struct {
29 volatile __u32 buff_size_byte_count;
30 volatile __u32 command_status;
31 volatile struct eth0_rx_desc_struct * next_desc;
32 volatile unsigned char * buff_pointer;
33 } __attribute__ ((packed)) eth0_rx_desc_single;
35 #define NT 20 /* Number of Transmit buffers */
36 #define NR 20 /* Number of Receive buffers */
37 #define MAX_BUFF_SIZE (1536+2*CACHE_LINE_SIZE) /* 1600 */
38 #define ETHERNET_PORTS_DIFFERENCE_OFFSETS 0x400
40 unsigned long TDN_ETH0 , RDN_ETH0; /* Rx/Tx current Descriptor Number*/
41 unsigned int EVB64260_ETH0_irq;
48 extern eth0_tx_desc_single *eth0_tx_desc;
49 extern eth0_rx_desc_single *eth0_rx_desc;
50 extern char *eth0_tx_buffer;
51 extern char *eth0_rx_buffer[NR];
52 extern char *eth_data;
54 extern int gt6426x_eth_poll(void *v);
55 extern int gt6426x_eth_transmit(void *v, char *p, unsigned int s);
56 extern void gt6426x_eth_disable(void *v);
57 extern int gt6426x_eth_probe(void *v, bd_t *bis);
59 #endif /* __GT64260x_ETH_H__ */