2 * U-Boot - Common settings for Analog Devices boards
5 #ifndef __CONFIG_BFIN_ADI_COMMON_H__
6 #define __CONFIG_BFIN_ADI_COMMON_H__
11 #ifndef _CONFIG_CMD_DEFAULT_H
12 # include <config_cmd_default.h>
13 # ifdef ADI_CMDS_NETWORK
14 # define CONFIG_CMD_DHCP
15 # define CONFIG_BOOTP_SUBNETMASK
16 # define CONFIG_BOOTP_GATEWAY
17 # define CONFIG_BOOTP_DNS
18 # define CONFIG_BOOTP_NTPSERVER
19 # define CONFIG_BOOTP_RANDOM_DELAY
20 # define CONFIG_LIB_RAND
21 # define CONFIG_KEEP_SERVERADDR
22 # define CONFIG_CMD_DNS
23 # define CONFIG_CMD_PING
24 # ifdef CONFIG_BFIN_MAC
25 # define CONFIG_CMD_MII
28 # undef CONFIG_CMD_BOOTD
29 # undef CONFIG_CMD_NET
30 # undef CONFIG_CMD_NFS
33 # define CONFIG_CMD_FAT
34 # define CONFIG_CMD_SATA
35 # define CONFIG_DOS_PARTITION
38 # define CONFIG_CMD_EXT2
39 # define CONFIG_CMD_FAT
40 # define CONFIG_CMD_MMC
41 # define CONFIG_DOS_PARTITION
42 # define CONFIG_SYS_MMC_MAX_BLK_COUNT 127
44 # ifdef CONFIG_MMC_SPI
45 # define CONFIG_CMD_MMC_SPI
48 # define CONFIG_CMD_EXT2
49 # define CONFIG_CMD_FAT
50 # define CONFIG_CMD_USB
51 # define CONFIG_CMD_USB_STORAGE
52 # define CONFIG_DOS_PARTITION
54 # if defined(CONFIG_NAND_PLAT) || defined(CONFIG_DRIVER_NAND_BFIN)
55 # define CONFIG_CMD_NAND
56 # define CONFIG_CMD_NAND_LOCK_UNLOCK
59 # define CONFIG_CMD_DIAG
61 # ifdef CONFIG_RTC_BFIN
62 # define CONFIG_CMD_DATE
63 # ifdef ADI_CMDS_NETWORK
64 # define CONFIG_CMD_SNTP
68 # define CONFIG_CMD_EEPROM
70 # if defined(CONFIG_BFIN_SPI) || defined(CONFIG_SOFT_SPI)
71 # define CONFIG_CMD_SPI
73 # ifdef CONFIG_SPI_FLASH
74 # define CONFIG_CMD_SF
76 # if defined(CONFIG_SYS_I2C) || defined(CONFIG_SYS_I2C_SOFT)
77 # define CONFIG_CMD_I2C
78 # define CONFIG_SOFT_I2C_READ_REPEATED_START
80 # ifdef CONFIG_SYS_NO_FLASH
81 # undef CONFIG_CMD_FLASH
82 # undef CONFIG_CMD_IMLS
84 # define CONFIG_CMD_JFFS2
86 # ifdef CONFIG_CMD_JFFS2
87 # define CONFIG_JFFS2_SUMMARY
89 # define CONFIG_CMD_BOOTLDR
90 # define CONFIG_CMD_CACHE
91 # define CONFIG_CMD_CPLBINFO
92 # define CONFIG_CMD_ELF
93 # define CONFIG_CMD_GPIO
94 # define CONFIG_CMD_KGDB
95 # define CONFIG_CMD_LDRINFO
96 # define CONFIG_CMD_REGINFO
97 # define CONFIG_CMD_STRINGS
98 # if defined(__ADSPBF51x__) || defined(__ADSPBF52x__) || defined(__ADSPBF54x__)
99 # define CONFIG_CMD_OTP
100 # define CONFIG_CMD_SPIBOOTLDR
107 #define CONFIG_SYS_LONGHELP 1
108 #define CONFIG_CMDLINE_EDITING 1
109 #define CONFIG_AUTO_COMPLETE 1
110 #define CONFIG_LOADS_ECHO 1
111 #define CONFIG_JTAG_CONSOLE
112 #define CONFIG_SILENT_CONSOLE
113 #ifndef CONFIG_BAUDRATE
114 # define CONFIG_BAUDRATE 57600
116 #ifdef CONFIG_UART_CONSOLE
117 # define CONFIG_BFIN_SERIAL
123 #define CONFIG_ENV_OVERWRITE 1
124 #define CONFIG_DEBUG_DUMP 1
125 #define CONFIG_KALLSYMS 1
126 #define CONFIG_PANIC_HANG 1
131 #ifndef CONFIG_BOOTDELAY
132 # if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_UART)
133 # define CONFIG_BOOTDELAY -1
135 # define CONFIG_BOOTDELAY 5
138 #ifndef CONFIG_BOOTCOMMAND
139 # define CONFIG_BOOTCOMMAND "run ramboot"
142 # define CONFIG_BOOTARGS_VIDEO "console=tty0 "
144 # define CONFIG_BOOTARGS_VIDEO ""
146 #ifndef CONFIG_BOOTARGS_ROOT
147 # define CONFIG_BOOTARGS_ROOT "/dev/mtdblock0 rw"
149 #ifndef FLASHBOOT_ENV_SETTINGS
150 # define FLASHBOOT_ENV_SETTINGS "flashboot=bootm 0x20100000\0"
152 #define CONFIG_BOOTARGS \
153 "root=" CONFIG_BOOTARGS_ROOT " " \
154 "clkin_hz=" __stringify(CONFIG_CLKIN_HZ) " " \
157 "uart" __stringify(CONFIG_UART_CONSOLE) "," \
158 __stringify(CONFIG_BAUDRATE) " " \
159 CONFIG_BOOTARGS_VIDEO \
160 "console=ttyBF" __stringify(CONFIG_UART_CONSOLE) "," \
161 __stringify(CONFIG_BAUDRATE)
162 #if defined(CONFIG_CMD_NAND)
163 # define NAND_ENV_SETTINGS \
164 "nandargs=set bootargs " CONFIG_BOOTARGS "\0" \
166 "nand read $(loadaddr) 0x20000 0x100000;" \
171 # define NAND_ENV_SETTINGS
173 #if defined(CONFIG_CMD_NET)
174 # if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
175 # define UBOOT_ENV_FILE "u-boot.bin"
177 # define UBOOT_ENV_FILE "u-boot.ldr"
179 # if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER)
181 # define UBOOT_ENV_UPDATE \
182 "eeprom write $(loadaddr) 0x0 $(filesize)"
184 # ifndef CONFIG_BFIN_SPI_IMG_SIZE
185 # define CONFIG_BFIN_SPI_IMG_SIZE 0x40000
187 # define UBOOT_ENV_UPDATE \
188 "sf probe " __stringify(BFIN_BOOT_SPI_SSEL) ";" \
189 "sf erase 0 " __stringify(CONFIG_BFIN_SPI_IMG_SIZE) ";" \
190 "sf write $(loadaddr) 0 $(filesize)"
192 # elif (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_NAND)
193 # define UBOOT_ENV_UPDATE \
194 "nand unlock 0 0x40000;" \
195 "nand erase 0 0x40000;" \
196 "nand write $(loadaddr) 0 0x40000"
198 # ifndef UBOOT_ENV_UPDATE
199 # define UBOOT_ENV_UPDATE \
200 "protect off 0x20000000 +$(filesize);" \
201 "erase 0x20000000 +$(filesize);" \
202 "cp.b $(loadaddr) 0x20000000 $(filesize)"
205 # ifdef CONFIG_NETCONSOLE
206 # define NETCONSOLE_ENV \
208 "set ncip ${serverip};" \
214 # define NETCONSOLE_ENV
216 # define NETWORK_ENV_SETTINGS \
219 "ubootfile=" UBOOT_ENV_FILE "\0" \
221 "tftp $(loadaddr) $(ubootfile);" \
224 "addip=set bootargs $(bootargs) " \
225 "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):" \
226 "$(hostname):eth0:off" \
230 "ramargs=set bootargs " CONFIG_BOOTARGS "\0" \
232 "tftp $(loadaddr) $(ramfile);" \
238 "nfsfile=vmImage\0" \
239 "nfsargs=set bootargs " \
240 "root=/dev/nfs rw " \
241 "nfsroot=$(serverip):$(rootpath),tcp,nfsvers=3" \
244 "tftp $(loadaddr) $(nfsfile);" \
250 # define NETWORK_ENV_SETTINGS
252 #ifndef BOARD_ENV_SETTINGS
253 # define BOARD_ENV_SETTINGS
255 #define CONFIG_EXTRA_ENV_SETTINGS \
257 NETWORK_ENV_SETTINGS \
258 FLASHBOOT_ENV_SETTINGS \
264 #ifdef CONFIG_CMD_NET
265 # define CONFIG_NETMASK 255.255.255.0
266 # ifndef CONFIG_IPADDR
267 # define CONFIG_IPADDR 192.168.0.15
268 # define CONFIG_GATEWAYIP 192.168.0.1
269 # define CONFIG_SERVERIP 192.168.0.2
271 # ifndef CONFIG_ROOTPATH
272 # define CONFIG_ROOTPATH "/romfs"
274 # ifdef CONFIG_CMD_DHCP
275 # ifndef CONFIG_SYS_AUTOLOAD
276 # define CONFIG_SYS_AUTOLOAD "no"
279 # define CONFIG_IP_DEFRAG
280 # define CONFIG_NET_RETRY_COUNT 20
286 #define CONFIG_FLASH_SHOW_PROGRESS 45
291 #ifdef CONFIG_SPI_FLASH_ALL
292 # define CONFIG_SPI_FLASH_ATMEL
293 # define CONFIG_SPI_FLASH_EON
294 # define CONFIG_SPI_FLASH_MACRONIX
295 # define CONFIG_SPI_FLASH_SPANSION
296 # define CONFIG_SPI_FLASH_SST
297 # define CONFIG_SPI_FLASH_STMICRO
298 # define CONFIG_SPI_FLASH_WINBOND
304 #if defined(CONFIG_SYS_I2C) || defined(CONFIG_SYS_I2C_SOFT)
305 # ifndef CONFIG_SYS_I2C_SPEED
306 # define CONFIG_SYS_I2C_SPEED 50000
308 # ifndef CONFIG_SYS_I2C_SLAVE
309 # define CONFIG_SYS_I2C_SLAVE 0
316 #ifndef CONFIG_BOARD_SIZE_LIMIT
317 # define CONFIG_BOARD_SIZE_LIMIT $$(( 256 * 1024 ))
319 #define CONFIG_BFIN_SPI_GPIO_CS /* Only matters if BFIN_SPI is enabled */
321 #define CONFIG_MONITOR_IS_IN_RAM
322 #ifdef CONFIG_HW_WATCHDOG
323 # define CONFIG_BFIN_WATCHDOG
324 # ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS
325 # define CONFIG_WATCHDOG_TIMEOUT_MSECS 5000
328 #ifndef CONFIG_ADI_GPIO2
329 # define CONFIG_ADI_GPIO1