1264eaa0eSValentin Longchamp /* 2264eaa0eSValentin Longchamp * (C) Copyright 2008-2011 3264eaa0eSValentin Longchamp * Heiko Schocher, DENX Software Engineering, hs@denx.de. 4264eaa0eSValentin Longchamp * 5264eaa0eSValentin Longchamp * See file CREDITS for list of people who contributed to this 6264eaa0eSValentin Longchamp * project. 7264eaa0eSValentin Longchamp * 8264eaa0eSValentin Longchamp * This program is free software; you can redistribute it and/or 9264eaa0eSValentin Longchamp * modify it under the terms of the GNU General Public License as 10264eaa0eSValentin Longchamp * published by the Free Software Foundation; either version 2 of 11264eaa0eSValentin Longchamp * the License, or (at your option) any later version. 12264eaa0eSValentin Longchamp * 13264eaa0eSValentin Longchamp * This program is distributed in the hope that it will be useful, 14264eaa0eSValentin Longchamp * but WITHOUT ANY WARRANTY; without even the implied warranty of 15264eaa0eSValentin Longchamp * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16264eaa0eSValentin Longchamp * GNU General Public License for more details. 17264eaa0eSValentin Longchamp * 18264eaa0eSValentin Longchamp * You should have received a copy of the GNU General Public License 19264eaa0eSValentin Longchamp * along with this program; if not, write to the Free Software 20264eaa0eSValentin Longchamp * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21264eaa0eSValentin Longchamp * MA 02111-1307 USA 22264eaa0eSValentin Longchamp */ 23264eaa0eSValentin Longchamp 24264eaa0eSValentin Longchamp #ifndef __CONFIG_KEYMILE_H 25264eaa0eSValentin Longchamp #define __CONFIG_KEYMILE_H 26264eaa0eSValentin Longchamp 27264eaa0eSValentin Longchamp /* Do boardspecific init for all boards */ 28264eaa0eSValentin Longchamp #define CONFIG_BOARD_EARLY_INIT_R 29264eaa0eSValentin Longchamp #define CONFIG_LAST_STAGE_INIT 30264eaa0eSValentin Longchamp 31264eaa0eSValentin Longchamp #define CONFIG_BOOTCOUNT_LIMIT 32264eaa0eSValentin Longchamp 33264eaa0eSValentin Longchamp /* 34264eaa0eSValentin Longchamp * Command line configuration. 35264eaa0eSValentin Longchamp */ 36264eaa0eSValentin Longchamp #include <config_cmd_default.h> 37264eaa0eSValentin Longchamp 38264eaa0eSValentin Longchamp #define CONFIG_CMD_ASKENV 39264eaa0eSValentin Longchamp #define CONFIG_CMD_DHCP 40264eaa0eSValentin Longchamp #define CONFIG_CMD_ECHO 41264eaa0eSValentin Longchamp #define CONFIG_CMD_IMMAP 42264eaa0eSValentin Longchamp #define CONFIG_CMD_MII 43264eaa0eSValentin Longchamp #define CONFIG_CMD_PING 44264eaa0eSValentin Longchamp #define CONFIG_CMD_EEPROM 45264eaa0eSValentin Longchamp #define CONFIG_CMD_I2C 46264eaa0eSValentin Longchamp #define CONFIG_CMD_JFFS2 47264eaa0eSValentin Longchamp #define CONFIG_CMD_MTDPARTS 48264eaa0eSValentin Longchamp #define CONFIG_CMD_SETEXPR 49264eaa0eSValentin Longchamp 50264eaa0eSValentin Longchamp #undef CONFIG_WATCHDOG /* disable platform specific watchdog */ 51264eaa0eSValentin Longchamp 52264eaa0eSValentin Longchamp #define CONFIG_BOOTDELAY 2 /* autoboot after 2 seconds */ 53264eaa0eSValentin Longchamp #undef CONFIG_BOOTARGS /* the boot command will set bootargs */ 54264eaa0eSValentin Longchamp 55264eaa0eSValentin Longchamp /* 56264eaa0eSValentin Longchamp * Miscellaneous configurable options 57264eaa0eSValentin Longchamp */ 58264eaa0eSValentin Longchamp #define CONFIG_SYS_HUSH_PARSER 59264eaa0eSValentin Longchamp #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " 60264eaa0eSValentin Longchamp #define CONFIG_SYS_LONGHELP /* undef to save memory */ 61264eaa0eSValentin Longchamp #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ 62264eaa0eSValentin Longchamp #if defined(CONFIG_CMD_KGDB) 63264eaa0eSValentin Longchamp #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ 64264eaa0eSValentin Longchamp #else 65264eaa0eSValentin Longchamp #define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ 66264eaa0eSValentin Longchamp #endif 67264eaa0eSValentin Longchamp #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) 68264eaa0eSValentin Longchamp #define CONFIG_SYS_MAXARGS 32 /* max number of command args */ 69264eaa0eSValentin Longchamp #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE 70264eaa0eSValentin Longchamp #define CONFIG_CMDLINE_EDITING 71264eaa0eSValentin Longchamp #define CONFIG_AUTO_COMPLETE 72264eaa0eSValentin Longchamp 73264eaa0eSValentin Longchamp #define CONFIG_HUSH_INIT_VAR 74264eaa0eSValentin Longchamp 75264eaa0eSValentin Longchamp #define CONFIG_SYS_ALT_MEMTEST /* memory test, takes time */ 76264eaa0eSValentin Longchamp 77264eaa0eSValentin Longchamp #define CONFIG_SYS_HZ 1000 /* decr. freq: 1 ms ticks */ 78264eaa0eSValentin Longchamp 79264eaa0eSValentin Longchamp #define CONFIG_BAUDRATE 115200 80264eaa0eSValentin Longchamp #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 } 81264eaa0eSValentin Longchamp 82264eaa0eSValentin Longchamp #define CONFIG_LOADS_ECHO 83264eaa0eSValentin Longchamp #define CONFIG_SYS_LOADS_BAUD_CHANGE 84264eaa0eSValentin Longchamp #define CONFIG_SYS_BOARD_DRAM_INIT /* Used board specific dram_init */ 85264eaa0eSValentin Longchamp 86264eaa0eSValentin Longchamp #define CONFIG_I2C_MULTI_BUS 87264eaa0eSValentin Longchamp #define CONFIG_SYS_MAX_I2C_BUS 1 88264eaa0eSValentin Longchamp #define CONFIG_SYS_I2C_INIT_BOARD 89264eaa0eSValentin Longchamp #define CONFIG_I2C_MUX 90264eaa0eSValentin Longchamp 91264eaa0eSValentin Longchamp /* Support the IVM EEprom */ 92264eaa0eSValentin Longchamp #define CONFIG_SYS_IVM_EEPROM_ADR 0x50 93264eaa0eSValentin Longchamp #define CONFIG_SYS_IVM_EEPROM_MAX_LEN 0x400 94264eaa0eSValentin Longchamp #define CONFIG_SYS_IVM_EEPROM_PAGE_LEN 0x100 95264eaa0eSValentin Longchamp 96264eaa0eSValentin Longchamp #define CONFIG_SYS_FLASH_PROTECTION 97264eaa0eSValentin Longchamp 98264eaa0eSValentin Longchamp /* 99264eaa0eSValentin Longchamp * BOOTP options 100264eaa0eSValentin Longchamp */ 101264eaa0eSValentin Longchamp #define CONFIG_BOOTP_BOOTFILESIZE 102264eaa0eSValentin Longchamp #define CONFIG_BOOTP_BOOTPATH 103264eaa0eSValentin Longchamp #define CONFIG_BOOTP_GATEWAY 104264eaa0eSValentin Longchamp #define CONFIG_BOOTP_HOSTNAME 105264eaa0eSValentin Longchamp 106264eaa0eSValentin Longchamp #define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024) 107264eaa0eSValentin Longchamp 108264eaa0eSValentin Longchamp /* UBI Support for all Keymile boards */ 109264eaa0eSValentin Longchamp #define CONFIG_CMD_UBI 110264eaa0eSValentin Longchamp #define CONFIG_RBTREE 111264eaa0eSValentin Longchamp #define CONFIG_MTD_PARTITIONS 112264eaa0eSValentin Longchamp #define CONFIG_MTD_DEVICE 113264eaa0eSValentin Longchamp #define CONFIG_MTD_CONCAT 114264eaa0eSValentin Longchamp 115f7fb46a8SHolger Brunck #define CONFIG_CMD_CRAMFS 116f7fb46a8SHolger Brunck #define CONFIG_CRAMFS_CMDLINE 117f7fb46a8SHolger Brunck 118264eaa0eSValentin Longchamp #ifndef CONFIG_KM_DEF_ENV_BOOTPARAMS 119264eaa0eSValentin Longchamp #define CONFIG_KM_DEF_ENV_BOOTPARAMS \ 120db0bb572SHolger Brunck "actual_bank=0\0" 121264eaa0eSValentin Longchamp #endif 122264eaa0eSValentin Longchamp 123264eaa0eSValentin Longchamp #ifndef CONFIG_KM_DEF_NETDEV 124264eaa0eSValentin Longchamp #define CONFIG_KM_DEF_NETDEV \ 125264eaa0eSValentin Longchamp "netdev=eth0\0" 126264eaa0eSValentin Longchamp #endif 127264eaa0eSValentin Longchamp 128264eaa0eSValentin Longchamp #ifndef CONFIG_KM_UBI_PARTITION_NAME 129264eaa0eSValentin Longchamp #define CONFIG_KM_UBI_PARTITION_NAME "ubi0" 130264eaa0eSValentin Longchamp #endif 131264eaa0eSValentin Longchamp #ifndef CONFIG_KM_UBI_LINUX_MTD_NAME 132264eaa0eSValentin Longchamp #define CONFIG_KM_UBI_LINUX_MTD_NAME "ubi0" 133264eaa0eSValentin Longchamp #endif 134264eaa0eSValentin Longchamp 135264eaa0eSValentin Longchamp #define xstr(s) str(s) 136264eaa0eSValentin Longchamp #define str(s) #s 137264eaa0eSValentin Longchamp 138264eaa0eSValentin Longchamp /* 139264eaa0eSValentin Longchamp * boottargets 140db0bb572SHolger Brunck * - set 'subbootcmds' 141264eaa0eSValentin Longchamp * - set 'bootcmd' and 'altbootcmd' 142264eaa0eSValentin Longchamp * available targets: 143264eaa0eSValentin Longchamp * - 'release': for a standalone system kernel/rootfs from flash 144264eaa0eSValentin Longchamp */ 145264eaa0eSValentin Longchamp #define CONFIG_KM_DEF_ENV_BOOTTARGETS \ 146db0bb572SHolger Brunck "subbootcmds=ubiattach ubicopy cramfsloadfdt cramfsloadkernel " \ 147db0bb572SHolger Brunck "flashargs add_default addpanic boot\0" \ 148b648bfc2SHolger Brunck "develop=" \ 149b648bfc2SHolger Brunck "tftp 200000 scripts/develop-${arch}.txt && " \ 1502d9528e3SHolger Brunck "env import -t 200000 ${filesize} && " \ 151b648bfc2SHolger Brunck "run setup_debug_env\0" \ 152b648bfc2SHolger Brunck "ramfs=" \ 153b648bfc2SHolger Brunck "tftp 200000 scripts/ramfs-${arch}.txt && " \ 154b648bfc2SHolger Brunck "env import -t 200000 ${filesize} && " \ 155b648bfc2SHolger Brunck "run setup_debug_env\0" \ 156264eaa0eSValentin Longchamp "" 157264eaa0eSValentin Longchamp 158264eaa0eSValentin Longchamp /* 159264eaa0eSValentin Longchamp * bootargs 160264eaa0eSValentin Longchamp * - modify 'bootargs' 161264eaa0eSValentin Longchamp * 162db0bb572SHolger Brunck * - 'add_default': default bootargs common for all arm/ppc boards 163264eaa0eSValentin Longchamp * - 'addpanic': add kernel panic options 164264eaa0eSValentin Longchamp * - 'flashargs': defaults arguments for flash base boot 165264eaa0eSValentin Longchamp * 166264eaa0eSValentin Longchamp */ 167264eaa0eSValentin Longchamp #define CONFIG_KM_DEF_ENV_BOOTARGS \ 168db0bb572SHolger Brunck "add_default=" \ 169264eaa0eSValentin Longchamp "setenv bootargs ${bootargs} " \ 170264eaa0eSValentin Longchamp "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ 171db0bb572SHolger Brunck ":${hostname}:${netdev}:off3" \ 172db0bb572SHolger Brunck " console=" CONFIG_KM_CONSOLE_TTY ",${baudrate}" \ 173*2a7714ceSAndreas Huber " mem=${kernelmem} init=${init}" \ 174db0bb572SHolger Brunck " phram.phram=phvar,${varaddr}," xstr(CONFIG_KM_PHRAM) \ 175db0bb572SHolger Brunck " ubi.mtd=" CONFIG_KM_UBI_LINUX_MTD_NAME " " \ 176db0bb572SHolger Brunck CONFIG_KM_DEF_BOOT_ARGS_CPU \ 177db0bb572SHolger Brunck "\0" \ 178264eaa0eSValentin Longchamp "addpanic=" \ 1792d9528e3SHolger Brunck "setenv bootargs ${bootargs} panic=1 panic_on_oops=1\0" \ 180264eaa0eSValentin Longchamp "flashargs=" \ 181264eaa0eSValentin Longchamp "setenv bootargs " \ 182264eaa0eSValentin Longchamp "root=mtdblock:rootfs${boot_bank} " \ 183264eaa0eSValentin Longchamp "rootfstype=squashfs ro\0" \ 184264eaa0eSValentin Longchamp "" 185264eaa0eSValentin Longchamp 186264eaa0eSValentin Longchamp /* 187264eaa0eSValentin Longchamp * flash_boot 188264eaa0eSValentin Longchamp * - commands for booting from flash 189264eaa0eSValentin Longchamp * 190264eaa0eSValentin Longchamp * - 'cramfsloadkernel': copy kernel from a cramfs to ram 191264eaa0eSValentin Longchamp * - 'ubiattach': attach ubi partition 192264eaa0eSValentin Longchamp * - 'ubicopy': copy ubi volume to ram 193264eaa0eSValentin Longchamp * - volume names: bootfs0, bootfs1, bootfs2, ... 194264eaa0eSValentin Longchamp * 195264eaa0eSValentin Longchamp * processor specific settings 196264eaa0eSValentin Longchamp * - 'cramfsloadfdt': copy fdt from a cramfs to ram 197264eaa0eSValentin Longchamp */ 198264eaa0eSValentin Longchamp #define CONFIG_KM_DEF_ENV_FLASH_BOOT \ 199264eaa0eSValentin Longchamp "cramfsaddr=" xstr(CONFIG_KM_CRAMFS_ADDR) "\0" \ 200db0bb572SHolger Brunck "cramfsloadkernel=cramfsload ${load_addr_r} uImage\0" \ 2012d9528e3SHolger Brunck "ubiattach=ubi part " CONFIG_KM_UBI_PARTITION_NAME "\0" \ 2022d9528e3SHolger Brunck "ubicopy=ubi read "xstr(CONFIG_KM_CRAMFS_ADDR) \ 2032d9528e3SHolger Brunck " bootfs${boot_bank}\0" \ 204264eaa0eSValentin Longchamp "" 205264eaa0eSValentin Longchamp 206264eaa0eSValentin Longchamp /* 207264eaa0eSValentin Longchamp * constants 208264eaa0eSValentin Longchamp * - KM specific constants and commands 209264eaa0eSValentin Longchamp * 210264eaa0eSValentin Longchamp * - 'default': setup default environment 211264eaa0eSValentin Longchamp */ 212264eaa0eSValentin Longchamp #define CONFIG_KM_DEF_ENV_CONSTANTS \ 213264eaa0eSValentin Longchamp "backup_bank=0\0" \ 214db0bb572SHolger Brunck "release=run newenv; reset\0" \ 215638a48edSHolger Brunck "pnvramsize=" xstr(CONFIG_KM_PNVRAM) "\0" \ 2160333cfe6SThomas Herzmann "testbootcmd=setenv boot_bank ${test_bank}; " \ 2170333cfe6SThomas Herzmann "run ${subbootcmds}; reset\0" \ 218264eaa0eSValentin Longchamp "" 219264eaa0eSValentin Longchamp 220264eaa0eSValentin Longchamp #ifndef CONFIG_KM_DEF_ENV 221264eaa0eSValentin Longchamp #define CONFIG_KM_DEF_ENV \ 222264eaa0eSValentin Longchamp CONFIG_KM_DEF_ENV_BOOTPARAMS \ 223264eaa0eSValentin Longchamp CONFIG_KM_DEF_NETDEV \ 224264eaa0eSValentin Longchamp CONFIG_KM_DEF_ENV_CPU \ 225264eaa0eSValentin Longchamp CONFIG_KM_DEF_ENV_BOOTTARGETS \ 226264eaa0eSValentin Longchamp CONFIG_KM_DEF_ENV_BOOTARGS \ 227264eaa0eSValentin Longchamp CONFIG_KM_DEF_ENV_FLASH_BOOT \ 228264eaa0eSValentin Longchamp CONFIG_KM_DEF_ENV_CONSTANTS \ 229264eaa0eSValentin Longchamp "altbootcmd=run bootcmd\0" \ 230db0bb572SHolger Brunck "bootcmd=km_checkbidhwk && " \ 231db0bb572SHolger Brunck " setenv bootcmd \'setenv boot_bank ${actual_bank}; " \ 232db0bb572SHolger Brunck "run ${subbootcmds}; reset\' && " \ 233db0bb572SHolger Brunck "setenv altbootcmd \'setenv boot_bank ${backup_bank}; " \ 234db0bb572SHolger Brunck "run ${subbootcmds}; reset\' && " \ 235db0bb572SHolger Brunck "saveenv && saveenv && boot\0" \ 236264eaa0eSValentin Longchamp "bootlimit=2\0" \ 237264eaa0eSValentin Longchamp "init=/sbin/init-overlay.sh\0" \ 238db0bb572SHolger Brunck "load_addr_r="xstr(CONFIG_KM_KERNEL_ADDR) "\0" \ 239db0bb572SHolger Brunck "load=tftpboot ${load_addr_r} ${u-boot}\0" \ 240264eaa0eSValentin Longchamp "mtdids=" MTDIDS_DEFAULT "\0" \ 241264eaa0eSValentin Longchamp "mtdparts=" MTDPARTS_DEFAULT "\0" \ 242264eaa0eSValentin Longchamp "stderr=serial\0" \ 243264eaa0eSValentin Longchamp "stdin=serial\0" \ 244264eaa0eSValentin Longchamp "stdout=serial\0" \ 245264eaa0eSValentin Longchamp "" 246264eaa0eSValentin Longchamp #endif /* CONFIG_KM_DEF_ENV */ 247264eaa0eSValentin Longchamp 248264eaa0eSValentin Longchamp #define CONFIG_VERSION_VARIABLE /* include version env variable */ 249264eaa0eSValentin Longchamp 250264eaa0eSValentin Longchamp #endif /* __CONFIG_KEYMILE_H */ 251