OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [devs/] [eth/] [mips/] [idt79s334a/] [v2_0/] [include/] [devs_eth_refidt334.inl] - Blame information for rev 174

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
//==========================================================================
2
//
3
//      devs_eth_refidt334.inl
4
//
5
//      IDT79S334a i82559 ethernet I/O definitions.
6
//
7
//==========================================================================
8
//####ECOSGPLCOPYRIGHTBEGIN####
9
// -------------------------------------------
10
// This file is part of eCos, the Embedded Configurable Operating System.
11
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
12
//
13
// eCos is free software; you can redistribute it and/or modify it under
14
// the terms of the GNU General Public License as published by the Free
15
// Software Foundation; either version 2 or (at your option) any later version.
16
//
17
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
18
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
19
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
20
// for more details.
21
//
22
// You should have received a copy of the GNU General Public License along
23
// with eCos; if not, write to the Free Software Foundation, Inc.,
24
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25
//
26
// As a special exception, if other files instantiate templates or use macros
27
// or inline functions from this file, or you compile this file and link it
28
// with other works to produce a work based on this file, this file does not
29
// by itself cause the resulting work to be covered by the GNU General Public
30
// License. However the source code for this file must still be made available
31
// in accordance with section (3) of the GNU General Public License.
32
//
33
// This exception does not invalidate any other reasons why a work based on
34
// this file might be covered by the GNU General Public License.
35
//
36
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
37
// at http://sources.redhat.com/ecos/ecos-license/
38
// -------------------------------------------
39
//####ECOSGPLCOPYRIGHTEND####
40
//==========================================================================
41
//#####DESCRIPTIONBEGIN####
42
//
43
// Author(s):   Tim Michals
44
// Contributors:jskov
45
// Date:        2003-02-13
46
// Purpose:     IDT79s334A i82559 ethernet defintions
47
//####DESCRIPTIONEND####
48
//==========================================================================
49
 
50
#include            // CYGNUM_HAL_INTERRUPT_ETHR
51
 
52
#if 1 < CYGNUM_DEVS_ETH_INTEL_I82559_DEV_COUNT
53
#define CYGHWR_DEVS_ETH_INTEL_I82559_DEMUX_ALL
54
#endif // multiple devs, so demux_all needed
55
 
56
 
57
#if defined(CYGPKG_DEVS_ETH_MIPS_REFIDT334_I82559_ETH0) || defined(CYGPKG_DEVS_ETH_MIPS_REFIDT334_I82559_ETH1)
58
 
59
#define CYGHWR_INTEL_I82559_PCI_MEM_MAP_BASE 0xa0100000
60
#define CYGHWR_INTEL_I82559_PCI_MEM_MAP_SIZE 0x100000 //CYGMEM_SECTION_pci_window_SIZE
61
 
62
#define CYGHWR_INTEL_I82559_PCI_VIRT_TO_BUS( _x_ ) (((cyg_uint32)(_x_))|0)
63
#define CYGHWR_INTEL_I82559_PCI_BUS_TO_VIRT( _x_ ) (((cyg_uint32)(_x_))&~0)
64
#endif
65
 
66
 
67
#ifdef CYGPKG_DEVS_ETH_MIPS_REFIDT334_I82559_ETH0
68
 
69
static I82559 i82559_eth0_priv_data = {
70
#ifdef CYGSEM_DEVS_ETH_MIPS_REFIDT334_I82559_ETH0_SET_ESA
71
    hardwired_esa: 1,
72
    mac_address: CYGSEM_DEVS_ETH_MIPS_REFIDT334_I82559_ETH0_SET_ESA
73
#else
74
    hardwired_esa: 0,
75
#endif
76
};
77
 
