blob: ceb130c813de4dc7c21464f67b6b4a1f18b68b12 [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
Mike Frysingerc0e7c7a2009-05-25 22:42:28 -040041# ifdef CONFIG_NAND_PLAT
42# define CONFIG_CMD_NAND
43# endif
Mike Frysinger62d2a232008-06-01 09:09:48 -040044# ifdef CONFIG_POST
45# define CONFIG_CMD_DIAG
46# endif
47# ifdef CONFIG_RTC_BFIN
48# define CONFIG_CMD_DATE
49# endif
50# ifdef CONFIG_SPI
51# define CONFIG_CMD_EEPROM
52# endif
53# if defined(CONFIG_BFIN_SPI) || defined(CONFIG_SOFT_SPI)
54# define CONFIG_CMD_SPI
55# endif
56# ifdef CONFIG_SPI_FLASH
57# define CONFIG_CMD_SF
58# endif
59# if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
60# define CONFIG_CMD_I2C
61# endif
62# ifdef CONFIG_SYS_NO_FLASH
63# undef CONFIG_CMD_FLASH
64# undef CONFIG_CMD_IMLS
65# else
66# define CONFIG_CMD_JFFS2
67# endif
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
Mike Frysinger7c8e97f2008-11-27 16:50:32 -050077# define CONFIG_CMD_SPIBOOTLDR
Mike Frysinger62d2a232008-06-01 09:09:48 -040078# endif
79#endif
80
81/*
82 * Console Settings
83 */
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
91#endif
92
93/*
94 * Debug Settings
95 */
96#define CONFIG_ENV_OVERWRITE 1
97#define CONFIG_DEBUG_DUMP 1
Mike Frysingera46fbba2009-05-20 04:35:14 -040098#define CONFIG_KALLSYMS 1
Mike Frysinger62d2a232008-06-01 09:09:48 -040099#define CONFIG_PANIC_HANG 1
100
101/*
102 * Env Settings
103 */
104#if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_UART)
105# define CONFIG_BOOTDELAY -1
106#else
107# define CONFIG_BOOTDELAY 5
108#endif
Mike Frysingera76bd0d2009-04-13 05:52:45 -0400109#ifndef CONFIG_BOOTCOMMAND
110# define CONFIG_BOOTCOMMAND "run ramboot"
111#endif
Mike Frysinger62d2a232008-06-01 09:09:48 -0400112#ifdef CONFIG_VIDEO
113# define CONFIG_BOOTARGS_VIDEO "console=tty0 "
114#else
115# define CONFIG_BOOTARGS_VIDEO ""
116#endif
Mike Frysingera76bd0d2009-04-13 05:52:45 -0400117#ifndef CONFIG_BOOTARGS_ROOT
118# define CONFIG_BOOTARGS_ROOT "/dev/mtdblock0 rw"
119#endif
Mike Frysinger62d2a232008-06-01 09:09:48 -0400120#define CONFIG_BOOTARGS \
Mike Frysingera76bd0d2009-04-13 05:52:45 -0400121 "root=" CONFIG_BOOTARGS_ROOT " " \
Mike Frysingera66097a2008-12-09 13:47:39 -0500122 "clkin_hz=" MK_STR(CONFIG_CLKIN_HZ) " " \
Mike Frysinger62d2a232008-06-01 09:09:48 -0400123 "earlyprintk=" \
124 "serial," \
125 "uart" MK_STR(CONFIG_UART_CONSOLE) "," \
126 MK_STR(CONFIG_BAUDRATE) " " \
127 CONFIG_BOOTARGS_VIDEO \
128 "console=ttyBF0," MK_STR(CONFIG_BAUDRATE)
Mike Frysingera76bd0d2009-04-13 05:52:45 -0400129#if defined(CONFIG_CMD_NAND)
130# define NAND_ENV_SETTINGS \
131 "nandargs=set bootargs " CONFIG_BOOTARGS "\0" \
132 "nandboot=" \
133 "nand read $(loadaddr) 0x20000 0x100000;" \
134 "run nandargs;" \
135 "bootm" \
136 "\0"
137#else
138# define NAND_ENV_SETTINGS
139#endif
Mike Frysinger62d2a232008-06-01 09:09:48 -0400140#if defined(CONFIG_CMD_NET)
141# if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
142# define UBOOT_ENV_FILE "u-boot.bin"
143# else
144# define UBOOT_ENV_FILE "u-boot.ldr"
145# endif
146# if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER)
147# ifdef CONFIG_SPI
148# define UBOOT_ENV_UPDATE \
149 "eeprom write $(loadaddr) 0x0 $(filesize)"
150# else
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)"
155# endif
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"
161# else
162# define UBOOT_ENV_UPDATE \
Robin Getz09bbcb32009-07-10 18:37:15 +0000163 "protect off 0x20000000 +$(filesize);" \
164 "erase 0x20000000 +$(filesize);" \
Mike Frysinger62d2a232008-06-01 09:09:48 -0400165 "cp.b $(loadaddr) 0x20000000 $(filesize)"
166# endif
167# define NETWORK_ENV_SETTINGS \
168 "ubootfile=" UBOOT_ENV_FILE "\0" \
169 "update=" \
170 "tftp $(loadaddr) $(ubootfile);" \
171 UBOOT_ENV_UPDATE \
172 "\0" \
173 "addip=set bootargs $(bootargs) " \
174 "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):" \
175 "$(hostname):eth0:off" \
176 "\0" \
Mike Frysingera76bd0d2009-04-13 05:52:45 -0400177 \
178 "ramfile=uImage\0" \
Mike Frysinger62d2a232008-06-01 09:09:48 -0400179 "ramargs=set bootargs " CONFIG_BOOTARGS "\0" \
180 "ramboot=" \
Mike Frysingera76bd0d2009-04-13 05:52:45 -0400181 "tftp $(loadaddr) $(ramfile);" \
Mike Frysinger62d2a232008-06-01 09:09:48 -0400182 "run ramargs;" \
183 "run addip;" \
184 "bootm" \
185 "\0" \
Mike Frysingera76bd0d2009-04-13 05:52:45 -0400186 \
187 "nfsfile=vmImage\0" \
Mike Frysinger62d2a232008-06-01 09:09:48 -0400188 "nfsargs=set bootargs " \
189 "root=/dev/nfs rw " \
190 "nfsroot=$(serverip):$(rootpath),tcp,nfsvers=3" \
191 "\0" \
192 "nfsboot=" \
Mike Frysingera76bd0d2009-04-13 05:52:45 -0400193 "tftp $(loadaddr) $(nfsfile);" \
Mike Frysinger62d2a232008-06-01 09:09:48 -0400194 "run nfsargs;" \
195 "run addip;" \
196 "bootm" \
197 "\0"
198#else
199# define NETWORK_ENV_SETTINGS
200#endif
201#define CONFIG_EXTRA_ENV_SETTINGS \
Mike Frysingera76bd0d2009-04-13 05:52:45 -0400202 NAND_ENV_SETTINGS \
Mike Frysinger62d2a232008-06-01 09:09:48 -0400203 NETWORK_ENV_SETTINGS \
204 "flashboot=bootm 0x20100000\0"
205
206/*
207 * Network Settings
208 */
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"
218# endif
219# endif
220# define CONFIG_NET_RETRY_COUNT 20
221#endif
222
Mike Frysinger07145b42009-04-24 17:11:47 -0400223/*
224 * Misc Settings
225 */
226#define CONFIG_LZMA
227
Mike Frysinger62d2a232008-06-01 09:09:48 -0400228#endif