]> git.ipfire.org Git - thirdparty/u-boot.git/blame - board/evb64260/eth.h
Add GPL-2.0+ SPDX-License-Identifier to source files
[thirdparty/u-boot.git] / board / evb64260 / eth.h
CommitLineData
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
20typedef 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
28typedef 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
40unsigned long TDN_ETH0 , RDN_ETH0; /* Rx/Tx current Descriptor Number*/
41unsigned int EVB64260_ETH0_irq;
42
43#define CLOSED 0
44#define OPENED 1
45
46#define PORT_ETH0 0
47
48extern eth0_tx_desc_single *eth0_tx_desc;
49extern eth0_rx_desc_single *eth0_rx_desc;
50extern char *eth0_tx_buffer;
51extern char *eth0_rx_buffer[NR];
52extern char *eth_data;
53
54extern int gt6426x_eth_poll(void *v);
10cbe3b6 55extern int gt6426x_eth_transmit(void *v, char *p, unsigned int s);
fe8c2806
WD
56extern void gt6426x_eth_disable(void *v);
57extern int gt6426x_eth_probe(void *v, bd_t *bis);
58
59#endif /* __GT64260x_ETH_H__ */