]>
Commit | Line | Data |
---|---|---|
fe8c2806 WD |
1 | /* |
2 | * (C) Copyright 2001 | |
3 | * Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc. | |
4 | * | |
1a459660 | 5 | * SPDX-License-Identifier: GPL-2.0+ |
fe8c2806 WD |
6 | */ |
7 | ||
8 | /* | |
9 | * eth.h - header file for the polled mode GT ethernet driver | |
10 | */ | |
11 | ||
12 | #ifndef __GT6426x_ETH_H__ | |
13 | #define __GT6426x_ETH_H__ | |
14 | ||
15 | #include <asm/types.h> | |
16 | #include <asm/io.h> | |
17 | #include <asm/byteorder.h> | |
18 | #include <common.h> | |
19 | ||
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; | |
77ddac94 | 26 | } __attribute__ ((packed)) eth0_tx_desc_single; |
fe8c2806 WD |
27 | |
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; | |
77ddac94 | 33 | } __attribute__ ((packed)) eth0_rx_desc_single; |
fe8c2806 WD |
34 | |
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 | |
39 | ||
40 | unsigned long TDN_ETH0 , RDN_ETH0; /* Rx/Tx current Descriptor Number*/ | |
41 | unsigned int EVB64260_ETH0_irq; | |
42 | ||
43 | #define CLOSED 0 | |
44 | #define OPENED 1 | |
45 | ||
46 | #define PORT_ETH0 0 | |
47 | ||
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; | |
53 | ||
54 | extern int gt6426x_eth_poll(void *v); | |
10cbe3b6 | 55 | extern int gt6426x_eth_transmit(void *v, char *p, unsigned int s); |
fe8c2806 WD |
56 | extern void gt6426x_eth_disable(void *v); |
57 | extern int gt6426x_eth_probe(void *v, bd_t *bis); | |
58 | ||
59 | #endif /* __GT64260x_ETH_H__ */ |