[lantiq] fix maintainer flag
[openwrt.git] / package / uboot-lantiq / files / include / configs / ifx-common.h
1 /*
2  * (C) Copyright 2008
3  * Stefan Roese, DENX Software Engineering, sr@denx.de.
4  *
5  * Common configuration options for all AMCC boards
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation; either version 2 of
10  * the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20  * MA 02111-1307 USA
21  */
22
23 #ifndef __IFX_COMMON_H
24 #define __IFX_COMMON_H
25
26 #define CONFIG_BOOTDELAY        2       /* autoboot after 5 seconds     */
27
28 #define CONFIG_BAUDRATE         115200
29
30 /* valid baudrates */
31 #define CONFIG_SYS_BAUDRATE_TABLE       { 9600, 19200, 38400, 57600, 115200 }
32
33 #define CONFIG_TIMESTAMP                /* Print image info with timestamp */
34
35 #undef CONFIG_PREBOOT
36
37 #undef  CONFIG_BOOTARGS
38 #define CONFIG_EXTRA_ENV_SETTINGS                                       \
39         "ram_addr=0x80500000\0"                                         \
40         "kernel_addr=0xb0020000\0"                                      \
41         "mtdparts=mtdparts=ifx-nor:256k(uboot)ro,64k(uboot_env)ro,64k(kernel),-(rootfs)\0" \
42         "flashargs=setenv bootargs rootfstype=squashfs,jffs2\0"         \
43         "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
44                 "nfsroot=${serverip}:${rootpath} \0"                    \
45         "addip=setenv bootargs ${bootargs} "                            \
46                 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"      \
47                 ":${hostname}:${netdev}:off\0"                          \
48         "addmisc=setenv bootargs ${bootargs} init=/etc/preinit "        \
49                 "console=ttyS1,115200 ethaddr=${ethaddr} "              \
50                 "${mtdparts}\0"                                         \
51         "flash_flash=run flashargs addip addmisc;"                      \
52                 "bootm ${kernel_addr}\0"                                \
53         "flash_nfs=run nfsargs addip addmisc;bootm ${kernel_addr}\0"    \
54         "net_flash=run load_kernel flashargs addip addmisc;"            \
55                 "bootm ${ram_addr}\0"                                   \
56         "net_nfs=run load_kernel nfsargs addip addmisc;"                \
57                 "bootm ${ram_addr}\0"                                   \
58         "load_kernel=tftp ${ram_addr} "                                 \
59                 "${tftppath}openwrt-ifxmips-uImage\0"                   \
60         "update_uboot=tftp 0x80500000 ${tftppath}u-boot.bin;era 0xb0000000 +${filesize};" \
61                 "cp.b 0x80500000 0xb0000000 ${filesize}\0" \
62         "update_openwrt=tftp ${ram_addr} "                              \
63                 "${tftppath}openwrt-ifxmips-squashfs.image;"            \
64                 "era ${kernel_addr} +${filesize};"                      \
65                 "cp.b ${ram_addr} ${kernel_addr} ${filesize}\0"
66
67 #define CONFIG_BOOTCOMMAND      "run flash_flash"
68
69 /*
70  * TFTP is using fragmented packets
71 */
72 #define CONFIG_IP_DEFRAG
73
74 /*
75  * BOOTP options
76  */
77 #define CONFIG_BOOTP_BOOTFILESIZE
78 #define CONFIG_BOOTP_BOOTPATH
79 #define CONFIG_BOOTP_GATEWAY
80 #define CONFIG_BOOTP_HOSTNAME
81
82
83 /*
84  * Command line configuration.
85  */
86
87 #define CONFIG_CMD_FLASH        /* flinfo, erase, protect       */
88 #define CONFIG_CMD_MEMORY       /* md mm nm mw cp cmp crc base loop mtest */
89 #define CONFIG_CMD_NET          /* bootp, tftpboot, rarpboot    */
90 #define CONFIG_CMD_RUN          /* run command in env variable  */
91 #define CONFIG_CMD_SAVEENV      /* saveenv                      */
92 #define CONFIG_CMD_IMI
93 #undef CONFIG_CMD_PING
94 #undef CONFIG_ZLIB
95 #undef CONFIG_GZIP
96 #undef CONFIG_SYS_HUSH_PARSER
97
98 /*
99  * Miscellaneous configurable options
100  */
101
102 #define CONFIG_LZMA
103
104 #undef CONFIG_SYS_LONGHELP                              /* undef to save memory */
105 #ifndef CONFIG_SYS_PROMPT
106 #define CONFIG_SYS_PROMPT               "=> "           /* Monitor Command Prompt */
107 #endif
108 #define CONFIG_SYS_CBSIZE               512             /* Console I/O Buffer Size */
109 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)  /* Print Buffer Size */
110 #define CONFIG_SYS_MAXARGS              16              /* max number of command args */
111
112 #define CONFIG_SYS_MALLOC_LEN           1024*1024
113 #define CONFIG_SYS_BOOTPARAMS_LEN       128*1024
114
115 #define CONFIG_SYS_MIPS_TIMER_FREQ      (CPU_CLOCK_RATE/2)
116 #define CONFIG_SYS_HZ                   1000
117
118 #define CONFIG_SYS_SDRAM_BASE           0x80000000
119 #define CONFIG_SYS_LOAD_ADDR            0x80100000      /* default load address */
120 #define CONFIG_SYS_MEMTEST_START        0x80100000
121 #define CONFIG_SYS_MEMTEST_END          0x80800000
122
123 #define CONFIG_CMDLINE_EDITING          /* add command line history     */
124 #undef CONFIG_AUTO_COMPLETE             /* add autocompletion support   */
125
126 #define CONFIG_ZERO_BOOTDELAY_CHECK     /* check for keypress on bootdelay==0 */
127 #define CONFIG_VERSION_VARIABLE         /* include version env variable */
128 #define CONFIG_SYS_CONSOLE_INFO_QUIET   /* don't print console @ startup*/
129
130 #ifdef CONFIG_SYS_HUSH_PARSER
131 #define CONFIG_SYS_PROMPT_HUSH_PS2      "> "
132 #endif
133
134 #define CONFIG_LOADS_ECHO               /* echo on for serial download  */
135 #define CONFIG_SYS_LOADS_BAUD_CHANGE    /* allow baudrate change        */
136
137 /*-----------------------------------------------------------------------
138  * FLASH and environment organization
139  */
140  
141 #define CONFIG_SYS_MAX_FLASH_BANKS_DETECT       1
142
143 #define CONFIG_SYS_MAX_FLASH_BANKS      1       /* max number of memory banks */
144 #define CONFIG_SYS_MAX_FLASH_SECT       (140)   /* max number of sectors on one chip */
145
146 #define PHYS_FLASH_1                    0xB0000000 /* Flash Bank #1 */
147 #define PHYS_FLASH_2                    0xB0800000 /* Flash Bank #2 */
148
149 /* The following #defines are needed to get flash environment right */
150 #define CONFIG_SYS_MONITOR_BASE         TEXT_BASE
151 #define CONFIG_SYS_MONITOR_LEN          (192 << 10)
152
153 #define CONFIG_SYS_INIT_SP_OFFSET       0x400000
154
155 #define CONFIG_SYS_FLASH_BASE           PHYS_FLASH_1
156
157 #define CONFIG_ENV_OVERWRITE            1
158 #define CONFIG_ENV_IS_IN_FLASH          1
159
160 /* Address and size of Primary Environment Sector       */
161 #define CONFIG_ENV_ADDR                 0xB0010000
162 #define CONFIG_ENV_SIZE                 0x10000
163
164 #ifdef CONFIG_FLASH_CFI_DRIVER
165 #define CONFIG_SYS_FLASH_CFI
166 #define CONFIG_SYS_FLASH_SWAP_ADDR
167 #define CONFIG_FLASH_SHOW_PROGRESS      45
168
169 #define CONFIG_SYS_FLASH_CFI_WIDTH      FLASH_CFI_16BIT
170
171 #define FLASH_FIXUP_ADDR_8(addr)        ((void*)((ulong)(addr)^2))
172 #define FLASH_FIXUP_ADDR_16(addr)       ((void*)((ulong)(addr)^2))
173
174 #endif
175
176 #define CONFIG_NR_DRAM_BANKS            1
177
178 #ifdef CONFIG_SYS_EBU_BOOT
179 #ifndef INFINEON_EBU_BOOTCFG
180 #error Please define INFINEON_EBU_BOOTCFG
181 #endif
182 #endif
183
184 #ifdef CONFIG_BOOTSTRAP
185 #define CONFIG_BOOTSTRAP_BASE                   CONFIG_BOOTSTRAP_TEXT_BASE
186 #define CONFIG_BOOTSTRAP_BAUDRATE               CONFIG_BAUDRATE
187 #define CONFIG_SKIP_LOWLEVEL_INIT
188 #define CONFIG_BOOTSTRAP_LZMA
189 //#define CONFIG_BOOTSTRAP_SERIAL
190 #endif
191
192 #endif /* __IFX_COMMON_H */