blob: 0a03654d5da730e19773bfc132bd65bd05972a9c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
/*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef SWFUNC_H
#define SWFUNC_H
//---------------------------------------------------------
// Program information
//---------------------------------------------------------
#define VER_NAME "Ver 0.34 version @2014/03/25 0932"
/* == Step 1: ====== Support OS system =================== */
// LinuxAP
// #define Windows
#define SLT_UBOOT
//#define SLT_DOS
/* == Step 2:======== Support interface ================== */
/* Choose One */
//#define SPI_BUS
//#define USE_LPC
//#define USE_P2A // PCI or PCIe bus to AHB bus
/* == Step 3:========== Support Chip ================== */
//#define AST1010_CHIP
//#define AST3200_IOMAP
//#define FPGA
#ifdef AST1010_CHIP
#ifdef SLT_UBOOT
#define AST1010_IOMAP 1
#endif
#ifdef SLT_DOS
#define AST1010_IOMAP 2
// AST1010 only has LPC interface
#undef USE_P2A
#undef SPI_BUS
#define USE_LPC
#endif
#endif
/* == Step 4:========== Select PHY ================== */
//#define SUPPORT_PHY_LAN9303 // Initial PHY via I2C bus
#define LAN9303_I2C_BUSNUM 6 // 1-based
#define LAN9303_I2C_ADR 0x14
/* ====================== Program ======================== */
// The "PHY_NCSI" option is only for DOS compiler
#if defined (PHY_NCSI)
#ifdef SLT_UBOOT
#error Wrong setting......
#endif
#endif
#if defined (PHY_NCSI)
#ifdef SUPPORT_PHY_LAN9303
#error Wrong setting (Can't support LAN9303)......
#endif
#endif
/* ================= Check setting ===================== */
#ifdef SLT_UBOOT
#ifdef SLT_DOS
#error Can NOT support two OS
#endif
#endif
#ifdef SLT_DOS
#ifdef SLT_UBOOT
#error Can NOT support two OS
#endif
#endif
#ifdef USE_P2A
#ifdef SLT_UBOOT
#error Can NOT be set PCI bus in Uboot
#endif
#endif
#ifdef USE_LPC
#ifdef SLT_UBOOT
#error Can NOT be set LPC bus in Uboot
#endif
#endif
#ifdef SPI_BUS
#ifdef SLT_UBOOT
#error Can NOT be set SPI bus in Uboot
#endif
#endif
/* ======================== Program flow control ======================== */
#define RUN_STEP 5
// 0: read_scu
// 1: parameter setup
// 2: init_scu1,
// 3: init_scu_macrst
// 4: Data Initial
// 5: ALL
/* ====================== Switch print debug message ====================== */
#define DbgPrn_Enable_Debug_delay 0
//#define DbgPrn_FuncHeader 0 //1
#define DbgPrn_ErrFlg 0
#define DbgPrn_BufAdr 0 //1
#define DbgPrn_Bufdat 0
#define DbgPrn_BufdatDetail 0
#define DbgPrn_PHYRW 0
#define DbgPrn_PHYInit 0
#define DbgPrn_PHYName 0
#define DbgPrn_DumpMACCnt 0
#define DbgPrn_Info 0 //1
#define DbgPrn_FRAME_LEN 0
/* ============ Enable or Disable Check item of the descriptor ============ */
#define CheckRxOwn
#define CheckRxErr
//#define CheckOddNibble
#define CheckCRC
#define CheckRxFIFOFull
#define CheckRxLen
//#define CheckDataEveryTime
//#define CheckRxbufUNAVA
#define CheckRPktLost
//#define CheckNPTxbufUNAVA
#define CheckTPktLost
#define CheckRxBuf
#endif // SWFUNC_H
|