2008-06-01 13:09:48 +00:00
|
|
|
/*
|
|
|
|
* U-Boot - Common settings for Analog Devices boards
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __CONFIG_BFIN_ADI_COMMON_H__
|
|
|
|
#define __CONFIG_BFIN_ADI_COMMON_H__
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Command Settings
|
|
|
|
*/
|
|
|
|
#ifndef _CONFIG_CMD_DEFAULT_H
|
2012-08-16 04:08:31 +00:00
|
|
|
# ifdef ADI_CMDS_NETWORK
|
2008-06-01 13:09:48 +00:00
|
|
|
# define CONFIG_CMD_DHCP
|
2009-08-11 14:20:13 +00:00
|
|
|
# define CONFIG_BOOTP_SUBNETMASK
|
|
|
|
# define CONFIG_BOOTP_GATEWAY
|
|
|
|
# define CONFIG_BOOTP_DNS
|
|
|
|
# define CONFIG_BOOTP_NTPSERVER
|
|
|
|
# define CONFIG_BOOTP_RANDOM_DELAY
|
|
|
|
# define CONFIG_KEEP_SERVERADDR
|
|
|
|
# define CONFIG_CMD_DNS
|
2008-06-01 13:09:48 +00:00
|
|
|
# define CONFIG_CMD_PING
|
|
|
|
# ifdef CONFIG_BFIN_MAC
|
|
|
|
# define CONFIG_CMD_MII
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
# ifdef CONFIG_LIBATA
|
|
|
|
# define CONFIG_CMD_FAT
|
|
|
|
# define CONFIG_CMD_SATA
|
|
|
|
# define CONFIG_DOS_PARTITION
|
|
|
|
# endif
|
|
|
|
# ifdef CONFIG_MMC
|
2010-12-24 17:53:47 +00:00
|
|
|
# define CONFIG_CMD_EXT2
|
2008-06-01 13:09:48 +00:00
|
|
|
# define CONFIG_CMD_FAT
|
|
|
|
# define CONFIG_CMD_MMC
|
|
|
|
# define CONFIG_DOS_PARTITION
|
2014-08-15 09:08:50 +00:00
|
|
|
# define CONFIG_SYS_MMC_MAX_BLK_COUNT 127
|
2008-06-01 13:09:48 +00:00
|
|
|
# endif
|
2010-12-24 17:53:47 +00:00
|
|
|
# ifdef CONFIG_MMC_SPI
|
|
|
|
# define CONFIG_CMD_MMC_SPI
|
|
|
|
# endif
|
2008-06-01 13:09:48 +00:00
|
|
|
# ifdef CONFIG_USB
|
|
|
|
# define CONFIG_CMD_EXT2
|
|
|
|
# define CONFIG_CMD_FAT
|
|
|
|
# define CONFIG_CMD_USB
|
|
|
|
# define CONFIG_CMD_USB_STORAGE
|
|
|
|
# define CONFIG_DOS_PARTITION
|
|
|
|
# endif
|
2009-11-11 22:29:35 +00:00
|
|
|
# if defined(CONFIG_NAND_PLAT) || defined(CONFIG_DRIVER_NAND_BFIN)
|
2009-05-26 02:42:28 +00:00
|
|
|
# define CONFIG_CMD_NAND
|
2010-09-21 23:33:53 +00:00
|
|
|
# define CONFIG_CMD_NAND_LOCK_UNLOCK
|
2009-05-26 02:42:28 +00:00
|
|
|
# endif
|
2008-06-01 13:09:48 +00:00
|
|
|
# ifdef CONFIG_POST
|
|
|
|
# define CONFIG_CMD_DIAG
|
|
|
|
# endif
|
|
|
|
# ifdef CONFIG_RTC_BFIN
|
|
|
|
# define CONFIG_CMD_DATE
|
2012-08-16 04:08:31 +00:00
|
|
|
# ifdef ADI_CMDS_NETWORK
|
2009-08-11 14:20:13 +00:00
|
|
|
# define CONFIG_CMD_SNTP
|
|
|
|
# endif
|
2008-06-01 13:09:48 +00:00
|
|
|
# endif
|
|
|
|
# ifdef CONFIG_SPI
|
|
|
|
# define CONFIG_CMD_EEPROM
|
|
|
|
# endif
|
|
|
|
# if defined(CONFIG_BFIN_SPI) || defined(CONFIG_SOFT_SPI)
|
|
|
|
# define CONFIG_CMD_SPI
|
|
|
|
# endif
|
|
|
|
# ifdef CONFIG_SPI_FLASH
|
|
|
|
# define CONFIG_CMD_SF
|
|
|
|
# endif
|
2014-11-13 07:30:55 +00:00
|
|
|
# if defined(CONFIG_SYS_I2C) || defined(CONFIG_SYS_I2C_SOFT)
|
2008-06-01 13:09:48 +00:00
|
|
|
# define CONFIG_CMD_I2C
|
2010-06-08 20:22:44 +00:00
|
|
|
# define CONFIG_SOFT_I2C_READ_REPEATED_START
|
2008-06-01 13:09:48 +00:00
|
|
|
# endif
|
2015-06-22 21:15:30 +00:00
|
|
|
# ifndef CONFIG_SYS_NO_FLASH
|
2008-06-01 13:09:48 +00:00
|
|
|
# define CONFIG_CMD_JFFS2
|
|
|
|
# endif
|
2010-01-08 12:56:17 +00:00
|
|
|
# ifdef CONFIG_CMD_JFFS2
|
|
|
|
# define CONFIG_JFFS2_SUMMARY
|
|
|
|
# endif
|
2008-06-01 13:09:48 +00:00
|
|
|
# define CONFIG_CMD_BOOTLDR
|
|
|
|
# define CONFIG_CMD_CACHE
|
|
|
|
# define CONFIG_CMD_CPLBINFO
|
2009-12-21 21:35:48 +00:00
|
|
|
# define CONFIG_CMD_KGDB
|
2010-12-26 17:35:21 +00:00
|
|
|
# define CONFIG_CMD_LDRINFO
|
2008-06-01 13:09:48 +00:00
|
|
|
# define CONFIG_CMD_REGINFO
|
|
|
|
# define CONFIG_CMD_STRINGS
|
|
|
|
# if defined(__ADSPBF51x__) || defined(__ADSPBF52x__) || defined(__ADSPBF54x__)
|
|
|
|
# define CONFIG_CMD_OTP
|
2008-11-27 21:50:32 +00:00
|
|
|
# define CONFIG_CMD_SPIBOOTLDR
|
2008-06-01 13:09:48 +00:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Console Settings
|
|
|
|
*/
|
|
|
|
#define CONFIG_SYS_LONGHELP 1
|
|
|
|
#define CONFIG_CMDLINE_EDITING 1
|
|
|
|
#define CONFIG_AUTO_COMPLETE 1
|
|
|
|
#define CONFIG_LOADS_ECHO 1
|
|
|
|
#define CONFIG_JTAG_CONSOLE
|
2009-10-15 18:59:46 +00:00
|
|
|
#define CONFIG_SILENT_CONSOLE
|
2008-06-01 13:09:48 +00:00
|
|
|
#ifndef CONFIG_BAUDRATE
|
|
|
|
# define CONFIG_BAUDRATE 57600
|
|
|
|
#endif
|
2013-04-07 11:04:14 +00:00
|
|
|
#ifdef CONFIG_UART_CONSOLE
|
|
|
|
# define CONFIG_BFIN_SERIAL
|
|
|
|
#endif
|
2008-06-01 13:09:48 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Debug Settings
|
|
|
|
*/
|
|
|
|
#define CONFIG_ENV_OVERWRITE 1
|
|
|
|
#define CONFIG_DEBUG_DUMP 1
|
2009-05-20 08:35:14 +00:00
|
|
|
#define CONFIG_KALLSYMS 1
|
2008-06-01 13:09:48 +00:00
|
|
|
#define CONFIG_PANIC_HANG 1
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Env Settings
|
|
|
|
*/
|
2010-09-20 19:14:58 +00:00
|
|
|
#ifndef CONFIG_BOOTDELAY
|
|
|
|
# if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_UART)
|
|
|
|
# define CONFIG_BOOTDELAY -1
|
|
|
|
# else
|
|
|
|
# define CONFIG_BOOTDELAY 5
|
|
|
|
# endif
|
2008-06-01 13:09:48 +00:00
|
|
|
#endif
|
2009-04-13 09:52:45 +00:00
|
|
|
#ifndef CONFIG_BOOTCOMMAND
|
|
|
|
# define CONFIG_BOOTCOMMAND "run ramboot"
|
|
|
|
#endif
|
2008-06-01 13:09:48 +00:00
|
|
|
#ifdef CONFIG_VIDEO
|
|
|
|
# define CONFIG_BOOTARGS_VIDEO "console=tty0 "
|
|
|
|
#else
|
|
|
|
# define CONFIG_BOOTARGS_VIDEO ""
|
|
|
|
#endif
|
2009-04-13 09:52:45 +00:00
|
|
|
#ifndef CONFIG_BOOTARGS_ROOT
|
|
|
|
# define CONFIG_BOOTARGS_ROOT "/dev/mtdblock0 rw"
|
|
|
|
#endif
|
2009-10-14 12:37:32 +00:00
|
|
|
#ifndef FLASHBOOT_ENV_SETTINGS
|
|
|
|
# define FLASHBOOT_ENV_SETTINGS "flashboot=bootm 0x20100000\0"
|
|
|
|
#endif
|
2008-06-01 13:09:48 +00:00
|
|
|
#define CONFIG_BOOTARGS \
|
2009-04-13 09:52:45 +00:00
|
|
|
"root=" CONFIG_BOOTARGS_ROOT " " \
|
2012-09-23 15:41:24 +00:00
|
|
|
"clkin_hz=" __stringify(CONFIG_CLKIN_HZ) " " \
|
2008-06-01 13:09:48 +00:00
|
|
|
"earlyprintk=" \
|
|
|
|
"serial," \
|
2012-09-23 15:41:24 +00:00
|
|
|
"uart" __stringify(CONFIG_UART_CONSOLE) "," \
|
|
|
|
__stringify(CONFIG_BAUDRATE) " " \
|
2008-06-01 13:09:48 +00:00
|
|
|
CONFIG_BOOTARGS_VIDEO \
|
2012-09-23 15:41:24 +00:00
|
|
|
"console=ttyBF" __stringify(CONFIG_UART_CONSOLE) "," \
|
|
|
|
__stringify(CONFIG_BAUDRATE)
|
2009-04-13 09:52:45 +00:00
|
|
|
#if defined(CONFIG_CMD_NAND)
|
|
|
|
# define NAND_ENV_SETTINGS \
|
|
|
|
"nandargs=set bootargs " CONFIG_BOOTARGS "\0" \
|
|
|
|
"nandboot=" \
|
|
|
|
"nand read $(loadaddr) 0x20000 0x100000;" \
|
|
|
|
"run nandargs;" \
|
|
|
|
"bootm" \
|
|
|
|
"\0"
|
|
|
|
#else
|
|
|
|
# define NAND_ENV_SETTINGS
|
|
|
|
#endif
|
2008-06-01 13:09:48 +00:00
|
|
|
#if defined(CONFIG_CMD_NET)
|
|
|
|
# if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
|
|
|
|
# define UBOOT_ENV_FILE "u-boot.bin"
|
|
|
|
# else
|
|
|
|
# define UBOOT_ENV_FILE "u-boot.ldr"
|
|
|
|
# endif
|
|
|
|
# if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER)
|
|
|
|
# ifdef CONFIG_SPI
|
|
|
|
# define UBOOT_ENV_UPDATE \
|
|
|
|
"eeprom write $(loadaddr) 0x0 $(filesize)"
|
|
|
|
# else
|
2010-09-29 20:24:16 +00:00
|
|
|
# ifndef CONFIG_BFIN_SPI_IMG_SIZE
|
|
|
|
# define CONFIG_BFIN_SPI_IMG_SIZE 0x40000
|
|
|
|
# endif
|
2008-06-01 13:09:48 +00:00
|
|
|
# define UBOOT_ENV_UPDATE \
|
2012-09-23 15:41:24 +00:00
|
|
|
"sf probe " __stringify(BFIN_BOOT_SPI_SSEL) ";" \
|
|
|
|
"sf erase 0 " __stringify(CONFIG_BFIN_SPI_IMG_SIZE) ";" \
|
2008-06-01 13:09:48 +00:00
|
|
|
"sf write $(loadaddr) 0 $(filesize)"
|
|
|
|
# endif
|
|
|
|
# elif (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_NAND)
|
|
|
|
# define UBOOT_ENV_UPDATE \
|
|
|
|
"nand unlock 0 0x40000;" \
|
|
|
|
"nand erase 0 0x40000;" \
|
|
|
|
"nand write $(loadaddr) 0 0x40000"
|
|
|
|
# else
|
2012-08-16 04:08:31 +00:00
|
|
|
# ifndef UBOOT_ENV_UPDATE
|
|
|
|
# define UBOOT_ENV_UPDATE \
|
2009-07-10 18:37:15 +00:00
|
|
|
"protect off 0x20000000 +$(filesize);" \
|
|
|
|
"erase 0x20000000 +$(filesize);" \
|
2008-06-01 13:09:48 +00:00
|
|
|
"cp.b $(loadaddr) 0x20000000 $(filesize)"
|
2012-08-16 04:08:31 +00:00
|
|
|
# endif
|
2008-06-01 13:09:48 +00:00
|
|
|
# endif
|
2009-12-21 20:31:08 +00:00
|
|
|
# ifdef CONFIG_NETCONSOLE
|
|
|
|
# define NETCONSOLE_ENV \
|
|
|
|
"nc=" \
|
|
|
|
"set ncip ${serverip};" \
|
|
|
|
"set stdin nc;" \
|
2011-06-25 00:58:13 +00:00
|
|
|
"set stdout nc;" \
|
|
|
|
"set stderr nc" \
|
2009-12-21 20:31:08 +00:00
|
|
|
"\0"
|
|
|
|
# else
|
|
|
|
# define NETCONSOLE_ENV
|
|
|
|
# endif
|
2008-06-01 13:09:48 +00:00
|
|
|
# define NETWORK_ENV_SETTINGS \
|
2009-12-21 20:31:08 +00:00
|
|
|
NETCONSOLE_ENV \
|
|
|
|
\
|
2008-06-01 13:09:48 +00:00
|
|
|
"ubootfile=" UBOOT_ENV_FILE "\0" \
|
|
|
|
"update=" \
|
|
|
|
"tftp $(loadaddr) $(ubootfile);" \
|
|
|
|
UBOOT_ENV_UPDATE \
|
|
|
|
"\0" \
|
|
|
|
"addip=set bootargs $(bootargs) " \
|
|
|
|
"ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):" \
|
|
|
|
"$(hostname):eth0:off" \
|
|
|
|
"\0" \
|
2009-04-13 09:52:45 +00:00
|
|
|
\
|
|
|
|
"ramfile=uImage\0" \
|
2008-06-01 13:09:48 +00:00
|
|
|
"ramargs=set bootargs " CONFIG_BOOTARGS "\0" \
|
|
|
|
"ramboot=" \
|
2009-04-13 09:52:45 +00:00
|
|
|
"tftp $(loadaddr) $(ramfile);" \
|
2008-06-01 13:09:48 +00:00
|
|
|
"run ramargs;" \
|
|
|
|
"run addip;" \
|
|
|
|
"bootm" \
|
|
|
|
"\0" \
|
2009-04-13 09:52:45 +00:00
|
|
|
\
|
|
|
|
"nfsfile=vmImage\0" \
|
2008-06-01 13:09:48 +00:00
|
|
|
"nfsargs=set bootargs " \
|
|
|
|
"root=/dev/nfs rw " \
|
|
|
|
"nfsroot=$(serverip):$(rootpath),tcp,nfsvers=3" \
|
|
|
|
"\0" \
|
|
|
|
"nfsboot=" \
|
2009-04-13 09:52:45 +00:00
|
|
|
"tftp $(loadaddr) $(nfsfile);" \
|
2008-06-01 13:09:48 +00:00
|
|
|
"run nfsargs;" \
|
|
|
|
"run addip;" \
|
|
|
|
"bootm" \
|
|
|
|
"\0"
|
|
|
|
#else
|
|
|
|
# define NETWORK_ENV_SETTINGS
|
|
|
|
#endif
|
2010-09-19 20:27:24 +00:00
|
|
|
#ifndef BOARD_ENV_SETTINGS
|
|
|
|
# define BOARD_ENV_SETTINGS
|
|
|
|
#endif
|
2008-06-01 13:09:48 +00:00
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
2009-04-13 09:52:45 +00:00
|
|
|
NAND_ENV_SETTINGS \
|
2008-06-01 13:09:48 +00:00
|
|
|
NETWORK_ENV_SETTINGS \
|
2010-09-19 20:27:24 +00:00
|
|
|
FLASHBOOT_ENV_SETTINGS \
|
|
|
|
BOARD_ENV_SETTINGS
|
2008-06-01 13:09:48 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Network Settings
|
|
|
|
*/
|
|
|
|
#ifdef CONFIG_CMD_NET
|
|
|
|
# define CONFIG_NETMASK 255.255.255.0
|
2010-09-20 19:14:58 +00:00
|
|
|
# ifndef CONFIG_IPADDR
|
|
|
|
# define CONFIG_IPADDR 192.168.0.15
|
|
|
|
# define CONFIG_GATEWAYIP 192.168.0.1
|
|
|
|
# define CONFIG_SERVERIP 192.168.0.2
|
|
|
|
# endif
|
|
|
|
# ifndef CONFIG_ROOTPATH
|
2011-10-13 13:03:47 +00:00
|
|
|
# define CONFIG_ROOTPATH "/romfs"
|
2010-09-20 19:14:58 +00:00
|
|
|
# endif
|
2008-06-01 13:09:48 +00:00
|
|
|
# ifdef CONFIG_CMD_DHCP
|
|
|
|
# ifndef CONFIG_SYS_AUTOLOAD
|
|
|
|
# define CONFIG_SYS_AUTOLOAD "no"
|
|
|
|
# endif
|
|
|
|
# endif
|
2010-06-13 16:47:52 +00:00
|
|
|
# define CONFIG_IP_DEFRAG
|
2008-06-01 13:09:48 +00:00
|
|
|
# define CONFIG_NET_RETRY_COUNT 20
|
|
|
|
#endif
|
|
|
|
|
2011-06-06 00:18:43 +00:00
|
|
|
/*
|
|
|
|
* Flash Settings
|
|
|
|
*/
|
|
|
|
#define CONFIG_FLASH_SHOW_PROGRESS 45
|
|
|
|
|
2010-09-19 20:26:55 +00:00
|
|
|
/*
|
|
|
|
* SPI Settings
|
|
|
|
*/
|
|
|
|
#ifdef CONFIG_SPI_FLASH_ALL
|
|
|
|
#endif
|
|
|
|
|
2010-06-08 20:18:00 +00:00
|
|
|
/*
|
|
|
|
* I2C Settings
|
|
|
|
*/
|
2014-11-13 07:30:55 +00:00
|
|
|
#if defined(CONFIG_SYS_I2C) || defined(CONFIG_SYS_I2C_SOFT)
|
2010-06-08 20:18:00 +00:00
|
|
|
# ifndef CONFIG_SYS_I2C_SPEED
|
|
|
|
# define CONFIG_SYS_I2C_SPEED 50000
|
|
|
|
# endif
|
|
|
|
# ifndef CONFIG_SYS_I2C_SLAVE
|
|
|
|
# define CONFIG_SYS_I2C_SLAVE 0
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2009-04-24 21:11:47 +00:00
|
|
|
/*
|
|
|
|
* Misc Settings
|
|
|
|
*/
|
2010-10-19 22:02:43 +00:00
|
|
|
#ifndef CONFIG_BOARD_SIZE_LIMIT
|
|
|
|
# define CONFIG_BOARD_SIZE_LIMIT $$(( 256 * 1024 ))
|
|
|
|
#endif
|
2010-06-02 10:13:50 +00:00
|
|
|
#define CONFIG_BFIN_SPI_GPIO_CS /* Only matters if BFIN_SPI is enabled */
|
2009-04-24 21:11:47 +00:00
|
|
|
#define CONFIG_LZMA
|
2011-01-10 05:19:47 +00:00
|
|
|
#define CONFIG_MONITOR_IS_IN_RAM
|
2013-04-07 10:02:37 +00:00
|
|
|
#ifdef CONFIG_HW_WATCHDOG
|
|
|
|
# define CONFIG_BFIN_WATCHDOG
|
|
|
|
# ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS
|
|
|
|
# define CONFIG_WATCHDOG_TIMEOUT_MSECS 5000
|
|
|
|
# endif
|
|
|
|
#endif
|
2013-05-02 05:46:21 +00:00
|
|
|
#ifndef CONFIG_ADI_GPIO2
|
|
|
|
# define CONFIG_ADI_GPIO1
|
|
|
|
#endif
|
2008-06-01 13:09:48 +00:00
|
|
|
#endif
|