]>
Commit | Line | Data |
---|---|---|
1e8f4e78 | 1 | /* |
b11f53f3 | 2 | * (C) Copyright 2008-2011 |
1e8f4e78 HS |
3 | * Heiko Schocher, DENX Software Engineering, hs@denx.de. |
4 | * | |
5 | * See file CREDITS for list of people who contributed to this | |
6 | * project. | |
7 | * | |
8 | * This program is free software; you can redistribute it and/or | |
9 | * modify it under the terms of the GNU General Public License as | |
10 | * published by the Free Software Foundation; either version 2 of | |
11 | * the License, or (at your option) any later version. | |
12 | * | |
13 | * This program is distributed in the hope that it will be useful, | |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | * GNU General Public License for more details. | |
17 | * | |
18 | * You should have received a copy of the GNU General Public License | |
19 | * along with this program; if not, write to the Free Software | |
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | * MA 02111-1307 USA | |
22 | */ | |
23 | ||
24 | #ifndef __CONFIG_KEYMILE_H | |
25 | #define __CONFIG_KEYMILE_H | |
26 | ||
27 | /* Do boardspecific init for all boards */ | |
b11f53f3 | 28 | #define CONFIG_BOARD_EARLY_INIT_R |
1e8f4e78 | 29 | |
31d80c77 PW |
30 | /* |
31 | * By default kwbimage.cfg from board specific folder is used | |
32 | * If for some board, different configuration file need to be used, | |
33 | * CONFIG_SYS_KWD_CONFIG should be defined in board specific header file | |
34 | */ | |
35 | #ifndef CONFIG_SYS_KWD_CONFIG | |
844f07d8 | 36 | #define CONFIG_SYS_KWD_CONFIG $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage.cfg |
31d80c77 PW |
37 | #endif /* CONFIG_SYS_KWD_CONFIG */ |
38 | ||
844f07d8 | 39 | /* |
31d80c77 PW |
40 | * CONFIG_SYS_TEXT_BASE can be defined in board specific header file, if needed |
41 | */ | |
42 | #ifndef CONFIG_SYS_TEXT_BASE | |
43 | #define CONFIG_SYS_TEXT_BASE 0x00400000 | |
44 | #endif /* CONFIG_SYS_TEXT_BASE */ | |
45 | ||
1e8f4e78 HS |
46 | /* |
47 | * Command line configuration. | |
48 | */ | |
49 | #include <config_cmd_default.h> | |
50 | ||
51 | #define CONFIG_CMD_ASKENV | |
52 | #define CONFIG_CMD_DHCP | |
53 | #define CONFIG_CMD_ECHO | |
54 | #define CONFIG_CMD_IMMAP | |
55 | #define CONFIG_CMD_MII | |
56 | #define CONFIG_CMD_PING | |
1e8f4e78 HS |
57 | #define CONFIG_CMD_EEPROM |
58 | #define CONFIG_CMD_I2C | |
364123db | 59 | #define CONFIG_CMD_JFFS2 |
dc71b248 | 60 | #define CONFIG_CMD_MTDPARTS |
f41ee960 | 61 | #define CONFIG_CMD_SETEXPR |
1e8f4e78 | 62 | |
b11f53f3 | 63 | #undef CONFIG_WATCHDOG /* disable platform specific watchdog */ |
1e8f4e78 | 64 | |
f41ee960 | 65 | #define CONFIG_BOOTDELAY 2 /* autoboot after 2 seconds */ |
b11f53f3 | 66 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs */ |
1e8f4e78 HS |
67 | |
68 | /* | |
69 | * Miscellaneous configurable options | |
70 | */ | |
71 | #define CONFIG_SYS_HUSH_PARSER | |
72 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | |
b11f53f3 HS |
73 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
74 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | |
1e8f4e78 | 75 | #if defined(CONFIG_CMD_KGDB) |
b11f53f3 | 76 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
1e8f4e78 | 77 | #else |
f41ee960 | 78 | #define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ |
1e8f4e78 | 79 | #endif |
b11f53f3 | 80 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) |
f41ee960 | 81 | #define CONFIG_SYS_MAXARGS 32 /* max number of command args */ |
b11f53f3 HS |
82 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
83 | #define CONFIG_CMDLINE_EDITING | |
84 | #define CONFIG_AUTO_COMPLETE | |
1e8f4e78 | 85 | |
b11f53f3 | 86 | #define CONFIG_HUSH_INIT_VAR |
1e8f4e78 HS |
87 | |
88 | #define CONFIG_SYS_ALT_MEMTEST /* memory test, takes time */ | |
b11f53f3 HS |
89 | #define CONFIG_SYS_MEMTEST_START 0x00100000 |
90 | #define CONFIG_SYS_MEMTEST_END 0x00f00000 /* 1 ... 15 MB in DRAM */ | |
1e8f4e78 | 91 | |
b11f53f3 | 92 | #define CONFIG_SYS_LOAD_ADDR 0x100000 |
1e8f4e78 | 93 | |
b11f53f3 | 94 | #define CONFIG_SYS_HZ 1000 /* decr. freq: 1 ms ticks */ |
1e8f4e78 | 95 | |
b11f53f3 | 96 | #define CONFIG_BAUDRATE 115200 |
1e8f4e78 HS |
97 | #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 } |
98 | ||
b11f53f3 HS |
99 | #define CONFIG_LOADS_ECHO |
100 | #define CONFIG_SYS_LOADS_BAUD_CHANGE | |
beeb2589 | 101 | #define CONFIG_SYS_BOARD_DRAM_INIT /* Used board specific dram_init */ |
1e8f4e78 HS |
102 | |
103 | /* | |
104 | * How to get access to the slot ID. Put this here to make it easy | |
105 | * to modify in a centralized location. This is used in the HDLC | |
106 | * driver to set the MAC. | |
107 | */ | |
b11f53f3 | 108 | #define CONFIG_CHECK_ETHERNET_PRESENT |
1e8f4e78 HS |
109 | #define CONFIG_SYS_SLOT_ID_BASE CONFIG_SYS_PIGGY_BASE |
110 | #define CONFIG_SYS_SLOT_ID_OFF (0x07) /* register offset */ | |
111 | #define CONFIG_SYS_SLOT_ID_MASK (0x3f) /* mask for slot ID bits */ | |
112 | ||
b11f53f3 | 113 | #define CONFIG_I2C_MULTI_BUS |
dc71b248 | 114 | #define CONFIG_SYS_MAX_I2C_BUS 1 |
b11f53f3 HS |
115 | #define CONFIG_SYS_I2C_INIT_BOARD |
116 | #define CONFIG_I2C_MUX | |
364123db HS |
117 | |
118 | /* EEprom support */ | |
b11f53f3 | 119 | #define CONFIG_SYS_I2C_MULTI_EEPROMS |
364123db | 120 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_ENABLE |
b11f53f3 HS |
121 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 |
122 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 | |
364123db HS |
123 | |
124 | /* Support the IVM EEprom */ | |
125 | #define CONFIG_SYS_IVM_EEPROM_ADR 0x50 | |
126 | #define CONFIG_SYS_IVM_EEPROM_MAX_LEN 0x400 | |
127 | #define CONFIG_SYS_IVM_EEPROM_PAGE_LEN 0x100 | |
128 | ||
b11f53f3 | 129 | #define CONFIG_SYS_FLASH_PROTECTION |
364123db | 130 | |
1e8f4e78 HS |
131 | /* |
132 | * BOOTP options | |
133 | */ | |
134 | #define CONFIG_BOOTP_BOOTFILESIZE | |
135 | #define CONFIG_BOOTP_BOOTPATH | |
136 | #define CONFIG_BOOTP_GATEWAY | |
137 | #define CONFIG_BOOTP_HOSTNAME | |
138 | ||
b11f53f3 | 139 | #define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024) |
dc71b248 | 140 | |
dc71b248 HS |
141 | /* UBI Support for all Keymile boards */ |
142 | #define CONFIG_CMD_UBI | |
143 | #define CONFIG_RBTREE | |
144 | #define CONFIG_MTD_PARTITIONS | |
145 | #define CONFIG_FLASH_CFI_MTD | |
146 | #define CONFIG_MTD_DEVICE | |
147 | #define CONFIG_MTD_CONCAT | |
148 | ||
364123db HS |
149 | /* define this to use the keymile's io muxing feature */ |
150 | /*#define CONFIG_IO_MUXING */ | |
151 | ||
152 | #ifdef CONFIG_IO_MUXING | |
153 | #define CONFIG_KM_DEF_ENV_IOMUX \ | |
48690d80 HS |
154 | "nc=setenv ethact HDLC \0" \ |
155 | "nce=setenv ethact SCC \0" \ | |
364123db HS |
156 | "stderr=serial,nc \0" \ |
157 | "stdin=serial,nc \0" \ | |
158 | "stdout=serial,nc \0" \ | |
159 | "tftpsrcp=69 \0" \ | |
160 | "tftpdstp=69 \0" | |
161 | #else | |
162 | #define CONFIG_KM_DEF_ENV_IOMUX \ | |
163 | "stderr=serial \0" \ | |
164 | "stdin=serial \0" \ | |
165 | "stdout=serial \0" | |
166 | #endif | |
167 | ||
168 | #ifndef CONFIG_KM_DEF_ENV_PRIVATE | |
169 | #define CONFIG_KM_DEF_ENV_PRIVATE \ | |
170 | "kmprivate=empty\0" | |
171 | #endif | |
172 | ||
173 | #define xstr(s) str(s) | |
174 | #define str(s) #s | |
175 | ||
176 | #ifndef CONFIG_KM_DEF_ENV | |
177 | #define CONFIG_KM_DEF_ENV \ | |
178 | "netdev=eth0\0" \ | |
179 | "u-boot_addr_r=100000\0" \ | |
180 | "kernel_addr_r=200000\0" \ | |
181 | "fdt_addr_r=600000\0" \ | |
182 | "ram_ws=800000 \0" \ | |
3202d331 | 183 | "script_ws=780000 \0" \ |
364123db HS |
184 | "fdt_file=" xstr(CONFIG_HOSTNAME) "/" \ |
185 | xstr(CONFIG_HOSTNAME) ".dtb\0" \ | |
186 | "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin \0" \ | |
187 | "kernel_file=" xstr(CONFIG_HOSTNAME) "/uImage \0" \ | |
188 | "load=tftp ${u-boot_addr_r} ${u-boot}\0" \ | |
189 | "update=protect off " xstr(BOOTFLASH_START) " +${filesize};" \ | |
190 | "erase " xstr(BOOTFLASH_START) " +${filesize};" \ | |
191 | "cp.b ${u-boot_addr_r} " xstr(BOOTFLASH_START) \ | |
192 | " ${filesize};" \ | |
193 | "protect on " xstr(BOOTFLASH_START) " +${filesize}\0" \ | |
194 | "load_fdt=tftp ${fdt_addr_r} ${fdt_file}; " \ | |
195 | "setenv actual_fdt_addr ${fdt_addr_r} \0" \ | |
196 | "load_kernel=tftp ${kernel_addr_r} ${kernel_file}; " \ | |
197 | "setenv actual_kernel_addr ${kernel_addr_r} \0" \ | |
198 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ | |
199 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ | |
200 | "nfsroot=${serverip}:${rootpath}\0" \ | |
201 | "mtdargs=setenv bootargs root=${actual_rootfs} rw " \ | |
202 | "rootfstype=jffs2 \0" \ | |
203 | "altmtdargs=setenv bootargs root=${backup_rootfs} rw " \ | |
204 | "rootfstype=jffs2 \0" \ | |
205 | "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ | |
206 | "addip=setenv bootargs ${bootargs} " \ | |
207 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ | |
208 | ":${hostname}:${netdev}:off panic=1\0" \ | |
209 | "addboardid=setenv bootargs ${bootargs} " \ | |
210 | "hwKey=${IVM_HWKey} boardId=0x${IVM_BoardId} \0" \ | |
211 | "addpram=setenv bootargs ${bootargs} " \ | |
212 | "mem=${mem} pram=${pram}\0" \ | |
213 | "pram=" xstr(CONFIG_PRAM) "k\0" \ | |
214 | "net_nfs=tftp ${kernel_addr_r} ${kernel_file}; " \ | |
215 | "tftp ${fdt_addr_r} ${fdt_file}; " \ | |
216 | "run nfsargs addip addcon addboardid addpram;" \ | |
217 | "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ | |
218 | "net_self=tftp ${kernel_addr_r} ${kernel_file}; " \ | |
219 | "tftp ${fdt_addr_r} ${fdt_file}; " \ | |
220 | "tftp ${ramdisk_addr} ${ramdisk_file}; " \ | |
221 | "run ramargs addip addboardid addpram; " \ | |
222 | "bootm ${kernel_addr_r} ${ramdisk_addr} ${fdt_addr_r}\0"\ | |
223 | "flash_nfs=run nfsargs addip addcon;" \ | |
224 | "bootm ${kernel_addr} - ${fdt_addr}\0" \ | |
225 | "flash_self=run ramargs addip addcon addboardid addpram;" \ | |
226 | "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ | |
227 | "bootcmd=run mtdargs addip addcon addboardid addpram; " \ | |
228 | "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \0" \ | |
229 | "altbootcmd=run altmtdargs addip addcon addboardid addpram; " \ | |
230 | "bootm ${backup_kernel_addr} - ${backup_fdt_addr} \0" \ | |
231 | "actual0=setenv actual_bank 0; setenv actual_kernel_addr " \ | |
232 | "${bank0_kernel_addr}; " \ | |
233 | "setenv actual_fdt_addr ${bank0_fdt_addr}; " \ | |
234 | "setenv actual_rootfs ${bank0_rootfs} \0" \ | |
235 | "actual1=setenv actual_bank 1; setenv actual_kernel_addr " \ | |
236 | "${bank1_kernel_addr}; " \ | |
237 | "setenv actual_fdt_addr ${bank1_fdt_addr}; " \ | |
238 | "setenv actual_rootfs ${bank1_rootfs} \0" \ | |
239 | "backup0=setenv backup_bank 0; setenv backup_kernel_addr " \ | |
240 | "${bank0_kernel_addr}; " \ | |
241 | "setenv backup_fdt_addr ${bank0_fdt_addr}; " \ | |
242 | "setenv backup_rootfs ${bank0_rootfs} \0" \ | |
243 | "backup1=setenv backup_bank 1; setenv backup_kernel_addr " \ | |
244 | "${bank1_kernel_addr}; " \ | |
245 | "setenv backup_fdt_addr ${bank1_fdt_addr}; " \ | |
246 | "setenv backup_rootfs ${bank1_rootfs} \0" \ | |
247 | "setbank0=run actual0 backup1 \0" \ | |
248 | "setbank1=run actual1 backup0 \0" \ | |
249 | "release=setenv bootcmd " \ | |
250 | "\'run mtdargs addip addcon addboardid addpram;" \ | |
251 | "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \'; " \ | |
252 | "saveenv \0" \ | |
253 | "develop=setenv bootcmd " \ | |
254 | "\'run nfsargs addip addcon addboardid addpram;" \ | |
255 | "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \'; " \ | |
256 | "saveenv \0" \ | |
257 | "developall=setenv bootcmd " \ | |
258 | "\'run load_fdt load_kernel nfsargs " \ | |
259 | "addip addcon addboardid addpram; " \ | |
260 | "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \'; " \ | |
261 | "saveenv \0" \ | |
262 | "set_new_esw_script=setenv new_esw_script " \ | |
263 | "new_esw_0x${IVM_BoardId}_0x${IVM_HWKey}.scr \0" \ | |
264 | "new_esw=run set_new_esw_script; " \ | |
3202d331 PT |
265 | "tftp ${script_ws} ${new_esw_script}; " \ |
266 | "iminfo ${script_ws}; source ${script_ws} \0" \ | |
364123db HS |
267 | "bootlimit=0 \0" \ |
268 | CONFIG_KM_DEF_ENV_IOMUX \ | |
269 | CONFIG_KM_DEF_ENV_PRIVATE \ | |
270 | "" | |
271 | #endif /* CONFIG_KM_DEF_ENV */ | |
272 | ||
273 | #define CONFIG_VERSION_VARIABLE /* include version env variable */ | |
274 | ||
1e8f4e78 | 275 | #endif /* __CONFIG_KEYMILE_H */ |