Staging: add epl stack
[platform/kernel/linux-starfive.git] / drivers / staging / epl / EdrvFec.h
1 /****************************************************************************
2
3   (c) SYSTEC electronic GmbH, D-07973 Greiz, August-Bebel-Str. 29
4       www.systec-electronic.com
5
6   Project:      openPOWERLINK
7
8   Description:  interface for ethernetdriver
9                 "fast ethernet controller" (FEC)
10                 freescale coldfire MCF528x and compatible FEC
11
12   License:
13
14     Redistribution and use in source and binary forms, with or without
15     modification, are permitted provided that the following conditions
16     are met:
17
18     1. Redistributions of source code must retain the above copyright
19        notice, this list of conditions and the following disclaimer.
20
21     2. Redistributions in binary form must reproduce the above copyright
22        notice, this list of conditions and the following disclaimer in the
23        documentation and/or other materials provided with the distribution.
24
25     3. Neither the name of SYSTEC electronic GmbH nor the names of its
26        contributors may be used to endorse or promote products derived
27        from this software without prior written permission. For written
28        permission, please contact info@systec-electronic.com.
29
30     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
31     "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
32     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
33     FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
34     COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
35     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
36     BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
37     LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
38     CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
39     LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
40     ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41     POSSIBILITY OF SUCH DAMAGE.
42
43     Severability Clause:
44
45         If a provision of this License is or becomes illegal, invalid or
46         unenforceable in any jurisdiction, that shall not affect:
47         1. the validity or enforceability in that jurisdiction of any other
48            provision of this License; or
49         2. the validity or enforceability in other jurisdictions of that or
50            any other provision of this License.
51
52   -------------------------------------------------------------------------
53
54                 $RCSfile: EdrvFec.h,v $
55
56                 $Author: D.Krueger $
57
58                 $Revision: 1.3 $  $Date: 2008/04/17 21:36:32 $
59
60                 $State: Exp $
61
62                 Build Environment:
63                 Dev C++ and GNU-Compiler for m68k
64
65   -------------------------------------------------------------------------
66
67   Revision History:
68
69   2005/08/01 m.b.:   start of implementation
70
71 ****************************************************************************/
72
73 #ifndef _EDRVFEC_H_
74 #define _EDRVFEC_H_
75
76
77 //---------------------------------------------------------------------------
78 // const defines
79 //---------------------------------------------------------------------------
80 // do this in config header
81 #define TARGET_HARDWARE TGTHW_SPLC_CF54
82
83
84 // base addresses
85 #if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282)
86
87
88 #elif ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5485)
89
90
91 #else
92
93     #error 'ERROR: Target was never implemented!'
94
95 #endif
96
97
98
99 //---------------------------------------------------------------------------
100 // types
101 //---------------------------------------------------------------------------
102
103
104 // Rx and Tx buffer descriptor format
105 typedef struct
106 {
107         WORD   m_wStatus;       // control / status  ---  used by edrv, do not change in application
108         WORD   m_wLength;       // transfer length
109         BYTE * m_pbData;        // buffer address
110 } tBufferDescr;
111
112 #if ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5282)
113
114 #elif ((TARGET_HARDWARE & TGT_CPU_MASK_) == TGT_CPU_5485)
115
116 #endif
117
118 //---------------------------------------------------------------------------
119 // function prototypes
120 //---------------------------------------------------------------------------
121
122
123
124 #endif  // #ifndef _EDRV_FEC_H_
125
126