blob: c0122b7a695b7424f125370f3c0445edb17ad814 [file] [log] [blame]
Heiko Schocher7f625fc2009-09-23 07:56:04 +02001/*
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
32#define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
33#define BOOTFLAG_WARM 0x02 /* Software reboot */
34
35#define CONFIG_BOARD_EARLY_INIT_R
36
37/* Partitions */
38#define CONFIG_DOS_PARTITION
39
40/*
41 * Command line configuration.
42 */
43#include <config_cmd_default.h>
44
45#define CONFIG_CMD_DATE
46#define CONFIG_CMD_DISPLAY
47#define CONFIG_CMD_DHCP
48#define CONFIG_CMD_PING
49#define CONFIG_CMD_EEPROM
50#define CONFIG_CMD_I2C
51#define CONFIG_CMD_DTT
52#define CONFIG_CMD_IDE
53#define CONFIG_CMD_FAT
54#define CONFIG_CMD_NFS
55#define CONFIG_CMD_MII
56#define CONFIG_CMD_SNTP
57
58#define CONFIG_TIMESTAMP 1 /* Print image info with timestamp */
59
60/*
61 * Autobooting
62 */
63#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
64
65#define CONFIG_PREBOOT "echo;" \
66 "echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;" \
67 "echo"
68
69#undef CONFIG_BOOTARGS
70
71#define xstr(s) str(s)
72#define str(s) #s
73
74#define CONFIG_EXTRA_ENV_SETTINGS \
75 "netdev=eth0\0" \
76 "nfsargs=setenv bootargs root=/dev/nfs rw " \
77 "nfsroot=${serverip}:${rootpath}\0" \
78 "ramargs=setenv bootargs root=/dev/ram rw\0" \
79 "addwdt=setenv bootargs ${bootargs} wdt=off\0" \
80 "logval=4\0" \
81 "addlog=setenv bootargs ${bootargs} loglevel=${logval}\0" \
82 "addip=setenv bootargs ${bootargs} " \
83 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
84 ":${hostname}:${netdev}:off panic=1\0" \
85 "kernel_addr=ff810000\0" \
86 "fdt_addr="xstr(CONFIG_SYS_FLASH_BASE)"\0" \
87 "flash_nfs=run nfsargs addip addcon addwdt addlog;" \
88 "bootm ${kernel_addr} - ${fdt_addr}\0" \
89 "rootpath=/opt/eldk/ppc_82xx\0" \
90 "kernel_addr_r=300000\0" \
91 "fdt_addr_r=200000\0" \
92 "fdt_file=" xstr(CONFIG_HOSTNAME) "/" \
93 xstr(CONFIG_HOSTNAME) ".dtb\0" \
94 "kernel_file=" xstr(CONFIG_HOSTNAME) "/uImage \0" \
95 "load_fdt=tftp ${fdt_addr_r} ${fdt_file};\0" \
96 "load_kernel=tftp ${kernel_addr_r} ${kernel_file};\0" \
97 "addcon=setenv bootargs ${bootargs} console=ttyPSC0,${baudrate}\0"\
98 "net_nfs=run load_fdt load_kernel; " \
99 "run nfsargs addip addcon addwdt addlog;" \
100 "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \
101 "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin \0" \
102 "u-boot_addr_r=200000\0" \
103 "load=tftp ${u-boot_addr_r} ${u-boot}\0" \
104 "update=protect off " xstr(TEXT_BASE) " +${filesize};" \
105 "erase " xstr(TEXT_BASE) " +${filesize};" \
106 "cp.b ${u-boot_addr_r} " xstr(TEXT_BASE) \
107 " ${filesize};" \
108 "protect on " xstr(TEXT_BASE) " +${filesize}\0" \
109 ""
110
111#define CONFIG_BOOTCOMMAND "run net_nfs"
112
113#define CONFIG_MISC_INIT_R 1
114
115/*
116 * Miscellaneous configurable options
117 */
118#define CONFIG_SYS_LONGHELP /* undef to save memory */
119#define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
120#if defined(CONFIG_CMD_KGDB)
121#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
122#else
123#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
124#endif
125#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
126#define CONFIG_SYS_MAXARGS 16 /* max number of command args*/
127#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
128
129/* Enable an alternate, more extensive memory test */
130#define CONFIG_SYS_ALT_MEMTEST
131
132/*
133 * Enable loopw command.
134 */
135#define CONFIG_LOOPW
136
137/* pass open firmware flat tree */
138#define CONFIG_OF_LIBFDT 1
139#define CONFIG_OF_BOARD_SETUP 1
140
141#endif /* __MANROLAND_COMMON_H */