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#ifndef __NETSTAL_COMMON_H
27#define __NETSTAL_COMMON_H
28
29#define CONFIG_SYS_SDRAM_BASE 0x00000000
30#define CONFIG_SYS_MONITOR_BASE TEXT_BASE
31#define CONFIG_SYS_MONITOR_LEN (320 * 1024)
32#define CONFIG_SYS_MALLOC_LEN (256 * 1024)
33
34
35
36
37#define CONFIG_SERIAL_MULTI
38#define CONFIG_SYS_BAUDRATE_TABLE \
39 {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400}
40
41
42
43
44#define CONFIG_HARD_I2C 1
45#define CONFIG_PPC4XX_I2C
46#define CONFIG_SYS_I2C_SPEED 400000
47#define CONFIG_SYS_I2C_SLAVE 0x7F
48
49
50#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
51#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
52
53
54#define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW 0x07
55#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4
56#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
57#define CONFIG_SYS_EEPROM_PAGE_WRITE_ENABLE
58
59
60
61
62#define CONFIG_PPC4xx_EMAC
63#define CONFIG_MII
64#define CONFIG_PHY_ADDR 1
65#define CONFIG_NET_MULTI 1
66#if defined(CONFIG_440)
67#define CONFIG_NETCONSOLE
68#define CONFIG_SYS_RX_ETH_BUFFER 32
69#else
70#define CONFIG_SYS_RX_ETH_BUFFER 16
71#endif
72#define CONFIG_HAS_ETH0
73
74
75
76
77#include <config_cmd_default.h>
78
79#define CONFIG_CMD_ASKENV
80#if defined(CONFIG_440)
81#define CONFIG_CMD_CACHE
82#endif
83#define CONFIG_CMD_DHCP
84#define CONFIG_CMD_DIAG
85#define CONFIG_CMD_EEPROM
86#define CONFIG_CMD_ELF
87#define CONFIG_CMD_I2C
88#define CONFIG_CMD_IRQ
89#define CONFIG_CMD_MII
90#define CONFIG_CMD_NET
91#define CONFIG_CMD_NFS
92#define CONFIG_CMD_PING
93#define CONFIG_CMD_REGINFO
94#define CONFIG_BOOT_RETRY_TIME 30
95#define CONFIG_RESET_TO_RETRY
96
97
98
99#define CONFIG_BOOTDELAY 1
100#define CONFIG_SYS_LONGHELP
101#define CONFIG_SYS_PROMPT "=> "
102#if defined(CONFIG_CMD_KGDB)
103#define CONFIG_SYS_CBSIZE 1024
104#else
105#define CONFIG_SYS_CBSIZE 256
106#endif
107#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
108#define CONFIG_SYS_MAXARGS 16
109#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
110
111#define CONFIG_SYS_MEMTEST_START 0x0400000
112#define CONFIG_SYS_MEMTEST_END 0x0C00000
113
114#define CONFIG_SYS_LOAD_ADDR 0x100000
115#define CONFIG_SYS_EXTBDINFO
116
117#define CONFIG_SYS_HZ 1000
118
119#define CONFIG_CMDLINE_EDITING
120#define CONFIG_AUTO_COMPLETE
121#define CONFIG_LOOPW
122#define CONFIG_MX_CYCLIC
123#define CONFIG_ZERO_BOOTDELAY_CHECK
124#define CONFIG_VERSION_VARIABLE
125#define CONFIG_SYS_CONSOLE_INFO_QUIET
126
127#define CONFIG_SYS_HUSH_PARSER
128#ifdef CONFIG_SYS_HUSH_PARSER
129#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
130#endif
131
132#define CONFIG_LOADS_ECHO
133#define CONFIG_SYS_LOADS_BAUD_CHANGE
134
135
136
137
138#define CONFIG_BOOTP_BOOTFILESIZE
139#define CONFIG_BOOTP_BOOTPATH
140#define CONFIG_BOOTP_GATEWAY
141#define CONFIG_BOOTP_HOSTNAME
142#define CONFIG_BOOTP_SUBNETMASK
143
144
145
146
147
148
149#define CONFIG_SYS_BOOTMAPSZ (8 << 20)
150
151
152
153
154#if defined(CONFIG_CMD_KGDB)
155#define CONFIG_KGDB_BAUDRATE 230400
156#define CONFIG_KGDB_SER_INDEX 2
157#endif
158
159
160
161
162#define CONFIG_OF_LIBFDT
163#define CONFIG_OF_BOARD_SETUP
164
165
166
167
168#define CONFIG_PREBOOT "echo;" \
169 "echo Type \"run net_nfs\" to mount root filesystem over NFS;" \
170 "echo"
171#define CONFIG_BOOTCOMMAND "run vx"
172
173
174
175
176#if !defined(CONFIG_USE_TTY)
177#define CONFIG_USE_TTY ttyS0
178#endif
179
180
181
182
183#if defined(CONFIG_440EP) || defined(CONFIG_440EPX) || \
184 defined(CONFIG_460EX) || defined(CONFIG_460GT)
185#define CONFIG_NETSTAL_DEF_ENV_ROOTPATH "rootpath=/opt/eldk/ppc_4xxFP\0"
186#else
187#define CONFIG_NETSTAL_DEF_ENV_ROOTPATH "rootpath=/opt/eldk/ppc_4xx\0"
188#endif
189
190
191
192
193
194#if !defined(CONFIG_ADDMISC)
195#define CONFIG_ADDMISC "addmisc=setenv bootargs ${bootargs}\0"
196#endif
197
198#define xstr(s) str(s)
199#define str(s) #s
200
201
202#define CONFIG_SERVERIP 172.25.1.1
203#define CONFIG_ETHADDR 00:60:13:00:00:00
204#define CONFIG_OVERWRITE_ETHADDR_ONCE
205
206#define CONFIG_SYS_TFTP_LOADADDR 0x01000000
207#define CONFIG_SYS_VXWORKS_ADD_PARAMS "u=dpu pw=netstal8752"
208#define CONFIG_SYS_VXWORKS_SERVERNAME "c"
209
210
211
212#define CONFIG_NETSTAL_DEF_ENV \
213 "netdev=eth0\0" \
214 "nfsargs=setenv bootargs root=/dev/nfs rw " \
215 "nfsroot=${serverip}:${rootpath}\0" \
216 "ramargs=setenv bootargs root=/dev/ram rw\0" \
217 "addip=setenv bootargs ${bootargs} " \
218 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
219 ":${hostname}:${netdev}:off panic=1\0" \
220 "addtty=setenv bootargs ${bootargs}" \
221 " console=" xstr(CONFIG_USE_TTY) ",${baudrate}\0" \
222 CONFIG_ADDMISC \
223 "initrd_high=30000000\0" \
224 "kernel_addr_r=400000\0" \
225 "fdt_addr_r=800000\0" \
226 "hostname=" xstr(CONFIG_HOSTNAME) "\0" \
227 "bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0" \
228 "uload=tftp " xstr(CONFIG_SYS_TFTP_LOADADDR) " " \
229 xstr(CONFIG_HOSTNAME) "/u-boot.bin\0" \
230 "vx_rom=" xstr(CONFIG_HOSTNAME) "/" \
231 xstr(CONFIG_HOSTNAME) "_vx_rom\0" \
232 "update=protect off " xstr(CONFIG_SYS_MONITOR_BASE) " FFFFFFFF;"\
233 "era " xstr(CONFIG_SYS_MONITOR_BASE) " FFFFFFFF;" \
234 "cp.b ${fileaddr} "xstr(CONFIG_SYS_MONITOR_BASE) \
235 " ${filesize}; setenv filesize\0" \
236 "upd=run uload update\0" \
237 "vx=setenv bootfile ${vx_rom}; tftp " \
238 xstr(CONFIG_SYS_TFTP_LOADADDR) "; bootvx\0" \
239 CONFIG_NETSTAL_DEF_ENV_ROOTPATH
240
241
242
243
244
245#define CONFIG_NETSTAL_DEF_ENV_POWERPC \
246 "flash_self=run ramargs addip addtty addmisc;" \
247 "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \
248 "flash_nfs=run nfsargs addip addtty addmisc;" \
249 "bootm ${kernel_addr} - ${fdt_addr}\0" \
250 "net_nfs=tftp ${kernel_addr_r} ${bootfile}; " \
251 "tftp ${fdt_addr_r} ${fdt_file}; " \
252 "run nfsargs addip addtty addmisc;" \
253 "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \
254 "fdt_file=" xstr(CONFIG_HOSTNAME) "/" xstr(CONFIG_HOSTNAME) ".dtb\0"
255
256#endif
257