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#ifndef __CONFIG_H
39#define __CONFIG_H
40
41#define CONFIG_MIPS32
42#define CPU_CLOCK_RATE 324000000
43#define CONFIG_SYS_MIPS_TIMER_FREQ (CPU_CLOCK_RATE / 2)
44#define CONFIG_SYS_HZ 1000
45
46#define CONFIG_SKIP_LOWLEVEL_INIT
47
48#define CONFIG_SYS_MONITOR_BASE TEXT_BASE
49#define CONFIG_SYS_MONITOR_LEN (256 << 10)
50#define CONFIG_STACKSIZE (256 << 10)
51#define CONFIG_SYS_MALLOC_LEN (1 << 20)
52#define CONFIG_SYS_BOOTPARAMS_LEN (128 << 10)
53#define CONFIG_SYS_INIT_SP_OFFSET 0x400000
54
55#if !defined(CONFIG_VCT_NAND) && !defined(CONFIG_VCT_ONENAND)
56#define CONFIG_VCT_NOR
57#else
58#define CONFIG_SYS_NO_FLASH
59#endif
60
61
62
63
64#ifdef CONFIG_VCT_PLATINUMAVC
65#define UART_1_BASE 0xBDC30000
66#else
67#define UART_1_BASE 0xBF89C000
68#endif
69
70#define CONFIG_SYS_NS16550_SERIAL
71#define CONFIG_SYS_NS16550
72#define CONFIG_SYS_NS16550_REG_SIZE -4
73#define CONFIG_SYS_NS16550_COM1 UART_1_BASE
74#define CONFIG_CONS_INDEX 1
75#define CONFIG_SYS_NS16550_CLK 921600
76#define CONFIG_BAUDRATE 115200
77#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
78
79
80
81
82#define CONFIG_SYS_SDRAM_BASE 0x80000000
83#define CONFIG_SYS_MBYTES_SDRAM 128
84#define CONFIG_SYS_MEMTEST_START 0x80200000
85#define CONFIG_SYS_MEMTEST_END 0x80400000
86#define CONFIG_SYS_LOAD_ADDR 0x80400000
87
88#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)
89
90
91
92#define CONFIG_DRIVER_SMC911X
93#define CONFIG_DRIVER_SMC911X_BASE 0x00000000
94#define CONFIG_DRIVER_SMC911X_32_BIT
95#define CONFIG_NET_RETRY_COUNT 20
96#endif
97
98
99
100
101#include <config_cmd_default.h>
102
103#define CONFIG_CMD_DHCP
104#define CONFIG_CMD_ELF
105#define CONFIG_CMD_EEPROM
106#define CONFIG_CMD_I2C
107
108
109
110
111#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)
112#define CONFIG_CMD_PING
113#define CONFIG_CMD_SNTP
114#else
115#undef CONFIG_CMD_NET
116#endif
117
118
119
120
121#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)
122#define CONFIG_CMD_USB
123#define CONFIG_CMD_FAT
124#endif
125
126#if defined(CONFIG_CMD_USB)
127#define CONFIG_USB_STORAGE
128#define CONFIG_DOS_PARTITION
129#define CONFIG_ISO_PARTITION
130
131#define CONFIG_SUPPORT_VFAT
132
133
134
135
136#define CONFIG_USB_EHCI
137#define CONFIG_USB_EHCI_VCT
138#define CONFIG_EHCI_DCACHE
139#define CONFIG_EHCI_MMIO_BIG_ENDIAN
140#define CONFIG_EHCI_DESC_BIG_ENDIAN
141#define CONFIG_EHCI_IS_TDI
142#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
143#endif
144
145#if !defined(CONFIG_VCT_NOR)
146#undef CONFIG_CMD_FLASH
147#undef CONFIG_CMD_IMLS
148#endif
149
150#if defined(CONFIG_VCT_NAND)
151#define CONFIG_CMD_NAND
152#endif
153
154#if defined(CONFIG_VCT_ONENAND)
155#define CONFIG_CMD_ONENAND
156#endif
157
158
159
160
161#define CONFIG_BOOTP_BOOTFILESIZE
162#define CONFIG_BOOTP_BOOTPATH
163#define CONFIG_BOOTP_GATEWAY
164#define CONFIG_BOOTP_HOSTNAME
165#define CONFIG_BOOTP_SUBNETMASK
166
167
168
169
170#define CONFIG_SYS_LONGHELP
171#define CONFIG_SYS_PROMPT "VCT# "
172#define CONFIG_SYS_CBSIZE 512
173#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
174 sizeof(CONFIG_SYS_PROMPT) + 16)
175#define CONFIG_SYS_MAXARGS 16
176#define CONFIG_TIMESTAMP
177#define CONFIG_CMDLINE_EDITING
178#define CONFIG_SYS_CONSOLE_INFO_QUIET
179
180
181
182
183#if defined(CONFIG_VCT_NOR)
184#define CONFIG_ENV_IS_IN_FLASH
185#define CONFIG_FLASH_NOT_MEM_MAPPED
186
187
188
189
190
191#define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
192
193
194
195
196
197
198
199#define CONFIG_FLASH_BASE 0xb0000000
200#define CONFIG_FLASH_END 0xbfffffff
201
202
203
204
205#define CONFIG_SYS_FLASH_CFI
206#define CONFIG_FLASH_CFI_DRIVER
207#define CONFIG_SYS_FLASH_CFI_AMD_RESET 1
208#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
209
210#define CONFIG_SYS_FLASH_BASE 0xb0000000
211#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
212#define CONFIG_SYS_MAX_FLASH_BANKS 1
213#define CONFIG_SYS_MAX_FLASH_SECT 512
214
215#define CONFIG_SYS_FLASH_ERASE_TOUT 120000
216#define CONFIG_SYS_FLASH_WRITE_TOUT 500
217
218#ifdef CONFIG_ENV_IS_IN_FLASH
219#define CONFIG_ENV_SECT_SIZE 0x10000
220#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN)
221#define CONFIG_ENV_SIZE 0x4000
222
223
224#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
225#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
226#endif
227#endif
228
229#if defined(CONFIG_VCT_ONENAND)
230#define CONFIG_USE_ONENAND_BOARD_INIT
231#define CONFIG_ENV_IS_IN_ONENAND
232#define CONFIG_SYS_ONENAND_BASE 0x00000000
233#define CONFIG_SYS_FLASH_BASE 0x00000000
234#define CONFIG_ENV_ADDR (128 << 10)
235#define CONFIG_ENV_SIZE (128 << 10)
236#endif
237
238
239
240
241#define CONFIG_SYS_DCACHE_SIZE 16384
242#define CONFIG_SYS_ICACHE_SIZE 16384
243#define CONFIG_SYS_CACHELINE_SIZE 32
244
245
246
247
248#undef CONFIG_HARD_I2C
249#define CONFIG_SOFT_I2C
250
251#define CONFIG_SYS_I2C_SPEED 83000
252#define CONFIG_SYS_I2C_SLAVE 0x7f
253
254
255
256
257#define CONFIG_SYS_GPIO_I2C_SCL 11
258#define CONFIG_SYS_GPIO_I2C_SDA 10
259
260#ifndef __ASSEMBLY__
261int vct_gpio_dir(int pin, int dir);
262void vct_gpio_set(int pin, int val);
263int vct_gpio_get(int pin);
264#endif
265
266#define I2C_INIT vct_gpio_dir(CONFIG_SYS_GPIO_I2C_SCL, 1)
267#define I2C_ACTIVE vct_gpio_dir(CONFIG_SYS_GPIO_I2C_SDA, 1)
268#define I2C_TRISTATE vct_gpio_dir(CONFIG_SYS_GPIO_I2C_SDA, 0)
269#define I2C_READ vct_gpio_get(CONFIG_SYS_GPIO_I2C_SDA)
270#define I2C_SDA(bit) vct_gpio_set(CONFIG_SYS_GPIO_I2C_SDA, bit)
271#define I2C_SCL(bit) vct_gpio_set(CONFIG_SYS_GPIO_I2C_SCL, bit)
272#define I2C_DELAY udelay(5)
273
274#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
275
276#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
277#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5
278
279
280#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
281
282#define CONFIG_BOOTCOMMAND "run test3"
283#define CONFIG_BOOTDELAY 5
284
285
286
287
288#define CONFIG_SYS_64BIT_VSPRINTF 1
289#define CONFIG_SYS_64BIT_STRTOUL 1
290
291
292
293
294#if defined(CONFIG_VCT_ONENAND)
295#define CONFIG_SYS_USE_UBI
296#define CONFIG_CMD_JFFS2
297#define CONFIG_CMD_UBI
298#define CONFIG_RBTREE
299#define CONFIG_MTD_PARTITIONS
300#define CONFIG_CMD_MTDPARTS
301
302#define MTDIDS_DEFAULT "onenand0=onenand"
303#define MTDPARTS_DEFAULT "mtdparts=onenand:128k(u-boot)," \
304 "128k(env)," \
305 "20m(kernel)," \
306 "-(rootfs)"
307#endif
308
309
310
311
312
313
314#if defined(CONFIG_VCT_SMALL_IMAGE)
315#undef CONFIG_CMD_ASKENV
316#undef CONFIG_CMD_BDI
317#undef CONFIG_CMD_BEDBUG
318#undef CONFIG_CMD_CACHE
319#undef CONFIG_CMD_CONSOLE
320#undef CONFIG_CMD_CRC32
321#undef CONFIG_CMD_DHCP
322#undef CONFIG_CMD_EEPROM
323#undef CONFIG_CMD_EEPROM
324#undef CONFIG_CMD_ELF
325#undef CONFIG_CMD_FAT
326#undef CONFIG_CMD_I2C
327#undef CONFIG_CMD_I2C
328#undef CONFIG_CMD_IRQ
329#undef CONFIG_CMD_ITEST
330#undef CONFIG_CMD_LOADB
331#undef CONFIG_CMD_LOADS
332#undef CONFIG_CMD_LOADY
333#undef CONFIG_CMD_MII
334#undef CONFIG_CMD_MISC
335#undef CONFIG_CMD_NET
336#undef CONFIG_CMD_PING
337#undef CONFIG_CMD_REGINFO
338#undef CONFIG_CMD_SNTP
339#undef CONFIG_CMD_SOURCE
340#undef CONFIG_CMD_STRINGS
341#undef CONFIG_CMD_TERMINAL
342#undef CONFIG_CMD_USB
343
344#undef CONFIG_DRIVER_SMC911X
345#undef CONFIG_SOFT_I2C
346#undef CONFIG_SOURCE
347#undef CONFIG_SYS_LONGHELP
348#undef CONFIG_TIMESTAMP
349#endif
350
351#endif
352