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>
14 # define CONFIG_CMD_DHCP
15 # define CONFIG_CMD_PING
16 # ifdef CONFIG_BFIN_MAC
17 # define CONFIG_CMD_MII
20 # undef CONFIG_CMD_BOOTD
21 # undef CONFIG_CMD_NET
22 # undef CONFIG_CMD_NFS
25 # define CONFIG_CMD_FAT
26 # define CONFIG_CMD_SATA
27 # define CONFIG_DOS_PARTITION
30 # define CONFIG_CMD_FAT
31 # define CONFIG_CMD_MMC
32 # define CONFIG_DOS_PARTITION
35 # define CONFIG_CMD_EXT2
36 # define CONFIG_CMD_FAT
37 # define CONFIG_CMD_USB
38 # define CONFIG_CMD_USB_STORAGE
39 # define CONFIG_DOS_PARTITION
42 # define CONFIG_CMD_DIAG
44 # ifdef CONFIG_RTC_BFIN
45 # define CONFIG_CMD_DATE
48 # define CONFIG_CMD_EEPROM
50 # if defined(CONFIG_BFIN_SPI) || defined(CONFIG_SOFT_SPI)
51 # define CONFIG_CMD_SPI
53 # ifdef CONFIG_SPI_FLASH
54 # define CONFIG_CMD_SF
56 # if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
57 # define CONFIG_CMD_I2C
59 # ifdef CONFIG_SYS_NO_FLASH
60 # undef CONFIG_CMD_FLASH
61 # undef CONFIG_CMD_IMLS
63 # define CONFIG_CMD_JFFS2
65 # define CONFIG_CMD_BOOTLDR
66 # define CONFIG_CMD_CACHE
67 # define CONFIG_CMD_CPLBINFO
68 # define CONFIG_CMD_ELF
69 # define CONFIG_ELF_SIMPLE_LOAD
70 # define CONFIG_CMD_REGINFO
71 # define CONFIG_CMD_STRINGS
72 # if defined(__ADSPBF51x__) || defined(__ADSPBF52x__) || defined(__ADSPBF54x__)
73 # define CONFIG_CMD_OTP
74 # define CONFIG_CMD_SPIBOOTLDR
81 #define CONFIG_SYS_LONGHELP 1
82 #define CONFIG_CMDLINE_EDITING 1
83 #define CONFIG_AUTO_COMPLETE 1
84 #define CONFIG_LOADS_ECHO 1
85 #define CONFIG_JTAG_CONSOLE
86 #ifndef CONFIG_BAUDRATE
87 # define CONFIG_BAUDRATE 57600
93 #define CONFIG_ENV_OVERWRITE 1
94 #define CONFIG_DEBUG_DUMP 1
95 #define CONFIG_KALLSYMS 1
96 #define CONFIG_PANIC_HANG 1
101 #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_UART)
102 # define CONFIG_BOOTDELAY -1
104 # define CONFIG_BOOTDELAY 5
106 #ifndef CONFIG_BOOTCOMMAND
107 # define CONFIG_BOOTCOMMAND "run ramboot"
110 # define CONFIG_BOOTARGS_VIDEO "console=tty0 "
112 # define CONFIG_BOOTARGS_VIDEO ""
114 #ifndef CONFIG_BOOTARGS_ROOT
115 # define CONFIG_BOOTARGS_ROOT "/dev/mtdblock0 rw"
117 #define CONFIG_BOOTARGS \
118 "root=" CONFIG_BOOTARGS_ROOT " " \
119 "clkin_hz=" MK_STR(CONFIG_CLKIN_HZ) " " \
122 "uart" MK_STR(CONFIG_UART_CONSOLE) "," \
123 MK_STR(CONFIG_BAUDRATE) " " \
124 CONFIG_BOOTARGS_VIDEO \
125 "console=ttyBF0," MK_STR(CONFIG_BAUDRATE)
126 #if defined(CONFIG_CMD_NAND)
127 # define NAND_ENV_SETTINGS \
128 "nandargs=set bootargs " CONFIG_BOOTARGS "\0" \
130 "nand read $(loadaddr) 0x20000 0x100000;" \
135 # define NAND_ENV_SETTINGS
137 #if defined(CONFIG_CMD_NET)
138 # if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
139 # define UBOOT_ENV_FILE "u-boot.bin"
141 # define UBOOT_ENV_FILE "u-boot.ldr"
143 # if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER)
145 # define UBOOT_ENV_UPDATE \
146 "eeprom write $(loadaddr) 0x0 $(filesize)"
148 # define UBOOT_ENV_UPDATE \
149 "sf probe " MK_STR(BFIN_BOOT_SPI_SSEL) ";" \
150 "sf erase 0 0x40000;" \
151 "sf write $(loadaddr) 0 $(filesize)"
153 # elif (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_NAND)
154 # define UBOOT_ENV_UPDATE \
155 "nand unlock 0 0x40000;" \
156 "nand erase 0 0x40000;" \
157 "nand write $(loadaddr) 0 0x40000"
159 # define UBOOT_ENV_UPDATE \
160 "protect off 0x20000000 0x2003FFFF;" \
161 "erase 0x20000000 0x2003FFFF;" \
162 "cp.b $(loadaddr) 0x20000000 $(filesize)"
164 # define NETWORK_ENV_SETTINGS \
165 "ubootfile=" UBOOT_ENV_FILE "\0" \
167 "tftp $(loadaddr) $(ubootfile);" \
170 "addip=set bootargs $(bootargs) " \
171 "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):" \
172 "$(hostname):eth0:off" \
176 "ramargs=set bootargs " CONFIG_BOOTARGS "\0" \
178 "tftp $(loadaddr) $(ramfile);" \
184 "nfsfile=vmImage\0" \
185 "nfsargs=set bootargs " \
186 "root=/dev/nfs rw " \
187 "nfsroot=$(serverip):$(rootpath),tcp,nfsvers=3" \
190 "tftp $(loadaddr) $(nfsfile);" \
196 # define NETWORK_ENV_SETTINGS
198 #define CONFIG_EXTRA_ENV_SETTINGS \
200 NETWORK_ENV_SETTINGS \
201 "flashboot=bootm 0x20100000\0"
206 #ifdef CONFIG_CMD_NET
207 # define CONFIG_IPADDR 192.168.0.15
208 # define CONFIG_NETMASK 255.255.255.0
209 # define CONFIG_GATEWAYIP 192.168.0.1
210 # define CONFIG_SERVERIP 192.168.0.2
211 # define CONFIG_ROOTPATH /romfs
212 # ifdef CONFIG_CMD_DHCP
213 # ifndef CONFIG_SYS_AUTOLOAD
214 # define CONFIG_SYS_AUTOLOAD "no"
217 # define CONFIG_NET_RETRY_COUNT 20