]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - drivers/net/sk98lin/h/skgesirq.h
imported Ka-Ro specific additions to U-Boot 2009.08 for TX28
[karo-tx-uboot.git] / drivers / net / sk98lin / h / skgesirq.h
1 /******************************************************************************
2  *
3  * Name:        skgesirq.h
4  * Project:     GEnesis, PCI Gigabit Ethernet Adapter
5  * Version:     $Revision$
6  * Date:        $Date$
7  * Purpose:     SK specific Gigabit Ethernet special IRQ functions
8  *
9  ******************************************************************************/
10
11 /******************************************************************************
12  *
13  *      (C)Copyright 1998-2002 SysKonnect GmbH.
14  *
15  *      This program is free software; you can redistribute it and/or modify
16  *      it under the terms of the GNU General Public License as published by
17  *      the Free Software Foundation; either version 2 of the License, or
18  *      (at your option) any later version.
19  *
20  *      The information in this file is provided "AS IS" without warranty.
21  *
22  ******************************************************************************/
23
24 /******************************************************************************
25  *
26  * History:
27  *      $Log$
28  *      Revision 1.1.3.1  2011-02-28 14:53:20  lothar
29  *      imported Ka-Ro specific additions to U-Boot 2009.08 for TX28
30  *
31  *      Revision 1.26  2002/10/14 09:52:36  rschmidt
32  *      Added SKERR_SIRQ_E023 and SKERR_SIRQ_E023 for GPHY (Yukon)
33  *      Editorial changes
34  *
35  *      Revision 1.25  2002/07/15 18:15:52  rwahl
36  *      Editorial changes.
37  *
38  *      Revision 1.24  2002/07/15 15:39:21  rschmidt
39  *      Corrected define for SKERR_SIRQ_E022
40  *      Editorial changes
41  *
42  *      Revision 1.23  2002/04/25 11:09:45  rschmidt
43  *      Removed declarations for SkXmInitPhy(), SkXmRxTxEnable()
44  *      Editorial changes
45  *
46  *      Revision 1.22  2000/11/09 11:30:10  rassmann
47  *      WA: Waiting after releasing reset until BCom chip is accessible.
48  *
49  *      Revision 1.21  2000/10/18 12:22:40  cgoos
50  *      Added workaround for half duplex hangup.
51  *
52  *      Revision 1.20  1999/12/06 10:00:44  cgoos
53  *      Added SET event for role.
54  *
55  *      Revision 1.19  1999/11/22 13:58:26  cgoos
56  *      Changed license header to GPL.
57  *
58  *      Revision 1.18  1999/05/19 07:32:59  cgoos
59  *      Changes for 1000Base-T.
60  *
61  *      Revision 1.17  1999/03/12 13:29:31  malthoff
62  *      Move Autonegotiation Error Codes to skgeinit.h.
63  *
64  *      Revision 1.16  1999/03/08 10:11:28  gklug
65  *      add: AutoNegDone return codes
66  *
67  *      Revision 1.15  1998/11/18 13:20:53  gklug
68  *      add: different timeouts for active and non-active links
69  *
70  *      Revision 1.14  1998/11/04 07:18:14  cgoos
71  *      Added prototype for SkXmRxTxEnable.
72  *
73  *      Revision 1.13  1998/10/21 05:52:23  gklug
74  *      add: parameter DoLoop to InitPhy function
75  *
76  *      Revision 1.12  1998/10/19 06:45:03  cgoos
77  *      Added prototype for SkXmInitPhy.
78  *
79  *      Revision 1.11  1998/10/15 14:34:10  gklug
80  *      add: WA_TIME is 500 msec
81  *
82  *      Revision 1.10  1998/10/14 14:49:41  malthoff
83  *      Remove err log defines E021 and E022. They are
84  *      defined in skgeinit.h now.
85  *
86  *      Revision 1.9  1998/10/14 14:00:39  gklug
87  *      add: error logs for init phys
88  *
89  *      Revision 1.8  1998/10/14 05:44:05  gklug
90  *      add: E020
91  *
92  *      Revision 1.7  1998/10/02 06:24:58  gklug
93  *      add: error messages
94  *
95  *      Revision 1.6  1998/10/01 07:54:45  gklug
96  *      add: PNMI debug module
97  *
98  *      Revision 1.5  1998/09/28 13:36:31  malthoff
99  *      Move the bit definitions for Autonegotiation
100  *      and Flow Control to skgeinit.h.
101  *
102  *      Revision 1.4  1998/09/15 12:29:34  gklug
103  *      add: error logs
104  *
105  *      Revision 1.3  1998/09/03 13:54:02  gklug
106  *      add: function prototypes
107  *
108  *      Revision 1.2  1998/09/03 10:24:36  gklug
109  *      add: Events send by PNMI
110  *      add: parameter definition for Flow Control etc.
111  *
112  *      Revision 1.1  1998/08/27 11:50:27  gklug
113  *      initial revision
114  *
115  *
116  ******************************************************************************/
117
118 #ifndef _INC_SKGESIRQ_H_
119 #define _INC_SKGESIRQ_H_
120
121 /*
122  * Define the Event the special IRQ/INI module can handle
123  */
124 #define SK_HWEV_WATIM                   1       /* Timeout for WA errata #2 XMAC */
125 #define SK_HWEV_PORT_START              2       /* Port Start Event by RLMT */
126 #define SK_HWEV_PORT_STOP               3       /* Port Stop Event by RLMT */
127 #define SK_HWEV_CLEAR_STAT              4       /* Clear Statistics by PNMI */
128 #define SK_HWEV_UPDATE_STAT             5       /* Update Statistics by PNMI */
129 #define SK_HWEV_SET_LMODE               6       /* Set Link Mode by PNMI */
130 #define SK_HWEV_SET_FLOWMODE    7       /* Set Flow Control Mode by PNMI */
131 #define SK_HWEV_SET_ROLE                8       /* Set Master/Slave (Role) by PNMI */
132 #define SK_HWEV_SET_SPEED               9       /* Set Link Speed by PNMI */
133 #define SK_HWEV_HALFDUP_CHK             10      /* Half Duplex Hangup Workaround */
134
135 #define SK_WA_ACT_TIME          (5000000L)      /* 5 sec */
136 #define SK_WA_INA_TIME          (100000L)       /* 100 msec */
137
138 #define SK_HALFDUP_CHK_TIME     (10000L)        /* 10 msec */
139
140 /*
141  * Define the error numbers and messages
142  */
143 #define SKERR_SIRQ_E001         (SK_ERRBASE_SIRQ+0)
144 #define SKERR_SIRQ_E001MSG      "Unknown event"
145 #define SKERR_SIRQ_E002         (SKERR_SIRQ_E001+1)
146 #define SKERR_SIRQ_E002MSG      "Packet timeout RX1"
147 #define SKERR_SIRQ_E003         (SKERR_SIRQ_E002+1)
148 #define SKERR_SIRQ_E003MSG      "Packet timeout RX2"
149 #define SKERR_SIRQ_E004         (SKERR_SIRQ_E003+1)
150 #define SKERR_SIRQ_E004MSG      "MAC 1 not correctly initialized"
151 #define SKERR_SIRQ_E005         (SKERR_SIRQ_E004+1)
152 #define SKERR_SIRQ_E005MSG      "MAC 2 not correctly initialized"
153 #define SKERR_SIRQ_E006         (SKERR_SIRQ_E005+1)
154 #define SKERR_SIRQ_E006MSG      "CHECK failure R1"
155 #define SKERR_SIRQ_E007         (SKERR_SIRQ_E006+1)
156 #define SKERR_SIRQ_E007MSG      "CHECK failure R2"
157 #define SKERR_SIRQ_E008         (SKERR_SIRQ_E007+1)
158 #define SKERR_SIRQ_E008MSG      "CHECK failure XS1"
159 #define SKERR_SIRQ_E009         (SKERR_SIRQ_E008+1)
160 #define SKERR_SIRQ_E009MSG      "CHECK failure XA1"
161 #define SKERR_SIRQ_E010         (SKERR_SIRQ_E009+1)
162 #define SKERR_SIRQ_E010MSG      "CHECK failure XS2"
163 #define SKERR_SIRQ_E011         (SKERR_SIRQ_E010+1)
164 #define SKERR_SIRQ_E011MSG      "CHECK failure XA2"
165 #define SKERR_SIRQ_E012         (SKERR_SIRQ_E011+1)
166 #define SKERR_SIRQ_E012MSG      "unexpected IRQ Master error"
167 #define SKERR_SIRQ_E013         (SKERR_SIRQ_E012+1)
168 #define SKERR_SIRQ_E013MSG      "unexpected IRQ Status error"
169 #define SKERR_SIRQ_E014         (SKERR_SIRQ_E013+1)
170 #define SKERR_SIRQ_E014MSG      "Parity error on RAM (read)"
171 #define SKERR_SIRQ_E015         (SKERR_SIRQ_E014+1)
172 #define SKERR_SIRQ_E015MSG      "Parity error on RAM (write)"
173 #define SKERR_SIRQ_E016         (SKERR_SIRQ_E015+1)
174 #define SKERR_SIRQ_E016MSG      "Parity error MAC 1"
175 #define SKERR_SIRQ_E017         (SKERR_SIRQ_E016+1)
176 #define SKERR_SIRQ_E017MSG      "Parity error MAC 2"
177 #define SKERR_SIRQ_E018         (SKERR_SIRQ_E017+1)
178 #define SKERR_SIRQ_E018MSG      "Parity error RX 1"
179 #define SKERR_SIRQ_E019         (SKERR_SIRQ_E018+1)
180 #define SKERR_SIRQ_E019MSG      "Parity error RX 2"
181 #define SKERR_SIRQ_E020         (SKERR_SIRQ_E019+1)
182 #define SKERR_SIRQ_E020MSG      "MAC transmit FIFO underrun"
183 #define SKERR_SIRQ_E021         (SKERR_SIRQ_E020+1)
184 #define SKERR_SIRQ_E021MSG      "Spurious TWSI interrupt"
185 #define SKERR_SIRQ_E022         (SKERR_SIRQ_E021+1)
186 #define SKERR_SIRQ_E022MSG      "Cable pair swap error"
187 #define SKERR_SIRQ_E023         (SKERR_SIRQ_E022+1)
188 #define SKERR_SIRQ_E023MSG      "Auto-negotiation error"
189 #define SKERR_SIRQ_E024         (SKERR_SIRQ_E023+1)
190 #define SKERR_SIRQ_E024MSG      "FIFO overflow error"
191
192 extern void SkGeSirqIsr(SK_AC *pAC, SK_IOC IoC, SK_U32 Istatus);
193 extern int  SkGeSirqEvent(SK_AC *pAC, SK_IOC IoC, SK_U32 Event, SK_EVPARA Para);
194 extern void SkHWLinkUp(SK_AC *pAC, SK_IOC IoC, int Port);
195 extern void SkHWLinkDown(SK_AC *pAC, SK_IOC IoC, int Port);
196
197 #endif  /* _INC_SKGESIRQ_H_ */