Heiko Schocher | 7f625fc | 2009-09-23 07:56:04 +0200 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2009 |
| 3 | * Heiko Schocher, DENX Software Engineering, hs@denx.de. |
| 4 | * |
| 5 | * See file CREDITS for list of people who contributed to this |
| 6 | * project. |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License as |
| 10 | * published by the Free Software Foundation; either version 2 of |
| 11 | * the License, or (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 21 | * MA 02111-1307 USA |
| 22 | */ |
| 23 | |
| 24 | #ifndef __MANROLAND_COMMON_H |
| 25 | #define __MANROLAND_COMMON_H |
| 26 | |
| 27 | /* |
| 28 | * High Level Configuration Options |
| 29 | * (easy to change) |
| 30 | */ |
| 31 | |
Heiko Schocher | 7f625fc | 2009-09-23 07:56:04 +0200 | [diff] [blame] | 32 | #define CONFIG_BOARD_EARLY_INIT_R |
| 33 | |
| 34 | /* Partitions */ |
| 35 | #define CONFIG_DOS_PARTITION |
| 36 | |
| 37 | /* |
| 38 | * Command line configuration. |
| 39 | */ |
| 40 | #include <config_cmd_default.h> |
| 41 | |
| 42 | #define CONFIG_CMD_DATE |
| 43 | #define CONFIG_CMD_DISPLAY |
| 44 | #define CONFIG_CMD_DHCP |
| 45 | #define CONFIG_CMD_PING |
| 46 | #define CONFIG_CMD_EEPROM |
| 47 | #define CONFIG_CMD_I2C |
| 48 | #define CONFIG_CMD_DTT |
| 49 | #define CONFIG_CMD_IDE |
| 50 | #define CONFIG_CMD_FAT |
| 51 | #define CONFIG_CMD_NFS |
| 52 | #define CONFIG_CMD_MII |
| 53 | #define CONFIG_CMD_SNTP |
| 54 | |
Ilya Yanok | 7f0d241 | 2010-09-09 23:03:32 +0200 | [diff] [blame] | 55 | /* |
| 56 | * 8-symbol LED display (can be accessed with 'display' command) |
| 57 | */ |
| 58 | #define CONFIG_PDSP188x |
| 59 | |
Heiko Schocher | 7f625fc | 2009-09-23 07:56:04 +0200 | [diff] [blame] | 60 | #define CONFIG_TIMESTAMP 1 /* Print image info with timestamp */ |
| 61 | |
| 62 | /* |
| 63 | * Autobooting |
| 64 | */ |
| 65 | #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ |
| 66 | |
| 67 | #define CONFIG_PREBOOT "echo;" \ |
| 68 | "echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;" \ |
| 69 | "echo" |
| 70 | |
| 71 | #undef CONFIG_BOOTARGS |
| 72 | |
| 73 | #define xstr(s) str(s) |
| 74 | #define str(s) #s |
| 75 | |
| 76 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 77 | "netdev=eth0\0" \ |
| 78 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
| 79 | "nfsroot=${serverip}:${rootpath}\0" \ |
| 80 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ |
| 81 | "addwdt=setenv bootargs ${bootargs} wdt=off\0" \ |
| 82 | "logval=4\0" \ |
| 83 | "addlog=setenv bootargs ${bootargs} loglevel=${logval}\0" \ |
| 84 | "addip=setenv bootargs ${bootargs} " \ |
| 85 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ |
| 86 | ":${hostname}:${netdev}:off panic=1\0" \ |
| 87 | "kernel_addr=ff810000\0" \ |
| 88 | "fdt_addr="xstr(CONFIG_SYS_FLASH_BASE)"\0" \ |
| 89 | "flash_nfs=run nfsargs addip addcon addwdt addlog;" \ |
| 90 | "bootm ${kernel_addr} - ${fdt_addr}\0" \ |
| 91 | "rootpath=/opt/eldk/ppc_82xx\0" \ |
| 92 | "kernel_addr_r=300000\0" \ |
| 93 | "fdt_addr_r=200000\0" \ |
| 94 | "fdt_file=" xstr(CONFIG_HOSTNAME) "/" \ |
| 95 | xstr(CONFIG_HOSTNAME) ".dtb\0" \ |
| 96 | "kernel_file=" xstr(CONFIG_HOSTNAME) "/uImage \0" \ |
| 97 | "load_fdt=tftp ${fdt_addr_r} ${fdt_file};\0" \ |
| 98 | "load_kernel=tftp ${kernel_addr_r} ${kernel_file};\0" \ |
| 99 | "addcon=setenv bootargs ${bootargs} console=ttyPSC0,${baudrate}\0"\ |
| 100 | "net_nfs=run load_fdt load_kernel; " \ |
| 101 | "run nfsargs addip addcon addwdt addlog;" \ |
| 102 | "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ |
| 103 | "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin \0" \ |
| 104 | "u-boot_addr_r=200000\0" \ |
| 105 | "load=tftp ${u-boot_addr_r} ${u-boot}\0" \ |
Wolfgang Denk | 14d0a02 | 2010-10-07 21:51:12 +0200 | [diff] [blame] | 106 | "update=protect off " xstr(CONFIG_SYS_TEXT_BASE) " +${filesize};" \ |
| 107 | "erase " xstr(CONFIG_SYS_TEXT_BASE) " +${filesize};" \ |
| 108 | "cp.b ${u-boot_addr_r} " xstr(CONFIG_SYS_TEXT_BASE) \ |
Heiko Schocher | 7f625fc | 2009-09-23 07:56:04 +0200 | [diff] [blame] | 109 | " ${filesize};" \ |
Wolfgang Denk | 14d0a02 | 2010-10-07 21:51:12 +0200 | [diff] [blame] | 110 | "protect on " xstr(CONFIG_SYS_TEXT_BASE) " +${filesize}\0" \ |
Heiko Schocher | 7f625fc | 2009-09-23 07:56:04 +0200 | [diff] [blame] | 111 | "" |
| 112 | |
| 113 | #define CONFIG_BOOTCOMMAND "run net_nfs" |
| 114 | |
| 115 | #define CONFIG_MISC_INIT_R 1 |
| 116 | |
| 117 | /* |
| 118 | * Miscellaneous configurable options |
| 119 | */ |
| 120 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
| 121 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
| 122 | #if defined(CONFIG_CMD_KGDB) |
| 123 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
| 124 | #else |
| 125 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
| 126 | #endif |
| 127 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) |
| 128 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args*/ |
| 129 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
Heiko Schocher | 7cb5fc1 | 2009-12-03 11:20:42 +0100 | [diff] [blame] | 130 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ |
Heiko Schocher | 7cb5fc1 | 2009-12-03 11:20:42 +0100 | [diff] [blame] | 131 | #define CONFIG_AUTO_COMPLETE /* add autocompletion support */ |
Heiko Schocher | 7f625fc | 2009-09-23 07:56:04 +0200 | [diff] [blame] | 132 | |
| 133 | /* Enable an alternate, more extensive memory test */ |
| 134 | #define CONFIG_SYS_ALT_MEMTEST |
| 135 | |
| 136 | /* |
| 137 | * Enable loopw command. |
| 138 | */ |
| 139 | #define CONFIG_LOOPW |
| 140 | |
| 141 | /* pass open firmware flat tree */ |
| 142 | #define CONFIG_OF_LIBFDT 1 |
| 143 | #define CONFIG_OF_BOARD_SETUP 1 |
| 144 | |
| 145 | #endif /* __MANROLAND_COMMON_H */ |