blob: a581924d278dcc973c98f9011c44f09e1da98952 [file] [log] [blame]
Mike Frysinger62d2a232008-06-01 09:09:48 -04001/*
2 * U-Boot - Common settings for Analog Devices boards
3 */
4
5#ifndef __CONFIG_BFIN_ADI_COMMON_H__
6#define __CONFIG_BFIN_ADI_COMMON_H__
7
8/*
9 * Command Settings
10 */
11#ifndef _CONFIG_CMD_DEFAULT_H
12# include <config_cmd_default.h>
13# if ADI_CMDS_NETWORK
14# define CONFIG_CMD_DHCP
15# define CONFIG_CMD_PING
16# ifdef CONFIG_BFIN_MAC
17# define CONFIG_CMD_MII
18# endif
19# else
20# undef CONFIG_CMD_BOOTD
21# undef CONFIG_CMD_NET
22# undef CONFIG_CMD_NFS
23# endif
24# ifdef CONFIG_LIBATA
25# define CONFIG_CMD_FAT
26# define CONFIG_CMD_SATA
27# define CONFIG_DOS_PARTITION
28# endif
29# ifdef CONFIG_MMC
30# define CONFIG_CMD_FAT
31# define CONFIG_CMD_MMC
32# define CONFIG_DOS_PARTITION
33# endif
34# ifdef CONFIG_USB
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
40# endif
41# ifdef CONFIG_POST
42# define CONFIG_CMD_DIAG
43# endif
44# ifdef CONFIG_RTC_BFIN
45# define CONFIG_CMD_DATE
46# endif
47# ifdef CONFIG_SPI
48# define CONFIG_CMD_EEPROM
49# endif
50# if defined(CONFIG_BFIN_SPI) || defined(CONFIG_SOFT_SPI)
51# define CONFIG_CMD_SPI
52# endif
53# ifdef CONFIG_SPI_FLASH
54# define CONFIG_CMD_SF
55# endif
56# if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
57# define CONFIG_CMD_I2C
58# endif
59# ifdef CONFIG_SYS_NO_FLASH
60# undef CONFIG_CMD_FLASH
61# undef CONFIG_CMD_IMLS
62# else
63# define CONFIG_CMD_JFFS2
64# endif
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
Mike Frysinger7c8e97f2008-11-27 16:50:32 -050074# define CONFIG_CMD_SPIBOOTLDR
Mike Frysinger62d2a232008-06-01 09:09:48 -040075# endif
76#endif
77
78/*
79 * Console Settings
80 */
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
88#endif
89
90/*
91 * Debug Settings
92 */
93#define CONFIG_ENV_OVERWRITE 1
94#define CONFIG_DEBUG_DUMP 1
Mike Frysingera46fbba2009-05-20 04:35:14 -040095#define CONFIG_KALLSYMS 1
Mike Frysinger62d2a232008-06-01 09:09:48 -040096#define CONFIG_PANIC_HANG 1
97
98/*
99 * Env Settings
100 */
101#if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_UART)
102# define CONFIG_BOOTDELAY -1
103#else
104# define CONFIG_BOOTDELAY 5
105#endif
106#define CONFIG_BOOTCOMMAND "run ramboot"
107#ifdef CONFIG_VIDEO
108# define CONFIG_BOOTARGS_VIDEO "console=tty0 "
109#else
110# define CONFIG_BOOTARGS_VIDEO ""
111#endif
112#define CONFIG_BOOTARGS \
113 "root=/dev/mtdblock0 rw " \
Mike Frysingera66097a2008-12-09 13:47:39 -0500114 "clkin_hz=" MK_STR(CONFIG_CLKIN_HZ) " " \
Mike Frysinger62d2a232008-06-01 09:09:48 -0400115 "earlyprintk=" \
116 "serial," \
117 "uart" MK_STR(CONFIG_UART_CONSOLE) "," \
118 MK_STR(CONFIG_BAUDRATE) " " \
119 CONFIG_BOOTARGS_VIDEO \
120 "console=ttyBF0," MK_STR(CONFIG_BAUDRATE)
121
122#if defined(CONFIG_CMD_NET)
123# if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
124# define UBOOT_ENV_FILE "u-boot.bin"
125# else
126# define UBOOT_ENV_FILE "u-boot.ldr"
127# endif
128# if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER)
129# ifdef CONFIG_SPI
130# define UBOOT_ENV_UPDATE \
131 "eeprom write $(loadaddr) 0x0 $(filesize)"
132# else
133# define UBOOT_ENV_UPDATE \
134 "sf probe " MK_STR(BFIN_BOOT_SPI_SSEL) ";" \
135 "sf erase 0 0x40000;" \
136 "sf write $(loadaddr) 0 $(filesize)"
137# endif
138# elif (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_NAND)
139# define UBOOT_ENV_UPDATE \
140 "nand unlock 0 0x40000;" \
141 "nand erase 0 0x40000;" \
142 "nand write $(loadaddr) 0 0x40000"
143# else
144# define UBOOT_ENV_UPDATE \
145 "protect off 0x20000000 0x2003FFFF;" \
146 "erase 0x20000000 0x2003FFFF;" \
147 "cp.b $(loadaddr) 0x20000000 $(filesize)"
148# endif
149# define NETWORK_ENV_SETTINGS \
150 "ubootfile=" UBOOT_ENV_FILE "\0" \
151 "update=" \
152 "tftp $(loadaddr) $(ubootfile);" \
153 UBOOT_ENV_UPDATE \
154 "\0" \
155 "addip=set bootargs $(bootargs) " \
156 "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):" \
157 "$(hostname):eth0:off" \
158 "\0" \
159 "ramargs=set bootargs " CONFIG_BOOTARGS "\0" \
160 "ramboot=" \
161 "tftp $(loadaddr) uImage;" \
162 "run ramargs;" \
163 "run addip;" \
164 "bootm" \
165 "\0" \
166 "nfsargs=set bootargs " \
167 "root=/dev/nfs rw " \
168 "nfsroot=$(serverip):$(rootpath),tcp,nfsvers=3" \
169 "\0" \
170 "nfsboot=" \
171 "tftp $(loadaddr) vmImage;" \
172 "run nfsargs;" \
173 "run addip;" \
174 "bootm" \
175 "\0"
176#else
177# define NETWORK_ENV_SETTINGS
178#endif
179#define CONFIG_EXTRA_ENV_SETTINGS \
180 NETWORK_ENV_SETTINGS \
181 "flashboot=bootm 0x20100000\0"
182
183/*
184 * Network Settings
185 */
186#ifdef CONFIG_CMD_NET
187# define CONFIG_IPADDR 192.168.0.15
188# define CONFIG_NETMASK 255.255.255.0
189# define CONFIG_GATEWAYIP 192.168.0.1
190# define CONFIG_SERVERIP 192.168.0.2
191# define CONFIG_ROOTPATH /romfs
192# ifdef CONFIG_CMD_DHCP
193# ifndef CONFIG_SYS_AUTOLOAD
194# define CONFIG_SYS_AUTOLOAD "no"
195# endif
196# endif
197# define CONFIG_NET_RETRY_COUNT 20
198#endif
199
200#endif