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
41 # ifdef CONFIG_NAND_PLAT
42 # define CONFIG_CMD_NAND
45 # define CONFIG_CMD_DIAG
47 # ifdef CONFIG_RTC_BFIN
48 # define CONFIG_CMD_DATE
51 # define CONFIG_CMD_EEPROM
53 # if defined(CONFIG_BFIN_SPI) || defined(CONFIG_SOFT_SPI)
54 # define CONFIG_CMD_SPI
56 # ifdef CONFIG_SPI_FLASH
57 # define CONFIG_CMD_SF
59 # if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
60 # define CONFIG_CMD_I2C
62 # ifdef CONFIG_SYS_NO_FLASH
63 # undef CONFIG_CMD_FLASH
64 # undef CONFIG_CMD_IMLS
66 # define CONFIG_CMD_JFFS2
68 # define CONFIG_CMD_BOOTLDR
69 # define CONFIG_CMD_CACHE
70 # define CONFIG_CMD_CPLBINFO
71 # define CONFIG_CMD_ELF
72 # define CONFIG_ELF_SIMPLE_LOAD
73 # define CONFIG_CMD_REGINFO
74 # define CONFIG_CMD_STRINGS
75 # if defined(__ADSPBF51x__) || defined(__ADSPBF52x__) || defined(__ADSPBF54x__)
76 # define CONFIG_CMD_OTP
77 # define CONFIG_CMD_SPIBOOTLDR
84 #define CONFIG_SYS_LONGHELP 1
85 #define CONFIG_CMDLINE_EDITING 1
86 #define CONFIG_AUTO_COMPLETE 1
87 #define CONFIG_LOADS_ECHO 1
88 #define CONFIG_JTAG_CONSOLE
89 #ifndef CONFIG_BAUDRATE
90 # define CONFIG_BAUDRATE 57600
96 #define CONFIG_ENV_OVERWRITE 1
97 #define CONFIG_DEBUG_DUMP 1
98 #define CONFIG_KALLSYMS 1
99 #define CONFIG_PANIC_HANG 1
104 #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_UART)
105 # define CONFIG_BOOTDELAY -1
107 # define CONFIG_BOOTDELAY 5
109 #ifndef CONFIG_BOOTCOMMAND
110 # define CONFIG_BOOTCOMMAND "run ramboot"
113 # define CONFIG_BOOTARGS_VIDEO "console=tty0 "
115 # define CONFIG_BOOTARGS_VIDEO ""
117 #ifndef CONFIG_BOOTARGS_ROOT
118 # define CONFIG_BOOTARGS_ROOT "/dev/mtdblock0 rw"
120 #define CONFIG_BOOTARGS \
121 "root=" CONFIG_BOOTARGS_ROOT " " \
122 "clkin_hz=" MK_STR(CONFIG_CLKIN_HZ) " " \
125 "uart" MK_STR(CONFIG_UART_CONSOLE) "," \
126 MK_STR(CONFIG_BAUDRATE) " " \
127 CONFIG_BOOTARGS_VIDEO \
128 "console=ttyBF0," MK_STR(CONFIG_BAUDRATE)
129 #if defined(CONFIG_CMD_NAND)
130 # define NAND_ENV_SETTINGS \
131 "nandargs=set bootargs " CONFIG_BOOTARGS "\0" \
133 "nand read $(loadaddr) 0x20000 0x100000;" \
138 # define NAND_ENV_SETTINGS
140 #if defined(CONFIG_CMD_NET)
141 # if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
142 # define UBOOT_ENV_FILE "u-boot.bin"
144 # define UBOOT_ENV_FILE "u-boot.ldr"
146 # if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER)
148 # define UBOOT_ENV_UPDATE \
149 "eeprom write $(loadaddr) 0x0 $(filesize)"
151 # define UBOOT_ENV_UPDATE \
152 "sf probe " MK_STR(BFIN_BOOT_SPI_SSEL) ";" \
153 "sf erase 0 0x40000;" \
154 "sf write $(loadaddr) 0 $(filesize)"
156 # elif (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_NAND)
157 # define UBOOT_ENV_UPDATE \
158 "nand unlock 0 0x40000;" \
159 "nand erase 0 0x40000;" \
160 "nand write $(loadaddr) 0 0x40000"
162 # define UBOOT_ENV_UPDATE \
163 "protect off 0x20000000 0x2003FFFF;" \
164 "erase 0x20000000 0x2003FFFF;" \
165 "cp.b $(loadaddr) 0x20000000 $(filesize)"
167 # define NETWORK_ENV_SETTINGS \
168 "ubootfile=" UBOOT_ENV_FILE "\0" \
170 "tftp $(loadaddr) $(ubootfile);" \
173 "addip=set bootargs $(bootargs) " \
174 "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):" \
175 "$(hostname):eth0:off" \
179 "ramargs=set bootargs " CONFIG_BOOTARGS "\0" \
181 "tftp $(loadaddr) $(ramfile);" \
187 "nfsfile=vmImage\0" \
188 "nfsargs=set bootargs " \
189 "root=/dev/nfs rw " \
190 "nfsroot=$(serverip):$(rootpath),tcp,nfsvers=3" \
193 "tftp $(loadaddr) $(nfsfile);" \
199 # define NETWORK_ENV_SETTINGS
201 #define CONFIG_EXTRA_ENV_SETTINGS \
203 NETWORK_ENV_SETTINGS \
204 "flashboot=bootm 0x20100000\0"
209 #ifdef CONFIG_CMD_NET
210 # define CONFIG_IPADDR 192.168.0.15
211 # define CONFIG_NETMASK 255.255.255.0
212 # define CONFIG_GATEWAYIP 192.168.0.1
213 # define CONFIG_SERVERIP 192.168.0.2
214 # define CONFIG_ROOTPATH /romfs
215 # ifdef CONFIG_CMD_DHCP
216 # ifndef CONFIG_SYS_AUTOLOAD
217 # define CONFIG_SYS_AUTOLOAD "no"
220 # define CONFIG_NET_RETRY_COUNT 20