1 #ifndef _IF_MCF5272_PRIVATE_DATA_H_
2 #define _IF_MCF5272_PRIVATE_DATA_H_
3 //==========================================================================
4 //####ECOSGPLCOPYRIGHTBEGIN####
5 // -------------------------------------------
6 // This file is part of eCos, the Embedded Configurable Operating System.
7 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
9 // eCos is free software; you can redistribute it and/or modify it under
10 // the terms of the GNU General Public License as published by the Free
11 // Software Foundation; either version 2 or (at your option) any later version.
13 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
14 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 // You should have received a copy of the GNU General Public License along
19 // with eCos; if not, write to the Free Software Foundation, Inc.,
20 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
22 // As a special exception, if other files instantiate templates or use macros
23 // or inline functions from this file, or you compile this file and link it
24 // with other works to produce a work based on this file, this file does not
25 // by itself cause the resulting work to be covered by the GNU General Public
26 // License. However the source code for this file must still be made available
27 // in accordance with section (3) of the GNU General Public License.
29 // This exception does not invalidate any other reasons why a work based on
30 // this file might be covered by the GNU General Public License.
32 // Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
33 // at http://sources.redhat.com/ecos/ecos-license/
34 // -------------------------------------------
35 //####ECOSGPLCOPYRIGHTEND####
36 //==========================================================================
38 #include <cyg/hal/drv_api.h>
39 #include <cyg/io/eth/netdev.h>
40 #include <cyg/io/eth/eth_drv.h>
41 #include <cyg/devs/eth/if_mcf5272.h>
42 #include <cyg/devs/eth/nbuf.h>
44 /* Device driver private data. */
46 struct MCF5272_fec_priv_data_t
51 /* Diagnositc supplement variables. */
55 unsigned int old_tx_pk_cnt;
56 unsigned int old_rx_pk_cnt;
57 unsigned int old_tx_bytes_cnt;
58 unsigned int old_rx_bytes_cnt;
61 /* 1 second alarm variables */
65 cyg_handle_t counter_h;
67 /* Diagnostic counters */
69 MCF5272_FEC_DIAG diag_counters;
71 /* This flag is set if the device is operational */
73 enum eth_drv_status_t operational;
75 /* Unknown, Half Duplex or Full duplex. */
77 enum eth_drv_mode_t duplex;
79 /* Ethernet bandwidth. */
83 /* Temporary packet buffer. */
85 eth_frame_hdr pkt_buf;
88 typedef struct MCF5272_fec_priv_data_t MCF5272_fec_priv_data_t;
90 #define PMCF5272_FEC_DATA(_SC_) \
91 ((MCF5272_fec_priv_data_t*)(((struct eth_drv_sc*)(_SC_))->driver_private))
92 #define PBUF_INFO(_SC_) \
93 (&(((MCF5272_fec_priv_data_t*)((_SC_)->driver_private))->nbuffer))
95 #endif /* _IF_MCF5272_PRIVATE_DATA_H_ */