1 /******************************************************************************
4 * Project: Gigabit Ethernet Adapters, Common Modules
5 * Version: $Revision: 1.83 $
6 * Date: $Date: 2003/09/16 14:07:37 $
7 * Purpose: Structures and prototypes for the GE Init Module
9 ******************************************************************************/
11 /******************************************************************************
13 * (C)Copyright 1998-2002 SysKonnect.
14 * (C)Copyright 2002-2003 Marvell.
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
21 * The information in this file is provided "AS IS" without warranty.
23 ******************************************************************************/
25 #ifndef __INC_SKGEINIT_H_
26 #define __INC_SKGEINIT_H_
30 #endif /* __cplusplus */
32 /* defines ********************************************************************/
34 #define SK_TEST_VAL 0x11335577UL
36 /* modifying Link LED behaviour (used with SkGeLinkLED()) */
37 #define SK_LNK_OFF LED_OFF
38 #define SK_LNK_ON (LED_ON | LED_BLK_OFF | LED_SYNC_OFF)
39 #define SK_LNK_BLINK (LED_ON | LED_BLK_ON | LED_SYNC_ON)
40 #define SK_LNK_PERM (LED_ON | LED_BLK_OFF | LED_SYNC_ON)
41 #define SK_LNK_TST (LED_ON | LED_BLK_ON | LED_SYNC_OFF)
43 /* parameter 'Mode' when calling SK_HWAC_LINK_LED() */
44 #define SK_LED_OFF LED_OFF
45 #define SK_LED_ACTIVE (LED_ON | LED_BLK_OFF | LED_SYNC_OFF)
46 #define SK_LED_STANDBY (LED_ON | LED_BLK_ON | LED_SYNC_OFF)
48 /* addressing LED Registers in SkGeXmitLED() */
49 #define XMIT_LED_INI 0
50 #define XMIT_LED_CNT (RX_LED_VAL - RX_LED_INI)
51 #define XMIT_LED_CTRL (RX_LED_CTRL- RX_LED_INI)
52 #define XMIT_LED_TST (RX_LED_TST - RX_LED_INI)
54 /* parameter 'Mode' when calling SkGeXmitLED() */
59 /* Counter and Timer constants, for a host clock of 62.5 MHz */
60 #define SK_XMIT_DUR 0x002faf08UL /* 50 ms */
61 #define SK_BLK_DUR 0x01dcd650UL /* 500 ms */
63 #define SK_DPOLL_DEF 0x00ee6b28UL /* 250 ms at 62.5 MHz */
65 #define SK_DPOLL_MAX 0x00ffffffUL /* 268 ms at 62.5 MHz */
66 /* 215 ms at 78.12 MHz */
68 #define SK_FACT_62 100 /* is given in percent */
69 #define SK_FACT_53 85 /* on GENESIS: 53.12 MHz */
70 #define SK_FACT_78 125 /* on YUKON: 78.12 MHz */
73 #define SK_MAC_TO_53 72 /* MAC arbiter timeout */
74 #define SK_PKT_TO_53 0x2000 /* Packet arbiter timeout */
75 #define SK_PKT_TO_MAX 0xffff /* Maximum value */
76 #define SK_RI_TO_53 36 /* RAM interface timeout */
78 #define SK_PHY_ACC_TO 600000 /* PHY access timeout */
80 /* RAM Buffer High Pause Threshold values */
81 #define SK_RB_ULPP ( 8 * 1024) /* Upper Level in kB/8 */
82 #define SK_RB_LLPP_S (10 * 1024) /* Lower Level for small Queues */
83 #define SK_RB_LLPP_B (16 * 1024) /* Lower Level for big Queues */
86 #define SK_BMU_RX_WM 0x600 /* BMU Rx Watermark */
89 #define SK_BMU_TX_WM 0x600 /* BMU Tx Watermark */
92 /* XMAC II Rx High Watermark */
93 #define SK_XM_RX_HI_WM 0x05aa /* 1450 */
95 /* XMAC II Tx Threshold */
96 #define SK_XM_THR_REDL 0x01fb /* .. for redundant link usage */
97 #define SK_XM_THR_SL 0x01fb /* .. for single link adapters */
98 #define SK_XM_THR_MULL 0x01fb /* .. for multiple link usage */
99 #define SK_XM_THR_JUMBO 0x03fc /* .. for jumbo frame usage */
101 /* values for GIPortUsage */
102 #define SK_RED_LINK 1 /* redundant link usage */
103 #define SK_MUL_LINK 2 /* multiple link usage */
104 #define SK_JUMBO_LINK 3 /* driver uses jumbo frames */
106 /* Minimum RAM Buffer Rx Queue Size */
107 #define SK_MIN_RXQ_SIZE 16 /* 16 kB */
109 /* Minimum RAM Buffer Tx Queue Size */
110 #define SK_MIN_TXQ_SIZE 16 /* 16 kB */
112 /* Queue Size units */
116 /* Percentage of queue size from whole memory */
117 /* 80 % for receive */
118 #define RAM_QUOTA_RX 80L
119 /* 0% for sync transfer */
120 #define RAM_QUOTA_SYNC 0L
121 /* the rest (20%) is taken for async transfer */
123 /* Get the rounded queue size in Bytes in 8k steps */
124 #define ROUND_QUEUE_SIZE(SizeInBytes) \
125 ((((unsigned long) (SizeInBytes) + (QZ_STEP*1024L)-1) / 1024) & \
128 /* Get the rounded queue size in KBytes in 8k steps */
129 #define ROUND_QUEUE_SIZE_KB(Kilobytes) \
130 ROUND_QUEUE_SIZE((Kilobytes) * 1024L)
132 /* Types of RAM Buffer Queues */
133 #define SK_RX_SRAM_Q 1 /* small receive queue */
134 #define SK_RX_BRAM_Q 2 /* big receive queue */
135 #define SK_TX_RAM_Q 3 /* small or big transmit queue */
137 /* parameter 'Dir' when calling SkGeStopPort() */
138 #define SK_STOP_TX 1 /* Stops the transmit path, resets the XMAC */
139 #define SK_STOP_RX 2 /* Stops the receive path */
140 #define SK_STOP_ALL 3 /* Stops Rx and Tx path, resets the XMAC */
142 /* parameter 'RstMode' when calling SkGeStopPort() */
143 #define SK_SOFT_RST 1 /* perform a software reset */
144 #define SK_HARD_RST 2 /* perform a hardware reset */
147 #define SK_INIT_DATA 0 /* Init level 0: init data structures */
148 #define SK_INIT_IO 1 /* Init level 1: init with IOs */
149 #define SK_INIT_RUN 2 /* Init level 2: init for run time */
151 /* Link Mode Parameter */
152 #define SK_LMODE_HALF 1 /* Half Duplex Mode */
153 #define SK_LMODE_FULL 2 /* Full Duplex Mode */
154 #define SK_LMODE_AUTOHALF 3 /* AutoHalf Duplex Mode */
155 #define SK_LMODE_AUTOFULL 4 /* AutoFull Duplex Mode */
156 #define SK_LMODE_AUTOBOTH 5 /* AutoBoth Duplex Mode */
157 #define SK_LMODE_AUTOSENSE 6 /* configured mode auto sensing */
158 #define SK_LMODE_INDETERMINATED 7 /* indeterminated */
160 /* Auto-negotiation timeout in 100ms granularity */
161 #define SK_AND_MAX_TO 6 /* Wait 600 msec before link comes up */
163 /* Auto-negotiation error codes */
164 #define SK_AND_OK 0 /* no error */
165 #define SK_AND_OTHER 1 /* other error than below */
166 #define SK_AND_DUP_CAP 2 /* Duplex capabilities error */
169 /* Link Speed Capabilities */
170 #define SK_LSPEED_CAP_AUTO (1<<0) /* Automatic resolution */
171 #define SK_LSPEED_CAP_10MBPS (1<<1) /* 10 Mbps */
172 #define SK_LSPEED_CAP_100MBPS (1<<2) /* 100 Mbps */
173 #define SK_LSPEED_CAP_1000MBPS (1<<3) /* 1000 Mbps */
174 #define SK_LSPEED_CAP_INDETERMINATED (1<<4) /* indeterminated */
176 /* Link Speed Parameter */
177 #define SK_LSPEED_AUTO 1 /* Automatic resolution */
178 #define SK_LSPEED_10MBPS 2 /* 10 Mbps */
179 #define SK_LSPEED_100MBPS 3 /* 100 Mbps */
180 #define SK_LSPEED_1000MBPS 4 /* 1000 Mbps */
181 #define SK_LSPEED_INDETERMINATED 5 /* indeterminated */
183 /* Link Speed Current State */
184 #define SK_LSPEED_STAT_UNKNOWN 1
185 #define SK_LSPEED_STAT_10MBPS 2
186 #define SK_LSPEED_STAT_100MBPS 3
187 #define SK_LSPEED_STAT_1000MBPS 4
188 #define SK_LSPEED_STAT_INDETERMINATED 5
191 /* Link Capability Parameter */
192 #define SK_LMODE_CAP_HALF (1<<0) /* Half Duplex Mode */
193 #define SK_LMODE_CAP_FULL (1<<1) /* Full Duplex Mode */
194 #define SK_LMODE_CAP_AUTOHALF (1<<2) /* AutoHalf Duplex Mode */
195 #define SK_LMODE_CAP_AUTOFULL (1<<3) /* AutoFull Duplex Mode */
196 #define SK_LMODE_CAP_INDETERMINATED (1<<4) /* indeterminated */
198 /* Link Mode Current State */
199 #define SK_LMODE_STAT_UNKNOWN 1 /* Unknown Duplex Mode */
200 #define SK_LMODE_STAT_HALF 2 /* Half Duplex Mode */
201 #define SK_LMODE_STAT_FULL 3 /* Full Duplex Mode */
202 #define SK_LMODE_STAT_AUTOHALF 4 /* Half Duplex Mode obtained by Auto-Neg */
203 #define SK_LMODE_STAT_AUTOFULL 5 /* Full Duplex Mode obtained by Auto-Neg */
204 #define SK_LMODE_STAT_INDETERMINATED 6 /* indeterminated */
206 /* Flow Control Mode Parameter (and capabilities) */
207 #define SK_FLOW_MODE_NONE 1 /* No Flow-Control */
208 #define SK_FLOW_MODE_LOC_SEND 2 /* Local station sends PAUSE */
209 #define SK_FLOW_MODE_SYMMETRIC 3 /* Both stations may send PAUSE */
210 #define SK_FLOW_MODE_SYM_OR_REM 4 /* Both stations may send PAUSE or
211 * just the remote station may send PAUSE
213 #define SK_FLOW_MODE_INDETERMINATED 5 /* indeterminated */
215 /* Flow Control Status Parameter */
216 #define SK_FLOW_STAT_NONE 1 /* No Flow Control */
217 #define SK_FLOW_STAT_REM_SEND 2 /* Remote Station sends PAUSE */
218 #define SK_FLOW_STAT_LOC_SEND 3 /* Local station sends PAUSE */
219 #define SK_FLOW_STAT_SYMMETRIC 4 /* Both station may send PAUSE */
220 #define SK_FLOW_STAT_INDETERMINATED 5 /* indeterminated */
222 /* Master/Slave Mode Capabilities */
223 #define SK_MS_CAP_AUTO (1<<0) /* Automatic resolution */
224 #define SK_MS_CAP_MASTER (1<<1) /* This station is master */
225 #define SK_MS_CAP_SLAVE (1<<2) /* This station is slave */
226 #define SK_MS_CAP_INDETERMINATED (1<<3) /* indeterminated */
228 /* Set Master/Slave Mode Parameter (and capabilities) */
229 #define SK_MS_MODE_AUTO 1 /* Automatic resolution */
230 #define SK_MS_MODE_MASTER 2 /* This station is master */
231 #define SK_MS_MODE_SLAVE 3 /* This station is slave */
232 #define SK_MS_MODE_INDETERMINATED 4 /* indeterminated */
234 /* Master/Slave Status Parameter */
235 #define SK_MS_STAT_UNSET 1 /* The M/S status is not set */
236 #define SK_MS_STAT_MASTER 2 /* This station is master */
237 #define SK_MS_STAT_SLAVE 3 /* This station is slave */
238 #define SK_MS_STAT_FAULT 4 /* M/S resolution failed */
239 #define SK_MS_STAT_INDETERMINATED 5 /* indeterminated */
241 /* parameter 'Mode' when calling SkXmSetRxCmd() */
242 #define SK_STRIP_FCS_ON (1<<0) /* Enable FCS stripping of Rx frames */
243 #define SK_STRIP_FCS_OFF (1<<1) /* Disable FCS stripping of Rx frames */
244 #define SK_STRIP_PAD_ON (1<<2) /* Enable pad byte stripping of Rx fr */
245 #define SK_STRIP_PAD_OFF (1<<3) /* Disable pad byte stripping of Rx fr */
246 #define SK_LENERR_OK_ON (1<<4) /* Don't chk fr for in range len error */
247 #define SK_LENERR_OK_OFF (1<<5) /* Check frames for in range len error */
248 #define SK_BIG_PK_OK_ON (1<<6) /* Don't set Rx Error bit for big frames */
249 #define SK_BIG_PK_OK_OFF (1<<7) /* Set Rx Error bit for big frames */
250 #define SK_SELF_RX_ON (1<<8) /* Enable Rx of own packets */
251 #define SK_SELF_RX_OFF (1<<9) /* Disable Rx of own packets */
253 /* parameter 'Para' when calling SkMacSetRxTxEn() */
254 #define SK_MAC_LOOPB_ON (1<<0) /* Enable MAC Loopback Mode */
255 #define SK_MAC_LOOPB_OFF (1<<1) /* Disable MAC Loopback Mode */
256 #define SK_PHY_LOOPB_ON (1<<2) /* Enable PHY Loopback Mode */
257 #define SK_PHY_LOOPB_OFF (1<<3) /* Disable PHY Loopback Mode */
258 #define SK_PHY_FULLD_ON (1<<4) /* Enable GMII Full Duplex */
259 #define SK_PHY_FULLD_OFF (1<<5) /* Disable GMII Full Duplex */
261 /* States of PState */
262 #define SK_PRT_RESET 0 /* the port is reset */
263 #define SK_PRT_STOP 1 /* the port is stopped (similar to SW reset) */
264 #define SK_PRT_INIT 2 /* the port is initialized */
265 #define SK_PRT_RUN 3 /* the port has an active link */
267 /* PHY power down modes */
268 #define PHY_PM_OPERATIONAL_MODE 0 /* PHY operational mode */
269 #define PHY_PM_DEEP_SLEEP 1 /* coma mode --> minimal power */
270 #define PHY_PM_IEEE_POWER_DOWN 2 /* IEEE 22.2.4.1.5 compl. power down */
271 #define PHY_PM_ENERGY_DETECT 3 /* energy detect */
272 #define PHY_PM_ENERGY_DETECT_PLUS 4 /* energy detect plus */
274 /* Default receive frame limit for Workaround of XMAC Errata */
275 #define SK_DEF_RX_WA_LIM SK_CONSTU64(100)
277 /* values for GILedBlinkCtrl (LED Blink Control) */
278 #define SK_ACT_LED_BLINK (1<<0) /* Active LED blinking */
279 #define SK_DUP_LED_NORMAL (1<<1) /* Duplex LED normal */
280 #define SK_LED_LINK100_ON (1<<2) /* Link 100M LED on */
282 /* Link Partner Status */
283 #define SK_LIPA_UNKNOWN 0 /* Link partner is in unknown state */
284 #define SK_LIPA_MANUAL 1 /* Link partner is in detected manual state */
285 #define SK_LIPA_AUTO 2 /* Link partner is in auto-negotiation state */
287 /* Maximum Restarts before restart is ignored (3Com WA) */
288 #define SK_MAX_LRESTART 3 /* Max. 3 times the link is restarted */
290 /* Max. Auto-neg. timeouts before link detection in sense mode is reset */
291 #define SK_MAX_ANEG_TO 10 /* Max. 10 times the sense mode is reset */
293 /* structures *****************************************************************/
296 * MAC specific functions
298 typedef struct s_GeMacFunc {
299 int (*pFnMacUpdateStats)(SK_AC *pAC, SK_IOC IoC, unsigned int Port);
300 int (*pFnMacStatistic)(SK_AC *pAC, SK_IOC IoC, unsigned int Port,
301 SK_U16 StatAddr, SK_U32 SK_FAR *pVal);
302 int (*pFnMacResetCounter)(SK_AC *pAC, SK_IOC IoC, unsigned int Port);
303 int (*pFnMacOverflow)(SK_AC *pAC, SK_IOC IoC, unsigned int Port,
304 SK_U16 IStatus, SK_U64 SK_FAR *pVal);
310 typedef struct s_GePort {
312 SK_TIMER PWaTimer; /* Workaround Timer */
313 SK_TIMER HalfDupChkTimer;
315 SK_U32 PPrevShorts; /* Previous Short Counter checking */
316 SK_U32 PPrevFcs; /* Previous FCS Error Counter checking */
317 SK_U64 PPrevRx; /* Previous RxOk Counter checking */
318 SK_U64 PRxLim; /* Previous RxOk Counter checking */
319 SK_U64 LastOctets; /* For half duplex hang check */
320 int PLinkResCt; /* Link Restart Counter */
321 int PAutoNegTimeOut;/* Auto-negotiation timeout current value */
322 int PAutoNegTOCt; /* Auto-negotiation Timeout Counter */
323 int PRxQSize; /* Port Rx Queue Size in kB */
324 int PXSQSize; /* Port Synchronous Transmit Queue Size in kB */
325 int PXAQSize; /* Port Asynchronous Transmit Queue Size in kB */
326 SK_U32 PRxQRamStart; /* Receive Queue RAM Buffer Start Address */
327 SK_U32 PRxQRamEnd; /* Receive Queue RAM Buffer End Address */
328 SK_U32 PXsQRamStart; /* Sync Tx Queue RAM Buffer Start Address */
329 SK_U32 PXsQRamEnd; /* Sync Tx Queue RAM Buffer End Address */
330 SK_U32 PXaQRamStart; /* Async Tx Queue RAM Buffer Start Address */
331 SK_U32 PXaQRamEnd; /* Async Tx Queue RAM Buffer End Address */
332 SK_U32 PRxOverCnt; /* Receive Overflow Counter */
333 int PRxQOff; /* Rx Queue Address Offset */
334 int PXsQOff; /* Synchronous Tx Queue Address Offset */
335 int PXaQOff; /* Asynchronous Tx Queue Address Offset */
336 int PhyType; /* PHY used on this port */
337 int PState; /* Port status (reset, stop, init, run) */
338 SK_U16 PhyId1; /* PHY Id1 on this port */
339 SK_U16 PhyAddr; /* MDIO/MDC PHY address */
340 SK_U16 PIsave; /* Saved Interrupt status word */
341 SK_U16 PSsave; /* Saved PHY status word */
342 SK_U16 PGmANegAdv; /* Saved GPhy AutoNegAdvertisment register */
343 SK_BOOL PHWLinkUp; /* The hardware Link is up (wiring) */
344 SK_BOOL PLinkBroken; /* Is Link broken ? */
345 SK_BOOL PCheckPar; /* Do we check for parity errors ? */
346 SK_BOOL HalfDupTimerActive;
347 SK_U8 PLinkCap; /* Link Capabilities */
348 SK_U8 PLinkModeConf; /* Link Mode configured */
349 SK_U8 PLinkMode; /* Link Mode currently used */
350 SK_U8 PLinkModeStatus;/* Link Mode Status */
351 SK_U8 PLinkSpeedCap; /* Link Speed Capabilities(10/100/1000 Mbps) */
352 SK_U8 PLinkSpeed; /* configured Link Speed (10/100/1000 Mbps) */
353 SK_U8 PLinkSpeedUsed; /* current Link Speed (10/100/1000 Mbps) */
354 SK_U8 PFlowCtrlCap; /* Flow Control Capabilities */
355 SK_U8 PFlowCtrlMode; /* Flow Control Mode */
356 SK_U8 PFlowCtrlStatus;/* Flow Control Status */
357 SK_U8 PMSCap; /* Master/Slave Capabilities */
358 SK_U8 PMSMode; /* Master/Slave Mode */
359 SK_U8 PMSStatus; /* Master/Slave Status */
360 SK_BOOL PAutoNegFail; /* Auto-negotiation fail flag */
361 SK_U8 PLipaAutoNeg; /* Auto-negotiation possible with Link Partner */
362 SK_U8 PCableLen; /* Cable Length */
363 SK_U8 PMdiPairLen[4]; /* MDI[0..3] Pair Length */
364 SK_U8 PMdiPairSts[4]; /* MDI[0..3] Pair Diagnostic Status */
365 SK_U8 PPhyPowerState; /* PHY current power state */
366 int PMacColThres; /* MAC Collision Threshold */
367 int PMacJamLen; /* MAC Jam length */
368 int PMacJamIpgVal; /* MAC Jam IPG */
369 int PMacJamIpgData; /* MAC IPG Jam to Data */
370 int PMacIpgData; /* MAC Data IPG */
371 SK_BOOL PMacLimit4; /* reset collision counter and backoff algorithm */
375 * Gigabit Ethernet Initialization Struct
376 * (has to be included in the adapter context)
378 typedef struct s_GeInit {
379 int GIChipId; /* Chip Identification Number */
380 int GIChipRev; /* Chip Revision Number */
381 SK_U8 GIPciHwRev; /* PCI HW Revision Number */
382 SK_BOOL GIGenesis; /* Genesis adapter ? */
383 SK_BOOL GIYukon; /* YUKON-A1/Bx chip */
384 SK_BOOL GIYukonLite; /* YUKON-Lite chip */
385 SK_BOOL GICopperType; /* Copper Type adapter ? */
386 SK_BOOL GIPciSlot64; /* 64-bit PCI Slot */
387 SK_BOOL GIPciClock66; /* 66 MHz PCI Clock */
388 SK_BOOL GIVauxAvail; /* VAUX available (YUKON) */
389 SK_BOOL GIYukon32Bit; /* 32-Bit YUKON adapter */
390 SK_U16 GILedBlinkCtrl; /* LED Blink Control */
391 int GIMacsFound; /* Number of MACs found on this adapter */
392 int GIMacType; /* MAC Type used on this adapter */
393 int GIHstClkFact; /* Host Clock Factor (62.5 / HstClk * 100) */
394 int GIPortUsage; /* Driver Port Usage */
395 int GILevel; /* Initialization Level completed */
396 int GIRamSize; /* The RAM size of the adapter in kB */
397 int GIWolOffs; /* WOL Register Offset (HW-Bug in Rev. A) */
398 SK_U32 GIRamOffs; /* RAM Address Offset for addr calculation */
399 SK_U32 GIPollTimerVal; /* Descr. Poll Timer Init Val (HstClk ticks) */
400 SK_U32 GIValIrqMask; /* Value for Interrupt Mask */
401 SK_U32 GITimeStampCnt; /* Time Stamp High Counter (YUKON only) */
402 SK_GEPORT GP[SK_MAX_MACS];/* Port Dependent Information */
403 SK_GEMACFUNC GIFunc; /* MAC depedent functions */
407 * Error numbers and messages for skxmac2.c and skgeinit.c
409 #define SKERR_HWI_E001 (SK_ERRBASE_HWINIT)
410 #define SKERR_HWI_E001MSG "SkXmClrExactAddr() has got illegal parameters"
411 #define SKERR_HWI_E002 (SKERR_HWI_E001+1)
412 #define SKERR_HWI_E002MSG "SkGeInit(): Level 1 call missing"
413 #define SKERR_HWI_E003 (SKERR_HWI_E002+1)
414 #define SKERR_HWI_E003MSG "SkGeInit() called with illegal init Level"
415 #define SKERR_HWI_E004 (SKERR_HWI_E003+1)
416 #define SKERR_HWI_E004MSG "SkGeInitPort(): Queue Size illegal configured"
417 #define SKERR_HWI_E005 (SKERR_HWI_E004+1)
418 #define SKERR_HWI_E005MSG "SkGeInitPort(): cannot init running ports"
419 #define SKERR_HWI_E006 (SKERR_HWI_E005+1)
420 #define SKERR_HWI_E006MSG "SkGeMacInit(): PState does not match HW state"
421 #define SKERR_HWI_E007 (SKERR_HWI_E006+1)
422 #define SKERR_HWI_E007MSG "SkXmInitDupMd() called with invalid Dup Mode"
423 #define SKERR_HWI_E008 (SKERR_HWI_E007+1)
424 #define SKERR_HWI_E008MSG "SkXmSetRxCmd() called with invalid Mode"
425 #define SKERR_HWI_E009 (SKERR_HWI_E008+1)
426 #define SKERR_HWI_E009MSG "SkGeCfgSync() called although PXSQSize zero"
427 #define SKERR_HWI_E010 (SKERR_HWI_E009+1)
428 #define SKERR_HWI_E010MSG "SkGeCfgSync() called with invalid parameters"
429 #define SKERR_HWI_E011 (SKERR_HWI_E010+1)
430 #define SKERR_HWI_E011MSG "SkGeInitPort(): Receive Queue Size too small"
431 #define SKERR_HWI_E012 (SKERR_HWI_E011+1)
432 #define SKERR_HWI_E012MSG "SkGeInitPort(): invalid Queue Size specified"
433 #define SKERR_HWI_E013 (SKERR_HWI_E012+1)
434 #define SKERR_HWI_E013MSG "SkGeInitPort(): cfg changed for running queue"
435 #define SKERR_HWI_E014 (SKERR_HWI_E013+1)
436 #define SKERR_HWI_E014MSG "SkGeInitPort(): unknown GIPortUsage specified"
437 #define SKERR_HWI_E015 (SKERR_HWI_E014+1)
438 #define SKERR_HWI_E015MSG "Illegal Link mode parameter"
439 #define SKERR_HWI_E016 (SKERR_HWI_E015+1)
440 #define SKERR_HWI_E016MSG "Illegal Flow control mode parameter"
441 #define SKERR_HWI_E017 (SKERR_HWI_E016+1)
442 #define SKERR_HWI_E017MSG "Illegal value specified for GIPollTimerVal"
443 #define SKERR_HWI_E018 (SKERR_HWI_E017+1)
444 #define SKERR_HWI_E018MSG "FATAL: SkGeStopPort() does not terminate (Tx)"
445 #define SKERR_HWI_E019 (SKERR_HWI_E018+1)
446 #define SKERR_HWI_E019MSG "Illegal Speed parameter"
447 #define SKERR_HWI_E020 (SKERR_HWI_E019+1)
448 #define SKERR_HWI_E020MSG "Illegal Master/Slave parameter"
449 #define SKERR_HWI_E021 (SKERR_HWI_E020+1)
450 #define SKERR_HWI_E021MSG "MacUpdateStats(): cannot update statistic counter"
451 #define SKERR_HWI_E022 (SKERR_HWI_E021+1)
452 #define SKERR_HWI_E022MSG "MacStatistic(): illegal statistic base address"
453 #define SKERR_HWI_E023 (SKERR_HWI_E022+1)
454 #define SKERR_HWI_E023MSG "SkGeInitPort(): Transmit Queue Size too small"
455 #define SKERR_HWI_E024 (SKERR_HWI_E023+1)
456 #define SKERR_HWI_E024MSG "FATAL: SkGeStopPort() does not terminate (Rx)"
457 #define SKERR_HWI_E025 (SKERR_HWI_E024+1)
458 #define SKERR_HWI_E025MSG ""
460 /* function prototypes ********************************************************/
465 * public functions in skgeinit.c
467 extern void SkGePollTxD(
473 extern void SkGeYellowLED(
478 extern int SkGeCfgSync(
486 extern void SkGeLoadLnkSyncCnt(
492 extern void SkGeStopPort(
504 extern void SkGeDeInit(
508 extern int SkGeInitPort(
513 extern void SkGeXmitLED(
519 extern int SkGeInitAssignRamToQueues(
525 * public functions in skxmac2.c
527 extern void SkMacRxTxDisable(
532 extern void SkMacSoftRst(
537 extern void SkMacHardRst(
542 extern void SkXmInitMac(
547 extern void SkGmInitMac(
552 extern void SkMacInitPhy(
558 extern void SkMacIrqDisable(
563 extern void SkMacFlushTxFifo(
568 extern void SkMacIrq(
573 extern int SkMacAutoNegDone(
578 extern void SkMacAutoNegLipaPhy(
584 extern int SkMacRxTxEnable(
589 extern void SkMacPromiscMode(
595 extern void SkMacHashing(
601 extern void SkXmPhyRead(
606 SK_U16 SK_FAR *pVal);
608 extern void SkXmPhyWrite(
615 extern void SkGmPhyRead(
620 SK_U16 SK_FAR *pVal);
622 extern void SkGmPhyWrite(
629 extern void SkXmClrExactAddr(
636 extern void SkXmAutoNegLipaXmac(
642 extern int SkXmUpdateStats(
647 extern int SkGmUpdateStats(
652 extern int SkXmMacStatistic(
657 SK_U32 SK_FAR *pVal);
659 extern int SkGmMacStatistic(
664 SK_U32 SK_FAR *pVal);
666 extern int SkXmResetCounter(
671 extern int SkGmResetCounter(
676 extern int SkXmOverflowStatus(
681 SK_U64 SK_FAR *pStatus);
683 extern int SkGmOverflowStatus(
688 SK_U64 SK_FAR *pStatus);
690 extern int SkGmCableDiagStatus(
697 extern void SkGePhyRead(
704 extern void SkGePhyWrite(
711 extern void SkMacSetRxCmd(
716 extern void SkMacCrcGener(
721 extern void SkMacTimeStamp(
726 extern void SkXmSendCont(
733 #else /* SK_KR_PROTO */
736 * public functions in skgeinit.c
738 extern void SkGePollTxD();
739 extern void SkGeYellowLED();
740 extern int SkGeCfgSync();
741 extern void SkGeLoadLnkSyncCnt();
742 extern void SkGeStopPort();
743 extern int SkGeInit();
744 extern void SkGeDeInit();
745 extern int SkGeInitPort();
746 extern void SkGeXmitLED();
747 extern int SkGeInitAssignRamToQueues();
750 * public functions in skxmac2.c
752 extern void SkMacRxTxDisable();
753 extern void SkMacSoftRst();
754 extern void SkMacHardRst();
755 extern void SkMacInitPhy();
756 extern int SkMacRxTxEnable();
757 extern void SkMacPromiscMode();
758 extern void SkMacHashing();
759 extern void SkMacIrqDisable();
760 extern void SkMacFlushTxFifo();
761 extern void SkMacIrq();
762 extern int SkMacAutoNegDone();
763 extern void SkMacAutoNegLipaPhy();
764 extern void SkXmInitMac();
765 extern void SkXmPhyRead();
766 extern void SkXmPhyWrite();
767 extern void SkGmInitMac();
768 extern void SkGmPhyRead();
769 extern void SkGmPhyWrite();
770 extern void SkXmClrExactAddr();
771 extern void SkXmAutoNegLipaXmac();
772 extern int SkXmUpdateStats();
773 extern int SkGmUpdateStats();
774 extern int SkXmMacStatistic();
775 extern int SkGmMacStatistic();
776 extern int SkXmResetCounter();
777 extern int SkGmResetCounter();
778 extern int SkXmOverflowStatus();
779 extern int SkGmOverflowStatus();
780 extern int SkGmCableDiagStatus();
783 extern void SkGePhyRead();
784 extern void SkGePhyWrite();
785 extern void SkMacSetRxCmd();
786 extern void SkMacCrcGener();
787 extern void SkMacTimeStamp();
788 extern void SkXmSendCont();
791 #endif /* SK_KR_PROTO */
795 #endif /* __cplusplus */
797 #endif /* __INC_SKGEINIT_H_ */