1 //==========================================================================
3 // devs_eth_refidt334.inl
5 // IDT79S334a i82559 ethernet I/O definitions.
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.
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.
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
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.
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.
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.
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####
43 // Author(s): Tim Michals
46 // Purpose: IDT79s334A i82559 ethernet defintions
47 //####DESCRIPTIONEND####
48 //==========================================================================
50 #include <cyg/hal/hal_intr.h> // CYGNUM_HAL_INTERRUPT_ETHR
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
57 #if defined(CYGPKG_DEVS_ETH_MIPS_REFIDT334_I82559_ETH0) || defined(CYGPKG_DEVS_ETH_MIPS_REFIDT334_I82559_ETH1)
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
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)
67 #ifdef CYGPKG_DEVS_ETH_MIPS_REFIDT334_I82559_ETH0
69 static I82559 i82559_eth0_priv_data = {
70 #ifdef CYGSEM_DEVS_ETH_MIPS_REFIDT334_I82559_ETH0_SET_ESA
72 mac_address: CYGSEM_DEVS_ETH_MIPS_REFIDT334_I82559_ETH0_SET_ESA
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
92 NETDEVTAB_ENTRY(i82559_netdev0,
93 "i82559_" CYGDAT_DEVS_ETH_MIPS_REFIDT334_I82559_ETH0_NAME,
97 #endif // CYGPKG_DEVS_ETH_XXX_ETH0
102 #ifdef CYGPKG_DEVS_ETH_MIPS_REFIDT334_I82559_ETH1
104 static I82559 i82559_eth1_priv_data = {
105 #ifdef CYGSEM_DEVS_ETH_MIPS_REFIDT334_I82559_ETH1_SET_ESA
107 mac_address: CYGSEM_DEVS_ETH_MIPS_REFIDT334_I82559_ETH1_SET_ESA
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
127 NETDEVTAB_ENTRY(i82559_netdev1,
128 "i82559_" CYGDAT_DEVS_ETH_MIPS_REFIDT334_I82559_ETH1_NAME,
132 #endif // CYGPKG_DEVS_ETH_XXX_ETH1
137 // These arrays are used for sanity checking of pointers
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,
143 #ifdef CYGPKG_DEVS_ETH_MIPS_REFIDT334_I82559_ETH1
144 &i82559_eth1_priv_data,
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
156 #ifdef CYGPKG_DEVS_ETH_MIPS_REFIDT334_I82559_ETH1
163 i82559_sc_array[CYGNUM_DEVS_ETH_INTEL_I82559_DEV_COUNT] = {
164 #ifdef CYGPKG_DEVS_ETH_MIPS_REFIDT334_I82559_ETH0
167 #ifdef CYGPKG_DEVS_ETH_MIPS_REFIDT334_I82559_ETH1
173 // EOF devs_eth_refidt334.inl