78
ETH_DRV_SC(i82559_sc0,
79
           &i82559_eth0_priv_data,      // Driver specific data
80
           CYGDAT_DEVS_ETH_MIPS_REFIDT334_I82559_ETH0_NAME, // Name for device
81
           i82559_start,
82
           i82559_stop,
83
           i82559_ioctl,
84
           i82559_can_send,
85
           i82559_send,
86
           i82559_recv,
87
           i82559_deliver,
88
           i82559_poll,
89
           i82559_int_vector
90
    );
91
 
92
NETDEVTAB_ENTRY(i82559_netdev0,
93
                "i82559_" CYGDAT_DEVS_ETH_MIPS_REFIDT334_I82559_ETH0_NAME,
94
                i82559_init,
95
                &i82559_sc0);
96
 
97
#endif // CYGPKG_DEVS_ETH_XXX_ETH0
98
 
99
 
100
 
101
 
102
#ifdef CYGPKG_DEVS_ETH_MIPS_REFIDT334_I82559_ETH1
103
 
104
static I82559 i82559_eth1_priv_data = {
105
#ifdef CYGSEM_DEVS_ETH_MIPS_REFIDT334_I82559_ETH1_SET_ESA
106
    hardwired_esa:2,
107
    mac_address: CYGSEM_DEVS_ETH_MIPS_REFIDT334_I82559_ETH1_SET_ESA
108
#else
109
    hardwired_esa: 0,
110
#endif
111
};
112
 
113
ETH_DRV_SC(i82559_sc1,
114
           &i82559_eth1_priv_data,      // Driver specific data
115
           CYGDAT_DEVS_ETH_MIPS_REFIDT334_I82559_ETH1_NAME, // Name for device
116
           i82559_start,
117
           i82559_stop,
118
           i82559_ioctl,
119
           i82559_can_send,
120
           i82559_send,
121
           i82559_recv,
122
           i82559_deliver,
123
           i82559_poll,
124
           i82559_int_vector
125
    );
126
 
127
NETDEVTAB_ENTRY(i82559_netdev1,
128
                "i82559_" CYGDAT_DEVS_ETH_MIPS_REFIDT334_I82559_ETH1_NAME,
129
                i82559_init,
130
                &i82559_sc1);
131
 
132
#endif // CYGPKG_DEVS_ETH_XXX_ETH1
133
 
134
 
135
 
136
 
137
// These arrays are used for sanity checking of pointers
138
I82559 *
139
i82559_priv_array[CYGNUM_DEVS_ETH_INTEL_I82559_DEV_COUNT] = {
140
#ifdef CYGPKG_DEVS_ETH_MIPS_REFIDT334_I82559_ETH0
141
    &i82559_eth0_priv_data,
142
#endif
143
#ifdef CYGPKG_DEVS_ETH_MIPS_REFIDT334_I82559_ETH1
144
    &i82559_eth1_priv_data,
145
#endif
146
};
147
 
148
#ifdef CYGDBG_USE_ASSERTS
149
// These are only used when assertions are enabled
150
cyg_netdevtab_entry_t *
151
i82559_netdev_array[CYGNUM_DEVS_ETH_INTEL_I82559_DEV_COUNT] = {
152
#ifdef CYGPKG_DEVS_ETH_MIPS_REFIDT334_I82559_ETH0
153
    &i82559_netdev0,
154
#endif
155
 
156
#ifdef CYGPKG_DEVS_ETH_MIPS_REFIDT334_I82559_ETH1
157
    &i82559_netdev1,
158
#endif
159
 
160
};
161
 
162
struct eth_drv_sc *
163
i82559_sc_array[CYGNUM_DEVS_ETH_INTEL_I82559_DEV_COUNT] = {
164
#ifdef CYGPKG_DEVS_ETH_MIPS_REFIDT334_I82559_ETH0
165
    &i82559_sc0,
166
#endif
167
#ifdef CYGPKG_DEVS_ETH_MIPS_REFIDT334_I82559_ETH1
168
    &i82559_sc1,
169
#endif
170
};
171
#endif
172
 
173
// EOF devs_eth_refidt334.inl

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.