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 # ifdef ADI_CMDS_NETWORK
13 # define CONFIG_CMD_DHCP
14 # define CONFIG_BOOTP_SUBNETMASK
15 # define CONFIG_BOOTP_GATEWAY
16 # define CONFIG_BOOTP_DNS
17 # define CONFIG_BOOTP_NTPSERVER
18 # define CONFIG_BOOTP_RANDOM_DELAY
19 # define CONFIG_KEEP_SERVERADDR
20 # define CONFIG_CMD_DNS
21 # define CONFIG_CMD_PING
22 # ifdef CONFIG_BFIN_MAC
23 # define CONFIG_CMD_MII
27 # define CONFIG_CMD_FAT
28 # define CONFIG_CMD_SATA
29 # define CONFIG_DOS_PARTITION
32 # define CONFIG_CMD_EXT2
33 # define CONFIG_CMD_FAT
34 # define CONFIG_CMD_MMC
35 # define CONFIG_DOS_PARTITION
36 # define CONFIG_SYS_MMC_MAX_BLK_COUNT 127
38 # ifdef CONFIG_MMC_SPI
39 # define CONFIG_CMD_MMC_SPI
42 # define CONFIG_CMD_EXT2
43 # define CONFIG_CMD_FAT
44 # define CONFIG_CMD_USB
45 # define CONFIG_CMD_USB_STORAGE
46 # define CONFIG_DOS_PARTITION
48 # if defined(CONFIG_NAND_PLAT) || defined(CONFIG_DRIVER_NAND_BFIN)
49 # define CONFIG_CMD_NAND
50 # define CONFIG_CMD_NAND_LOCK_UNLOCK
53 # define CONFIG_CMD_DIAG
55 # ifdef CONFIG_RTC_BFIN
56 # define CONFIG_CMD_DATE
57 # ifdef ADI_CMDS_NETWORK
58 # define CONFIG_CMD_SNTP
62 # define CONFIG_CMD_EEPROM
64 # if defined(CONFIG_BFIN_SPI) || defined(CONFIG_SOFT_SPI)
65 # define CONFIG_CMD_SPI
67 # ifdef CONFIG_SPI_FLASH
68 # define CONFIG_CMD_SF
70 # if defined(CONFIG_SYS_I2C) || defined(CONFIG_SYS_I2C_SOFT)
71 # define CONFIG_CMD_I2C
72 # define CONFIG_SOFT_I2C_READ_REPEATED_START
74 # ifndef CONFIG_SYS_NO_FLASH
75 # define CONFIG_CMD_JFFS2
77 # ifdef CONFIG_CMD_JFFS2
78 # define CONFIG_JFFS2_SUMMARY
80 # define CONFIG_CMD_BOOTLDR
81 # define CONFIG_CMD_CACHE
82 # define CONFIG_CMD_CPLBINFO
83 # define CONFIG_CMD_ELF
84 # define CONFIG_CMD_GPIO
85 # define CONFIG_CMD_KGDB
86 # define CONFIG_CMD_LDRINFO
87 # define CONFIG_CMD_REGINFO
88 # define CONFIG_CMD_STRINGS
89 # if defined(__ADSPBF51x__) || defined(__ADSPBF52x__) || defined(__ADSPBF54x__)
90 # define CONFIG_CMD_OTP
91 # define CONFIG_CMD_SPIBOOTLDR
98 #define CONFIG_SYS_LONGHELP 1
99 #define CONFIG_CMDLINE_EDITING 1
100 #define CONFIG_AUTO_COMPLETE 1
101 #define CONFIG_LOADS_ECHO 1
102 #define CONFIG_JTAG_CONSOLE
103 #define CONFIG_SILENT_CONSOLE
104 #ifndef CONFIG_BAUDRATE
105 # define CONFIG_BAUDRATE 57600
107 #ifdef CONFIG_UART_CONSOLE
108 # define CONFIG_BFIN_SERIAL
114 #define CONFIG_ENV_OVERWRITE 1
115 #define CONFIG_DEBUG_DUMP 1
116 #define CONFIG_KALLSYMS 1
117 #define CONFIG_PANIC_HANG 1
122 #ifndef CONFIG_BOOTDELAY
123 # if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_UART)
124 # define CONFIG_BOOTDELAY -1
126 # define CONFIG_BOOTDELAY 5
129 #ifndef CONFIG_BOOTCOMMAND
130 # define CONFIG_BOOTCOMMAND "run ramboot"
133 # define CONFIG_BOOTARGS_VIDEO "console=tty0 "
135 # define CONFIG_BOOTARGS_VIDEO ""
137 #ifndef CONFIG_BOOTARGS_ROOT
138 # define CONFIG_BOOTARGS_ROOT "/dev/mtdblock0 rw"
140 #ifndef FLASHBOOT_ENV_SETTINGS
141 # define FLASHBOOT_ENV_SETTINGS "flashboot=bootm 0x20100000\0"
143 #define CONFIG_BOOTARGS \
144 "root=" CONFIG_BOOTARGS_ROOT " " \
145 "clkin_hz=" __stringify(CONFIG_CLKIN_HZ) " " \
148 "uart" __stringify(CONFIG_UART_CONSOLE) "," \
149 __stringify(CONFIG_BAUDRATE) " " \
150 CONFIG_BOOTARGS_VIDEO \
151 "console=ttyBF" __stringify(CONFIG_UART_CONSOLE) "," \
152 __stringify(CONFIG_BAUDRATE)
153 #if defined(CONFIG_CMD_NAND)
154 # define NAND_ENV_SETTINGS \
155 "nandargs=set bootargs " CONFIG_BOOTARGS "\0" \
157 "nand read $(loadaddr) 0x20000 0x100000;" \
162 # define NAND_ENV_SETTINGS
164 #if defined(CONFIG_CMD_NET)
165 # if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
166 # define UBOOT_ENV_FILE "u-boot.bin"
168 # define UBOOT_ENV_FILE "u-boot.ldr"
170 # if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER)
172 # define UBOOT_ENV_UPDATE \
173 "eeprom write $(loadaddr) 0x0 $(filesize)"
175 # ifndef CONFIG_BFIN_SPI_IMG_SIZE
176 # define CONFIG_BFIN_SPI_IMG_SIZE 0x40000
178 # define UBOOT_ENV_UPDATE \
179 "sf probe " __stringify(BFIN_BOOT_SPI_SSEL) ";" \
180 "sf erase 0 " __stringify(CONFIG_BFIN_SPI_IMG_SIZE) ";" \
181 "sf write $(loadaddr) 0 $(filesize)"
183 # elif (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_NAND)
184 # define UBOOT_ENV_UPDATE \
185 "nand unlock 0 0x40000;" \
186 "nand erase 0 0x40000;" \
187 "nand write $(loadaddr) 0 0x40000"
189 # ifndef UBOOT_ENV_UPDATE
190 # define UBOOT_ENV_UPDATE \
191 "protect off 0x20000000 +$(filesize);" \
192 "erase 0x20000000 +$(filesize);" \
193 "cp.b $(loadaddr) 0x20000000 $(filesize)"
196 # ifdef CONFIG_NETCONSOLE
197 # define NETCONSOLE_ENV \
199 "set ncip ${serverip};" \
205 # define NETCONSOLE_ENV
207 # define NETWORK_ENV_SETTINGS \
210 "ubootfile=" UBOOT_ENV_FILE "\0" \
212 "tftp $(loadaddr) $(ubootfile);" \
215 "addip=set bootargs $(bootargs) " \
216 "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):" \
217 "$(hostname):eth0:off" \
221 "ramargs=set bootargs " CONFIG_BOOTARGS "\0" \
223 "tftp $(loadaddr) $(ramfile);" \
229 "nfsfile=vmImage\0" \
230 "nfsargs=set bootargs " \
231 "root=/dev/nfs rw " \
232 "nfsroot=$(serverip):$(rootpath),tcp,nfsvers=3" \
235 "tftp $(loadaddr) $(nfsfile);" \
241 # define NETWORK_ENV_SETTINGS
243 #ifndef BOARD_ENV_SETTINGS
244 # define BOARD_ENV_SETTINGS
246 #define CONFIG_EXTRA_ENV_SETTINGS \
248 NETWORK_ENV_SETTINGS \
249 FLASHBOOT_ENV_SETTINGS \
255 #ifdef CONFIG_CMD_NET
256 # define CONFIG_NETMASK 255.255.255.0
257 # ifndef CONFIG_IPADDR
258 # define CONFIG_IPADDR 192.168.0.15
259 # define CONFIG_GATEWAYIP 192.168.0.1
260 # define CONFIG_SERVERIP 192.168.0.2
262 # ifndef CONFIG_ROOTPATH
263 # define CONFIG_ROOTPATH "/romfs"
265 # ifdef CONFIG_CMD_DHCP
266 # ifndef CONFIG_SYS_AUTOLOAD
267 # define CONFIG_SYS_AUTOLOAD "no"
270 # define CONFIG_IP_DEFRAG
271 # define CONFIG_NET_RETRY_COUNT 20
277 #define CONFIG_FLASH_SHOW_PROGRESS 45
282 #ifdef CONFIG_SPI_FLASH_ALL
283 # define CONFIG_SPI_FLASH_ATMEL
284 # define CONFIG_SPI_FLASH_EON
285 # define CONFIG_SPI_FLASH_MACRONIX
286 # define CONFIG_SPI_FLASH_SPANSION
287 # define CONFIG_SPI_FLASH_SST
288 # define CONFIG_SPI_FLASH_STMICRO
289 # define CONFIG_SPI_FLASH_WINBOND
295 #if defined(CONFIG_SYS_I2C) || defined(CONFIG_SYS_I2C_SOFT)
296 # ifndef CONFIG_SYS_I2C_SPEED
297 # define CONFIG_SYS_I2C_SPEED 50000
299 # ifndef CONFIG_SYS_I2C_SLAVE
300 # define CONFIG_SYS_I2C_SLAVE 0
307 #ifndef CONFIG_BOARD_SIZE_LIMIT
308 # define CONFIG_BOARD_SIZE_LIMIT $$(( 256 * 1024 ))
310 #define CONFIG_BFIN_SPI_GPIO_CS /* Only matters if BFIN_SPI is enabled */
312 #define CONFIG_MONITOR_IS_IN_RAM
313 #ifdef CONFIG_HW_WATCHDOG
314 # define CONFIG_BFIN_WATCHDOG
315 # ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS
316 # define CONFIG_WATCHDOG_TIMEOUT_MSECS 5000
319 #ifndef CONFIG_ADI_GPIO2
320 # define CONFIG_ADI_GPIO1