Commit b3dbf4a51f3891c16315b038cd3b7a87f4182e0d

Authored by Macpaul Lin
Committed by Wolfgang Denk
1 parent 3474741c8d

ftgmac100: support of gigabit eth ftgmac100

Add Faraday's ftgmac100 (gigabit ethernet)
MAC controller's driver.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>

Showing 5 changed files with 839 additions and 0 deletions Inline Diff

1 # 1 #
2 # (C) Copyright 2000 - 2009 2 # (C) Copyright 2000 - 2009
3 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 3 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 # 4 #
5 # See file CREDITS for list of people who contributed to this 5 # See file CREDITS for list of people who contributed to this
6 # project. 6 # project.
7 # 7 #
8 # This program is free software; you can redistribute it and/or 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 9 # modify it under the terms of the GNU General Public License as
10 # published by the Free Software Foundation; either version 2 of 10 # published by the Free Software Foundation; either version 2 of
11 # the License, or (at your option) any later version. 11 # the License, or (at your option) any later version.
12 # 12 #
13 # This program is distributed in the hope that it will be useful, 13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details. 16 # GNU General Public License for more details.
17 # 17 #
18 # You should have received a copy of the GNU General Public License 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 19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 # MA 02111-1307 USA 21 # MA 02111-1307 USA
22 # 22 #
23 23
24 Summary: 24 Summary:
25 ======== 25 ========
26 26
27 This directory contains the source code for U-Boot, a boot loader for 27 This directory contains the source code for U-Boot, a boot loader for
28 Embedded boards based on PowerPC, ARM, MIPS and several other 28 Embedded boards based on PowerPC, ARM, MIPS and several other
29 processors, which can be installed in a boot ROM and used to 29 processors, which can be installed in a boot ROM and used to
30 initialize and test the hardware or to download and run application 30 initialize and test the hardware or to download and run application
31 code. 31 code.
32 32
33 The development of U-Boot is closely related to Linux: some parts of 33 The development of U-Boot is closely related to Linux: some parts of
34 the source code originate in the Linux source tree, we have some 34 the source code originate in the Linux source tree, we have some
35 header files in common, and special provision has been made to 35 header files in common, and special provision has been made to
36 support booting of Linux images. 36 support booting of Linux images.
37 37
38 Some attention has been paid to make this software easily 38 Some attention has been paid to make this software easily
39 configurable and extendable. For instance, all monitor commands are 39 configurable and extendable. For instance, all monitor commands are
40 implemented with the same call interface, so that it's very easy to 40 implemented with the same call interface, so that it's very easy to
41 add new commands. Also, instead of permanently adding rarely used 41 add new commands. Also, instead of permanently adding rarely used
42 code (for instance hardware test utilities) to the monitor, you can 42 code (for instance hardware test utilities) to the monitor, you can
43 load and run it dynamically. 43 load and run it dynamically.
44 44
45 45
46 Status: 46 Status:
47 ======= 47 =======
48 48
49 In general, all boards for which a configuration option exists in the 49 In general, all boards for which a configuration option exists in the
50 Makefile have been tested to some extent and can be considered 50 Makefile have been tested to some extent and can be considered
51 "working". In fact, many of them are used in production systems. 51 "working". In fact, many of them are used in production systems.
52 52
53 In case of problems see the CHANGELOG and CREDITS files to find out 53 In case of problems see the CHANGELOG and CREDITS files to find out
54 who contributed the specific port. The MAINTAINERS file lists board 54 who contributed the specific port. The MAINTAINERS file lists board
55 maintainers. 55 maintainers.
56 56
57 57
58 Where to get help: 58 Where to get help:
59 ================== 59 ==================
60 60
61 In case you have questions about, problems with or contributions for 61 In case you have questions about, problems with or contributions for
62 U-Boot you should send a message to the U-Boot mailing list at 62 U-Boot you should send a message to the U-Boot mailing list at
63 <u-boot@lists.denx.de>. There is also an archive of previous traffic 63 <u-boot@lists.denx.de>. There is also an archive of previous traffic
64 on the mailing list - please search the archive before asking FAQ's. 64 on the mailing list - please search the archive before asking FAQ's.
65 Please see http://lists.denx.de/pipermail/u-boot and 65 Please see http://lists.denx.de/pipermail/u-boot and
66 http://dir.gmane.org/gmane.comp.boot-loaders.u-boot 66 http://dir.gmane.org/gmane.comp.boot-loaders.u-boot
67 67
68 68
69 Where to get source code: 69 Where to get source code:
70 ========================= 70 =========================
71 71
72 The U-Boot source code is maintained in the git repository at 72 The U-Boot source code is maintained in the git repository at
73 git://www.denx.de/git/u-boot.git ; you can browse it online at 73 git://www.denx.de/git/u-boot.git ; you can browse it online at
74 http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=summary 74 http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=summary
75 75
76 The "snapshot" links on this page allow you to download tarballs of 76 The "snapshot" links on this page allow you to download tarballs of
77 any version you might be interested in. Official releases are also 77 any version you might be interested in. Official releases are also
78 available for FTP download from the ftp://ftp.denx.de/pub/u-boot/ 78 available for FTP download from the ftp://ftp.denx.de/pub/u-boot/
79 directory. 79 directory.
80 80
81 Pre-built (and tested) images are available from 81 Pre-built (and tested) images are available from
82 ftp://ftp.denx.de/pub/u-boot/images/ 82 ftp://ftp.denx.de/pub/u-boot/images/
83 83
84 84
85 Where we come from: 85 Where we come from:
86 =================== 86 ===================
87 87
88 - start from 8xxrom sources 88 - start from 8xxrom sources
89 - create PPCBoot project (http://sourceforge.net/projects/ppcboot) 89 - create PPCBoot project (http://sourceforge.net/projects/ppcboot)
90 - clean up code 90 - clean up code
91 - make it easier to add custom boards 91 - make it easier to add custom boards
92 - make it possible to add other [PowerPC] CPUs 92 - make it possible to add other [PowerPC] CPUs
93 - extend functions, especially: 93 - extend functions, especially:
94 * Provide extended interface to Linux boot loader 94 * Provide extended interface to Linux boot loader
95 * S-Record download 95 * S-Record download
96 * network boot 96 * network boot
97 * PCMCIA / CompactFlash / ATA disk / SCSI ... boot 97 * PCMCIA / CompactFlash / ATA disk / SCSI ... boot
98 - create ARMBoot project (http://sourceforge.net/projects/armboot) 98 - create ARMBoot project (http://sourceforge.net/projects/armboot)
99 - add other CPU families (starting with ARM) 99 - add other CPU families (starting with ARM)
100 - create U-Boot project (http://sourceforge.net/projects/u-boot) 100 - create U-Boot project (http://sourceforge.net/projects/u-boot)
101 - current project page: see http://www.denx.de/wiki/U-Boot 101 - current project page: see http://www.denx.de/wiki/U-Boot
102 102
103 103
104 Names and Spelling: 104 Names and Spelling:
105 =================== 105 ===================
106 106
107 The "official" name of this project is "Das U-Boot". The spelling 107 The "official" name of this project is "Das U-Boot". The spelling
108 "U-Boot" shall be used in all written text (documentation, comments 108 "U-Boot" shall be used in all written text (documentation, comments
109 in source files etc.). Example: 109 in source files etc.). Example:
110 110
111 This is the README file for the U-Boot project. 111 This is the README file for the U-Boot project.
112 112
113 File names etc. shall be based on the string "u-boot". Examples: 113 File names etc. shall be based on the string "u-boot". Examples:
114 114
115 include/asm-ppc/u-boot.h 115 include/asm-ppc/u-boot.h
116 116
117 #include <asm/u-boot.h> 117 #include <asm/u-boot.h>
118 118
119 Variable names, preprocessor constants etc. shall be either based on 119 Variable names, preprocessor constants etc. shall be either based on
120 the string "u_boot" or on "U_BOOT". Example: 120 the string "u_boot" or on "U_BOOT". Example:
121 121
122 U_BOOT_VERSION u_boot_logo 122 U_BOOT_VERSION u_boot_logo
123 IH_OS_U_BOOT u_boot_hush_start 123 IH_OS_U_BOOT u_boot_hush_start
124 124
125 125
126 Versioning: 126 Versioning:
127 =========== 127 ===========
128 128
129 Starting with the release in October 2008, the names of the releases 129 Starting with the release in October 2008, the names of the releases
130 were changed from numerical release numbers without deeper meaning 130 were changed from numerical release numbers without deeper meaning
131 into a time stamp based numbering. Regular releases are identified by 131 into a time stamp based numbering. Regular releases are identified by
132 names consisting of the calendar year and month of the release date. 132 names consisting of the calendar year and month of the release date.
133 Additional fields (if present) indicate release candidates or bug fix 133 Additional fields (if present) indicate release candidates or bug fix
134 releases in "stable" maintenance trees. 134 releases in "stable" maintenance trees.
135 135
136 Examples: 136 Examples:
137 U-Boot v2009.11 - Release November 2009 137 U-Boot v2009.11 - Release November 2009
138 U-Boot v2009.11.1 - Release 1 in version November 2009 stable tree 138 U-Boot v2009.11.1 - Release 1 in version November 2009 stable tree
139 U-Boot v2010.09-rc1 - Release candiate 1 for September 2010 release 139 U-Boot v2010.09-rc1 - Release candiate 1 for September 2010 release
140 140
141 141
142 Directory Hierarchy: 142 Directory Hierarchy:
143 ==================== 143 ====================
144 144
145 /arch Architecture specific files 145 /arch Architecture specific files
146 /arm Files generic to ARM architecture 146 /arm Files generic to ARM architecture
147 /cpu CPU specific files 147 /cpu CPU specific files
148 /arm720t Files specific to ARM 720 CPUs 148 /arm720t Files specific to ARM 720 CPUs
149 /arm920t Files specific to ARM 920 CPUs 149 /arm920t Files specific to ARM 920 CPUs
150 /at91rm9200 Files specific to Atmel AT91RM9200 CPU 150 /at91rm9200 Files specific to Atmel AT91RM9200 CPU
151 /imx Files specific to Freescale MC9328 i.MX CPUs 151 /imx Files specific to Freescale MC9328 i.MX CPUs
152 /s3c24x0 Files specific to Samsung S3C24X0 CPUs 152 /s3c24x0 Files specific to Samsung S3C24X0 CPUs
153 /arm925t Files specific to ARM 925 CPUs 153 /arm925t Files specific to ARM 925 CPUs
154 /arm926ejs Files specific to ARM 926 CPUs 154 /arm926ejs Files specific to ARM 926 CPUs
155 /arm1136 Files specific to ARM 1136 CPUs 155 /arm1136 Files specific to ARM 1136 CPUs
156 /ixp Files specific to Intel XScale IXP CPUs 156 /ixp Files specific to Intel XScale IXP CPUs
157 /pxa Files specific to Intel XScale PXA CPUs 157 /pxa Files specific to Intel XScale PXA CPUs
158 /s3c44b0 Files specific to Samsung S3C44B0 CPUs 158 /s3c44b0 Files specific to Samsung S3C44B0 CPUs
159 /sa1100 Files specific to Intel StrongARM SA1100 CPUs 159 /sa1100 Files specific to Intel StrongARM SA1100 CPUs
160 /lib Architecture specific library files 160 /lib Architecture specific library files
161 /avr32 Files generic to AVR32 architecture 161 /avr32 Files generic to AVR32 architecture
162 /cpu CPU specific files 162 /cpu CPU specific files
163 /lib Architecture specific library files 163 /lib Architecture specific library files
164 /blackfin Files generic to Analog Devices Blackfin architecture 164 /blackfin Files generic to Analog Devices Blackfin architecture
165 /cpu CPU specific files 165 /cpu CPU specific files
166 /lib Architecture specific library files 166 /lib Architecture specific library files
167 /i386 Files generic to i386 architecture 167 /i386 Files generic to i386 architecture
168 /cpu CPU specific files 168 /cpu CPU specific files
169 /lib Architecture specific library files 169 /lib Architecture specific library files
170 /m68k Files generic to m68k architecture 170 /m68k Files generic to m68k architecture
171 /cpu CPU specific files 171 /cpu CPU specific files
172 /mcf52x2 Files specific to Freescale ColdFire MCF52x2 CPUs 172 /mcf52x2 Files specific to Freescale ColdFire MCF52x2 CPUs
173 /mcf5227x Files specific to Freescale ColdFire MCF5227x CPUs 173 /mcf5227x Files specific to Freescale ColdFire MCF5227x CPUs
174 /mcf532x Files specific to Freescale ColdFire MCF5329 CPUs 174 /mcf532x Files specific to Freescale ColdFire MCF5329 CPUs
175 /mcf5445x Files specific to Freescale ColdFire MCF5445x CPUs 175 /mcf5445x Files specific to Freescale ColdFire MCF5445x CPUs
176 /mcf547x_8x Files specific to Freescale ColdFire MCF547x_8x CPUs 176 /mcf547x_8x Files specific to Freescale ColdFire MCF547x_8x CPUs
177 /lib Architecture specific library files 177 /lib Architecture specific library files
178 /microblaze Files generic to microblaze architecture 178 /microblaze Files generic to microblaze architecture
179 /cpu CPU specific files 179 /cpu CPU specific files
180 /lib Architecture specific library files 180 /lib Architecture specific library files
181 /mips Files generic to MIPS architecture 181 /mips Files generic to MIPS architecture
182 /cpu CPU specific files 182 /cpu CPU specific files
183 /lib Architecture specific library files 183 /lib Architecture specific library files
184 /nios2 Files generic to Altera NIOS2 architecture 184 /nios2 Files generic to Altera NIOS2 architecture
185 /cpu CPU specific files 185 /cpu CPU specific files
186 /lib Architecture specific library files 186 /lib Architecture specific library files
187 /powerpc Files generic to PowerPC architecture 187 /powerpc Files generic to PowerPC architecture
188 /cpu CPU specific files 188 /cpu CPU specific files
189 /74xx_7xx Files specific to Freescale MPC74xx and 7xx CPUs 189 /74xx_7xx Files specific to Freescale MPC74xx and 7xx CPUs
190 /mpc5xx Files specific to Freescale MPC5xx CPUs 190 /mpc5xx Files specific to Freescale MPC5xx CPUs
191 /mpc5xxx Files specific to Freescale MPC5xxx CPUs 191 /mpc5xxx Files specific to Freescale MPC5xxx CPUs
192 /mpc8xx Files specific to Freescale MPC8xx CPUs 192 /mpc8xx Files specific to Freescale MPC8xx CPUs
193 /mpc8220 Files specific to Freescale MPC8220 CPUs 193 /mpc8220 Files specific to Freescale MPC8220 CPUs
194 /mpc824x Files specific to Freescale MPC824x CPUs 194 /mpc824x Files specific to Freescale MPC824x CPUs
195 /mpc8260 Files specific to Freescale MPC8260 CPUs 195 /mpc8260 Files specific to Freescale MPC8260 CPUs
196 /mpc85xx Files specific to Freescale MPC85xx CPUs 196 /mpc85xx Files specific to Freescale MPC85xx CPUs
197 /ppc4xx Files specific to AMCC PowerPC 4xx CPUs 197 /ppc4xx Files specific to AMCC PowerPC 4xx CPUs
198 /lib Architecture specific library files 198 /lib Architecture specific library files
199 /sh Files generic to SH architecture 199 /sh Files generic to SH architecture
200 /cpu CPU specific files 200 /cpu CPU specific files
201 /sh2 Files specific to sh2 CPUs 201 /sh2 Files specific to sh2 CPUs
202 /sh3 Files specific to sh3 CPUs 202 /sh3 Files specific to sh3 CPUs
203 /sh4 Files specific to sh4 CPUs 203 /sh4 Files specific to sh4 CPUs
204 /lib Architecture specific library files 204 /lib Architecture specific library files
205 /sparc Files generic to SPARC architecture 205 /sparc Files generic to SPARC architecture
206 /cpu CPU specific files 206 /cpu CPU specific files
207 /leon2 Files specific to Gaisler LEON2 SPARC CPU 207 /leon2 Files specific to Gaisler LEON2 SPARC CPU
208 /leon3 Files specific to Gaisler LEON3 SPARC CPU 208 /leon3 Files specific to Gaisler LEON3 SPARC CPU
209 /lib Architecture specific library files 209 /lib Architecture specific library files
210 /api Machine/arch independent API for external apps 210 /api Machine/arch independent API for external apps
211 /board Board dependent files 211 /board Board dependent files
212 /common Misc architecture independent functions 212 /common Misc architecture independent functions
213 /disk Code for disk drive partition handling 213 /disk Code for disk drive partition handling
214 /doc Documentation (don't expect too much) 214 /doc Documentation (don't expect too much)
215 /drivers Commonly used device drivers 215 /drivers Commonly used device drivers
216 /examples Example code for standalone applications, etc. 216 /examples Example code for standalone applications, etc.
217 /fs Filesystem code (cramfs, ext2, jffs2, etc.) 217 /fs Filesystem code (cramfs, ext2, jffs2, etc.)
218 /include Header Files 218 /include Header Files
219 /lib Files generic to all architectures 219 /lib Files generic to all architectures
220 /libfdt Library files to support flattened device trees 220 /libfdt Library files to support flattened device trees
221 /lzma Library files to support LZMA decompression 221 /lzma Library files to support LZMA decompression
222 /lzo Library files to support LZO decompression 222 /lzo Library files to support LZO decompression
223 /net Networking code 223 /net Networking code
224 /post Power On Self Test 224 /post Power On Self Test
225 /rtc Real Time Clock drivers 225 /rtc Real Time Clock drivers
226 /tools Tools to build S-Record or U-Boot images, etc. 226 /tools Tools to build S-Record or U-Boot images, etc.
227 227
228 Software Configuration: 228 Software Configuration:
229 ======================= 229 =======================
230 230
231 Configuration is usually done using C preprocessor defines; the 231 Configuration is usually done using C preprocessor defines; the
232 rationale behind that is to avoid dead code whenever possible. 232 rationale behind that is to avoid dead code whenever possible.
233 233
234 There are two classes of configuration variables: 234 There are two classes of configuration variables:
235 235
236 * Configuration _OPTIONS_: 236 * Configuration _OPTIONS_:
237 These are selectable by the user and have names beginning with 237 These are selectable by the user and have names beginning with
238 "CONFIG_". 238 "CONFIG_".
239 239
240 * Configuration _SETTINGS_: 240 * Configuration _SETTINGS_:
241 These depend on the hardware etc. and should not be meddled with if 241 These depend on the hardware etc. and should not be meddled with if
242 you don't know what you're doing; they have names beginning with 242 you don't know what you're doing; they have names beginning with
243 "CONFIG_SYS_". 243 "CONFIG_SYS_".
244 244
245 Later we will add a configuration tool - probably similar to or even 245 Later we will add a configuration tool - probably similar to or even
246 identical to what's used for the Linux kernel. Right now, we have to 246 identical to what's used for the Linux kernel. Right now, we have to
247 do the configuration by hand, which means creating some symbolic 247 do the configuration by hand, which means creating some symbolic
248 links and editing some configuration files. We use the TQM8xxL boards 248 links and editing some configuration files. We use the TQM8xxL boards
249 as an example here. 249 as an example here.
250 250
251 251
252 Selection of Processor Architecture and Board Type: 252 Selection of Processor Architecture and Board Type:
253 --------------------------------------------------- 253 ---------------------------------------------------
254 254
255 For all supported boards there are ready-to-use default 255 For all supported boards there are ready-to-use default
256 configurations available; just type "make <board_name>_config". 256 configurations available; just type "make <board_name>_config".
257 257
258 Example: For a TQM823L module type: 258 Example: For a TQM823L module type:
259 259
260 cd u-boot 260 cd u-boot
261 make TQM823L_config 261 make TQM823L_config
262 262
263 For the Cogent platform, you need to specify the CPU type as well; 263 For the Cogent platform, you need to specify the CPU type as well;
264 e.g. "make cogent_mpc8xx_config". And also configure the cogent 264 e.g. "make cogent_mpc8xx_config". And also configure the cogent
265 directory according to the instructions in cogent/README. 265 directory according to the instructions in cogent/README.
266 266
267 267
268 Configuration Options: 268 Configuration Options:
269 ---------------------- 269 ----------------------
270 270
271 Configuration depends on the combination of board and CPU type; all 271 Configuration depends on the combination of board and CPU type; all
272 such information is kept in a configuration file 272 such information is kept in a configuration file
273 "include/configs/<board_name>.h". 273 "include/configs/<board_name>.h".
274 274
275 Example: For a TQM823L module, all configuration settings are in 275 Example: For a TQM823L module, all configuration settings are in
276 "include/configs/TQM823L.h". 276 "include/configs/TQM823L.h".
277 277
278 278
279 Many of the options are named exactly as the corresponding Linux 279 Many of the options are named exactly as the corresponding Linux
280 kernel configuration options. The intention is to make it easier to 280 kernel configuration options. The intention is to make it easier to
281 build a config tool - later. 281 build a config tool - later.
282 282
283 283
284 The following options need to be configured: 284 The following options need to be configured:
285 285
286 - CPU Type: Define exactly one, e.g. CONFIG_MPC85XX. 286 - CPU Type: Define exactly one, e.g. CONFIG_MPC85XX.
287 287
288 - Board Type: Define exactly one, e.g. CONFIG_MPC8540ADS. 288 - Board Type: Define exactly one, e.g. CONFIG_MPC8540ADS.
289 289
290 - CPU Daughterboard Type: (if CONFIG_ATSTK1000 is defined) 290 - CPU Daughterboard Type: (if CONFIG_ATSTK1000 is defined)
291 Define exactly one, e.g. CONFIG_ATSTK1002 291 Define exactly one, e.g. CONFIG_ATSTK1002
292 292
293 - CPU Module Type: (if CONFIG_COGENT is defined) 293 - CPU Module Type: (if CONFIG_COGENT is defined)
294 Define exactly one of 294 Define exactly one of
295 CONFIG_CMA286_60_OLD 295 CONFIG_CMA286_60_OLD
296 --- FIXME --- not tested yet: 296 --- FIXME --- not tested yet:
297 CONFIG_CMA286_60, CONFIG_CMA286_21, CONFIG_CMA286_60P, 297 CONFIG_CMA286_60, CONFIG_CMA286_21, CONFIG_CMA286_60P,
298 CONFIG_CMA287_23, CONFIG_CMA287_50 298 CONFIG_CMA287_23, CONFIG_CMA287_50
299 299
300 - Motherboard Type: (if CONFIG_COGENT is defined) 300 - Motherboard Type: (if CONFIG_COGENT is defined)
301 Define exactly one of 301 Define exactly one of
302 CONFIG_CMA101, CONFIG_CMA102 302 CONFIG_CMA101, CONFIG_CMA102
303 303
304 - Motherboard I/O Modules: (if CONFIG_COGENT is defined) 304 - Motherboard I/O Modules: (if CONFIG_COGENT is defined)
305 Define one or more of 305 Define one or more of
306 CONFIG_CMA302 306 CONFIG_CMA302
307 307
308 - Motherboard Options: (if CONFIG_CMA101 or CONFIG_CMA102 are defined) 308 - Motherboard Options: (if CONFIG_CMA101 or CONFIG_CMA102 are defined)
309 Define one or more of 309 Define one or more of
310 CONFIG_LCD_HEARTBEAT - update a character position on 310 CONFIG_LCD_HEARTBEAT - update a character position on
311 the LCD display every second with 311 the LCD display every second with
312 a "rotator" |\-/|\-/ 312 a "rotator" |\-/|\-/
313 313
314 - Board flavour: (if CONFIG_MPC8260ADS is defined) 314 - Board flavour: (if CONFIG_MPC8260ADS is defined)
315 CONFIG_ADSTYPE 315 CONFIG_ADSTYPE
316 Possible values are: 316 Possible values are:
317 CONFIG_SYS_8260ADS - original MPC8260ADS 317 CONFIG_SYS_8260ADS - original MPC8260ADS
318 CONFIG_SYS_8266ADS - MPC8266ADS 318 CONFIG_SYS_8266ADS - MPC8266ADS
319 CONFIG_SYS_PQ2FADS - PQ2FADS-ZU or PQ2FADS-VR 319 CONFIG_SYS_PQ2FADS - PQ2FADS-ZU or PQ2FADS-VR
320 CONFIG_SYS_8272ADS - MPC8272ADS 320 CONFIG_SYS_8272ADS - MPC8272ADS
321 321
322 - MPC824X Family Member (if CONFIG_MPC824X is defined) 322 - MPC824X Family Member (if CONFIG_MPC824X is defined)
323 Define exactly one of 323 Define exactly one of
324 CONFIG_MPC8240, CONFIG_MPC8245 324 CONFIG_MPC8240, CONFIG_MPC8245
325 325
326 - 8xx CPU Options: (if using an MPC8xx CPU) 326 - 8xx CPU Options: (if using an MPC8xx CPU)
327 CONFIG_8xx_GCLK_FREQ - deprecated: CPU clock if 327 CONFIG_8xx_GCLK_FREQ - deprecated: CPU clock if
328 get_gclk_freq() cannot work 328 get_gclk_freq() cannot work
329 e.g. if there is no 32KHz 329 e.g. if there is no 32KHz
330 reference PIT/RTC clock 330 reference PIT/RTC clock
331 CONFIG_8xx_OSCLK - PLL input clock (either EXTCLK 331 CONFIG_8xx_OSCLK - PLL input clock (either EXTCLK
332 or XTAL/EXTAL) 332 or XTAL/EXTAL)
333 333
334 - 859/866/885 CPU options: (if using a MPC859 or MPC866 or MPC885 CPU): 334 - 859/866/885 CPU options: (if using a MPC859 or MPC866 or MPC885 CPU):
335 CONFIG_SYS_8xx_CPUCLK_MIN 335 CONFIG_SYS_8xx_CPUCLK_MIN
336 CONFIG_SYS_8xx_CPUCLK_MAX 336 CONFIG_SYS_8xx_CPUCLK_MAX
337 CONFIG_8xx_CPUCLK_DEFAULT 337 CONFIG_8xx_CPUCLK_DEFAULT
338 See doc/README.MPC866 338 See doc/README.MPC866
339 339
340 CONFIG_SYS_MEASURE_CPUCLK 340 CONFIG_SYS_MEASURE_CPUCLK
341 341
342 Define this to measure the actual CPU clock instead 342 Define this to measure the actual CPU clock instead
343 of relying on the correctness of the configured 343 of relying on the correctness of the configured
344 values. Mostly useful for board bringup to make sure 344 values. Mostly useful for board bringup to make sure
345 the PLL is locked at the intended frequency. Note 345 the PLL is locked at the intended frequency. Note
346 that this requires a (stable) reference clock (32 kHz 346 that this requires a (stable) reference clock (32 kHz
347 RTC clock or CONFIG_SYS_8XX_XIN) 347 RTC clock or CONFIG_SYS_8XX_XIN)
348 348
349 CONFIG_SYS_DELAYED_ICACHE 349 CONFIG_SYS_DELAYED_ICACHE
350 350
351 Define this option if you want to enable the 351 Define this option if you want to enable the
352 ICache only when Code runs from RAM. 352 ICache only when Code runs from RAM.
353 353
354 - Intel Monahans options: 354 - Intel Monahans options:
355 CONFIG_SYS_MONAHANS_RUN_MODE_OSC_RATIO 355 CONFIG_SYS_MONAHANS_RUN_MODE_OSC_RATIO
356 356
357 Defines the Monahans run mode to oscillator 357 Defines the Monahans run mode to oscillator
358 ratio. Valid values are 8, 16, 24, 31. The core 358 ratio. Valid values are 8, 16, 24, 31. The core
359 frequency is this value multiplied by 13 MHz. 359 frequency is this value multiplied by 13 MHz.
360 360
361 CONFIG_SYS_MONAHANS_TURBO_RUN_MODE_RATIO 361 CONFIG_SYS_MONAHANS_TURBO_RUN_MODE_RATIO
362 362
363 Defines the Monahans turbo mode to oscillator 363 Defines the Monahans turbo mode to oscillator
364 ratio. Valid values are 1 (default if undefined) and 364 ratio. Valid values are 1 (default if undefined) and
365 2. The core frequency as calculated above is multiplied 365 2. The core frequency as calculated above is multiplied
366 by this value. 366 by this value.
367 367
368 - Linux Kernel Interface: 368 - Linux Kernel Interface:
369 CONFIG_CLOCKS_IN_MHZ 369 CONFIG_CLOCKS_IN_MHZ
370 370
371 U-Boot stores all clock information in Hz 371 U-Boot stores all clock information in Hz
372 internally. For binary compatibility with older Linux 372 internally. For binary compatibility with older Linux
373 kernels (which expect the clocks passed in the 373 kernels (which expect the clocks passed in the
374 bd_info data to be in MHz) the environment variable 374 bd_info data to be in MHz) the environment variable
375 "clocks_in_mhz" can be defined so that U-Boot 375 "clocks_in_mhz" can be defined so that U-Boot
376 converts clock data to MHZ before passing it to the 376 converts clock data to MHZ before passing it to the
377 Linux kernel. 377 Linux kernel.
378 When CONFIG_CLOCKS_IN_MHZ is defined, a definition of 378 When CONFIG_CLOCKS_IN_MHZ is defined, a definition of
379 "clocks_in_mhz=1" is automatically included in the 379 "clocks_in_mhz=1" is automatically included in the
380 default environment. 380 default environment.
381 381
382 CONFIG_MEMSIZE_IN_BYTES [relevant for MIPS only] 382 CONFIG_MEMSIZE_IN_BYTES [relevant for MIPS only]
383 383
384 When transferring memsize parameter to linux, some versions 384 When transferring memsize parameter to linux, some versions
385 expect it to be in bytes, others in MB. 385 expect it to be in bytes, others in MB.
386 Define CONFIG_MEMSIZE_IN_BYTES to make it in bytes. 386 Define CONFIG_MEMSIZE_IN_BYTES to make it in bytes.
387 387
388 CONFIG_OF_LIBFDT 388 CONFIG_OF_LIBFDT
389 389
390 New kernel versions are expecting firmware settings to be 390 New kernel versions are expecting firmware settings to be
391 passed using flattened device trees (based on open firmware 391 passed using flattened device trees (based on open firmware
392 concepts). 392 concepts).
393 393
394 CONFIG_OF_LIBFDT 394 CONFIG_OF_LIBFDT
395 * New libfdt-based support 395 * New libfdt-based support
396 * Adds the "fdt" command 396 * Adds the "fdt" command
397 * The bootm command automatically updates the fdt 397 * The bootm command automatically updates the fdt
398 398
399 OF_CPU - The proper name of the cpus node (only required for 399 OF_CPU - The proper name of the cpus node (only required for
400 MPC512X and MPC5xxx based boards). 400 MPC512X and MPC5xxx based boards).
401 OF_SOC - The proper name of the soc node (only required for 401 OF_SOC - The proper name of the soc node (only required for
402 MPC512X and MPC5xxx based boards). 402 MPC512X and MPC5xxx based boards).
403 OF_TBCLK - The timebase frequency. 403 OF_TBCLK - The timebase frequency.
404 OF_STDOUT_PATH - The path to the console device 404 OF_STDOUT_PATH - The path to the console device
405 405
406 boards with QUICC Engines require OF_QE to set UCC MAC 406 boards with QUICC Engines require OF_QE to set UCC MAC
407 addresses 407 addresses
408 408
409 CONFIG_OF_BOARD_SETUP 409 CONFIG_OF_BOARD_SETUP
410 410
411 Board code has addition modification that it wants to make 411 Board code has addition modification that it wants to make
412 to the flat device tree before handing it off to the kernel 412 to the flat device tree before handing it off to the kernel
413 413
414 CONFIG_OF_BOOT_CPU 414 CONFIG_OF_BOOT_CPU
415 415
416 This define fills in the correct boot CPU in the boot 416 This define fills in the correct boot CPU in the boot
417 param header, the default value is zero if undefined. 417 param header, the default value is zero if undefined.
418 418
419 CONFIG_OF_IDE_FIXUP 419 CONFIG_OF_IDE_FIXUP
420 420
421 U-Boot can detect if an IDE device is present or not. 421 U-Boot can detect if an IDE device is present or not.
422 If not, and this new config option is activated, U-Boot 422 If not, and this new config option is activated, U-Boot
423 removes the ATA node from the DTS before booting Linux, 423 removes the ATA node from the DTS before booting Linux,
424 so the Linux IDE driver does not probe the device and 424 so the Linux IDE driver does not probe the device and
425 crash. This is needed for buggy hardware (uc101) where 425 crash. This is needed for buggy hardware (uc101) where
426 no pull down resistor is connected to the signal IDE5V_DD7. 426 no pull down resistor is connected to the signal IDE5V_DD7.
427 427
428 - vxWorks boot parameters: 428 - vxWorks boot parameters:
429 429
430 bootvx constructs a valid bootline using the following 430 bootvx constructs a valid bootline using the following
431 environments variables: bootfile, ipaddr, serverip, hostname. 431 environments variables: bootfile, ipaddr, serverip, hostname.
432 It loads the vxWorks image pointed bootfile. 432 It loads the vxWorks image pointed bootfile.
433 433
434 CONFIG_SYS_VXWORKS_BOOT_DEVICE - The vxworks device name 434 CONFIG_SYS_VXWORKS_BOOT_DEVICE - The vxworks device name
435 CONFIG_SYS_VXWORKS_MAC_PTR - Ethernet 6 byte MA -address 435 CONFIG_SYS_VXWORKS_MAC_PTR - Ethernet 6 byte MA -address
436 CONFIG_SYS_VXWORKS_SERVERNAME - Name of the server 436 CONFIG_SYS_VXWORKS_SERVERNAME - Name of the server
437 CONFIG_SYS_VXWORKS_BOOT_ADDR - Address of boot parameters 437 CONFIG_SYS_VXWORKS_BOOT_ADDR - Address of boot parameters
438 438
439 CONFIG_SYS_VXWORKS_ADD_PARAMS 439 CONFIG_SYS_VXWORKS_ADD_PARAMS
440 440
441 Add it at the end of the bootline. E.g "u=username pw=secret" 441 Add it at the end of the bootline. E.g "u=username pw=secret"
442 442
443 Note: If a "bootargs" environment is defined, it will overwride 443 Note: If a "bootargs" environment is defined, it will overwride
444 the defaults discussed just above. 444 the defaults discussed just above.
445 445
446 - Serial Ports: 446 - Serial Ports:
447 CONFIG_PL010_SERIAL 447 CONFIG_PL010_SERIAL
448 448
449 Define this if you want support for Amba PrimeCell PL010 UARTs. 449 Define this if you want support for Amba PrimeCell PL010 UARTs.
450 450
451 CONFIG_PL011_SERIAL 451 CONFIG_PL011_SERIAL
452 452
453 Define this if you want support for Amba PrimeCell PL011 UARTs. 453 Define this if you want support for Amba PrimeCell PL011 UARTs.
454 454
455 CONFIG_PL011_CLOCK 455 CONFIG_PL011_CLOCK
456 456
457 If you have Amba PrimeCell PL011 UARTs, set this variable to 457 If you have Amba PrimeCell PL011 UARTs, set this variable to
458 the clock speed of the UARTs. 458 the clock speed of the UARTs.
459 459
460 CONFIG_PL01x_PORTS 460 CONFIG_PL01x_PORTS
461 461
462 If you have Amba PrimeCell PL010 or PL011 UARTs on your board, 462 If you have Amba PrimeCell PL010 or PL011 UARTs on your board,
463 define this to a list of base addresses for each (supported) 463 define this to a list of base addresses for each (supported)
464 port. See e.g. include/configs/versatile.h 464 port. See e.g. include/configs/versatile.h
465 465
466 466
467 - Console Interface: 467 - Console Interface:
468 Depending on board, define exactly one serial port 468 Depending on board, define exactly one serial port
469 (like CONFIG_8xx_CONS_SMC1, CONFIG_8xx_CONS_SMC2, 469 (like CONFIG_8xx_CONS_SMC1, CONFIG_8xx_CONS_SMC2,
470 CONFIG_8xx_CONS_SCC1, ...), or switch off the serial 470 CONFIG_8xx_CONS_SCC1, ...), or switch off the serial
471 console by defining CONFIG_8xx_CONS_NONE 471 console by defining CONFIG_8xx_CONS_NONE
472 472
473 Note: if CONFIG_8xx_CONS_NONE is defined, the serial 473 Note: if CONFIG_8xx_CONS_NONE is defined, the serial
474 port routines must be defined elsewhere 474 port routines must be defined elsewhere
475 (i.e. serial_init(), serial_getc(), ...) 475 (i.e. serial_init(), serial_getc(), ...)
476 476
477 CONFIG_CFB_CONSOLE 477 CONFIG_CFB_CONSOLE
478 Enables console device for a color framebuffer. Needs following 478 Enables console device for a color framebuffer. Needs following
479 defines (cf. smiLynxEM, i8042, board/eltec/bab7xx) 479 defines (cf. smiLynxEM, i8042, board/eltec/bab7xx)
480 VIDEO_FB_LITTLE_ENDIAN graphic memory organisation 480 VIDEO_FB_LITTLE_ENDIAN graphic memory organisation
481 (default big endian) 481 (default big endian)
482 VIDEO_HW_RECTFILL graphic chip supports 482 VIDEO_HW_RECTFILL graphic chip supports
483 rectangle fill 483 rectangle fill
484 (cf. smiLynxEM) 484 (cf. smiLynxEM)
485 VIDEO_HW_BITBLT graphic chip supports 485 VIDEO_HW_BITBLT graphic chip supports
486 bit-blit (cf. smiLynxEM) 486 bit-blit (cf. smiLynxEM)
487 VIDEO_VISIBLE_COLS visible pixel columns 487 VIDEO_VISIBLE_COLS visible pixel columns
488 (cols=pitch) 488 (cols=pitch)
489 VIDEO_VISIBLE_ROWS visible pixel rows 489 VIDEO_VISIBLE_ROWS visible pixel rows
490 VIDEO_PIXEL_SIZE bytes per pixel 490 VIDEO_PIXEL_SIZE bytes per pixel
491 VIDEO_DATA_FORMAT graphic data format 491 VIDEO_DATA_FORMAT graphic data format
492 (0-5, cf. cfb_console.c) 492 (0-5, cf. cfb_console.c)
493 VIDEO_FB_ADRS framebuffer address 493 VIDEO_FB_ADRS framebuffer address
494 VIDEO_KBD_INIT_FCT keyboard int fct 494 VIDEO_KBD_INIT_FCT keyboard int fct
495 (i.e. i8042_kbd_init()) 495 (i.e. i8042_kbd_init())
496 VIDEO_TSTC_FCT test char fct 496 VIDEO_TSTC_FCT test char fct
497 (i.e. i8042_tstc) 497 (i.e. i8042_tstc)
498 VIDEO_GETC_FCT get char fct 498 VIDEO_GETC_FCT get char fct
499 (i.e. i8042_getc) 499 (i.e. i8042_getc)
500 CONFIG_CONSOLE_CURSOR cursor drawing on/off 500 CONFIG_CONSOLE_CURSOR cursor drawing on/off
501 (requires blink timer 501 (requires blink timer
502 cf. i8042.c) 502 cf. i8042.c)
503 CONFIG_SYS_CONSOLE_BLINK_COUNT blink interval (cf. i8042.c) 503 CONFIG_SYS_CONSOLE_BLINK_COUNT blink interval (cf. i8042.c)
504 CONFIG_CONSOLE_TIME display time/date info in 504 CONFIG_CONSOLE_TIME display time/date info in
505 upper right corner 505 upper right corner
506 (requires CONFIG_CMD_DATE) 506 (requires CONFIG_CMD_DATE)
507 CONFIG_VIDEO_LOGO display Linux logo in 507 CONFIG_VIDEO_LOGO display Linux logo in
508 upper left corner 508 upper left corner
509 CONFIG_VIDEO_BMP_LOGO use bmp_logo.h instead of 509 CONFIG_VIDEO_BMP_LOGO use bmp_logo.h instead of
510 linux_logo.h for logo. 510 linux_logo.h for logo.
511 Requires CONFIG_VIDEO_LOGO 511 Requires CONFIG_VIDEO_LOGO
512 CONFIG_CONSOLE_EXTRA_INFO 512 CONFIG_CONSOLE_EXTRA_INFO
513 additional board info beside 513 additional board info beside
514 the logo 514 the logo
515 515
516 When CONFIG_CFB_CONSOLE is defined, video console is 516 When CONFIG_CFB_CONSOLE is defined, video console is
517 default i/o. Serial console can be forced with 517 default i/o. Serial console can be forced with
518 environment 'console=serial'. 518 environment 'console=serial'.
519 519
520 When CONFIG_SILENT_CONSOLE is defined, all console 520 When CONFIG_SILENT_CONSOLE is defined, all console
521 messages (by U-Boot and Linux!) can be silenced with 521 messages (by U-Boot and Linux!) can be silenced with
522 the "silent" environment variable. See 522 the "silent" environment variable. See
523 doc/README.silent for more information. 523 doc/README.silent for more information.
524 524
525 - Console Baudrate: 525 - Console Baudrate:
526 CONFIG_BAUDRATE - in bps 526 CONFIG_BAUDRATE - in bps
527 Select one of the baudrates listed in 527 Select one of the baudrates listed in
528 CONFIG_SYS_BAUDRATE_TABLE, see below. 528 CONFIG_SYS_BAUDRATE_TABLE, see below.
529 CONFIG_SYS_BRGCLK_PRESCALE, baudrate prescale 529 CONFIG_SYS_BRGCLK_PRESCALE, baudrate prescale
530 530
531 - Console Rx buffer length 531 - Console Rx buffer length
532 With CONFIG_SYS_SMC_RXBUFLEN it is possible to define 532 With CONFIG_SYS_SMC_RXBUFLEN it is possible to define
533 the maximum receive buffer length for the SMC. 533 the maximum receive buffer length for the SMC.
534 This option is actual only for 82xx and 8xx possible. 534 This option is actual only for 82xx and 8xx possible.
535 If using CONFIG_SYS_SMC_RXBUFLEN also CONFIG_SYS_MAXIDLE 535 If using CONFIG_SYS_SMC_RXBUFLEN also CONFIG_SYS_MAXIDLE
536 must be defined, to setup the maximum idle timeout for 536 must be defined, to setup the maximum idle timeout for
537 the SMC. 537 the SMC.
538 538
539 - Boot Delay: CONFIG_BOOTDELAY - in seconds 539 - Boot Delay: CONFIG_BOOTDELAY - in seconds
540 Delay before automatically booting the default image; 540 Delay before automatically booting the default image;
541 set to -1 to disable autoboot. 541 set to -1 to disable autoboot.
542 542
543 See doc/README.autoboot for these options that 543 See doc/README.autoboot for these options that
544 work with CONFIG_BOOTDELAY. None are required. 544 work with CONFIG_BOOTDELAY. None are required.
545 CONFIG_BOOT_RETRY_TIME 545 CONFIG_BOOT_RETRY_TIME
546 CONFIG_BOOT_RETRY_MIN 546 CONFIG_BOOT_RETRY_MIN
547 CONFIG_AUTOBOOT_KEYED 547 CONFIG_AUTOBOOT_KEYED
548 CONFIG_AUTOBOOT_PROMPT 548 CONFIG_AUTOBOOT_PROMPT
549 CONFIG_AUTOBOOT_DELAY_STR 549 CONFIG_AUTOBOOT_DELAY_STR
550 CONFIG_AUTOBOOT_STOP_STR 550 CONFIG_AUTOBOOT_STOP_STR
551 CONFIG_AUTOBOOT_DELAY_STR2 551 CONFIG_AUTOBOOT_DELAY_STR2
552 CONFIG_AUTOBOOT_STOP_STR2 552 CONFIG_AUTOBOOT_STOP_STR2
553 CONFIG_ZERO_BOOTDELAY_CHECK 553 CONFIG_ZERO_BOOTDELAY_CHECK
554 CONFIG_RESET_TO_RETRY 554 CONFIG_RESET_TO_RETRY
555 555
556 - Autoboot Command: 556 - Autoboot Command:
557 CONFIG_BOOTCOMMAND 557 CONFIG_BOOTCOMMAND
558 Only needed when CONFIG_BOOTDELAY is enabled; 558 Only needed when CONFIG_BOOTDELAY is enabled;
559 define a command string that is automatically executed 559 define a command string that is automatically executed
560 when no character is read on the console interface 560 when no character is read on the console interface
561 within "Boot Delay" after reset. 561 within "Boot Delay" after reset.
562 562
563 CONFIG_BOOTARGS 563 CONFIG_BOOTARGS
564 This can be used to pass arguments to the bootm 564 This can be used to pass arguments to the bootm
565 command. The value of CONFIG_BOOTARGS goes into the 565 command. The value of CONFIG_BOOTARGS goes into the
566 environment value "bootargs". 566 environment value "bootargs".
567 567
568 CONFIG_RAMBOOT and CONFIG_NFSBOOT 568 CONFIG_RAMBOOT and CONFIG_NFSBOOT
569 The value of these goes into the environment as 569 The value of these goes into the environment as
570 "ramboot" and "nfsboot" respectively, and can be used 570 "ramboot" and "nfsboot" respectively, and can be used
571 as a convenience, when switching between booting from 571 as a convenience, when switching between booting from
572 RAM and NFS. 572 RAM and NFS.
573 573
574 - Pre-Boot Commands: 574 - Pre-Boot Commands:
575 CONFIG_PREBOOT 575 CONFIG_PREBOOT
576 576
577 When this option is #defined, the existence of the 577 When this option is #defined, the existence of the
578 environment variable "preboot" will be checked 578 environment variable "preboot" will be checked
579 immediately before starting the CONFIG_BOOTDELAY 579 immediately before starting the CONFIG_BOOTDELAY
580 countdown and/or running the auto-boot command resp. 580 countdown and/or running the auto-boot command resp.
581 entering interactive mode. 581 entering interactive mode.
582 582
583 This feature is especially useful when "preboot" is 583 This feature is especially useful when "preboot" is
584 automatically generated or modified. For an example 584 automatically generated or modified. For an example
585 see the LWMON board specific code: here "preboot" is 585 see the LWMON board specific code: here "preboot" is
586 modified when the user holds down a certain 586 modified when the user holds down a certain
587 combination of keys on the (special) keyboard when 587 combination of keys on the (special) keyboard when
588 booting the systems 588 booting the systems
589 589
590 - Serial Download Echo Mode: 590 - Serial Download Echo Mode:
591 CONFIG_LOADS_ECHO 591 CONFIG_LOADS_ECHO
592 If defined to 1, all characters received during a 592 If defined to 1, all characters received during a
593 serial download (using the "loads" command) are 593 serial download (using the "loads" command) are
594 echoed back. This might be needed by some terminal 594 echoed back. This might be needed by some terminal
595 emulations (like "cu"), but may as well just take 595 emulations (like "cu"), but may as well just take
596 time on others. This setting #define's the initial 596 time on others. This setting #define's the initial
597 value of the "loads_echo" environment variable. 597 value of the "loads_echo" environment variable.
598 598
599 - Kgdb Serial Baudrate: (if CONFIG_CMD_KGDB is defined) 599 - Kgdb Serial Baudrate: (if CONFIG_CMD_KGDB is defined)
600 CONFIG_KGDB_BAUDRATE 600 CONFIG_KGDB_BAUDRATE
601 Select one of the baudrates listed in 601 Select one of the baudrates listed in
602 CONFIG_SYS_BAUDRATE_TABLE, see below. 602 CONFIG_SYS_BAUDRATE_TABLE, see below.
603 603
604 - Monitor Functions: 604 - Monitor Functions:
605 Monitor commands can be included or excluded 605 Monitor commands can be included or excluded
606 from the build by using the #include files 606 from the build by using the #include files
607 "config_cmd_all.h" and #undef'ing unwanted 607 "config_cmd_all.h" and #undef'ing unwanted
608 commands, or using "config_cmd_default.h" 608 commands, or using "config_cmd_default.h"
609 and augmenting with additional #define's 609 and augmenting with additional #define's
610 for wanted commands. 610 for wanted commands.
611 611
612 The default command configuration includes all commands 612 The default command configuration includes all commands
613 except those marked below with a "*". 613 except those marked below with a "*".
614 614
615 CONFIG_CMD_ASKENV * ask for env variable 615 CONFIG_CMD_ASKENV * ask for env variable
616 CONFIG_CMD_BDI bdinfo 616 CONFIG_CMD_BDI bdinfo
617 CONFIG_CMD_BEDBUG * Include BedBug Debugger 617 CONFIG_CMD_BEDBUG * Include BedBug Debugger
618 CONFIG_CMD_BMP * BMP support 618 CONFIG_CMD_BMP * BMP support
619 CONFIG_CMD_BSP * Board specific commands 619 CONFIG_CMD_BSP * Board specific commands
620 CONFIG_CMD_BOOTD bootd 620 CONFIG_CMD_BOOTD bootd
621 CONFIG_CMD_CACHE * icache, dcache 621 CONFIG_CMD_CACHE * icache, dcache
622 CONFIG_CMD_CONSOLE coninfo 622 CONFIG_CMD_CONSOLE coninfo
623 CONFIG_CMD_DATE * support for RTC, date/time... 623 CONFIG_CMD_DATE * support for RTC, date/time...
624 CONFIG_CMD_DHCP * DHCP support 624 CONFIG_CMD_DHCP * DHCP support
625 CONFIG_CMD_DIAG * Diagnostics 625 CONFIG_CMD_DIAG * Diagnostics
626 CONFIG_CMD_DS4510 * ds4510 I2C gpio commands 626 CONFIG_CMD_DS4510 * ds4510 I2C gpio commands
627 CONFIG_CMD_DS4510_INFO * ds4510 I2C info command 627 CONFIG_CMD_DS4510_INFO * ds4510 I2C info command
628 CONFIG_CMD_DS4510_MEM * ds4510 I2C eeprom/sram commansd 628 CONFIG_CMD_DS4510_MEM * ds4510 I2C eeprom/sram commansd
629 CONFIG_CMD_DS4510_RST * ds4510 I2C rst command 629 CONFIG_CMD_DS4510_RST * ds4510 I2C rst command
630 CONFIG_CMD_DTT * Digital Therm and Thermostat 630 CONFIG_CMD_DTT * Digital Therm and Thermostat
631 CONFIG_CMD_ECHO echo arguments 631 CONFIG_CMD_ECHO echo arguments
632 CONFIG_CMD_EDITENV edit env variable 632 CONFIG_CMD_EDITENV edit env variable
633 CONFIG_CMD_EEPROM * EEPROM read/write support 633 CONFIG_CMD_EEPROM * EEPROM read/write support
634 CONFIG_CMD_ELF * bootelf, bootvx 634 CONFIG_CMD_ELF * bootelf, bootvx
635 CONFIG_CMD_SAVEENV saveenv 635 CONFIG_CMD_SAVEENV saveenv
636 CONFIG_CMD_FDC * Floppy Disk Support 636 CONFIG_CMD_FDC * Floppy Disk Support
637 CONFIG_CMD_FAT * FAT partition support 637 CONFIG_CMD_FAT * FAT partition support
638 CONFIG_CMD_FDOS * Dos diskette Support 638 CONFIG_CMD_FDOS * Dos diskette Support
639 CONFIG_CMD_FLASH flinfo, erase, protect 639 CONFIG_CMD_FLASH flinfo, erase, protect
640 CONFIG_CMD_FPGA FPGA device initialization support 640 CONFIG_CMD_FPGA FPGA device initialization support
641 CONFIG_CMD_HWFLOW * RTS/CTS hw flow control 641 CONFIG_CMD_HWFLOW * RTS/CTS hw flow control
642 CONFIG_CMD_I2C * I2C serial bus support 642 CONFIG_CMD_I2C * I2C serial bus support
643 CONFIG_CMD_IDE * IDE harddisk support 643 CONFIG_CMD_IDE * IDE harddisk support
644 CONFIG_CMD_IMI iminfo 644 CONFIG_CMD_IMI iminfo
645 CONFIG_CMD_IMLS List all found images 645 CONFIG_CMD_IMLS List all found images
646 CONFIG_CMD_IMMAP * IMMR dump support 646 CONFIG_CMD_IMMAP * IMMR dump support
647 CONFIG_CMD_IRQ * irqinfo 647 CONFIG_CMD_IRQ * irqinfo
648 CONFIG_CMD_ITEST Integer/string test of 2 values 648 CONFIG_CMD_ITEST Integer/string test of 2 values
649 CONFIG_CMD_JFFS2 * JFFS2 Support 649 CONFIG_CMD_JFFS2 * JFFS2 Support
650 CONFIG_CMD_KGDB * kgdb 650 CONFIG_CMD_KGDB * kgdb
651 CONFIG_CMD_LOADB loadb 651 CONFIG_CMD_LOADB loadb
652 CONFIG_CMD_LOADS loads 652 CONFIG_CMD_LOADS loads
653 CONFIG_CMD_MD5SUM print md5 message digest 653 CONFIG_CMD_MD5SUM print md5 message digest
654 (requires CONFIG_CMD_MEMORY and CONFIG_MD5) 654 (requires CONFIG_CMD_MEMORY and CONFIG_MD5)
655 CONFIG_CMD_MEMORY md, mm, nm, mw, cp, cmp, crc, base, 655 CONFIG_CMD_MEMORY md, mm, nm, mw, cp, cmp, crc, base,
656 loop, loopw, mtest 656 loop, loopw, mtest
657 CONFIG_CMD_MISC Misc functions like sleep etc 657 CONFIG_CMD_MISC Misc functions like sleep etc
658 CONFIG_CMD_MMC * MMC memory mapped support 658 CONFIG_CMD_MMC * MMC memory mapped support
659 CONFIG_CMD_MII * MII utility commands 659 CONFIG_CMD_MII * MII utility commands
660 CONFIG_CMD_MTDPARTS * MTD partition support 660 CONFIG_CMD_MTDPARTS * MTD partition support
661 CONFIG_CMD_NAND * NAND support 661 CONFIG_CMD_NAND * NAND support
662 CONFIG_CMD_NET bootp, tftpboot, rarpboot 662 CONFIG_CMD_NET bootp, tftpboot, rarpboot
663 CONFIG_CMD_PCA953X * PCA953x I2C gpio commands 663 CONFIG_CMD_PCA953X * PCA953x I2C gpio commands
664 CONFIG_CMD_PCA953X_INFO * PCA953x I2C gpio info command 664 CONFIG_CMD_PCA953X_INFO * PCA953x I2C gpio info command
665 CONFIG_CMD_PCI * pciinfo 665 CONFIG_CMD_PCI * pciinfo
666 CONFIG_CMD_PCMCIA * PCMCIA support 666 CONFIG_CMD_PCMCIA * PCMCIA support
667 CONFIG_CMD_PING * send ICMP ECHO_REQUEST to network 667 CONFIG_CMD_PING * send ICMP ECHO_REQUEST to network
668 host 668 host
669 CONFIG_CMD_PORTIO * Port I/O 669 CONFIG_CMD_PORTIO * Port I/O
670 CONFIG_CMD_REGINFO * Register dump 670 CONFIG_CMD_REGINFO * Register dump
671 CONFIG_CMD_RUN run command in env variable 671 CONFIG_CMD_RUN run command in env variable
672 CONFIG_CMD_SAVES * save S record dump 672 CONFIG_CMD_SAVES * save S record dump
673 CONFIG_CMD_SCSI * SCSI Support 673 CONFIG_CMD_SCSI * SCSI Support
674 CONFIG_CMD_SDRAM * print SDRAM configuration information 674 CONFIG_CMD_SDRAM * print SDRAM configuration information
675 (requires CONFIG_CMD_I2C) 675 (requires CONFIG_CMD_I2C)
676 CONFIG_CMD_SETGETDCR Support for DCR Register access 676 CONFIG_CMD_SETGETDCR Support for DCR Register access
677 (4xx only) 677 (4xx only)
678 CONFIG_CMD_SHA1 print sha1 memory digest 678 CONFIG_CMD_SHA1 print sha1 memory digest
679 (requires CONFIG_CMD_MEMORY) 679 (requires CONFIG_CMD_MEMORY)
680 CONFIG_CMD_SOURCE "source" command Support 680 CONFIG_CMD_SOURCE "source" command Support
681 CONFIG_CMD_SPI * SPI serial bus support 681 CONFIG_CMD_SPI * SPI serial bus support
682 CONFIG_CMD_USB * USB support 682 CONFIG_CMD_USB * USB support
683 CONFIG_CMD_VFD * VFD support (TRAB) 683 CONFIG_CMD_VFD * VFD support (TRAB)
684 CONFIG_CMD_CDP * Cisco Discover Protocol support 684 CONFIG_CMD_CDP * Cisco Discover Protocol support
685 CONFIG_CMD_FSL * Microblaze FSL support 685 CONFIG_CMD_FSL * Microblaze FSL support
686 686
687 687
688 EXAMPLE: If you want all functions except of network 688 EXAMPLE: If you want all functions except of network
689 support you can write: 689 support you can write:
690 690
691 #include "config_cmd_all.h" 691 #include "config_cmd_all.h"
692 #undef CONFIG_CMD_NET 692 #undef CONFIG_CMD_NET
693 693
694 Other Commands: 694 Other Commands:
695 fdt (flattened device tree) command: CONFIG_OF_LIBFDT 695 fdt (flattened device tree) command: CONFIG_OF_LIBFDT
696 696
697 Note: Don't enable the "icache" and "dcache" commands 697 Note: Don't enable the "icache" and "dcache" commands
698 (configuration option CONFIG_CMD_CACHE) unless you know 698 (configuration option CONFIG_CMD_CACHE) unless you know
699 what you (and your U-Boot users) are doing. Data 699 what you (and your U-Boot users) are doing. Data
700 cache cannot be enabled on systems like the 8xx or 700 cache cannot be enabled on systems like the 8xx or
701 8260 (where accesses to the IMMR region must be 701 8260 (where accesses to the IMMR region must be
702 uncached), and it cannot be disabled on all other 702 uncached), and it cannot be disabled on all other
703 systems where we (mis-) use the data cache to hold an 703 systems where we (mis-) use the data cache to hold an
704 initial stack and some data. 704 initial stack and some data.
705 705
706 706
707 XXX - this list needs to get updated! 707 XXX - this list needs to get updated!
708 708
709 - Watchdog: 709 - Watchdog:
710 CONFIG_WATCHDOG 710 CONFIG_WATCHDOG
711 If this variable is defined, it enables watchdog 711 If this variable is defined, it enables watchdog
712 support. There must be support in the platform specific 712 support. There must be support in the platform specific
713 code for a watchdog. For the 8xx and 8260 CPUs, the 713 code for a watchdog. For the 8xx and 8260 CPUs, the
714 SIU Watchdog feature is enabled in the SYPCR 714 SIU Watchdog feature is enabled in the SYPCR
715 register. 715 register.
716 716
717 - U-Boot Version: 717 - U-Boot Version:
718 CONFIG_VERSION_VARIABLE 718 CONFIG_VERSION_VARIABLE
719 If this variable is defined, an environment variable 719 If this variable is defined, an environment variable
720 named "ver" is created by U-Boot showing the U-Boot 720 named "ver" is created by U-Boot showing the U-Boot
721 version as printed by the "version" command. 721 version as printed by the "version" command.
722 This variable is readonly. 722 This variable is readonly.
723 723
724 - Real-Time Clock: 724 - Real-Time Clock:
725 725
726 When CONFIG_CMD_DATE is selected, the type of the RTC 726 When CONFIG_CMD_DATE is selected, the type of the RTC
727 has to be selected, too. Define exactly one of the 727 has to be selected, too. Define exactly one of the
728 following options: 728 following options:
729 729
730 CONFIG_RTC_MPC8xx - use internal RTC of MPC8xx 730 CONFIG_RTC_MPC8xx - use internal RTC of MPC8xx
731 CONFIG_RTC_PCF8563 - use Philips PCF8563 RTC 731 CONFIG_RTC_PCF8563 - use Philips PCF8563 RTC
732 CONFIG_RTC_MC13783 - use MC13783 RTC 732 CONFIG_RTC_MC13783 - use MC13783 RTC
733 CONFIG_RTC_MC146818 - use MC146818 RTC 733 CONFIG_RTC_MC146818 - use MC146818 RTC
734 CONFIG_RTC_DS1307 - use Maxim, Inc. DS1307 RTC 734 CONFIG_RTC_DS1307 - use Maxim, Inc. DS1307 RTC
735 CONFIG_RTC_DS1337 - use Maxim, Inc. DS1337 RTC 735 CONFIG_RTC_DS1337 - use Maxim, Inc. DS1337 RTC
736 CONFIG_RTC_DS1338 - use Maxim, Inc. DS1338 RTC 736 CONFIG_RTC_DS1338 - use Maxim, Inc. DS1338 RTC
737 CONFIG_RTC_DS164x - use Dallas DS164x RTC 737 CONFIG_RTC_DS164x - use Dallas DS164x RTC
738 CONFIG_RTC_ISL1208 - use Intersil ISL1208 RTC 738 CONFIG_RTC_ISL1208 - use Intersil ISL1208 RTC
739 CONFIG_RTC_MAX6900 - use Maxim, Inc. MAX6900 RTC 739 CONFIG_RTC_MAX6900 - use Maxim, Inc. MAX6900 RTC
740 CONFIG_SYS_RTC_DS1337_NOOSC - Turn off the OSC output for DS1337 740 CONFIG_SYS_RTC_DS1337_NOOSC - Turn off the OSC output for DS1337
741 741
742 Note that if the RTC uses I2C, then the I2C interface 742 Note that if the RTC uses I2C, then the I2C interface
743 must also be configured. See I2C Support, below. 743 must also be configured. See I2C Support, below.
744 744
745 - GPIO Support: 745 - GPIO Support:
746 CONFIG_PCA953X - use NXP's PCA953X series I2C GPIO 746 CONFIG_PCA953X - use NXP's PCA953X series I2C GPIO
747 CONFIG_PCA953X_INFO - enable pca953x info command 747 CONFIG_PCA953X_INFO - enable pca953x info command
748 748
749 Note that if the GPIO device uses I2C, then the I2C interface 749 Note that if the GPIO device uses I2C, then the I2C interface
750 must also be configured. See I2C Support, below. 750 must also be configured. See I2C Support, below.
751 751
752 - Timestamp Support: 752 - Timestamp Support:
753 753
754 When CONFIG_TIMESTAMP is selected, the timestamp 754 When CONFIG_TIMESTAMP is selected, the timestamp
755 (date and time) of an image is printed by image 755 (date and time) of an image is printed by image
756 commands like bootm or iminfo. This option is 756 commands like bootm or iminfo. This option is
757 automatically enabled when you select CONFIG_CMD_DATE . 757 automatically enabled when you select CONFIG_CMD_DATE .
758 758
759 - Partition Support: 759 - Partition Support:
760 CONFIG_MAC_PARTITION and/or CONFIG_DOS_PARTITION 760 CONFIG_MAC_PARTITION and/or CONFIG_DOS_PARTITION
761 and/or CONFIG_ISO_PARTITION and/or CONFIG_EFI_PARTITION 761 and/or CONFIG_ISO_PARTITION and/or CONFIG_EFI_PARTITION
762 762
763 If IDE or SCSI support is enabled (CONFIG_CMD_IDE or 763 If IDE or SCSI support is enabled (CONFIG_CMD_IDE or
764 CONFIG_CMD_SCSI) you must configure support for at 764 CONFIG_CMD_SCSI) you must configure support for at
765 least one partition type as well. 765 least one partition type as well.
766 766
767 - IDE Reset method: 767 - IDE Reset method:
768 CONFIG_IDE_RESET_ROUTINE - this is defined in several 768 CONFIG_IDE_RESET_ROUTINE - this is defined in several
769 board configurations files but used nowhere! 769 board configurations files but used nowhere!
770 770
771 CONFIG_IDE_RESET - is this is defined, IDE Reset will 771 CONFIG_IDE_RESET - is this is defined, IDE Reset will
772 be performed by calling the function 772 be performed by calling the function
773 ide_set_reset(int reset) 773 ide_set_reset(int reset)
774 which has to be defined in a board specific file 774 which has to be defined in a board specific file
775 775
776 - ATAPI Support: 776 - ATAPI Support:
777 CONFIG_ATAPI 777 CONFIG_ATAPI
778 778
779 Set this to enable ATAPI support. 779 Set this to enable ATAPI support.
780 780
781 - LBA48 Support 781 - LBA48 Support
782 CONFIG_LBA48 782 CONFIG_LBA48
783 783
784 Set this to enable support for disks larger than 137GB 784 Set this to enable support for disks larger than 137GB
785 Also look at CONFIG_SYS_64BIT_LBA. 785 Also look at CONFIG_SYS_64BIT_LBA.
786 Whithout these , LBA48 support uses 32bit variables and will 'only' 786 Whithout these , LBA48 support uses 32bit variables and will 'only'
787 support disks up to 2.1TB. 787 support disks up to 2.1TB.
788 788
789 CONFIG_SYS_64BIT_LBA: 789 CONFIG_SYS_64BIT_LBA:
790 When enabled, makes the IDE subsystem use 64bit sector addresses. 790 When enabled, makes the IDE subsystem use 64bit sector addresses.
791 Default is 32bit. 791 Default is 32bit.
792 792
793 - SCSI Support: 793 - SCSI Support:
794 At the moment only there is only support for the 794 At the moment only there is only support for the
795 SYM53C8XX SCSI controller; define 795 SYM53C8XX SCSI controller; define
796 CONFIG_SCSI_SYM53C8XX to enable it. 796 CONFIG_SCSI_SYM53C8XX to enable it.
797 797
798 CONFIG_SYS_SCSI_MAX_LUN [8], CONFIG_SYS_SCSI_MAX_SCSI_ID [7] and 798 CONFIG_SYS_SCSI_MAX_LUN [8], CONFIG_SYS_SCSI_MAX_SCSI_ID [7] and
799 CONFIG_SYS_SCSI_MAX_DEVICE [CONFIG_SYS_SCSI_MAX_SCSI_ID * 799 CONFIG_SYS_SCSI_MAX_DEVICE [CONFIG_SYS_SCSI_MAX_SCSI_ID *
800 CONFIG_SYS_SCSI_MAX_LUN] can be adjusted to define the 800 CONFIG_SYS_SCSI_MAX_LUN] can be adjusted to define the
801 maximum numbers of LUNs, SCSI ID's and target 801 maximum numbers of LUNs, SCSI ID's and target
802 devices. 802 devices.
803 CONFIG_SYS_SCSI_SYM53C8XX_CCF to fix clock timing (80Mhz) 803 CONFIG_SYS_SCSI_SYM53C8XX_CCF to fix clock timing (80Mhz)
804 804
805 - NETWORK Support (PCI): 805 - NETWORK Support (PCI):
806 CONFIG_E1000 806 CONFIG_E1000
807 Support for Intel 8254x gigabit chips. 807 Support for Intel 8254x gigabit chips.
808 808
809 CONFIG_E1000_FALLBACK_MAC 809 CONFIG_E1000_FALLBACK_MAC
810 default MAC for empty EEPROM after production. 810 default MAC for empty EEPROM after production.
811 811
812 CONFIG_EEPRO100 812 CONFIG_EEPRO100
813 Support for Intel 82557/82559/82559ER chips. 813 Support for Intel 82557/82559/82559ER chips.
814 Optional CONFIG_EEPRO100_SROM_WRITE enables EEPROM 814 Optional CONFIG_EEPRO100_SROM_WRITE enables EEPROM
815 write routine for first time initialisation. 815 write routine for first time initialisation.
816 816
817 CONFIG_TULIP 817 CONFIG_TULIP
818 Support for Digital 2114x chips. 818 Support for Digital 2114x chips.
819 Optional CONFIG_TULIP_SELECT_MEDIA for board specific 819 Optional CONFIG_TULIP_SELECT_MEDIA for board specific
820 modem chip initialisation (KS8761/QS6611). 820 modem chip initialisation (KS8761/QS6611).
821 821
822 CONFIG_NATSEMI 822 CONFIG_NATSEMI
823 Support for National dp83815 chips. 823 Support for National dp83815 chips.
824 824
825 CONFIG_NS8382X 825 CONFIG_NS8382X
826 Support for National dp8382[01] gigabit chips. 826 Support for National dp8382[01] gigabit chips.
827 827
828 - NETWORK Support (other): 828 - NETWORK Support (other):
829 829
830 CONFIG_DRIVER_AT91EMAC 830 CONFIG_DRIVER_AT91EMAC
831 Support for AT91RM9200 EMAC. 831 Support for AT91RM9200 EMAC.
832 832
833 CONFIG_RMII 833 CONFIG_RMII
834 Define this to use reduced MII inteface 834 Define this to use reduced MII inteface
835 835
836 CONFIG_DRIVER_AT91EMAC_QUIET 836 CONFIG_DRIVER_AT91EMAC_QUIET
837 If this defined, the driver is quiet. 837 If this defined, the driver is quiet.
838 The driver doen't show link status messages. 838 The driver doen't show link status messages.
839 839
840 CONFIG_DRIVER_LAN91C96 840 CONFIG_DRIVER_LAN91C96
841 Support for SMSC's LAN91C96 chips. 841 Support for SMSC's LAN91C96 chips.
842 842
843 CONFIG_LAN91C96_BASE 843 CONFIG_LAN91C96_BASE
844 Define this to hold the physical address 844 Define this to hold the physical address
845 of the LAN91C96's I/O space 845 of the LAN91C96's I/O space
846 846
847 CONFIG_LAN91C96_USE_32_BIT 847 CONFIG_LAN91C96_USE_32_BIT
848 Define this to enable 32 bit addressing 848 Define this to enable 32 bit addressing
849 849
850 CONFIG_DRIVER_SMC91111 850 CONFIG_DRIVER_SMC91111
851 Support for SMSC's LAN91C111 chip 851 Support for SMSC's LAN91C111 chip
852 852
853 CONFIG_SMC91111_BASE 853 CONFIG_SMC91111_BASE
854 Define this to hold the physical address 854 Define this to hold the physical address
855 of the device (I/O space) 855 of the device (I/O space)
856 856
857 CONFIG_SMC_USE_32_BIT 857 CONFIG_SMC_USE_32_BIT
858 Define this if data bus is 32 bits 858 Define this if data bus is 32 bits
859 859
860 CONFIG_SMC_USE_IOFUNCS 860 CONFIG_SMC_USE_IOFUNCS
861 Define this to use i/o functions instead of macros 861 Define this to use i/o functions instead of macros
862 (some hardware wont work with macros) 862 (some hardware wont work with macros)
863 863
864 CONFIG_FTGMAC100
865 Support for Faraday's FTGMAC100 Gigabit SoC Ethernet
866
867 CONFIG_FTGMAC100_EGIGA
868 Define this to use GE link update with gigabit PHY.
869 Define this if FTGMAC100 is connected to gigabit PHY.
870 If your system has 10/100 PHY only, it might not occur
871 wrong behavior. Because PHY usually return timeout or
872 useless data when polling gigabit status and gigabit
873 control registers. This behavior won't affect the
874 correctnessof 10/100 link speed update.
875
864 CONFIG_SMC911X 876 CONFIG_SMC911X
865 Support for SMSC's LAN911x and LAN921x chips 877 Support for SMSC's LAN911x and LAN921x chips
866 878
867 CONFIG_SMC911X_BASE 879 CONFIG_SMC911X_BASE
868 Define this to hold the physical address 880 Define this to hold the physical address
869 of the device (I/O space) 881 of the device (I/O space)
870 882
871 CONFIG_SMC911X_32_BIT 883 CONFIG_SMC911X_32_BIT
872 Define this if data bus is 32 bits 884 Define this if data bus is 32 bits
873 885
874 CONFIG_SMC911X_16_BIT 886 CONFIG_SMC911X_16_BIT
875 Define this if data bus is 16 bits. If your processor 887 Define this if data bus is 16 bits. If your processor
876 automatically converts one 32 bit word to two 16 bit 888 automatically converts one 32 bit word to two 16 bit
877 words you may also try CONFIG_SMC911X_32_BIT. 889 words you may also try CONFIG_SMC911X_32_BIT.
878 890
879 - USB Support: 891 - USB Support:
880 At the moment only the UHCI host controller is 892 At the moment only the UHCI host controller is
881 supported (PIP405, MIP405, MPC5200); define 893 supported (PIP405, MIP405, MPC5200); define
882 CONFIG_USB_UHCI to enable it. 894 CONFIG_USB_UHCI to enable it.
883 define CONFIG_USB_KEYBOARD to enable the USB Keyboard 895 define CONFIG_USB_KEYBOARD to enable the USB Keyboard
884 and define CONFIG_USB_STORAGE to enable the USB 896 and define CONFIG_USB_STORAGE to enable the USB
885 storage devices. 897 storage devices.
886 Note: 898 Note:
887 Supported are USB Keyboards and USB Floppy drives 899 Supported are USB Keyboards and USB Floppy drives
888 (TEAC FD-05PUB). 900 (TEAC FD-05PUB).
889 MPC5200 USB requires additional defines: 901 MPC5200 USB requires additional defines:
890 CONFIG_USB_CLOCK 902 CONFIG_USB_CLOCK
891 for 528 MHz Clock: 0x0001bbbb 903 for 528 MHz Clock: 0x0001bbbb
892 CONFIG_PSC3_USB 904 CONFIG_PSC3_USB
893 for USB on PSC3 905 for USB on PSC3
894 CONFIG_USB_CONFIG 906 CONFIG_USB_CONFIG
895 for differential drivers: 0x00001000 907 for differential drivers: 0x00001000
896 for single ended drivers: 0x00005000 908 for single ended drivers: 0x00005000
897 for differential drivers on PSC3: 0x00000100 909 for differential drivers on PSC3: 0x00000100
898 for single ended drivers on PSC3: 0x00004100 910 for single ended drivers on PSC3: 0x00004100
899 CONFIG_SYS_USB_EVENT_POLL 911 CONFIG_SYS_USB_EVENT_POLL
900 May be defined to allow interrupt polling 912 May be defined to allow interrupt polling
901 instead of using asynchronous interrupts 913 instead of using asynchronous interrupts
902 914
903 - USB Device: 915 - USB Device:
904 Define the below if you wish to use the USB console. 916 Define the below if you wish to use the USB console.
905 Once firmware is rebuilt from a serial console issue the 917 Once firmware is rebuilt from a serial console issue the
906 command "setenv stdin usbtty; setenv stdout usbtty" and 918 command "setenv stdin usbtty; setenv stdout usbtty" and
907 attach your USB cable. The Unix command "dmesg" should print 919 attach your USB cable. The Unix command "dmesg" should print
908 it has found a new device. The environment variable usbtty 920 it has found a new device. The environment variable usbtty
909 can be set to gserial or cdc_acm to enable your device to 921 can be set to gserial or cdc_acm to enable your device to
910 appear to a USB host as a Linux gserial device or a 922 appear to a USB host as a Linux gserial device or a
911 Common Device Class Abstract Control Model serial device. 923 Common Device Class Abstract Control Model serial device.
912 If you select usbtty = gserial you should be able to enumerate 924 If you select usbtty = gserial you should be able to enumerate
913 a Linux host by 925 a Linux host by
914 # modprobe usbserial vendor=0xVendorID product=0xProductID 926 # modprobe usbserial vendor=0xVendorID product=0xProductID
915 else if using cdc_acm, simply setting the environment 927 else if using cdc_acm, simply setting the environment
916 variable usbtty to be cdc_acm should suffice. The following 928 variable usbtty to be cdc_acm should suffice. The following
917 might be defined in YourBoardName.h 929 might be defined in YourBoardName.h
918 930
919 CONFIG_USB_DEVICE 931 CONFIG_USB_DEVICE
920 Define this to build a UDC device 932 Define this to build a UDC device
921 933
922 CONFIG_USB_TTY 934 CONFIG_USB_TTY
923 Define this to have a tty type of device available to 935 Define this to have a tty type of device available to
924 talk to the UDC device 936 talk to the UDC device
925 937
926 CONFIG_SYS_CONSOLE_IS_IN_ENV 938 CONFIG_SYS_CONSOLE_IS_IN_ENV
927 Define this if you want stdin, stdout &/or stderr to 939 Define this if you want stdin, stdout &/or stderr to
928 be set to usbtty. 940 be set to usbtty.
929 941
930 mpc8xx: 942 mpc8xx:
931 CONFIG_SYS_USB_EXTC_CLK 0xBLAH 943 CONFIG_SYS_USB_EXTC_CLK 0xBLAH
932 Derive USB clock from external clock "blah" 944 Derive USB clock from external clock "blah"
933 - CONFIG_SYS_USB_EXTC_CLK 0x02 945 - CONFIG_SYS_USB_EXTC_CLK 0x02
934 946
935 CONFIG_SYS_USB_BRG_CLK 0xBLAH 947 CONFIG_SYS_USB_BRG_CLK 0xBLAH
936 Derive USB clock from brgclk 948 Derive USB clock from brgclk
937 - CONFIG_SYS_USB_BRG_CLK 0x04 949 - CONFIG_SYS_USB_BRG_CLK 0x04
938 950
939 If you have a USB-IF assigned VendorID then you may wish to 951 If you have a USB-IF assigned VendorID then you may wish to
940 define your own vendor specific values either in BoardName.h 952 define your own vendor specific values either in BoardName.h
941 or directly in usbd_vendor_info.h. If you don't define 953 or directly in usbd_vendor_info.h. If you don't define
942 CONFIG_USBD_MANUFACTURER, CONFIG_USBD_PRODUCT_NAME, 954 CONFIG_USBD_MANUFACTURER, CONFIG_USBD_PRODUCT_NAME,
943 CONFIG_USBD_VENDORID and CONFIG_USBD_PRODUCTID, then U-Boot 955 CONFIG_USBD_VENDORID and CONFIG_USBD_PRODUCTID, then U-Boot
944 should pretend to be a Linux device to it's target host. 956 should pretend to be a Linux device to it's target host.
945 957
946 CONFIG_USBD_MANUFACTURER 958 CONFIG_USBD_MANUFACTURER
947 Define this string as the name of your company for 959 Define this string as the name of your company for
948 - CONFIG_USBD_MANUFACTURER "my company" 960 - CONFIG_USBD_MANUFACTURER "my company"
949 961
950 CONFIG_USBD_PRODUCT_NAME 962 CONFIG_USBD_PRODUCT_NAME
951 Define this string as the name of your product 963 Define this string as the name of your product
952 - CONFIG_USBD_PRODUCT_NAME "acme usb device" 964 - CONFIG_USBD_PRODUCT_NAME "acme usb device"
953 965
954 CONFIG_USBD_VENDORID 966 CONFIG_USBD_VENDORID
955 Define this as your assigned Vendor ID from the USB 967 Define this as your assigned Vendor ID from the USB
956 Implementors Forum. This *must* be a genuine Vendor ID 968 Implementors Forum. This *must* be a genuine Vendor ID
957 to avoid polluting the USB namespace. 969 to avoid polluting the USB namespace.
958 - CONFIG_USBD_VENDORID 0xFFFF 970 - CONFIG_USBD_VENDORID 0xFFFF
959 971
960 CONFIG_USBD_PRODUCTID 972 CONFIG_USBD_PRODUCTID
961 Define this as the unique Product ID 973 Define this as the unique Product ID
962 for your device 974 for your device
963 - CONFIG_USBD_PRODUCTID 0xFFFF 975 - CONFIG_USBD_PRODUCTID 0xFFFF
964 976
965 977
966 - MMC Support: 978 - MMC Support:
967 The MMC controller on the Intel PXA is supported. To 979 The MMC controller on the Intel PXA is supported. To
968 enable this define CONFIG_MMC. The MMC can be 980 enable this define CONFIG_MMC. The MMC can be
969 accessed from the boot prompt by mapping the device 981 accessed from the boot prompt by mapping the device
970 to physical memory similar to flash. Command line is 982 to physical memory similar to flash. Command line is
971 enabled with CONFIG_CMD_MMC. The MMC driver also works with 983 enabled with CONFIG_CMD_MMC. The MMC driver also works with
972 the FAT fs. This is enabled with CONFIG_CMD_FAT. 984 the FAT fs. This is enabled with CONFIG_CMD_FAT.
973 985
974 - Journaling Flash filesystem support: 986 - Journaling Flash filesystem support:
975 CONFIG_JFFS2_NAND, CONFIG_JFFS2_NAND_OFF, CONFIG_JFFS2_NAND_SIZE, 987 CONFIG_JFFS2_NAND, CONFIG_JFFS2_NAND_OFF, CONFIG_JFFS2_NAND_SIZE,
976 CONFIG_JFFS2_NAND_DEV 988 CONFIG_JFFS2_NAND_DEV
977 Define these for a default partition on a NAND device 989 Define these for a default partition on a NAND device
978 990
979 CONFIG_SYS_JFFS2_FIRST_SECTOR, 991 CONFIG_SYS_JFFS2_FIRST_SECTOR,
980 CONFIG_SYS_JFFS2_FIRST_BANK, CONFIG_SYS_JFFS2_NUM_BANKS 992 CONFIG_SYS_JFFS2_FIRST_BANK, CONFIG_SYS_JFFS2_NUM_BANKS
981 Define these for a default partition on a NOR device 993 Define these for a default partition on a NOR device
982 994
983 CONFIG_SYS_JFFS_CUSTOM_PART 995 CONFIG_SYS_JFFS_CUSTOM_PART
984 Define this to create an own partition. You have to provide a 996 Define this to create an own partition. You have to provide a
985 function struct part_info* jffs2_part_info(int part_num) 997 function struct part_info* jffs2_part_info(int part_num)
986 998
987 If you define only one JFFS2 partition you may also want to 999 If you define only one JFFS2 partition you may also want to
988 #define CONFIG_SYS_JFFS_SINGLE_PART 1 1000 #define CONFIG_SYS_JFFS_SINGLE_PART 1
989 to disable the command chpart. This is the default when you 1001 to disable the command chpart. This is the default when you
990 have not defined a custom partition 1002 have not defined a custom partition
991 1003
992 - Keyboard Support: 1004 - Keyboard Support:
993 CONFIG_ISA_KEYBOARD 1005 CONFIG_ISA_KEYBOARD
994 1006
995 Define this to enable standard (PC-Style) keyboard 1007 Define this to enable standard (PC-Style) keyboard
996 support 1008 support
997 1009
998 CONFIG_I8042_KBD 1010 CONFIG_I8042_KBD
999 Standard PC keyboard driver with US (is default) and 1011 Standard PC keyboard driver with US (is default) and
1000 GERMAN key layout (switch via environment 'keymap=de') support. 1012 GERMAN key layout (switch via environment 'keymap=de') support.
1001 Export function i8042_kbd_init, i8042_tstc and i8042_getc 1013 Export function i8042_kbd_init, i8042_tstc and i8042_getc
1002 for cfb_console. Supports cursor blinking. 1014 for cfb_console. Supports cursor blinking.
1003 1015
1004 - Video support: 1016 - Video support:
1005 CONFIG_VIDEO 1017 CONFIG_VIDEO
1006 1018
1007 Define this to enable video support (for output to 1019 Define this to enable video support (for output to
1008 video). 1020 video).
1009 1021
1010 CONFIG_VIDEO_CT69000 1022 CONFIG_VIDEO_CT69000
1011 1023
1012 Enable Chips & Technologies 69000 Video chip 1024 Enable Chips & Technologies 69000 Video chip
1013 1025
1014 CONFIG_VIDEO_SMI_LYNXEM 1026 CONFIG_VIDEO_SMI_LYNXEM
1015 Enable Silicon Motion SMI 712/710/810 Video chip. The 1027 Enable Silicon Motion SMI 712/710/810 Video chip. The
1016 video output is selected via environment 'videoout' 1028 video output is selected via environment 'videoout'
1017 (1 = LCD and 2 = CRT). If videoout is undefined, CRT is 1029 (1 = LCD and 2 = CRT). If videoout is undefined, CRT is
1018 assumed. 1030 assumed.
1019 1031
1020 For the CT69000 and SMI_LYNXEM drivers, videomode is 1032 For the CT69000 and SMI_LYNXEM drivers, videomode is
1021 selected via environment 'videomode'. Two different ways 1033 selected via environment 'videomode'. Two different ways
1022 are possible: 1034 are possible:
1023 - "videomode=num" 'num' is a standard LiLo mode numbers. 1035 - "videomode=num" 'num' is a standard LiLo mode numbers.
1024 Following standard modes are supported (* is default): 1036 Following standard modes are supported (* is default):
1025 1037
1026 Colors 640x480 800x600 1024x768 1152x864 1280x1024 1038 Colors 640x480 800x600 1024x768 1152x864 1280x1024
1027 -------------+--------------------------------------------- 1039 -------------+---------------------------------------------
1028 8 bits | 0x301* 0x303 0x305 0x161 0x307 1040 8 bits | 0x301* 0x303 0x305 0x161 0x307
1029 15 bits | 0x310 0x313 0x316 0x162 0x319 1041 15 bits | 0x310 0x313 0x316 0x162 0x319
1030 16 bits | 0x311 0x314 0x317 0x163 0x31A 1042 16 bits | 0x311 0x314 0x317 0x163 0x31A
1031 24 bits | 0x312 0x315 0x318 ? 0x31B 1043 24 bits | 0x312 0x315 0x318 ? 0x31B
1032 -------------+--------------------------------------------- 1044 -------------+---------------------------------------------
1033 (i.e. setenv videomode 317; saveenv; reset;) 1045 (i.e. setenv videomode 317; saveenv; reset;)
1034 1046
1035 - "videomode=bootargs" all the video parameters are parsed 1047 - "videomode=bootargs" all the video parameters are parsed
1036 from the bootargs. (See drivers/video/videomodes.c) 1048 from the bootargs. (See drivers/video/videomodes.c)
1037 1049
1038 1050
1039 CONFIG_VIDEO_SED13806 1051 CONFIG_VIDEO_SED13806
1040 Enable Epson SED13806 driver. This driver supports 8bpp 1052 Enable Epson SED13806 driver. This driver supports 8bpp
1041 and 16bpp modes defined by CONFIG_VIDEO_SED13806_8BPP 1053 and 16bpp modes defined by CONFIG_VIDEO_SED13806_8BPP
1042 or CONFIG_VIDEO_SED13806_16BPP 1054 or CONFIG_VIDEO_SED13806_16BPP
1043 1055
1044 - Keyboard Support: 1056 - Keyboard Support:
1045 CONFIG_KEYBOARD 1057 CONFIG_KEYBOARD
1046 1058
1047 Define this to enable a custom keyboard support. 1059 Define this to enable a custom keyboard support.
1048 This simply calls drv_keyboard_init() which must be 1060 This simply calls drv_keyboard_init() which must be
1049 defined in your board-specific files. 1061 defined in your board-specific files.
1050 The only board using this so far is RBC823. 1062 The only board using this so far is RBC823.
1051 1063
1052 - LCD Support: CONFIG_LCD 1064 - LCD Support: CONFIG_LCD
1053 1065
1054 Define this to enable LCD support (for output to LCD 1066 Define this to enable LCD support (for output to LCD
1055 display); also select one of the supported displays 1067 display); also select one of the supported displays
1056 by defining one of these: 1068 by defining one of these:
1057 1069
1058 CONFIG_ATMEL_LCD: 1070 CONFIG_ATMEL_LCD:
1059 1071
1060 HITACHI TX09D70VM1CCA, 3.5", 240x320. 1072 HITACHI TX09D70VM1CCA, 3.5", 240x320.
1061 1073
1062 CONFIG_NEC_NL6448AC33: 1074 CONFIG_NEC_NL6448AC33:
1063 1075
1064 NEC NL6448AC33-18. Active, color, single scan. 1076 NEC NL6448AC33-18. Active, color, single scan.
1065 1077
1066 CONFIG_NEC_NL6448BC20 1078 CONFIG_NEC_NL6448BC20
1067 1079
1068 NEC NL6448BC20-08. 6.5", 640x480. 1080 NEC NL6448BC20-08. 6.5", 640x480.
1069 Active, color, single scan. 1081 Active, color, single scan.
1070 1082
1071 CONFIG_NEC_NL6448BC33_54 1083 CONFIG_NEC_NL6448BC33_54
1072 1084
1073 NEC NL6448BC33-54. 10.4", 640x480. 1085 NEC NL6448BC33-54. 10.4", 640x480.
1074 Active, color, single scan. 1086 Active, color, single scan.
1075 1087
1076 CONFIG_SHARP_16x9 1088 CONFIG_SHARP_16x9
1077 1089
1078 Sharp 320x240. Active, color, single scan. 1090 Sharp 320x240. Active, color, single scan.
1079 It isn't 16x9, and I am not sure what it is. 1091 It isn't 16x9, and I am not sure what it is.
1080 1092
1081 CONFIG_SHARP_LQ64D341 1093 CONFIG_SHARP_LQ64D341
1082 1094
1083 Sharp LQ64D341 display, 640x480. 1095 Sharp LQ64D341 display, 640x480.
1084 Active, color, single scan. 1096 Active, color, single scan.
1085 1097
1086 CONFIG_HLD1045 1098 CONFIG_HLD1045
1087 1099
1088 HLD1045 display, 640x480. 1100 HLD1045 display, 640x480.
1089 Active, color, single scan. 1101 Active, color, single scan.
1090 1102
1091 CONFIG_OPTREX_BW 1103 CONFIG_OPTREX_BW
1092 1104
1093 Optrex CBL50840-2 NF-FW 99 22 M5 1105 Optrex CBL50840-2 NF-FW 99 22 M5
1094 or 1106 or
1095 Hitachi LMG6912RPFC-00T 1107 Hitachi LMG6912RPFC-00T
1096 or 1108 or
1097 Hitachi SP14Q002 1109 Hitachi SP14Q002
1098 1110
1099 320x240. Black & white. 1111 320x240. Black & white.
1100 1112
1101 Normally display is black on white background; define 1113 Normally display is black on white background; define
1102 CONFIG_SYS_WHITE_ON_BLACK to get it inverted. 1114 CONFIG_SYS_WHITE_ON_BLACK to get it inverted.
1103 1115
1104 - Splash Screen Support: CONFIG_SPLASH_SCREEN 1116 - Splash Screen Support: CONFIG_SPLASH_SCREEN
1105 1117
1106 If this option is set, the environment is checked for 1118 If this option is set, the environment is checked for
1107 a variable "splashimage". If found, the usual display 1119 a variable "splashimage". If found, the usual display
1108 of logo, copyright and system information on the LCD 1120 of logo, copyright and system information on the LCD
1109 is suppressed and the BMP image at the address 1121 is suppressed and the BMP image at the address
1110 specified in "splashimage" is loaded instead. The 1122 specified in "splashimage" is loaded instead. The
1111 console is redirected to the "nulldev", too. This 1123 console is redirected to the "nulldev", too. This
1112 allows for a "silent" boot where a splash screen is 1124 allows for a "silent" boot where a splash screen is
1113 loaded very quickly after power-on. 1125 loaded very quickly after power-on.
1114 1126
1115 CONFIG_SPLASH_SCREEN_ALIGN 1127 CONFIG_SPLASH_SCREEN_ALIGN
1116 1128
1117 If this option is set the splash image can be freely positioned 1129 If this option is set the splash image can be freely positioned
1118 on the screen. Environment variable "splashpos" specifies the 1130 on the screen. Environment variable "splashpos" specifies the
1119 position as "x,y". If a positive number is given it is used as 1131 position as "x,y". If a positive number is given it is used as
1120 number of pixel from left/top. If a negative number is given it 1132 number of pixel from left/top. If a negative number is given it
1121 is used as number of pixel from right/bottom. You can also 1133 is used as number of pixel from right/bottom. You can also
1122 specify 'm' for centering the image. 1134 specify 'm' for centering the image.
1123 1135
1124 Example: 1136 Example:
1125 setenv splashpos m,m 1137 setenv splashpos m,m
1126 => image at center of screen 1138 => image at center of screen
1127 1139
1128 setenv splashpos 30,20 1140 setenv splashpos 30,20
1129 => image at x = 30 and y = 20 1141 => image at x = 30 and y = 20
1130 1142
1131 setenv splashpos -10,m 1143 setenv splashpos -10,m
1132 => vertically centered image 1144 => vertically centered image
1133 at x = dspWidth - bmpWidth - 9 1145 at x = dspWidth - bmpWidth - 9
1134 1146
1135 - Gzip compressed BMP image support: CONFIG_VIDEO_BMP_GZIP 1147 - Gzip compressed BMP image support: CONFIG_VIDEO_BMP_GZIP
1136 1148
1137 If this option is set, additionally to standard BMP 1149 If this option is set, additionally to standard BMP
1138 images, gzipped BMP images can be displayed via the 1150 images, gzipped BMP images can be displayed via the
1139 splashscreen support or the bmp command. 1151 splashscreen support or the bmp command.
1140 1152
1141 - Run length encoded BMP image (RLE8) support: CONFIG_VIDEO_BMP_RLE8 1153 - Run length encoded BMP image (RLE8) support: CONFIG_VIDEO_BMP_RLE8
1142 1154
1143 If this option is set, 8-bit RLE compressed BMP images 1155 If this option is set, 8-bit RLE compressed BMP images
1144 can be displayed via the splashscreen support or the 1156 can be displayed via the splashscreen support or the
1145 bmp command. 1157 bmp command.
1146 1158
1147 - Compression support: 1159 - Compression support:
1148 CONFIG_BZIP2 1160 CONFIG_BZIP2
1149 1161
1150 If this option is set, support for bzip2 compressed 1162 If this option is set, support for bzip2 compressed
1151 images is included. If not, only uncompressed and gzip 1163 images is included. If not, only uncompressed and gzip
1152 compressed images are supported. 1164 compressed images are supported.
1153 1165
1154 NOTE: the bzip2 algorithm requires a lot of RAM, so 1166 NOTE: the bzip2 algorithm requires a lot of RAM, so
1155 the malloc area (as defined by CONFIG_SYS_MALLOC_LEN) should 1167 the malloc area (as defined by CONFIG_SYS_MALLOC_LEN) should
1156 be at least 4MB. 1168 be at least 4MB.
1157 1169
1158 CONFIG_LZMA 1170 CONFIG_LZMA
1159 1171
1160 If this option is set, support for lzma compressed 1172 If this option is set, support for lzma compressed
1161 images is included. 1173 images is included.
1162 1174
1163 Note: The LZMA algorithm adds between 2 and 4KB of code and it 1175 Note: The LZMA algorithm adds between 2 and 4KB of code and it
1164 requires an amount of dynamic memory that is given by the 1176 requires an amount of dynamic memory that is given by the
1165 formula: 1177 formula:
1166 1178
1167 (1846 + 768 << (lc + lp)) * sizeof(uint16) 1179 (1846 + 768 << (lc + lp)) * sizeof(uint16)
1168 1180
1169 Where lc and lp stand for, respectively, Literal context bits 1181 Where lc and lp stand for, respectively, Literal context bits
1170 and Literal pos bits. 1182 and Literal pos bits.
1171 1183
1172 This value is upper-bounded by 14MB in the worst case. Anyway, 1184 This value is upper-bounded by 14MB in the worst case. Anyway,
1173 for a ~4MB large kernel image, we have lc=3 and lp=0 for a 1185 for a ~4MB large kernel image, we have lc=3 and lp=0 for a
1174 total amount of (1846 + 768 << (3 + 0)) * 2 = ~41KB... that is 1186 total amount of (1846 + 768 << (3 + 0)) * 2 = ~41KB... that is
1175 a very small buffer. 1187 a very small buffer.
1176 1188
1177 Use the lzmainfo tool to determinate the lc and lp values and 1189 Use the lzmainfo tool to determinate the lc and lp values and
1178 then calculate the amount of needed dynamic memory (ensuring 1190 then calculate the amount of needed dynamic memory (ensuring
1179 the appropriate CONFIG_SYS_MALLOC_LEN value). 1191 the appropriate CONFIG_SYS_MALLOC_LEN value).
1180 1192
1181 - MII/PHY support: 1193 - MII/PHY support:
1182 CONFIG_PHY_ADDR 1194 CONFIG_PHY_ADDR
1183 1195
1184 The address of PHY on MII bus. 1196 The address of PHY on MII bus.
1185 1197
1186 CONFIG_PHY_CLOCK_FREQ (ppc4xx) 1198 CONFIG_PHY_CLOCK_FREQ (ppc4xx)
1187 1199
1188 The clock frequency of the MII bus 1200 The clock frequency of the MII bus
1189 1201
1190 CONFIG_PHY_GIGE 1202 CONFIG_PHY_GIGE
1191 1203
1192 If this option is set, support for speed/duplex 1204 If this option is set, support for speed/duplex
1193 detection of gigabit PHY is included. 1205 detection of gigabit PHY is included.
1194 1206
1195 CONFIG_PHY_RESET_DELAY 1207 CONFIG_PHY_RESET_DELAY
1196 1208
1197 Some PHY like Intel LXT971A need extra delay after 1209 Some PHY like Intel LXT971A need extra delay after
1198 reset before any MII register access is possible. 1210 reset before any MII register access is possible.
1199 For such PHY, set this option to the usec delay 1211 For such PHY, set this option to the usec delay
1200 required. (minimum 300usec for LXT971A) 1212 required. (minimum 300usec for LXT971A)
1201 1213
1202 CONFIG_PHY_CMD_DELAY (ppc4xx) 1214 CONFIG_PHY_CMD_DELAY (ppc4xx)
1203 1215
1204 Some PHY like Intel LXT971A need extra delay after 1216 Some PHY like Intel LXT971A need extra delay after
1205 command issued before MII status register can be read 1217 command issued before MII status register can be read
1206 1218
1207 - Ethernet address: 1219 - Ethernet address:
1208 CONFIG_ETHADDR 1220 CONFIG_ETHADDR
1209 CONFIG_ETH1ADDR 1221 CONFIG_ETH1ADDR
1210 CONFIG_ETH2ADDR 1222 CONFIG_ETH2ADDR
1211 CONFIG_ETH3ADDR 1223 CONFIG_ETH3ADDR
1212 CONFIG_ETH4ADDR 1224 CONFIG_ETH4ADDR
1213 CONFIG_ETH5ADDR 1225 CONFIG_ETH5ADDR
1214 1226
1215 Define a default value for Ethernet address to use 1227 Define a default value for Ethernet address to use
1216 for the respective Ethernet interface, in case this 1228 for the respective Ethernet interface, in case this
1217 is not determined automatically. 1229 is not determined automatically.
1218 1230
1219 - IP address: 1231 - IP address:
1220 CONFIG_IPADDR 1232 CONFIG_IPADDR
1221 1233
1222 Define a default value for the IP address to use for 1234 Define a default value for the IP address to use for
1223 the default Ethernet interface, in case this is not 1235 the default Ethernet interface, in case this is not
1224 determined through e.g. bootp. 1236 determined through e.g. bootp.
1225 1237
1226 - Server IP address: 1238 - Server IP address:
1227 CONFIG_SERVERIP 1239 CONFIG_SERVERIP
1228 1240
1229 Defines a default value for the IP address of a TFTP 1241 Defines a default value for the IP address of a TFTP
1230 server to contact when using the "tftboot" command. 1242 server to contact when using the "tftboot" command.
1231 1243
1232 CONFIG_KEEP_SERVERADDR 1244 CONFIG_KEEP_SERVERADDR
1233 1245
1234 Keeps the server's MAC address, in the env 'serveraddr' 1246 Keeps the server's MAC address, in the env 'serveraddr'
1235 for passing to bootargs (like Linux's netconsole option) 1247 for passing to bootargs (like Linux's netconsole option)
1236 1248
1237 - Multicast TFTP Mode: 1249 - Multicast TFTP Mode:
1238 CONFIG_MCAST_TFTP 1250 CONFIG_MCAST_TFTP
1239 1251
1240 Defines whether you want to support multicast TFTP as per 1252 Defines whether you want to support multicast TFTP as per
1241 rfc-2090; for example to work with atftp. Lets lots of targets 1253 rfc-2090; for example to work with atftp. Lets lots of targets
1242 tftp down the same boot image concurrently. Note: the Ethernet 1254 tftp down the same boot image concurrently. Note: the Ethernet
1243 driver in use must provide a function: mcast() to join/leave a 1255 driver in use must provide a function: mcast() to join/leave a
1244 multicast group. 1256 multicast group.
1245 1257
1246 CONFIG_BOOTP_RANDOM_DELAY 1258 CONFIG_BOOTP_RANDOM_DELAY
1247 - BOOTP Recovery Mode: 1259 - BOOTP Recovery Mode:
1248 CONFIG_BOOTP_RANDOM_DELAY 1260 CONFIG_BOOTP_RANDOM_DELAY
1249 1261
1250 If you have many targets in a network that try to 1262 If you have many targets in a network that try to
1251 boot using BOOTP, you may want to avoid that all 1263 boot using BOOTP, you may want to avoid that all
1252 systems send out BOOTP requests at precisely the same 1264 systems send out BOOTP requests at precisely the same
1253 moment (which would happen for instance at recovery 1265 moment (which would happen for instance at recovery
1254 from a power failure, when all systems will try to 1266 from a power failure, when all systems will try to
1255 boot, thus flooding the BOOTP server. Defining 1267 boot, thus flooding the BOOTP server. Defining
1256 CONFIG_BOOTP_RANDOM_DELAY causes a random delay to be 1268 CONFIG_BOOTP_RANDOM_DELAY causes a random delay to be
1257 inserted before sending out BOOTP requests. The 1269 inserted before sending out BOOTP requests. The
1258 following delays are inserted then: 1270 following delays are inserted then:
1259 1271
1260 1st BOOTP request: delay 0 ... 1 sec 1272 1st BOOTP request: delay 0 ... 1 sec
1261 2nd BOOTP request: delay 0 ... 2 sec 1273 2nd BOOTP request: delay 0 ... 2 sec
1262 3rd BOOTP request: delay 0 ... 4 sec 1274 3rd BOOTP request: delay 0 ... 4 sec
1263 4th and following 1275 4th and following
1264 BOOTP requests: delay 0 ... 8 sec 1276 BOOTP requests: delay 0 ... 8 sec
1265 1277
1266 - DHCP Advanced Options: 1278 - DHCP Advanced Options:
1267 You can fine tune the DHCP functionality by defining 1279 You can fine tune the DHCP functionality by defining
1268 CONFIG_BOOTP_* symbols: 1280 CONFIG_BOOTP_* symbols:
1269 1281
1270 CONFIG_BOOTP_SUBNETMASK 1282 CONFIG_BOOTP_SUBNETMASK
1271 CONFIG_BOOTP_GATEWAY 1283 CONFIG_BOOTP_GATEWAY
1272 CONFIG_BOOTP_HOSTNAME 1284 CONFIG_BOOTP_HOSTNAME
1273 CONFIG_BOOTP_NISDOMAIN 1285 CONFIG_BOOTP_NISDOMAIN
1274 CONFIG_BOOTP_BOOTPATH 1286 CONFIG_BOOTP_BOOTPATH
1275 CONFIG_BOOTP_BOOTFILESIZE 1287 CONFIG_BOOTP_BOOTFILESIZE
1276 CONFIG_BOOTP_DNS 1288 CONFIG_BOOTP_DNS
1277 CONFIG_BOOTP_DNS2 1289 CONFIG_BOOTP_DNS2
1278 CONFIG_BOOTP_SEND_HOSTNAME 1290 CONFIG_BOOTP_SEND_HOSTNAME
1279 CONFIG_BOOTP_NTPSERVER 1291 CONFIG_BOOTP_NTPSERVER
1280 CONFIG_BOOTP_TIMEOFFSET 1292 CONFIG_BOOTP_TIMEOFFSET
1281 CONFIG_BOOTP_VENDOREX 1293 CONFIG_BOOTP_VENDOREX
1282 1294
1283 CONFIG_BOOTP_SERVERIP - TFTP server will be the serverip 1295 CONFIG_BOOTP_SERVERIP - TFTP server will be the serverip
1284 environment variable, not the BOOTP server. 1296 environment variable, not the BOOTP server.
1285 1297
1286 CONFIG_BOOTP_DNS2 - If a DHCP client requests the DNS 1298 CONFIG_BOOTP_DNS2 - If a DHCP client requests the DNS
1287 serverip from a DHCP server, it is possible that more 1299 serverip from a DHCP server, it is possible that more
1288 than one DNS serverip is offered to the client. 1300 than one DNS serverip is offered to the client.
1289 If CONFIG_BOOTP_DNS2 is enabled, the secondary DNS 1301 If CONFIG_BOOTP_DNS2 is enabled, the secondary DNS
1290 serverip will be stored in the additional environment 1302 serverip will be stored in the additional environment
1291 variable "dnsip2". The first DNS serverip is always 1303 variable "dnsip2". The first DNS serverip is always
1292 stored in the variable "dnsip", when CONFIG_BOOTP_DNS 1304 stored in the variable "dnsip", when CONFIG_BOOTP_DNS
1293 is defined. 1305 is defined.
1294 1306
1295 CONFIG_BOOTP_SEND_HOSTNAME - Some DHCP servers are capable 1307 CONFIG_BOOTP_SEND_HOSTNAME - Some DHCP servers are capable
1296 to do a dynamic update of a DNS server. To do this, they 1308 to do a dynamic update of a DNS server. To do this, they
1297 need the hostname of the DHCP requester. 1309 need the hostname of the DHCP requester.
1298 If CONFIG_BOOTP_SEND_HOSTNAME is defined, the content 1310 If CONFIG_BOOTP_SEND_HOSTNAME is defined, the content
1299 of the "hostname" environment variable is passed as 1311 of the "hostname" environment variable is passed as
1300 option 12 to the DHCP server. 1312 option 12 to the DHCP server.
1301 1313
1302 CONFIG_BOOTP_DHCP_REQUEST_DELAY 1314 CONFIG_BOOTP_DHCP_REQUEST_DELAY
1303 1315
1304 A 32bit value in microseconds for a delay between 1316 A 32bit value in microseconds for a delay between
1305 receiving a "DHCP Offer" and sending the "DHCP Request". 1317 receiving a "DHCP Offer" and sending the "DHCP Request".
1306 This fixes a problem with certain DHCP servers that don't 1318 This fixes a problem with certain DHCP servers that don't
1307 respond 100% of the time to a "DHCP request". E.g. On an 1319 respond 100% of the time to a "DHCP request". E.g. On an
1308 AT91RM9200 processor running at 180MHz, this delay needed 1320 AT91RM9200 processor running at 180MHz, this delay needed
1309 to be *at least* 15,000 usec before a Windows Server 2003 1321 to be *at least* 15,000 usec before a Windows Server 2003
1310 DHCP server would reply 100% of the time. I recommend at 1322 DHCP server would reply 100% of the time. I recommend at
1311 least 50,000 usec to be safe. The alternative is to hope 1323 least 50,000 usec to be safe. The alternative is to hope
1312 that one of the retries will be successful but note that 1324 that one of the retries will be successful but note that
1313 the DHCP timeout and retry process takes a longer than 1325 the DHCP timeout and retry process takes a longer than
1314 this delay. 1326 this delay.
1315 1327
1316 - CDP Options: 1328 - CDP Options:
1317 CONFIG_CDP_DEVICE_ID 1329 CONFIG_CDP_DEVICE_ID
1318 1330
1319 The device id used in CDP trigger frames. 1331 The device id used in CDP trigger frames.
1320 1332
1321 CONFIG_CDP_DEVICE_ID_PREFIX 1333 CONFIG_CDP_DEVICE_ID_PREFIX
1322 1334
1323 A two character string which is prefixed to the MAC address 1335 A two character string which is prefixed to the MAC address
1324 of the device. 1336 of the device.
1325 1337
1326 CONFIG_CDP_PORT_ID 1338 CONFIG_CDP_PORT_ID
1327 1339
1328 A printf format string which contains the ascii name of 1340 A printf format string which contains the ascii name of
1329 the port. Normally is set to "eth%d" which sets 1341 the port. Normally is set to "eth%d" which sets
1330 eth0 for the first Ethernet, eth1 for the second etc. 1342 eth0 for the first Ethernet, eth1 for the second etc.
1331 1343
1332 CONFIG_CDP_CAPABILITIES 1344 CONFIG_CDP_CAPABILITIES
1333 1345
1334 A 32bit integer which indicates the device capabilities; 1346 A 32bit integer which indicates the device capabilities;
1335 0x00000010 for a normal host which does not forwards. 1347 0x00000010 for a normal host which does not forwards.
1336 1348
1337 CONFIG_CDP_VERSION 1349 CONFIG_CDP_VERSION
1338 1350
1339 An ascii string containing the version of the software. 1351 An ascii string containing the version of the software.
1340 1352
1341 CONFIG_CDP_PLATFORM 1353 CONFIG_CDP_PLATFORM
1342 1354
1343 An ascii string containing the name of the platform. 1355 An ascii string containing the name of the platform.
1344 1356
1345 CONFIG_CDP_TRIGGER 1357 CONFIG_CDP_TRIGGER
1346 1358
1347 A 32bit integer sent on the trigger. 1359 A 32bit integer sent on the trigger.
1348 1360
1349 CONFIG_CDP_POWER_CONSUMPTION 1361 CONFIG_CDP_POWER_CONSUMPTION
1350 1362
1351 A 16bit integer containing the power consumption of the 1363 A 16bit integer containing the power consumption of the
1352 device in .1 of milliwatts. 1364 device in .1 of milliwatts.
1353 1365
1354 CONFIG_CDP_APPLIANCE_VLAN_TYPE 1366 CONFIG_CDP_APPLIANCE_VLAN_TYPE
1355 1367
1356 A byte containing the id of the VLAN. 1368 A byte containing the id of the VLAN.
1357 1369
1358 - Status LED: CONFIG_STATUS_LED 1370 - Status LED: CONFIG_STATUS_LED
1359 1371
1360 Several configurations allow to display the current 1372 Several configurations allow to display the current
1361 status using a LED. For instance, the LED will blink 1373 status using a LED. For instance, the LED will blink
1362 fast while running U-Boot code, stop blinking as 1374 fast while running U-Boot code, stop blinking as
1363 soon as a reply to a BOOTP request was received, and 1375 soon as a reply to a BOOTP request was received, and
1364 start blinking slow once the Linux kernel is running 1376 start blinking slow once the Linux kernel is running
1365 (supported by a status LED driver in the Linux 1377 (supported by a status LED driver in the Linux
1366 kernel). Defining CONFIG_STATUS_LED enables this 1378 kernel). Defining CONFIG_STATUS_LED enables this
1367 feature in U-Boot. 1379 feature in U-Boot.
1368 1380
1369 - CAN Support: CONFIG_CAN_DRIVER 1381 - CAN Support: CONFIG_CAN_DRIVER
1370 1382
1371 Defining CONFIG_CAN_DRIVER enables CAN driver support 1383 Defining CONFIG_CAN_DRIVER enables CAN driver support
1372 on those systems that support this (optional) 1384 on those systems that support this (optional)
1373 feature, like the TQM8xxL modules. 1385 feature, like the TQM8xxL modules.
1374 1386
1375 - I2C Support: CONFIG_HARD_I2C | CONFIG_SOFT_I2C 1387 - I2C Support: CONFIG_HARD_I2C | CONFIG_SOFT_I2C
1376 1388
1377 These enable I2C serial bus commands. Defining either of 1389 These enable I2C serial bus commands. Defining either of
1378 (but not both of) CONFIG_HARD_I2C or CONFIG_SOFT_I2C will 1390 (but not both of) CONFIG_HARD_I2C or CONFIG_SOFT_I2C will
1379 include the appropriate I2C driver for the selected CPU. 1391 include the appropriate I2C driver for the selected CPU.
1380 1392
1381 This will allow you to use i2c commands at the u-boot 1393 This will allow you to use i2c commands at the u-boot
1382 command line (as long as you set CONFIG_CMD_I2C in 1394 command line (as long as you set CONFIG_CMD_I2C in
1383 CONFIG_COMMANDS) and communicate with i2c based realtime 1395 CONFIG_COMMANDS) and communicate with i2c based realtime
1384 clock chips. See common/cmd_i2c.c for a description of the 1396 clock chips. See common/cmd_i2c.c for a description of the
1385 command line interface. 1397 command line interface.
1386 1398
1387 CONFIG_HARD_I2C selects a hardware I2C controller. 1399 CONFIG_HARD_I2C selects a hardware I2C controller.
1388 1400
1389 CONFIG_SOFT_I2C configures u-boot to use a software (aka 1401 CONFIG_SOFT_I2C configures u-boot to use a software (aka
1390 bit-banging) driver instead of CPM or similar hardware 1402 bit-banging) driver instead of CPM or similar hardware
1391 support for I2C. 1403 support for I2C.
1392 1404
1393 There are several other quantities that must also be 1405 There are several other quantities that must also be
1394 defined when you define CONFIG_HARD_I2C or CONFIG_SOFT_I2C. 1406 defined when you define CONFIG_HARD_I2C or CONFIG_SOFT_I2C.
1395 1407
1396 In both cases you will need to define CONFIG_SYS_I2C_SPEED 1408 In both cases you will need to define CONFIG_SYS_I2C_SPEED
1397 to be the frequency (in Hz) at which you wish your i2c bus 1409 to be the frequency (in Hz) at which you wish your i2c bus
1398 to run and CONFIG_SYS_I2C_SLAVE to be the address of this node (ie 1410 to run and CONFIG_SYS_I2C_SLAVE to be the address of this node (ie
1399 the CPU's i2c node address). 1411 the CPU's i2c node address).
1400 1412
1401 Now, the u-boot i2c code for the mpc8xx 1413 Now, the u-boot i2c code for the mpc8xx
1402 (arch/powerpc/cpu/mpc8xx/i2c.c) sets the CPU up as a master node 1414 (arch/powerpc/cpu/mpc8xx/i2c.c) sets the CPU up as a master node
1403 and so its address should therefore be cleared to 0 (See, 1415 and so its address should therefore be cleared to 0 (See,
1404 eg, MPC823e User's Manual p.16-473). So, set 1416 eg, MPC823e User's Manual p.16-473). So, set
1405 CONFIG_SYS_I2C_SLAVE to 0. 1417 CONFIG_SYS_I2C_SLAVE to 0.
1406 1418
1407 CONFIG_SYS_I2C_INIT_MPC5XXX 1419 CONFIG_SYS_I2C_INIT_MPC5XXX
1408 1420
1409 When a board is reset during an i2c bus transfer 1421 When a board is reset during an i2c bus transfer
1410 chips might think that the current transfer is still 1422 chips might think that the current transfer is still
1411 in progress. Reset the slave devices by sending start 1423 in progress. Reset the slave devices by sending start
1412 commands until the slave device responds. 1424 commands until the slave device responds.
1413 1425
1414 That's all that's required for CONFIG_HARD_I2C. 1426 That's all that's required for CONFIG_HARD_I2C.
1415 1427
1416 If you use the software i2c interface (CONFIG_SOFT_I2C) 1428 If you use the software i2c interface (CONFIG_SOFT_I2C)
1417 then the following macros need to be defined (examples are 1429 then the following macros need to be defined (examples are
1418 from include/configs/lwmon.h): 1430 from include/configs/lwmon.h):
1419 1431
1420 I2C_INIT 1432 I2C_INIT
1421 1433
1422 (Optional). Any commands necessary to enable the I2C 1434 (Optional). Any commands necessary to enable the I2C
1423 controller or configure ports. 1435 controller or configure ports.
1424 1436
1425 eg: #define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL) 1437 eg: #define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL)
1426 1438
1427 I2C_PORT 1439 I2C_PORT
1428 1440
1429 (Only for MPC8260 CPU). The I/O port to use (the code 1441 (Only for MPC8260 CPU). The I/O port to use (the code
1430 assumes both bits are on the same port). Valid values 1442 assumes both bits are on the same port). Valid values
1431 are 0..3 for ports A..D. 1443 are 0..3 for ports A..D.
1432 1444
1433 I2C_ACTIVE 1445 I2C_ACTIVE
1434 1446
1435 The code necessary to make the I2C data line active 1447 The code necessary to make the I2C data line active
1436 (driven). If the data line is open collector, this 1448 (driven). If the data line is open collector, this
1437 define can be null. 1449 define can be null.
1438 1450
1439 eg: #define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA) 1451 eg: #define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA)
1440 1452
1441 I2C_TRISTATE 1453 I2C_TRISTATE
1442 1454
1443 The code necessary to make the I2C data line tri-stated 1455 The code necessary to make the I2C data line tri-stated
1444 (inactive). If the data line is open collector, this 1456 (inactive). If the data line is open collector, this
1445 define can be null. 1457 define can be null.
1446 1458
1447 eg: #define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA) 1459 eg: #define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA)
1448 1460
1449 I2C_READ 1461 I2C_READ
1450 1462
1451 Code that returns TRUE if the I2C data line is high, 1463 Code that returns TRUE if the I2C data line is high,
1452 FALSE if it is low. 1464 FALSE if it is low.
1453 1465
1454 eg: #define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0) 1466 eg: #define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0)
1455 1467
1456 I2C_SDA(bit) 1468 I2C_SDA(bit)
1457 1469
1458 If <bit> is TRUE, sets the I2C data line high. If it 1470 If <bit> is TRUE, sets the I2C data line high. If it
1459 is FALSE, it clears it (low). 1471 is FALSE, it clears it (low).
1460 1472
1461 eg: #define I2C_SDA(bit) \ 1473 eg: #define I2C_SDA(bit) \
1462 if(bit) immr->im_cpm.cp_pbdat |= PB_SDA; \ 1474 if(bit) immr->im_cpm.cp_pbdat |= PB_SDA; \
1463 else immr->im_cpm.cp_pbdat &= ~PB_SDA 1475 else immr->im_cpm.cp_pbdat &= ~PB_SDA
1464 1476
1465 I2C_SCL(bit) 1477 I2C_SCL(bit)
1466 1478
1467 If <bit> is TRUE, sets the I2C clock line high. If it 1479 If <bit> is TRUE, sets the I2C clock line high. If it
1468 is FALSE, it clears it (low). 1480 is FALSE, it clears it (low).
1469 1481
1470 eg: #define I2C_SCL(bit) \ 1482 eg: #define I2C_SCL(bit) \
1471 if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \ 1483 if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \
1472 else immr->im_cpm.cp_pbdat &= ~PB_SCL 1484 else immr->im_cpm.cp_pbdat &= ~PB_SCL
1473 1485
1474 I2C_DELAY 1486 I2C_DELAY
1475 1487
1476 This delay is invoked four times per clock cycle so this 1488 This delay is invoked four times per clock cycle so this
1477 controls the rate of data transfer. The data rate thus 1489 controls the rate of data transfer. The data rate thus
1478 is 1 / (I2C_DELAY * 4). Often defined to be something 1490 is 1 / (I2C_DELAY * 4). Often defined to be something
1479 like: 1491 like:
1480 1492
1481 #define I2C_DELAY udelay(2) 1493 #define I2C_DELAY udelay(2)
1482 1494
1483 CONFIG_SOFT_I2C_GPIO_SCL / CONFIG_SOFT_I2C_GPIO_SDA 1495 CONFIG_SOFT_I2C_GPIO_SCL / CONFIG_SOFT_I2C_GPIO_SDA
1484 1496
1485 If your arch supports the generic GPIO framework (asm/gpio.h), 1497 If your arch supports the generic GPIO framework (asm/gpio.h),
1486 then you may alternatively define the two GPIOs that are to be 1498 then you may alternatively define the two GPIOs that are to be
1487 used as SCL / SDA. Any of the previous I2C_xxx macros will 1499 used as SCL / SDA. Any of the previous I2C_xxx macros will
1488 have GPIO-based defaults assigned to them as appropriate. 1500 have GPIO-based defaults assigned to them as appropriate.
1489 1501
1490 You should define these to the GPIO value as given directly to 1502 You should define these to the GPIO value as given directly to
1491 the generic GPIO functions. 1503 the generic GPIO functions.
1492 1504
1493 CONFIG_SYS_I2C_INIT_BOARD 1505 CONFIG_SYS_I2C_INIT_BOARD
1494 1506
1495 When a board is reset during an i2c bus transfer 1507 When a board is reset during an i2c bus transfer
1496 chips might think that the current transfer is still 1508 chips might think that the current transfer is still
1497 in progress. On some boards it is possible to access 1509 in progress. On some boards it is possible to access
1498 the i2c SCLK line directly, either by using the 1510 the i2c SCLK line directly, either by using the
1499 processor pin as a GPIO or by having a second pin 1511 processor pin as a GPIO or by having a second pin
1500 connected to the bus. If this option is defined a 1512 connected to the bus. If this option is defined a
1501 custom i2c_init_board() routine in boards/xxx/board.c 1513 custom i2c_init_board() routine in boards/xxx/board.c
1502 is run early in the boot sequence. 1514 is run early in the boot sequence.
1503 1515
1504 CONFIG_SYS_I2C_BOARD_LATE_INIT 1516 CONFIG_SYS_I2C_BOARD_LATE_INIT
1505 1517
1506 An alternative to CONFIG_SYS_I2C_INIT_BOARD. If this option is 1518 An alternative to CONFIG_SYS_I2C_INIT_BOARD. If this option is
1507 defined a custom i2c_board_late_init() routine in 1519 defined a custom i2c_board_late_init() routine in
1508 boards/xxx/board.c is run AFTER the operations in i2c_init() 1520 boards/xxx/board.c is run AFTER the operations in i2c_init()
1509 is completed. This callpoint can be used to unreset i2c bus 1521 is completed. This callpoint can be used to unreset i2c bus
1510 using CPU i2c controller register accesses for CPUs whose i2c 1522 using CPU i2c controller register accesses for CPUs whose i2c
1511 controller provide such a method. It is called at the end of 1523 controller provide such a method. It is called at the end of
1512 i2c_init() to allow i2c_init operations to setup the i2c bus 1524 i2c_init() to allow i2c_init operations to setup the i2c bus
1513 controller on the CPU (e.g. setting bus speed & slave address). 1525 controller on the CPU (e.g. setting bus speed & slave address).
1514 1526
1515 CONFIG_I2CFAST (PPC405GP|PPC405EP only) 1527 CONFIG_I2CFAST (PPC405GP|PPC405EP only)
1516 1528
1517 This option enables configuration of bi_iic_fast[] flags 1529 This option enables configuration of bi_iic_fast[] flags
1518 in u-boot bd_info structure based on u-boot environment 1530 in u-boot bd_info structure based on u-boot environment
1519 variable "i2cfast". (see also i2cfast) 1531 variable "i2cfast". (see also i2cfast)
1520 1532
1521 CONFIG_I2C_MULTI_BUS 1533 CONFIG_I2C_MULTI_BUS
1522 1534
1523 This option allows the use of multiple I2C buses, each of which 1535 This option allows the use of multiple I2C buses, each of which
1524 must have a controller. At any point in time, only one bus is 1536 must have a controller. At any point in time, only one bus is
1525 active. To switch to a different bus, use the 'i2c dev' command. 1537 active. To switch to a different bus, use the 'i2c dev' command.
1526 Note that bus numbering is zero-based. 1538 Note that bus numbering is zero-based.
1527 1539
1528 CONFIG_SYS_I2C_NOPROBES 1540 CONFIG_SYS_I2C_NOPROBES
1529 1541
1530 This option specifies a list of I2C devices that will be skipped 1542 This option specifies a list of I2C devices that will be skipped
1531 when the 'i2c probe' command is issued. If CONFIG_I2C_MULTI_BUS 1543 when the 'i2c probe' command is issued. If CONFIG_I2C_MULTI_BUS
1532 is set, specify a list of bus-device pairs. Otherwise, specify 1544 is set, specify a list of bus-device pairs. Otherwise, specify
1533 a 1D array of device addresses 1545 a 1D array of device addresses
1534 1546
1535 e.g. 1547 e.g.
1536 #undef CONFIG_I2C_MULTI_BUS 1548 #undef CONFIG_I2C_MULTI_BUS
1537 #define CONFIG_SYS_I2C_NOPROBES {0x50,0x68} 1549 #define CONFIG_SYS_I2C_NOPROBES {0x50,0x68}
1538 1550
1539 will skip addresses 0x50 and 0x68 on a board with one I2C bus 1551 will skip addresses 0x50 and 0x68 on a board with one I2C bus
1540 1552
1541 #define CONFIG_I2C_MULTI_BUS 1553 #define CONFIG_I2C_MULTI_BUS
1542 #define CONFIG_SYS_I2C_MULTI_NOPROBES {{0,0x50},{0,0x68},{1,0x54}} 1554 #define CONFIG_SYS_I2C_MULTI_NOPROBES {{0,0x50},{0,0x68},{1,0x54}}
1543 1555
1544 will skip addresses 0x50 and 0x68 on bus 0 and address 0x54 on bus 1 1556 will skip addresses 0x50 and 0x68 on bus 0 and address 0x54 on bus 1
1545 1557
1546 CONFIG_SYS_SPD_BUS_NUM 1558 CONFIG_SYS_SPD_BUS_NUM
1547 1559
1548 If defined, then this indicates the I2C bus number for DDR SPD. 1560 If defined, then this indicates the I2C bus number for DDR SPD.
1549 If not defined, then U-Boot assumes that SPD is on I2C bus 0. 1561 If not defined, then U-Boot assumes that SPD is on I2C bus 0.
1550 1562
1551 CONFIG_SYS_RTC_BUS_NUM 1563 CONFIG_SYS_RTC_BUS_NUM
1552 1564
1553 If defined, then this indicates the I2C bus number for the RTC. 1565 If defined, then this indicates the I2C bus number for the RTC.
1554 If not defined, then U-Boot assumes that RTC is on I2C bus 0. 1566 If not defined, then U-Boot assumes that RTC is on I2C bus 0.
1555 1567
1556 CONFIG_SYS_DTT_BUS_NUM 1568 CONFIG_SYS_DTT_BUS_NUM
1557 1569
1558 If defined, then this indicates the I2C bus number for the DTT. 1570 If defined, then this indicates the I2C bus number for the DTT.
1559 If not defined, then U-Boot assumes that DTT is on I2C bus 0. 1571 If not defined, then U-Boot assumes that DTT is on I2C bus 0.
1560 1572
1561 CONFIG_SYS_I2C_DTT_ADDR: 1573 CONFIG_SYS_I2C_DTT_ADDR:
1562 1574
1563 If defined, specifies the I2C address of the DTT device. 1575 If defined, specifies the I2C address of the DTT device.
1564 If not defined, then U-Boot uses predefined value for 1576 If not defined, then U-Boot uses predefined value for
1565 specified DTT device. 1577 specified DTT device.
1566 1578
1567 CONFIG_FSL_I2C 1579 CONFIG_FSL_I2C
1568 1580
1569 Define this option if you want to use Freescale's I2C driver in 1581 Define this option if you want to use Freescale's I2C driver in
1570 drivers/i2c/fsl_i2c.c. 1582 drivers/i2c/fsl_i2c.c.
1571 1583
1572 CONFIG_I2C_MUX 1584 CONFIG_I2C_MUX
1573 1585
1574 Define this option if you have I2C devices reached over 1 .. n 1586 Define this option if you have I2C devices reached over 1 .. n
1575 I2C Muxes like the pca9544a. This option addes a new I2C 1587 I2C Muxes like the pca9544a. This option addes a new I2C
1576 Command "i2c bus [muxtype:muxaddr:muxchannel]" which adds a 1588 Command "i2c bus [muxtype:muxaddr:muxchannel]" which adds a
1577 new I2C Bus to the existing I2C Busses. If you select the 1589 new I2C Bus to the existing I2C Busses. If you select the
1578 new Bus with "i2c dev", u-bbot sends first the commandos for 1590 new Bus with "i2c dev", u-bbot sends first the commandos for
1579 the muxes to activate this new "bus". 1591 the muxes to activate this new "bus".
1580 1592
1581 CONFIG_I2C_MULTI_BUS must be also defined, to use this 1593 CONFIG_I2C_MULTI_BUS must be also defined, to use this
1582 feature! 1594 feature!
1583 1595
1584 Example: 1596 Example:
1585 Adding a new I2C Bus reached over 2 pca9544a muxes 1597 Adding a new I2C Bus reached over 2 pca9544a muxes
1586 The First mux with address 70 and channel 6 1598 The First mux with address 70 and channel 6
1587 The Second mux with address 71 and channel 4 1599 The Second mux with address 71 and channel 4
1588 1600
1589 => i2c bus pca9544a:70:6:pca9544a:71:4 1601 => i2c bus pca9544a:70:6:pca9544a:71:4
1590 1602
1591 Use the "i2c bus" command without parameter, to get a list 1603 Use the "i2c bus" command without parameter, to get a list
1592 of I2C Busses with muxes: 1604 of I2C Busses with muxes:
1593 1605
1594 => i2c bus 1606 => i2c bus
1595 Busses reached over muxes: 1607 Busses reached over muxes:
1596 Bus ID: 2 1608 Bus ID: 2
1597 reached over Mux(es): 1609 reached over Mux(es):
1598 pca9544a@70 ch: 4 1610 pca9544a@70 ch: 4
1599 Bus ID: 3 1611 Bus ID: 3
1600 reached over Mux(es): 1612 reached over Mux(es):
1601 pca9544a@70 ch: 6 1613 pca9544a@70 ch: 6
1602 pca9544a@71 ch: 4 1614 pca9544a@71 ch: 4
1603 => 1615 =>
1604 1616
1605 If you now switch to the new I2C Bus 3 with "i2c dev 3" 1617 If you now switch to the new I2C Bus 3 with "i2c dev 3"
1606 u-boot sends First the Commando to the mux@70 to enable 1618 u-boot sends First the Commando to the mux@70 to enable
1607 channel 6, and then the Commando to the mux@71 to enable 1619 channel 6, and then the Commando to the mux@71 to enable
1608 the channel 4. 1620 the channel 4.
1609 1621
1610 After that, you can use the "normal" i2c commands as 1622 After that, you can use the "normal" i2c commands as
1611 usual, to communicate with your I2C devices behind 1623 usual, to communicate with your I2C devices behind
1612 the 2 muxes. 1624 the 2 muxes.
1613 1625
1614 This option is actually implemented for the bitbanging 1626 This option is actually implemented for the bitbanging
1615 algorithm in common/soft_i2c.c and for the Hardware I2C 1627 algorithm in common/soft_i2c.c and for the Hardware I2C
1616 Bus on the MPC8260. But it should be not so difficult 1628 Bus on the MPC8260. But it should be not so difficult
1617 to add this option to other architectures. 1629 to add this option to other architectures.
1618 1630
1619 CONFIG_SOFT_I2C_READ_REPEATED_START 1631 CONFIG_SOFT_I2C_READ_REPEATED_START
1620 1632
1621 defining this will force the i2c_read() function in 1633 defining this will force the i2c_read() function in
1622 the soft_i2c driver to perform an I2C repeated start 1634 the soft_i2c driver to perform an I2C repeated start
1623 between writing the address pointer and reading the 1635 between writing the address pointer and reading the
1624 data. If this define is omitted the default behaviour 1636 data. If this define is omitted the default behaviour
1625 of doing a stop-start sequence will be used. Most I2C 1637 of doing a stop-start sequence will be used. Most I2C
1626 devices can use either method, but some require one or 1638 devices can use either method, but some require one or
1627 the other. 1639 the other.
1628 1640
1629 - SPI Support: CONFIG_SPI 1641 - SPI Support: CONFIG_SPI
1630 1642
1631 Enables SPI driver (so far only tested with 1643 Enables SPI driver (so far only tested with
1632 SPI EEPROM, also an instance works with Crystal A/D and 1644 SPI EEPROM, also an instance works with Crystal A/D and
1633 D/As on the SACSng board) 1645 D/As on the SACSng board)
1634 1646
1635 CONFIG_SPI_X 1647 CONFIG_SPI_X
1636 1648
1637 Enables extended (16-bit) SPI EEPROM addressing. 1649 Enables extended (16-bit) SPI EEPROM addressing.
1638 (symmetrical to CONFIG_I2C_X) 1650 (symmetrical to CONFIG_I2C_X)
1639 1651
1640 CONFIG_SOFT_SPI 1652 CONFIG_SOFT_SPI
1641 1653
1642 Enables a software (bit-bang) SPI driver rather than 1654 Enables a software (bit-bang) SPI driver rather than
1643 using hardware support. This is a general purpose 1655 using hardware support. This is a general purpose
1644 driver that only requires three general I/O port pins 1656 driver that only requires three general I/O port pins
1645 (two outputs, one input) to function. If this is 1657 (two outputs, one input) to function. If this is
1646 defined, the board configuration must define several 1658 defined, the board configuration must define several
1647 SPI configuration items (port pins to use, etc). For 1659 SPI configuration items (port pins to use, etc). For
1648 an example, see include/configs/sacsng.h. 1660 an example, see include/configs/sacsng.h.
1649 1661
1650 CONFIG_HARD_SPI 1662 CONFIG_HARD_SPI
1651 1663
1652 Enables a hardware SPI driver for general-purpose reads 1664 Enables a hardware SPI driver for general-purpose reads
1653 and writes. As with CONFIG_SOFT_SPI, the board configuration 1665 and writes. As with CONFIG_SOFT_SPI, the board configuration
1654 must define a list of chip-select function pointers. 1666 must define a list of chip-select function pointers.
1655 Currently supported on some MPC8xxx processors. For an 1667 Currently supported on some MPC8xxx processors. For an
1656 example, see include/configs/mpc8349emds.h. 1668 example, see include/configs/mpc8349emds.h.
1657 1669
1658 CONFIG_MXC_SPI 1670 CONFIG_MXC_SPI
1659 1671
1660 Enables the driver for the SPI controllers on i.MX and MXC 1672 Enables the driver for the SPI controllers on i.MX and MXC
1661 SoCs. Currently only i.MX31 is supported. 1673 SoCs. Currently only i.MX31 is supported.
1662 1674
1663 - FPGA Support: CONFIG_FPGA 1675 - FPGA Support: CONFIG_FPGA
1664 1676
1665 Enables FPGA subsystem. 1677 Enables FPGA subsystem.
1666 1678
1667 CONFIG_FPGA_<vendor> 1679 CONFIG_FPGA_<vendor>
1668 1680
1669 Enables support for specific chip vendors. 1681 Enables support for specific chip vendors.
1670 (ALTERA, XILINX) 1682 (ALTERA, XILINX)
1671 1683
1672 CONFIG_FPGA_<family> 1684 CONFIG_FPGA_<family>
1673 1685
1674 Enables support for FPGA family. 1686 Enables support for FPGA family.
1675 (SPARTAN2, SPARTAN3, VIRTEX2, CYCLONE2, ACEX1K, ACEX) 1687 (SPARTAN2, SPARTAN3, VIRTEX2, CYCLONE2, ACEX1K, ACEX)
1676 1688
1677 CONFIG_FPGA_COUNT 1689 CONFIG_FPGA_COUNT
1678 1690
1679 Specify the number of FPGA devices to support. 1691 Specify the number of FPGA devices to support.
1680 1692
1681 CONFIG_SYS_FPGA_PROG_FEEDBACK 1693 CONFIG_SYS_FPGA_PROG_FEEDBACK
1682 1694
1683 Enable printing of hash marks during FPGA configuration. 1695 Enable printing of hash marks during FPGA configuration.
1684 1696
1685 CONFIG_SYS_FPGA_CHECK_BUSY 1697 CONFIG_SYS_FPGA_CHECK_BUSY
1686 1698
1687 Enable checks on FPGA configuration interface busy 1699 Enable checks on FPGA configuration interface busy
1688 status by the configuration function. This option 1700 status by the configuration function. This option
1689 will require a board or device specific function to 1701 will require a board or device specific function to
1690 be written. 1702 be written.
1691 1703
1692 CONFIG_FPGA_DELAY 1704 CONFIG_FPGA_DELAY
1693 1705
1694 If defined, a function that provides delays in the FPGA 1706 If defined, a function that provides delays in the FPGA
1695 configuration driver. 1707 configuration driver.
1696 1708
1697 CONFIG_SYS_FPGA_CHECK_CTRLC 1709 CONFIG_SYS_FPGA_CHECK_CTRLC
1698 Allow Control-C to interrupt FPGA configuration 1710 Allow Control-C to interrupt FPGA configuration
1699 1711
1700 CONFIG_SYS_FPGA_CHECK_ERROR 1712 CONFIG_SYS_FPGA_CHECK_ERROR
1701 1713
1702 Check for configuration errors during FPGA bitfile 1714 Check for configuration errors during FPGA bitfile
1703 loading. For example, abort during Virtex II 1715 loading. For example, abort during Virtex II
1704 configuration if the INIT_B line goes low (which 1716 configuration if the INIT_B line goes low (which
1705 indicated a CRC error). 1717 indicated a CRC error).
1706 1718
1707 CONFIG_SYS_FPGA_WAIT_INIT 1719 CONFIG_SYS_FPGA_WAIT_INIT
1708 1720
1709 Maximum time to wait for the INIT_B line to deassert 1721 Maximum time to wait for the INIT_B line to deassert
1710 after PROB_B has been deasserted during a Virtex II 1722 after PROB_B has been deasserted during a Virtex II
1711 FPGA configuration sequence. The default time is 500 1723 FPGA configuration sequence. The default time is 500
1712 ms. 1724 ms.
1713 1725
1714 CONFIG_SYS_FPGA_WAIT_BUSY 1726 CONFIG_SYS_FPGA_WAIT_BUSY
1715 1727
1716 Maximum time to wait for BUSY to deassert during 1728 Maximum time to wait for BUSY to deassert during
1717 Virtex II FPGA configuration. The default is 5 ms. 1729 Virtex II FPGA configuration. The default is 5 ms.
1718 1730
1719 CONFIG_SYS_FPGA_WAIT_CONFIG 1731 CONFIG_SYS_FPGA_WAIT_CONFIG
1720 1732
1721 Time to wait after FPGA configuration. The default is 1733 Time to wait after FPGA configuration. The default is
1722 200 ms. 1734 200 ms.
1723 1735
1724 - Configuration Management: 1736 - Configuration Management:
1725 CONFIG_IDENT_STRING 1737 CONFIG_IDENT_STRING
1726 1738
1727 If defined, this string will be added to the U-Boot 1739 If defined, this string will be added to the U-Boot
1728 version information (U_BOOT_VERSION) 1740 version information (U_BOOT_VERSION)
1729 1741
1730 - Vendor Parameter Protection: 1742 - Vendor Parameter Protection:
1731 1743
1732 U-Boot considers the values of the environment 1744 U-Boot considers the values of the environment
1733 variables "serial#" (Board Serial Number) and 1745 variables "serial#" (Board Serial Number) and
1734 "ethaddr" (Ethernet Address) to be parameters that 1746 "ethaddr" (Ethernet Address) to be parameters that
1735 are set once by the board vendor / manufacturer, and 1747 are set once by the board vendor / manufacturer, and
1736 protects these variables from casual modification by 1748 protects these variables from casual modification by
1737 the user. Once set, these variables are read-only, 1749 the user. Once set, these variables are read-only,
1738 and write or delete attempts are rejected. You can 1750 and write or delete attempts are rejected. You can
1739 change this behaviour: 1751 change this behaviour:
1740 1752
1741 If CONFIG_ENV_OVERWRITE is #defined in your config 1753 If CONFIG_ENV_OVERWRITE is #defined in your config
1742 file, the write protection for vendor parameters is 1754 file, the write protection for vendor parameters is
1743 completely disabled. Anybody can change or delete 1755 completely disabled. Anybody can change or delete
1744 these parameters. 1756 these parameters.
1745 1757
1746 Alternatively, if you #define _both_ CONFIG_ETHADDR 1758 Alternatively, if you #define _both_ CONFIG_ETHADDR
1747 _and_ CONFIG_OVERWRITE_ETHADDR_ONCE, a default 1759 _and_ CONFIG_OVERWRITE_ETHADDR_ONCE, a default
1748 Ethernet address is installed in the environment, 1760 Ethernet address is installed in the environment,
1749 which can be changed exactly ONCE by the user. [The 1761 which can be changed exactly ONCE by the user. [The
1750 serial# is unaffected by this, i. e. it remains 1762 serial# is unaffected by this, i. e. it remains
1751 read-only.] 1763 read-only.]
1752 1764
1753 - Protected RAM: 1765 - Protected RAM:
1754 CONFIG_PRAM 1766 CONFIG_PRAM
1755 1767
1756 Define this variable to enable the reservation of 1768 Define this variable to enable the reservation of
1757 "protected RAM", i. e. RAM which is not overwritten 1769 "protected RAM", i. e. RAM which is not overwritten
1758 by U-Boot. Define CONFIG_PRAM to hold the number of 1770 by U-Boot. Define CONFIG_PRAM to hold the number of
1759 kB you want to reserve for pRAM. You can overwrite 1771 kB you want to reserve for pRAM. You can overwrite
1760 this default value by defining an environment 1772 this default value by defining an environment
1761 variable "pram" to the number of kB you want to 1773 variable "pram" to the number of kB you want to
1762 reserve. Note that the board info structure will 1774 reserve. Note that the board info structure will
1763 still show the full amount of RAM. If pRAM is 1775 still show the full amount of RAM. If pRAM is
1764 reserved, a new environment variable "mem" will 1776 reserved, a new environment variable "mem" will
1765 automatically be defined to hold the amount of 1777 automatically be defined to hold the amount of
1766 remaining RAM in a form that can be passed as boot 1778 remaining RAM in a form that can be passed as boot
1767 argument to Linux, for instance like that: 1779 argument to Linux, for instance like that:
1768 1780
1769 setenv bootargs ... mem=\${mem} 1781 setenv bootargs ... mem=\${mem}
1770 saveenv 1782 saveenv
1771 1783
1772 This way you can tell Linux not to use this memory, 1784 This way you can tell Linux not to use this memory,
1773 either, which results in a memory region that will 1785 either, which results in a memory region that will
1774 not be affected by reboots. 1786 not be affected by reboots.
1775 1787
1776 *WARNING* If your board configuration uses automatic 1788 *WARNING* If your board configuration uses automatic
1777 detection of the RAM size, you must make sure that 1789 detection of the RAM size, you must make sure that
1778 this memory test is non-destructive. So far, the 1790 this memory test is non-destructive. So far, the
1779 following board configurations are known to be 1791 following board configurations are known to be
1780 "pRAM-clean": 1792 "pRAM-clean":
1781 1793
1782 ETX094, IVMS8, IVML24, SPD8xx, TQM8xxL, 1794 ETX094, IVMS8, IVML24, SPD8xx, TQM8xxL,
1783 HERMES, IP860, RPXlite, LWMON, LANTEC, 1795 HERMES, IP860, RPXlite, LWMON, LANTEC,
1784 FLAGADM, TQM8260 1796 FLAGADM, TQM8260
1785 1797
1786 - Error Recovery: 1798 - Error Recovery:
1787 CONFIG_PANIC_HANG 1799 CONFIG_PANIC_HANG
1788 1800
1789 Define this variable to stop the system in case of a 1801 Define this variable to stop the system in case of a
1790 fatal error, so that you have to reset it manually. 1802 fatal error, so that you have to reset it manually.
1791 This is probably NOT a good idea for an embedded 1803 This is probably NOT a good idea for an embedded
1792 system where you want the system to reboot 1804 system where you want the system to reboot
1793 automatically as fast as possible, but it may be 1805 automatically as fast as possible, but it may be
1794 useful during development since you can try to debug 1806 useful during development since you can try to debug
1795 the conditions that lead to the situation. 1807 the conditions that lead to the situation.
1796 1808
1797 CONFIG_NET_RETRY_COUNT 1809 CONFIG_NET_RETRY_COUNT
1798 1810
1799 This variable defines the number of retries for 1811 This variable defines the number of retries for
1800 network operations like ARP, RARP, TFTP, or BOOTP 1812 network operations like ARP, RARP, TFTP, or BOOTP
1801 before giving up the operation. If not defined, a 1813 before giving up the operation. If not defined, a
1802 default value of 5 is used. 1814 default value of 5 is used.
1803 1815
1804 CONFIG_ARP_TIMEOUT 1816 CONFIG_ARP_TIMEOUT
1805 1817
1806 Timeout waiting for an ARP reply in milliseconds. 1818 Timeout waiting for an ARP reply in milliseconds.
1807 1819
1808 - Command Interpreter: 1820 - Command Interpreter:
1809 CONFIG_AUTO_COMPLETE 1821 CONFIG_AUTO_COMPLETE
1810 1822
1811 Enable auto completion of commands using TAB. 1823 Enable auto completion of commands using TAB.
1812 1824
1813 Note that this feature has NOT been implemented yet 1825 Note that this feature has NOT been implemented yet
1814 for the "hush" shell. 1826 for the "hush" shell.
1815 1827
1816 1828
1817 CONFIG_SYS_HUSH_PARSER 1829 CONFIG_SYS_HUSH_PARSER
1818 1830
1819 Define this variable to enable the "hush" shell (from 1831 Define this variable to enable the "hush" shell (from
1820 Busybox) as command line interpreter, thus enabling 1832 Busybox) as command line interpreter, thus enabling
1821 powerful command line syntax like 1833 powerful command line syntax like
1822 if...then...else...fi conditionals or `&&' and '||' 1834 if...then...else...fi conditionals or `&&' and '||'
1823 constructs ("shell scripts"). 1835 constructs ("shell scripts").
1824 1836
1825 If undefined, you get the old, much simpler behaviour 1837 If undefined, you get the old, much simpler behaviour
1826 with a somewhat smaller memory footprint. 1838 with a somewhat smaller memory footprint.
1827 1839
1828 1840
1829 CONFIG_SYS_PROMPT_HUSH_PS2 1841 CONFIG_SYS_PROMPT_HUSH_PS2
1830 1842
1831 This defines the secondary prompt string, which is 1843 This defines the secondary prompt string, which is
1832 printed when the command interpreter needs more input 1844 printed when the command interpreter needs more input
1833 to complete a command. Usually "> ". 1845 to complete a command. Usually "> ".
1834 1846
1835 Note: 1847 Note:
1836 1848
1837 In the current implementation, the local variables 1849 In the current implementation, the local variables
1838 space and global environment variables space are 1850 space and global environment variables space are
1839 separated. Local variables are those you define by 1851 separated. Local variables are those you define by
1840 simply typing `name=value'. To access a local 1852 simply typing `name=value'. To access a local
1841 variable later on, you have write `$name' or 1853 variable later on, you have write `$name' or
1842 `${name}'; to execute the contents of a variable 1854 `${name}'; to execute the contents of a variable
1843 directly type `$name' at the command prompt. 1855 directly type `$name' at the command prompt.
1844 1856
1845 Global environment variables are those you use 1857 Global environment variables are those you use
1846 setenv/printenv to work with. To run a command stored 1858 setenv/printenv to work with. To run a command stored
1847 in such a variable, you need to use the run command, 1859 in such a variable, you need to use the run command,
1848 and you must not use the '$' sign to access them. 1860 and you must not use the '$' sign to access them.
1849 1861
1850 To store commands and special characters in a 1862 To store commands and special characters in a
1851 variable, please use double quotation marks 1863 variable, please use double quotation marks
1852 surrounding the whole text of the variable, instead 1864 surrounding the whole text of the variable, instead
1853 of the backslashes before semicolons and special 1865 of the backslashes before semicolons and special
1854 symbols. 1866 symbols.
1855 1867
1856 - Commandline Editing and History: 1868 - Commandline Editing and History:
1857 CONFIG_CMDLINE_EDITING 1869 CONFIG_CMDLINE_EDITING
1858 1870
1859 Enable editing and History functions for interactive 1871 Enable editing and History functions for interactive
1860 commandline input operations 1872 commandline input operations
1861 1873
1862 - Default Environment: 1874 - Default Environment:
1863 CONFIG_EXTRA_ENV_SETTINGS 1875 CONFIG_EXTRA_ENV_SETTINGS
1864 1876
1865 Define this to contain any number of null terminated 1877 Define this to contain any number of null terminated
1866 strings (variable = value pairs) that will be part of 1878 strings (variable = value pairs) that will be part of
1867 the default environment compiled into the boot image. 1879 the default environment compiled into the boot image.
1868 1880
1869 For example, place something like this in your 1881 For example, place something like this in your
1870 board's config file: 1882 board's config file:
1871 1883
1872 #define CONFIG_EXTRA_ENV_SETTINGS \ 1884 #define CONFIG_EXTRA_ENV_SETTINGS \
1873 "myvar1=value1\0" \ 1885 "myvar1=value1\0" \
1874 "myvar2=value2\0" 1886 "myvar2=value2\0"
1875 1887
1876 Warning: This method is based on knowledge about the 1888 Warning: This method is based on knowledge about the
1877 internal format how the environment is stored by the 1889 internal format how the environment is stored by the
1878 U-Boot code. This is NOT an official, exported 1890 U-Boot code. This is NOT an official, exported
1879 interface! Although it is unlikely that this format 1891 interface! Although it is unlikely that this format
1880 will change soon, there is no guarantee either. 1892 will change soon, there is no guarantee either.
1881 You better know what you are doing here. 1893 You better know what you are doing here.
1882 1894
1883 Note: overly (ab)use of the default environment is 1895 Note: overly (ab)use of the default environment is
1884 discouraged. Make sure to check other ways to preset 1896 discouraged. Make sure to check other ways to preset
1885 the environment like the "source" command or the 1897 the environment like the "source" command or the
1886 boot command first. 1898 boot command first.
1887 1899
1888 - DataFlash Support: 1900 - DataFlash Support:
1889 CONFIG_HAS_DATAFLASH 1901 CONFIG_HAS_DATAFLASH
1890 1902
1891 Defining this option enables DataFlash features and 1903 Defining this option enables DataFlash features and
1892 allows to read/write in Dataflash via the standard 1904 allows to read/write in Dataflash via the standard
1893 commands cp, md... 1905 commands cp, md...
1894 1906
1895 - SystemACE Support: 1907 - SystemACE Support:
1896 CONFIG_SYSTEMACE 1908 CONFIG_SYSTEMACE
1897 1909
1898 Adding this option adds support for Xilinx SystemACE 1910 Adding this option adds support for Xilinx SystemACE
1899 chips attached via some sort of local bus. The address 1911 chips attached via some sort of local bus. The address
1900 of the chip must also be defined in the 1912 of the chip must also be defined in the
1901 CONFIG_SYS_SYSTEMACE_BASE macro. For example: 1913 CONFIG_SYS_SYSTEMACE_BASE macro. For example:
1902 1914
1903 #define CONFIG_SYSTEMACE 1915 #define CONFIG_SYSTEMACE
1904 #define CONFIG_SYS_SYSTEMACE_BASE 0xf0000000 1916 #define CONFIG_SYS_SYSTEMACE_BASE 0xf0000000
1905 1917
1906 When SystemACE support is added, the "ace" device type 1918 When SystemACE support is added, the "ace" device type
1907 becomes available to the fat commands, i.e. fatls. 1919 becomes available to the fat commands, i.e. fatls.
1908 1920
1909 - TFTP Fixed UDP Port: 1921 - TFTP Fixed UDP Port:
1910 CONFIG_TFTP_PORT 1922 CONFIG_TFTP_PORT
1911 1923
1912 If this is defined, the environment variable tftpsrcp 1924 If this is defined, the environment variable tftpsrcp
1913 is used to supply the TFTP UDP source port value. 1925 is used to supply the TFTP UDP source port value.
1914 If tftpsrcp isn't defined, the normal pseudo-random port 1926 If tftpsrcp isn't defined, the normal pseudo-random port
1915 number generator is used. 1927 number generator is used.
1916 1928
1917 Also, the environment variable tftpdstp is used to supply 1929 Also, the environment variable tftpdstp is used to supply
1918 the TFTP UDP destination port value. If tftpdstp isn't 1930 the TFTP UDP destination port value. If tftpdstp isn't
1919 defined, the normal port 69 is used. 1931 defined, the normal port 69 is used.
1920 1932
1921 The purpose for tftpsrcp is to allow a TFTP server to 1933 The purpose for tftpsrcp is to allow a TFTP server to
1922 blindly start the TFTP transfer using the pre-configured 1934 blindly start the TFTP transfer using the pre-configured
1923 target IP address and UDP port. This has the effect of 1935 target IP address and UDP port. This has the effect of
1924 "punching through" the (Windows XP) firewall, allowing 1936 "punching through" the (Windows XP) firewall, allowing
1925 the remainder of the TFTP transfer to proceed normally. 1937 the remainder of the TFTP transfer to proceed normally.
1926 A better solution is to properly configure the firewall, 1938 A better solution is to properly configure the firewall,
1927 but sometimes that is not allowed. 1939 but sometimes that is not allowed.
1928 1940
1929 - Show boot progress: 1941 - Show boot progress:
1930 CONFIG_SHOW_BOOT_PROGRESS 1942 CONFIG_SHOW_BOOT_PROGRESS
1931 1943
1932 Defining this option allows to add some board- 1944 Defining this option allows to add some board-
1933 specific code (calling a user-provided function 1945 specific code (calling a user-provided function
1934 "show_boot_progress(int)") that enables you to show 1946 "show_boot_progress(int)") that enables you to show
1935 the system's boot progress on some display (for 1947 the system's boot progress on some display (for
1936 example, some LED's) on your board. At the moment, 1948 example, some LED's) on your board. At the moment,
1937 the following checkpoints are implemented: 1949 the following checkpoints are implemented:
1938 1950
1939 Legacy uImage format: 1951 Legacy uImage format:
1940 1952
1941 Arg Where When 1953 Arg Where When
1942 1 common/cmd_bootm.c before attempting to boot an image 1954 1 common/cmd_bootm.c before attempting to boot an image
1943 -1 common/cmd_bootm.c Image header has bad magic number 1955 -1 common/cmd_bootm.c Image header has bad magic number
1944 2 common/cmd_bootm.c Image header has correct magic number 1956 2 common/cmd_bootm.c Image header has correct magic number
1945 -2 common/cmd_bootm.c Image header has bad checksum 1957 -2 common/cmd_bootm.c Image header has bad checksum
1946 3 common/cmd_bootm.c Image header has correct checksum 1958 3 common/cmd_bootm.c Image header has correct checksum
1947 -3 common/cmd_bootm.c Image data has bad checksum 1959 -3 common/cmd_bootm.c Image data has bad checksum
1948 4 common/cmd_bootm.c Image data has correct checksum 1960 4 common/cmd_bootm.c Image data has correct checksum
1949 -4 common/cmd_bootm.c Image is for unsupported architecture 1961 -4 common/cmd_bootm.c Image is for unsupported architecture
1950 5 common/cmd_bootm.c Architecture check OK 1962 5 common/cmd_bootm.c Architecture check OK
1951 -5 common/cmd_bootm.c Wrong Image Type (not kernel, multi) 1963 -5 common/cmd_bootm.c Wrong Image Type (not kernel, multi)
1952 6 common/cmd_bootm.c Image Type check OK 1964 6 common/cmd_bootm.c Image Type check OK
1953 -6 common/cmd_bootm.c gunzip uncompression error 1965 -6 common/cmd_bootm.c gunzip uncompression error
1954 -7 common/cmd_bootm.c Unimplemented compression type 1966 -7 common/cmd_bootm.c Unimplemented compression type
1955 7 common/cmd_bootm.c Uncompression OK 1967 7 common/cmd_bootm.c Uncompression OK
1956 8 common/cmd_bootm.c No uncompress/copy overwrite error 1968 8 common/cmd_bootm.c No uncompress/copy overwrite error
1957 -9 common/cmd_bootm.c Unsupported OS (not Linux, BSD, VxWorks, QNX) 1969 -9 common/cmd_bootm.c Unsupported OS (not Linux, BSD, VxWorks, QNX)
1958 1970
1959 9 common/image.c Start initial ramdisk verification 1971 9 common/image.c Start initial ramdisk verification
1960 -10 common/image.c Ramdisk header has bad magic number 1972 -10 common/image.c Ramdisk header has bad magic number
1961 -11 common/image.c Ramdisk header has bad checksum 1973 -11 common/image.c Ramdisk header has bad checksum
1962 10 common/image.c Ramdisk header is OK 1974 10 common/image.c Ramdisk header is OK
1963 -12 common/image.c Ramdisk data has bad checksum 1975 -12 common/image.c Ramdisk data has bad checksum
1964 11 common/image.c Ramdisk data has correct checksum 1976 11 common/image.c Ramdisk data has correct checksum
1965 12 common/image.c Ramdisk verification complete, start loading 1977 12 common/image.c Ramdisk verification complete, start loading
1966 -13 common/image.c Wrong Image Type (not PPC Linux ramdisk) 1978 -13 common/image.c Wrong Image Type (not PPC Linux ramdisk)
1967 13 common/image.c Start multifile image verification 1979 13 common/image.c Start multifile image verification
1968 14 common/image.c No initial ramdisk, no multifile, continue. 1980 14 common/image.c No initial ramdisk, no multifile, continue.
1969 1981
1970 15 arch/<arch>/lib/bootm.c All preparation done, transferring control to OS 1982 15 arch/<arch>/lib/bootm.c All preparation done, transferring control to OS
1971 1983
1972 -30 arch/powerpc/lib/board.c Fatal error, hang the system 1984 -30 arch/powerpc/lib/board.c Fatal error, hang the system
1973 -31 post/post.c POST test failed, detected by post_output_backlog() 1985 -31 post/post.c POST test failed, detected by post_output_backlog()
1974 -32 post/post.c POST test failed, detected by post_run_single() 1986 -32 post/post.c POST test failed, detected by post_run_single()
1975 1987
1976 34 common/cmd_doc.c before loading a Image from a DOC device 1988 34 common/cmd_doc.c before loading a Image from a DOC device
1977 -35 common/cmd_doc.c Bad usage of "doc" command 1989 -35 common/cmd_doc.c Bad usage of "doc" command
1978 35 common/cmd_doc.c correct usage of "doc" command 1990 35 common/cmd_doc.c correct usage of "doc" command
1979 -36 common/cmd_doc.c No boot device 1991 -36 common/cmd_doc.c No boot device
1980 36 common/cmd_doc.c correct boot device 1992 36 common/cmd_doc.c correct boot device
1981 -37 common/cmd_doc.c Unknown Chip ID on boot device 1993 -37 common/cmd_doc.c Unknown Chip ID on boot device
1982 37 common/cmd_doc.c correct chip ID found, device available 1994 37 common/cmd_doc.c correct chip ID found, device available
1983 -38 common/cmd_doc.c Read Error on boot device 1995 -38 common/cmd_doc.c Read Error on boot device
1984 38 common/cmd_doc.c reading Image header from DOC device OK 1996 38 common/cmd_doc.c reading Image header from DOC device OK
1985 -39 common/cmd_doc.c Image header has bad magic number 1997 -39 common/cmd_doc.c Image header has bad magic number
1986 39 common/cmd_doc.c Image header has correct magic number 1998 39 common/cmd_doc.c Image header has correct magic number
1987 -40 common/cmd_doc.c Error reading Image from DOC device 1999 -40 common/cmd_doc.c Error reading Image from DOC device
1988 40 common/cmd_doc.c Image header has correct magic number 2000 40 common/cmd_doc.c Image header has correct magic number
1989 41 common/cmd_ide.c before loading a Image from a IDE device 2001 41 common/cmd_ide.c before loading a Image from a IDE device
1990 -42 common/cmd_ide.c Bad usage of "ide" command 2002 -42 common/cmd_ide.c Bad usage of "ide" command
1991 42 common/cmd_ide.c correct usage of "ide" command 2003 42 common/cmd_ide.c correct usage of "ide" command
1992 -43 common/cmd_ide.c No boot device 2004 -43 common/cmd_ide.c No boot device
1993 43 common/cmd_ide.c boot device found 2005 43 common/cmd_ide.c boot device found
1994 -44 common/cmd_ide.c Device not available 2006 -44 common/cmd_ide.c Device not available
1995 44 common/cmd_ide.c Device available 2007 44 common/cmd_ide.c Device available
1996 -45 common/cmd_ide.c wrong partition selected 2008 -45 common/cmd_ide.c wrong partition selected
1997 45 common/cmd_ide.c partition selected 2009 45 common/cmd_ide.c partition selected
1998 -46 common/cmd_ide.c Unknown partition table 2010 -46 common/cmd_ide.c Unknown partition table
1999 46 common/cmd_ide.c valid partition table found 2011 46 common/cmd_ide.c valid partition table found
2000 -47 common/cmd_ide.c Invalid partition type 2012 -47 common/cmd_ide.c Invalid partition type
2001 47 common/cmd_ide.c correct partition type 2013 47 common/cmd_ide.c correct partition type
2002 -48 common/cmd_ide.c Error reading Image Header on boot device 2014 -48 common/cmd_ide.c Error reading Image Header on boot device
2003 48 common/cmd_ide.c reading Image Header from IDE device OK 2015 48 common/cmd_ide.c reading Image Header from IDE device OK
2004 -49 common/cmd_ide.c Image header has bad magic number 2016 -49 common/cmd_ide.c Image header has bad magic number
2005 49 common/cmd_ide.c Image header has correct magic number 2017 49 common/cmd_ide.c Image header has correct magic number
2006 -50 common/cmd_ide.c Image header has bad checksum 2018 -50 common/cmd_ide.c Image header has bad checksum
2007 50 common/cmd_ide.c Image header has correct checksum 2019 50 common/cmd_ide.c Image header has correct checksum
2008 -51 common/cmd_ide.c Error reading Image from IDE device 2020 -51 common/cmd_ide.c Error reading Image from IDE device
2009 51 common/cmd_ide.c reading Image from IDE device OK 2021 51 common/cmd_ide.c reading Image from IDE device OK
2010 52 common/cmd_nand.c before loading a Image from a NAND device 2022 52 common/cmd_nand.c before loading a Image from a NAND device
2011 -53 common/cmd_nand.c Bad usage of "nand" command 2023 -53 common/cmd_nand.c Bad usage of "nand" command
2012 53 common/cmd_nand.c correct usage of "nand" command 2024 53 common/cmd_nand.c correct usage of "nand" command
2013 -54 common/cmd_nand.c No boot device 2025 -54 common/cmd_nand.c No boot device
2014 54 common/cmd_nand.c boot device found 2026 54 common/cmd_nand.c boot device found
2015 -55 common/cmd_nand.c Unknown Chip ID on boot device 2027 -55 common/cmd_nand.c Unknown Chip ID on boot device
2016 55 common/cmd_nand.c correct chip ID found, device available 2028 55 common/cmd_nand.c correct chip ID found, device available
2017 -56 common/cmd_nand.c Error reading Image Header on boot device 2029 -56 common/cmd_nand.c Error reading Image Header on boot device
2018 56 common/cmd_nand.c reading Image Header from NAND device OK 2030 56 common/cmd_nand.c reading Image Header from NAND device OK
2019 -57 common/cmd_nand.c Image header has bad magic number 2031 -57 common/cmd_nand.c Image header has bad magic number
2020 57 common/cmd_nand.c Image header has correct magic number 2032 57 common/cmd_nand.c Image header has correct magic number
2021 -58 common/cmd_nand.c Error reading Image from NAND device 2033 -58 common/cmd_nand.c Error reading Image from NAND device
2022 58 common/cmd_nand.c reading Image from NAND device OK 2034 58 common/cmd_nand.c reading Image from NAND device OK
2023 2035
2024 -60 common/env_common.c Environment has a bad CRC, using default 2036 -60 common/env_common.c Environment has a bad CRC, using default
2025 2037
2026 64 net/eth.c starting with Ethernet configuration. 2038 64 net/eth.c starting with Ethernet configuration.
2027 -64 net/eth.c no Ethernet found. 2039 -64 net/eth.c no Ethernet found.
2028 65 net/eth.c Ethernet found. 2040 65 net/eth.c Ethernet found.
2029 2041
2030 -80 common/cmd_net.c usage wrong 2042 -80 common/cmd_net.c usage wrong
2031 80 common/cmd_net.c before calling NetLoop() 2043 80 common/cmd_net.c before calling NetLoop()
2032 -81 common/cmd_net.c some error in NetLoop() occurred 2044 -81 common/cmd_net.c some error in NetLoop() occurred
2033 81 common/cmd_net.c NetLoop() back without error 2045 81 common/cmd_net.c NetLoop() back without error
2034 -82 common/cmd_net.c size == 0 (File with size 0 loaded) 2046 -82 common/cmd_net.c size == 0 (File with size 0 loaded)
2035 82 common/cmd_net.c trying automatic boot 2047 82 common/cmd_net.c trying automatic boot
2036 83 common/cmd_net.c running "source" command 2048 83 common/cmd_net.c running "source" command
2037 -83 common/cmd_net.c some error in automatic boot or "source" command 2049 -83 common/cmd_net.c some error in automatic boot or "source" command
2038 84 common/cmd_net.c end without errors 2050 84 common/cmd_net.c end without errors
2039 2051
2040 FIT uImage format: 2052 FIT uImage format:
2041 2053
2042 Arg Where When 2054 Arg Where When
2043 100 common/cmd_bootm.c Kernel FIT Image has correct format 2055 100 common/cmd_bootm.c Kernel FIT Image has correct format
2044 -100 common/cmd_bootm.c Kernel FIT Image has incorrect format 2056 -100 common/cmd_bootm.c Kernel FIT Image has incorrect format
2045 101 common/cmd_bootm.c No Kernel subimage unit name, using configuration 2057 101 common/cmd_bootm.c No Kernel subimage unit name, using configuration
2046 -101 common/cmd_bootm.c Can't get configuration for kernel subimage 2058 -101 common/cmd_bootm.c Can't get configuration for kernel subimage
2047 102 common/cmd_bootm.c Kernel unit name specified 2059 102 common/cmd_bootm.c Kernel unit name specified
2048 -103 common/cmd_bootm.c Can't get kernel subimage node offset 2060 -103 common/cmd_bootm.c Can't get kernel subimage node offset
2049 103 common/cmd_bootm.c Found configuration node 2061 103 common/cmd_bootm.c Found configuration node
2050 104 common/cmd_bootm.c Got kernel subimage node offset 2062 104 common/cmd_bootm.c Got kernel subimage node offset
2051 -104 common/cmd_bootm.c Kernel subimage hash verification failed 2063 -104 common/cmd_bootm.c Kernel subimage hash verification failed
2052 105 common/cmd_bootm.c Kernel subimage hash verification OK 2064 105 common/cmd_bootm.c Kernel subimage hash verification OK
2053 -105 common/cmd_bootm.c Kernel subimage is for unsupported architecture 2065 -105 common/cmd_bootm.c Kernel subimage is for unsupported architecture
2054 106 common/cmd_bootm.c Architecture check OK 2066 106 common/cmd_bootm.c Architecture check OK
2055 -106 common/cmd_bootm.c Kernel subimage has wrong type 2067 -106 common/cmd_bootm.c Kernel subimage has wrong type
2056 107 common/cmd_bootm.c Kernel subimage type OK 2068 107 common/cmd_bootm.c Kernel subimage type OK
2057 -107 common/cmd_bootm.c Can't get kernel subimage data/size 2069 -107 common/cmd_bootm.c Can't get kernel subimage data/size
2058 108 common/cmd_bootm.c Got kernel subimage data/size 2070 108 common/cmd_bootm.c Got kernel subimage data/size
2059 -108 common/cmd_bootm.c Wrong image type (not legacy, FIT) 2071 -108 common/cmd_bootm.c Wrong image type (not legacy, FIT)
2060 -109 common/cmd_bootm.c Can't get kernel subimage type 2072 -109 common/cmd_bootm.c Can't get kernel subimage type
2061 -110 common/cmd_bootm.c Can't get kernel subimage comp 2073 -110 common/cmd_bootm.c Can't get kernel subimage comp
2062 -111 common/cmd_bootm.c Can't get kernel subimage os 2074 -111 common/cmd_bootm.c Can't get kernel subimage os
2063 -112 common/cmd_bootm.c Can't get kernel subimage load address 2075 -112 common/cmd_bootm.c Can't get kernel subimage load address
2064 -113 common/cmd_bootm.c Image uncompress/copy overwrite error 2076 -113 common/cmd_bootm.c Image uncompress/copy overwrite error
2065 2077
2066 120 common/image.c Start initial ramdisk verification 2078 120 common/image.c Start initial ramdisk verification
2067 -120 common/image.c Ramdisk FIT image has incorrect format 2079 -120 common/image.c Ramdisk FIT image has incorrect format
2068 121 common/image.c Ramdisk FIT image has correct format 2080 121 common/image.c Ramdisk FIT image has correct format
2069 122 common/image.c No ramdisk subimage unit name, using configuration 2081 122 common/image.c No ramdisk subimage unit name, using configuration
2070 -122 common/image.c Can't get configuration for ramdisk subimage 2082 -122 common/image.c Can't get configuration for ramdisk subimage
2071 123 common/image.c Ramdisk unit name specified 2083 123 common/image.c Ramdisk unit name specified
2072 -124 common/image.c Can't get ramdisk subimage node offset 2084 -124 common/image.c Can't get ramdisk subimage node offset
2073 125 common/image.c Got ramdisk subimage node offset 2085 125 common/image.c Got ramdisk subimage node offset
2074 -125 common/image.c Ramdisk subimage hash verification failed 2086 -125 common/image.c Ramdisk subimage hash verification failed
2075 126 common/image.c Ramdisk subimage hash verification OK 2087 126 common/image.c Ramdisk subimage hash verification OK
2076 -126 common/image.c Ramdisk subimage for unsupported architecture 2088 -126 common/image.c Ramdisk subimage for unsupported architecture
2077 127 common/image.c Architecture check OK 2089 127 common/image.c Architecture check OK
2078 -127 common/image.c Can't get ramdisk subimage data/size 2090 -127 common/image.c Can't get ramdisk subimage data/size
2079 128 common/image.c Got ramdisk subimage data/size 2091 128 common/image.c Got ramdisk subimage data/size
2080 129 common/image.c Can't get ramdisk load address 2092 129 common/image.c Can't get ramdisk load address
2081 -129 common/image.c Got ramdisk load address 2093 -129 common/image.c Got ramdisk load address
2082 2094
2083 -130 common/cmd_doc.c Incorrect FIT image format 2095 -130 common/cmd_doc.c Incorrect FIT image format
2084 131 common/cmd_doc.c FIT image format OK 2096 131 common/cmd_doc.c FIT image format OK
2085 2097
2086 -140 common/cmd_ide.c Incorrect FIT image format 2098 -140 common/cmd_ide.c Incorrect FIT image format
2087 141 common/cmd_ide.c FIT image format OK 2099 141 common/cmd_ide.c FIT image format OK
2088 2100
2089 -150 common/cmd_nand.c Incorrect FIT image format 2101 -150 common/cmd_nand.c Incorrect FIT image format
2090 151 common/cmd_nand.c FIT image format OK 2102 151 common/cmd_nand.c FIT image format OK
2091 2103
2092 - Automatic software updates via TFTP server 2104 - Automatic software updates via TFTP server
2093 CONFIG_UPDATE_TFTP 2105 CONFIG_UPDATE_TFTP
2094 CONFIG_UPDATE_TFTP_CNT_MAX 2106 CONFIG_UPDATE_TFTP_CNT_MAX
2095 CONFIG_UPDATE_TFTP_MSEC_MAX 2107 CONFIG_UPDATE_TFTP_MSEC_MAX
2096 2108
2097 These options enable and control the auto-update feature; 2109 These options enable and control the auto-update feature;
2098 for a more detailed description refer to doc/README.update. 2110 for a more detailed description refer to doc/README.update.
2099 2111
2100 - MTD Support (mtdparts command, UBI support) 2112 - MTD Support (mtdparts command, UBI support)
2101 CONFIG_MTD_DEVICE 2113 CONFIG_MTD_DEVICE
2102 2114
2103 Adds the MTD device infrastructure from the Linux kernel. 2115 Adds the MTD device infrastructure from the Linux kernel.
2104 Needed for mtdparts command support. 2116 Needed for mtdparts command support.
2105 2117
2106 CONFIG_MTD_PARTITIONS 2118 CONFIG_MTD_PARTITIONS
2107 2119
2108 Adds the MTD partitioning infrastructure from the Linux 2120 Adds the MTD partitioning infrastructure from the Linux
2109 kernel. Needed for UBI support. 2121 kernel. Needed for UBI support.
2110 2122
2111 2123
2112 Modem Support: 2124 Modem Support:
2113 -------------- 2125 --------------
2114 2126
2115 [so far only for SMDK2400 and TRAB boards] 2127 [so far only for SMDK2400 and TRAB boards]
2116 2128
2117 - Modem support enable: 2129 - Modem support enable:
2118 CONFIG_MODEM_SUPPORT 2130 CONFIG_MODEM_SUPPORT
2119 2131
2120 - RTS/CTS Flow control enable: 2132 - RTS/CTS Flow control enable:
2121 CONFIG_HWFLOW 2133 CONFIG_HWFLOW
2122 2134
2123 - Modem debug support: 2135 - Modem debug support:
2124 CONFIG_MODEM_SUPPORT_DEBUG 2136 CONFIG_MODEM_SUPPORT_DEBUG
2125 2137
2126 Enables debugging stuff (char screen[1024], dbg()) 2138 Enables debugging stuff (char screen[1024], dbg())
2127 for modem support. Useful only with BDI2000. 2139 for modem support. Useful only with BDI2000.
2128 2140
2129 - Interrupt support (PPC): 2141 - Interrupt support (PPC):
2130 2142
2131 There are common interrupt_init() and timer_interrupt() 2143 There are common interrupt_init() and timer_interrupt()
2132 for all PPC archs. interrupt_init() calls interrupt_init_cpu() 2144 for all PPC archs. interrupt_init() calls interrupt_init_cpu()
2133 for CPU specific initialization. interrupt_init_cpu() 2145 for CPU specific initialization. interrupt_init_cpu()
2134 should set decrementer_count to appropriate value. If 2146 should set decrementer_count to appropriate value. If
2135 CPU resets decrementer automatically after interrupt 2147 CPU resets decrementer automatically after interrupt
2136 (ppc4xx) it should set decrementer_count to zero. 2148 (ppc4xx) it should set decrementer_count to zero.
2137 timer_interrupt() calls timer_interrupt_cpu() for CPU 2149 timer_interrupt() calls timer_interrupt_cpu() for CPU
2138 specific handling. If board has watchdog / status_led 2150 specific handling. If board has watchdog / status_led
2139 / other_activity_monitor it works automatically from 2151 / other_activity_monitor it works automatically from
2140 general timer_interrupt(). 2152 general timer_interrupt().
2141 2153
2142 - General: 2154 - General:
2143 2155
2144 In the target system modem support is enabled when a 2156 In the target system modem support is enabled when a
2145 specific key (key combination) is pressed during 2157 specific key (key combination) is pressed during
2146 power-on. Otherwise U-Boot will boot normally 2158 power-on. Otherwise U-Boot will boot normally
2147 (autoboot). The key_pressed() function is called from 2159 (autoboot). The key_pressed() function is called from
2148 board_init(). Currently key_pressed() is a dummy 2160 board_init(). Currently key_pressed() is a dummy
2149 function, returning 1 and thus enabling modem 2161 function, returning 1 and thus enabling modem
2150 initialization. 2162 initialization.
2151 2163
2152 If there are no modem init strings in the 2164 If there are no modem init strings in the
2153 environment, U-Boot proceed to autoboot; the 2165 environment, U-Boot proceed to autoboot; the
2154 previous output (banner, info printfs) will be 2166 previous output (banner, info printfs) will be
2155 suppressed, though. 2167 suppressed, though.
2156 2168
2157 See also: doc/README.Modem 2169 See also: doc/README.Modem
2158 2170
2159 2171
2160 Configuration Settings: 2172 Configuration Settings:
2161 ----------------------- 2173 -----------------------
2162 2174
2163 - CONFIG_SYS_LONGHELP: Defined when you want long help messages included; 2175 - CONFIG_SYS_LONGHELP: Defined when you want long help messages included;
2164 undefine this when you're short of memory. 2176 undefine this when you're short of memory.
2165 2177
2166 - CONFIG_SYS_HELP_CMD_WIDTH: Defined when you want to override the default 2178 - CONFIG_SYS_HELP_CMD_WIDTH: Defined when you want to override the default
2167 width of the commands listed in the 'help' command output. 2179 width of the commands listed in the 'help' command output.
2168 2180
2169 - CONFIG_SYS_PROMPT: This is what U-Boot prints on the console to 2181 - CONFIG_SYS_PROMPT: This is what U-Boot prints on the console to
2170 prompt for user input. 2182 prompt for user input.
2171 2183
2172 - CONFIG_SYS_CBSIZE: Buffer size for input from the Console 2184 - CONFIG_SYS_CBSIZE: Buffer size for input from the Console
2173 2185
2174 - CONFIG_SYS_PBSIZE: Buffer size for Console output 2186 - CONFIG_SYS_PBSIZE: Buffer size for Console output
2175 2187
2176 - CONFIG_SYS_MAXARGS: max. Number of arguments accepted for monitor commands 2188 - CONFIG_SYS_MAXARGS: max. Number of arguments accepted for monitor commands
2177 2189
2178 - CONFIG_SYS_BARGSIZE: Buffer size for Boot Arguments which are passed to 2190 - CONFIG_SYS_BARGSIZE: Buffer size for Boot Arguments which are passed to
2179 the application (usually a Linux kernel) when it is 2191 the application (usually a Linux kernel) when it is
2180 booted 2192 booted
2181 2193
2182 - CONFIG_SYS_BAUDRATE_TABLE: 2194 - CONFIG_SYS_BAUDRATE_TABLE:
2183 List of legal baudrate settings for this board. 2195 List of legal baudrate settings for this board.
2184 2196
2185 - CONFIG_SYS_CONSOLE_INFO_QUIET 2197 - CONFIG_SYS_CONSOLE_INFO_QUIET
2186 Suppress display of console information at boot. 2198 Suppress display of console information at boot.
2187 2199
2188 - CONFIG_SYS_CONSOLE_IS_IN_ENV 2200 - CONFIG_SYS_CONSOLE_IS_IN_ENV
2189 If the board specific function 2201 If the board specific function
2190 extern int overwrite_console (void); 2202 extern int overwrite_console (void);
2191 returns 1, the stdin, stderr and stdout are switched to the 2203 returns 1, the stdin, stderr and stdout are switched to the
2192 serial port, else the settings in the environment are used. 2204 serial port, else the settings in the environment are used.
2193 2205
2194 - CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE 2206 - CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
2195 Enable the call to overwrite_console(). 2207 Enable the call to overwrite_console().
2196 2208
2197 - CONFIG_SYS_CONSOLE_ENV_OVERWRITE 2209 - CONFIG_SYS_CONSOLE_ENV_OVERWRITE
2198 Enable overwrite of previous console environment settings. 2210 Enable overwrite of previous console environment settings.
2199 2211
2200 - CONFIG_SYS_MEMTEST_START, CONFIG_SYS_MEMTEST_END: 2212 - CONFIG_SYS_MEMTEST_START, CONFIG_SYS_MEMTEST_END:
2201 Begin and End addresses of the area used by the 2213 Begin and End addresses of the area used by the
2202 simple memory test. 2214 simple memory test.
2203 2215
2204 - CONFIG_SYS_ALT_MEMTEST: 2216 - CONFIG_SYS_ALT_MEMTEST:
2205 Enable an alternate, more extensive memory test. 2217 Enable an alternate, more extensive memory test.
2206 2218
2207 - CONFIG_SYS_MEMTEST_SCRATCH: 2219 - CONFIG_SYS_MEMTEST_SCRATCH:
2208 Scratch address used by the alternate memory test 2220 Scratch address used by the alternate memory test
2209 You only need to set this if address zero isn't writeable 2221 You only need to set this if address zero isn't writeable
2210 2222
2211 - CONFIG_SYS_MEM_TOP_HIDE (PPC only): 2223 - CONFIG_SYS_MEM_TOP_HIDE (PPC only):
2212 If CONFIG_SYS_MEM_TOP_HIDE is defined in the board config header, 2224 If CONFIG_SYS_MEM_TOP_HIDE is defined in the board config header,
2213 this specified memory area will get subtracted from the top 2225 this specified memory area will get subtracted from the top
2214 (end) of RAM and won't get "touched" at all by U-Boot. By 2226 (end) of RAM and won't get "touched" at all by U-Boot. By
2215 fixing up gd->ram_size the Linux kernel should gets passed 2227 fixing up gd->ram_size the Linux kernel should gets passed
2216 the now "corrected" memory size and won't touch it either. 2228 the now "corrected" memory size and won't touch it either.
2217 This should work for arch/ppc and arch/powerpc. Only Linux 2229 This should work for arch/ppc and arch/powerpc. Only Linux
2218 board ports in arch/powerpc with bootwrapper support that 2230 board ports in arch/powerpc with bootwrapper support that
2219 recalculate the memory size from the SDRAM controller setup 2231 recalculate the memory size from the SDRAM controller setup
2220 will have to get fixed in Linux additionally. 2232 will have to get fixed in Linux additionally.
2221 2233
2222 This option can be used as a workaround for the 440EPx/GRx 2234 This option can be used as a workaround for the 440EPx/GRx
2223 CHIP 11 errata where the last 256 bytes in SDRAM shouldn't 2235 CHIP 11 errata where the last 256 bytes in SDRAM shouldn't
2224 be touched. 2236 be touched.
2225 2237
2226 WARNING: Please make sure that this value is a multiple of 2238 WARNING: Please make sure that this value is a multiple of
2227 the Linux page size (normally 4k). If this is not the case, 2239 the Linux page size (normally 4k). If this is not the case,
2228 then the end address of the Linux memory will be located at a 2240 then the end address of the Linux memory will be located at a
2229 non page size aligned address and this could cause major 2241 non page size aligned address and this could cause major
2230 problems. 2242 problems.
2231 2243
2232 - CONFIG_SYS_TFTP_LOADADDR: 2244 - CONFIG_SYS_TFTP_LOADADDR:
2233 Default load address for network file downloads 2245 Default load address for network file downloads
2234 2246
2235 - CONFIG_SYS_LOADS_BAUD_CHANGE: 2247 - CONFIG_SYS_LOADS_BAUD_CHANGE:
2236 Enable temporary baudrate change while serial download 2248 Enable temporary baudrate change while serial download
2237 2249
2238 - CONFIG_SYS_SDRAM_BASE: 2250 - CONFIG_SYS_SDRAM_BASE:
2239 Physical start address of SDRAM. _Must_ be 0 here. 2251 Physical start address of SDRAM. _Must_ be 0 here.
2240 2252
2241 - CONFIG_SYS_MBIO_BASE: 2253 - CONFIG_SYS_MBIO_BASE:
2242 Physical start address of Motherboard I/O (if using a 2254 Physical start address of Motherboard I/O (if using a
2243 Cogent motherboard) 2255 Cogent motherboard)
2244 2256
2245 - CONFIG_SYS_FLASH_BASE: 2257 - CONFIG_SYS_FLASH_BASE:
2246 Physical start address of Flash memory. 2258 Physical start address of Flash memory.
2247 2259
2248 - CONFIG_SYS_MONITOR_BASE: 2260 - CONFIG_SYS_MONITOR_BASE:
2249 Physical start address of boot monitor code (set by 2261 Physical start address of boot monitor code (set by
2250 make config files to be same as the text base address 2262 make config files to be same as the text base address
2251 (CONFIG_SYS_TEXT_BASE) used when linking) - same as 2263 (CONFIG_SYS_TEXT_BASE) used when linking) - same as
2252 CONFIG_SYS_FLASH_BASE when booting from flash. 2264 CONFIG_SYS_FLASH_BASE when booting from flash.
2253 2265
2254 - CONFIG_SYS_MONITOR_LEN: 2266 - CONFIG_SYS_MONITOR_LEN:
2255 Size of memory reserved for monitor code, used to 2267 Size of memory reserved for monitor code, used to
2256 determine _at_compile_time_ (!) if the environment is 2268 determine _at_compile_time_ (!) if the environment is
2257 embedded within the U-Boot image, or in a separate 2269 embedded within the U-Boot image, or in a separate
2258 flash sector. 2270 flash sector.
2259 2271
2260 - CONFIG_SYS_MALLOC_LEN: 2272 - CONFIG_SYS_MALLOC_LEN:
2261 Size of DRAM reserved for malloc() use. 2273 Size of DRAM reserved for malloc() use.
2262 2274
2263 - CONFIG_SYS_BOOTM_LEN: 2275 - CONFIG_SYS_BOOTM_LEN:
2264 Normally compressed uImages are limited to an 2276 Normally compressed uImages are limited to an
2265 uncompressed size of 8 MBytes. If this is not enough, 2277 uncompressed size of 8 MBytes. If this is not enough,
2266 you can define CONFIG_SYS_BOOTM_LEN in your board config file 2278 you can define CONFIG_SYS_BOOTM_LEN in your board config file
2267 to adjust this setting to your needs. 2279 to adjust this setting to your needs.
2268 2280
2269 - CONFIG_SYS_BOOTMAPSZ: 2281 - CONFIG_SYS_BOOTMAPSZ:
2270 Maximum size of memory mapped by the startup code of 2282 Maximum size of memory mapped by the startup code of
2271 the Linux kernel; all data that must be processed by 2283 the Linux kernel; all data that must be processed by
2272 the Linux kernel (bd_info, boot arguments, FDT blob if 2284 the Linux kernel (bd_info, boot arguments, FDT blob if
2273 used) must be put below this limit, unless "bootm_low" 2285 used) must be put below this limit, unless "bootm_low"
2274 enviroment variable is defined and non-zero. In such case 2286 enviroment variable is defined and non-zero. In such case
2275 all data for the Linux kernel must be between "bootm_low" 2287 all data for the Linux kernel must be between "bootm_low"
2276 and "bootm_low" + CONFIG_SYS_BOOTMAPSZ. 2288 and "bootm_low" + CONFIG_SYS_BOOTMAPSZ.
2277 2289
2278 - CONFIG_SYS_BOOT_RAMDISK_HIGH: 2290 - CONFIG_SYS_BOOT_RAMDISK_HIGH:
2279 Enable initrd_high functionality. If defined then the 2291 Enable initrd_high functionality. If defined then the
2280 initrd_high feature is enabled and the bootm ramdisk subcommand 2292 initrd_high feature is enabled and the bootm ramdisk subcommand
2281 is enabled. 2293 is enabled.
2282 2294
2283 - CONFIG_SYS_BOOT_GET_CMDLINE: 2295 - CONFIG_SYS_BOOT_GET_CMDLINE:
2284 Enables allocating and saving kernel cmdline in space between 2296 Enables allocating and saving kernel cmdline in space between
2285 "bootm_low" and "bootm_low" + BOOTMAPSZ. 2297 "bootm_low" and "bootm_low" + BOOTMAPSZ.
2286 2298
2287 - CONFIG_SYS_BOOT_GET_KBD: 2299 - CONFIG_SYS_BOOT_GET_KBD:
2288 Enables allocating and saving a kernel copy of the bd_info in 2300 Enables allocating and saving a kernel copy of the bd_info in
2289 space between "bootm_low" and "bootm_low" + BOOTMAPSZ. 2301 space between "bootm_low" and "bootm_low" + BOOTMAPSZ.
2290 2302
2291 - CONFIG_SYS_MAX_FLASH_BANKS: 2303 - CONFIG_SYS_MAX_FLASH_BANKS:
2292 Max number of Flash memory banks 2304 Max number of Flash memory banks
2293 2305
2294 - CONFIG_SYS_MAX_FLASH_SECT: 2306 - CONFIG_SYS_MAX_FLASH_SECT:
2295 Max number of sectors on a Flash chip 2307 Max number of sectors on a Flash chip
2296 2308
2297 - CONFIG_SYS_FLASH_ERASE_TOUT: 2309 - CONFIG_SYS_FLASH_ERASE_TOUT:
2298 Timeout for Flash erase operations (in ms) 2310 Timeout for Flash erase operations (in ms)
2299 2311
2300 - CONFIG_SYS_FLASH_WRITE_TOUT: 2312 - CONFIG_SYS_FLASH_WRITE_TOUT:
2301 Timeout for Flash write operations (in ms) 2313 Timeout for Flash write operations (in ms)
2302 2314
2303 - CONFIG_SYS_FLASH_LOCK_TOUT 2315 - CONFIG_SYS_FLASH_LOCK_TOUT
2304 Timeout for Flash set sector lock bit operation (in ms) 2316 Timeout for Flash set sector lock bit operation (in ms)
2305 2317
2306 - CONFIG_SYS_FLASH_UNLOCK_TOUT 2318 - CONFIG_SYS_FLASH_UNLOCK_TOUT
2307 Timeout for Flash clear lock bits operation (in ms) 2319 Timeout for Flash clear lock bits operation (in ms)
2308 2320
2309 - CONFIG_SYS_FLASH_PROTECTION 2321 - CONFIG_SYS_FLASH_PROTECTION
2310 If defined, hardware flash sectors protection is used 2322 If defined, hardware flash sectors protection is used
2311 instead of U-Boot software protection. 2323 instead of U-Boot software protection.
2312 2324
2313 - CONFIG_SYS_DIRECT_FLASH_TFTP: 2325 - CONFIG_SYS_DIRECT_FLASH_TFTP:
2314 2326
2315 Enable TFTP transfers directly to flash memory; 2327 Enable TFTP transfers directly to flash memory;
2316 without this option such a download has to be 2328 without this option such a download has to be
2317 performed in two steps: (1) download to RAM, and (2) 2329 performed in two steps: (1) download to RAM, and (2)
2318 copy from RAM to flash. 2330 copy from RAM to flash.
2319 2331
2320 The two-step approach is usually more reliable, since 2332 The two-step approach is usually more reliable, since
2321 you can check if the download worked before you erase 2333 you can check if the download worked before you erase
2322 the flash, but in some situations (when system RAM is 2334 the flash, but in some situations (when system RAM is
2323 too limited to allow for a temporary copy of the 2335 too limited to allow for a temporary copy of the
2324 downloaded image) this option may be very useful. 2336 downloaded image) this option may be very useful.
2325 2337
2326 - CONFIG_SYS_FLASH_CFI: 2338 - CONFIG_SYS_FLASH_CFI:
2327 Define if the flash driver uses extra elements in the 2339 Define if the flash driver uses extra elements in the
2328 common flash structure for storing flash geometry. 2340 common flash structure for storing flash geometry.
2329 2341
2330 - CONFIG_FLASH_CFI_DRIVER 2342 - CONFIG_FLASH_CFI_DRIVER
2331 This option also enables the building of the cfi_flash driver 2343 This option also enables the building of the cfi_flash driver
2332 in the drivers directory 2344 in the drivers directory
2333 2345
2334 - CONFIG_FLASH_CFI_MTD 2346 - CONFIG_FLASH_CFI_MTD
2335 This option enables the building of the cfi_mtd driver 2347 This option enables the building of the cfi_mtd driver
2336 in the drivers directory. The driver exports CFI flash 2348 in the drivers directory. The driver exports CFI flash
2337 to the MTD layer. 2349 to the MTD layer.
2338 2350
2339 - CONFIG_SYS_FLASH_USE_BUFFER_WRITE 2351 - CONFIG_SYS_FLASH_USE_BUFFER_WRITE
2340 Use buffered writes to flash. 2352 Use buffered writes to flash.
2341 2353
2342 - CONFIG_FLASH_SPANSION_S29WS_N 2354 - CONFIG_FLASH_SPANSION_S29WS_N
2343 s29ws-n MirrorBit flash has non-standard addresses for buffered 2355 s29ws-n MirrorBit flash has non-standard addresses for buffered
2344 write commands. 2356 write commands.
2345 2357
2346 - CONFIG_SYS_FLASH_QUIET_TEST 2358 - CONFIG_SYS_FLASH_QUIET_TEST
2347 If this option is defined, the common CFI flash doesn't 2359 If this option is defined, the common CFI flash doesn't
2348 print it's warning upon not recognized FLASH banks. This 2360 print it's warning upon not recognized FLASH banks. This
2349 is useful, if some of the configured banks are only 2361 is useful, if some of the configured banks are only
2350 optionally available. 2362 optionally available.
2351 2363
2352 - CONFIG_FLASH_SHOW_PROGRESS 2364 - CONFIG_FLASH_SHOW_PROGRESS
2353 If defined (must be an integer), print out countdown 2365 If defined (must be an integer), print out countdown
2354 digits and dots. Recommended value: 45 (9..1) for 80 2366 digits and dots. Recommended value: 45 (9..1) for 80
2355 column displays, 15 (3..1) for 40 column displays. 2367 column displays, 15 (3..1) for 40 column displays.
2356 2368
2357 - CONFIG_SYS_RX_ETH_BUFFER: 2369 - CONFIG_SYS_RX_ETH_BUFFER:
2358 Defines the number of Ethernet receive buffers. On some 2370 Defines the number of Ethernet receive buffers. On some
2359 Ethernet controllers it is recommended to set this value 2371 Ethernet controllers it is recommended to set this value
2360 to 8 or even higher (EEPRO100 or 405 EMAC), since all 2372 to 8 or even higher (EEPRO100 or 405 EMAC), since all
2361 buffers can be full shortly after enabling the interface 2373 buffers can be full shortly after enabling the interface
2362 on high Ethernet traffic. 2374 on high Ethernet traffic.
2363 Defaults to 4 if not defined. 2375 Defaults to 4 if not defined.
2364 2376
2365 - CONFIG_ENV_MAX_ENTRIES 2377 - CONFIG_ENV_MAX_ENTRIES
2366 2378
2367 Maximum number of entries in the hash table that is used 2379 Maximum number of entries in the hash table that is used
2368 internally to store the environment settings. The default 2380 internally to store the environment settings. The default
2369 setting is supposed to be generous and should work in most 2381 setting is supposed to be generous and should work in most
2370 cases. This setting can be used to tune behaviour; see 2382 cases. This setting can be used to tune behaviour; see
2371 lib/hashtable.c for details. 2383 lib/hashtable.c for details.
2372 2384
2373 The following definitions that deal with the placement and management 2385 The following definitions that deal with the placement and management
2374 of environment data (variable area); in general, we support the 2386 of environment data (variable area); in general, we support the
2375 following configurations: 2387 following configurations:
2376 2388
2377 - CONFIG_ENV_IS_IN_FLASH: 2389 - CONFIG_ENV_IS_IN_FLASH:
2378 2390
2379 Define this if the environment is in flash memory. 2391 Define this if the environment is in flash memory.
2380 2392
2381 a) The environment occupies one whole flash sector, which is 2393 a) The environment occupies one whole flash sector, which is
2382 "embedded" in the text segment with the U-Boot code. This 2394 "embedded" in the text segment with the U-Boot code. This
2383 happens usually with "bottom boot sector" or "top boot 2395 happens usually with "bottom boot sector" or "top boot
2384 sector" type flash chips, which have several smaller 2396 sector" type flash chips, which have several smaller
2385 sectors at the start or the end. For instance, such a 2397 sectors at the start or the end. For instance, such a
2386 layout can have sector sizes of 8, 2x4, 16, Nx32 kB. In 2398 layout can have sector sizes of 8, 2x4, 16, Nx32 kB. In
2387 such a case you would place the environment in one of the 2399 such a case you would place the environment in one of the
2388 4 kB sectors - with U-Boot code before and after it. With 2400 4 kB sectors - with U-Boot code before and after it. With
2389 "top boot sector" type flash chips, you would put the 2401 "top boot sector" type flash chips, you would put the
2390 environment in one of the last sectors, leaving a gap 2402 environment in one of the last sectors, leaving a gap
2391 between U-Boot and the environment. 2403 between U-Boot and the environment.
2392 2404
2393 - CONFIG_ENV_OFFSET: 2405 - CONFIG_ENV_OFFSET:
2394 2406
2395 Offset of environment data (variable area) to the 2407 Offset of environment data (variable area) to the
2396 beginning of flash memory; for instance, with bottom boot 2408 beginning of flash memory; for instance, with bottom boot
2397 type flash chips the second sector can be used: the offset 2409 type flash chips the second sector can be used: the offset
2398 for this sector is given here. 2410 for this sector is given here.
2399 2411
2400 CONFIG_ENV_OFFSET is used relative to CONFIG_SYS_FLASH_BASE. 2412 CONFIG_ENV_OFFSET is used relative to CONFIG_SYS_FLASH_BASE.
2401 2413
2402 - CONFIG_ENV_ADDR: 2414 - CONFIG_ENV_ADDR:
2403 2415
2404 This is just another way to specify the start address of 2416 This is just another way to specify the start address of
2405 the flash sector containing the environment (instead of 2417 the flash sector containing the environment (instead of
2406 CONFIG_ENV_OFFSET). 2418 CONFIG_ENV_OFFSET).
2407 2419
2408 - CONFIG_ENV_SECT_SIZE: 2420 - CONFIG_ENV_SECT_SIZE:
2409 2421
2410 Size of the sector containing the environment. 2422 Size of the sector containing the environment.
2411 2423
2412 2424
2413 b) Sometimes flash chips have few, equal sized, BIG sectors. 2425 b) Sometimes flash chips have few, equal sized, BIG sectors.
2414 In such a case you don't want to spend a whole sector for 2426 In such a case you don't want to spend a whole sector for
2415 the environment. 2427 the environment.
2416 2428
2417 - CONFIG_ENV_SIZE: 2429 - CONFIG_ENV_SIZE:
2418 2430
2419 If you use this in combination with CONFIG_ENV_IS_IN_FLASH 2431 If you use this in combination with CONFIG_ENV_IS_IN_FLASH
2420 and CONFIG_ENV_SECT_SIZE, you can specify to use only a part 2432 and CONFIG_ENV_SECT_SIZE, you can specify to use only a part
2421 of this flash sector for the environment. This saves 2433 of this flash sector for the environment. This saves
2422 memory for the RAM copy of the environment. 2434 memory for the RAM copy of the environment.
2423 2435
2424 It may also save flash memory if you decide to use this 2436 It may also save flash memory if you decide to use this
2425 when your environment is "embedded" within U-Boot code, 2437 when your environment is "embedded" within U-Boot code,
2426 since then the remainder of the flash sector could be used 2438 since then the remainder of the flash sector could be used
2427 for U-Boot code. It should be pointed out that this is 2439 for U-Boot code. It should be pointed out that this is
2428 STRONGLY DISCOURAGED from a robustness point of view: 2440 STRONGLY DISCOURAGED from a robustness point of view:
2429 updating the environment in flash makes it always 2441 updating the environment in flash makes it always
2430 necessary to erase the WHOLE sector. If something goes 2442 necessary to erase the WHOLE sector. If something goes
2431 wrong before the contents has been restored from a copy in 2443 wrong before the contents has been restored from a copy in
2432 RAM, your target system will be dead. 2444 RAM, your target system will be dead.
2433 2445
2434 - CONFIG_ENV_ADDR_REDUND 2446 - CONFIG_ENV_ADDR_REDUND
2435 CONFIG_ENV_SIZE_REDUND 2447 CONFIG_ENV_SIZE_REDUND
2436 2448
2437 These settings describe a second storage area used to hold 2449 These settings describe a second storage area used to hold
2438 a redundant copy of the environment data, so that there is 2450 a redundant copy of the environment data, so that there is
2439 a valid backup copy in case there is a power failure during 2451 a valid backup copy in case there is a power failure during
2440 a "saveenv" operation. 2452 a "saveenv" operation.
2441 2453
2442 BE CAREFUL! Any changes to the flash layout, and some changes to the 2454 BE CAREFUL! Any changes to the flash layout, and some changes to the
2443 source code will make it necessary to adapt <board>/u-boot.lds* 2455 source code will make it necessary to adapt <board>/u-boot.lds*
2444 accordingly! 2456 accordingly!
2445 2457
2446 2458
2447 - CONFIG_ENV_IS_IN_NVRAM: 2459 - CONFIG_ENV_IS_IN_NVRAM:
2448 2460
2449 Define this if you have some non-volatile memory device 2461 Define this if you have some non-volatile memory device
2450 (NVRAM, battery buffered SRAM) which you want to use for the 2462 (NVRAM, battery buffered SRAM) which you want to use for the
2451 environment. 2463 environment.
2452 2464
2453 - CONFIG_ENV_ADDR: 2465 - CONFIG_ENV_ADDR:
2454 - CONFIG_ENV_SIZE: 2466 - CONFIG_ENV_SIZE:
2455 2467
2456 These two #defines are used to determine the memory area you 2468 These two #defines are used to determine the memory area you
2457 want to use for environment. It is assumed that this memory 2469 want to use for environment. It is assumed that this memory
2458 can just be read and written to, without any special 2470 can just be read and written to, without any special
2459 provision. 2471 provision.
2460 2472
2461 BE CAREFUL! The first access to the environment happens quite early 2473 BE CAREFUL! The first access to the environment happens quite early
2462 in U-Boot initalization (when we try to get the setting of for the 2474 in U-Boot initalization (when we try to get the setting of for the
2463 console baudrate). You *MUST* have mapped your NVRAM area then, or 2475 console baudrate). You *MUST* have mapped your NVRAM area then, or
2464 U-Boot will hang. 2476 U-Boot will hang.
2465 2477
2466 Please note that even with NVRAM we still use a copy of the 2478 Please note that even with NVRAM we still use a copy of the
2467 environment in RAM: we could work on NVRAM directly, but we want to 2479 environment in RAM: we could work on NVRAM directly, but we want to
2468 keep settings there always unmodified except somebody uses "saveenv" 2480 keep settings there always unmodified except somebody uses "saveenv"
2469 to save the current settings. 2481 to save the current settings.
2470 2482
2471 2483
2472 - CONFIG_ENV_IS_IN_EEPROM: 2484 - CONFIG_ENV_IS_IN_EEPROM:
2473 2485
2474 Use this if you have an EEPROM or similar serial access 2486 Use this if you have an EEPROM or similar serial access
2475 device and a driver for it. 2487 device and a driver for it.
2476 2488
2477 - CONFIG_ENV_OFFSET: 2489 - CONFIG_ENV_OFFSET:
2478 - CONFIG_ENV_SIZE: 2490 - CONFIG_ENV_SIZE:
2479 2491
2480 These two #defines specify the offset and size of the 2492 These two #defines specify the offset and size of the
2481 environment area within the total memory of your EEPROM. 2493 environment area within the total memory of your EEPROM.
2482 2494
2483 - CONFIG_SYS_I2C_EEPROM_ADDR: 2495 - CONFIG_SYS_I2C_EEPROM_ADDR:
2484 If defined, specified the chip address of the EEPROM device. 2496 If defined, specified the chip address of the EEPROM device.
2485 The default address is zero. 2497 The default address is zero.
2486 2498
2487 - CONFIG_SYS_EEPROM_PAGE_WRITE_BITS: 2499 - CONFIG_SYS_EEPROM_PAGE_WRITE_BITS:
2488 If defined, the number of bits used to address bytes in a 2500 If defined, the number of bits used to address bytes in a
2489 single page in the EEPROM device. A 64 byte page, for example 2501 single page in the EEPROM device. A 64 byte page, for example
2490 would require six bits. 2502 would require six bits.
2491 2503
2492 - CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS: 2504 - CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS:
2493 If defined, the number of milliseconds to delay between 2505 If defined, the number of milliseconds to delay between
2494 page writes. The default is zero milliseconds. 2506 page writes. The default is zero milliseconds.
2495 2507
2496 - CONFIG_SYS_I2C_EEPROM_ADDR_LEN: 2508 - CONFIG_SYS_I2C_EEPROM_ADDR_LEN:
2497 The length in bytes of the EEPROM memory array address. Note 2509 The length in bytes of the EEPROM memory array address. Note
2498 that this is NOT the chip address length! 2510 that this is NOT the chip address length!
2499 2511
2500 - CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW: 2512 - CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW:
2501 EEPROM chips that implement "address overflow" are ones 2513 EEPROM chips that implement "address overflow" are ones
2502 like Catalyst 24WC04/08/16 which has 9/10/11 bits of 2514 like Catalyst 24WC04/08/16 which has 9/10/11 bits of
2503 address and the extra bits end up in the "chip address" bit 2515 address and the extra bits end up in the "chip address" bit
2504 slots. This makes a 24WC08 (1Kbyte) chip look like four 256 2516 slots. This makes a 24WC08 (1Kbyte) chip look like four 256
2505 byte chips. 2517 byte chips.
2506 2518
2507 Note that we consider the length of the address field to 2519 Note that we consider the length of the address field to
2508 still be one byte because the extra address bits are hidden 2520 still be one byte because the extra address bits are hidden
2509 in the chip address. 2521 in the chip address.
2510 2522
2511 - CONFIG_SYS_EEPROM_SIZE: 2523 - CONFIG_SYS_EEPROM_SIZE:
2512 The size in bytes of the EEPROM device. 2524 The size in bytes of the EEPROM device.
2513 2525
2514 - CONFIG_ENV_EEPROM_IS_ON_I2C 2526 - CONFIG_ENV_EEPROM_IS_ON_I2C
2515 define this, if you have I2C and SPI activated, and your 2527 define this, if you have I2C and SPI activated, and your
2516 EEPROM, which holds the environment, is on the I2C bus. 2528 EEPROM, which holds the environment, is on the I2C bus.
2517 2529
2518 - CONFIG_I2C_ENV_EEPROM_BUS 2530 - CONFIG_I2C_ENV_EEPROM_BUS
2519 if you have an Environment on an EEPROM reached over 2531 if you have an Environment on an EEPROM reached over
2520 I2C muxes, you can define here, how to reach this 2532 I2C muxes, you can define here, how to reach this
2521 EEPROM. For example: 2533 EEPROM. For example:
2522 2534
2523 #define CONFIG_I2C_ENV_EEPROM_BUS "pca9547:70:d\0" 2535 #define CONFIG_I2C_ENV_EEPROM_BUS "pca9547:70:d\0"
2524 2536
2525 EEPROM which holds the environment, is reached over 2537 EEPROM which holds the environment, is reached over
2526 a pca9547 i2c mux with address 0x70, channel 3. 2538 a pca9547 i2c mux with address 0x70, channel 3.
2527 2539
2528 - CONFIG_ENV_IS_IN_DATAFLASH: 2540 - CONFIG_ENV_IS_IN_DATAFLASH:
2529 2541
2530 Define this if you have a DataFlash memory device which you 2542 Define this if you have a DataFlash memory device which you
2531 want to use for the environment. 2543 want to use for the environment.
2532 2544
2533 - CONFIG_ENV_OFFSET: 2545 - CONFIG_ENV_OFFSET:
2534 - CONFIG_ENV_ADDR: 2546 - CONFIG_ENV_ADDR:
2535 - CONFIG_ENV_SIZE: 2547 - CONFIG_ENV_SIZE:
2536 2548
2537 These three #defines specify the offset and size of the 2549 These three #defines specify the offset and size of the
2538 environment area within the total memory of your DataFlash placed 2550 environment area within the total memory of your DataFlash placed
2539 at the specified address. 2551 at the specified address.
2540 2552
2541 - CONFIG_ENV_IS_IN_NAND: 2553 - CONFIG_ENV_IS_IN_NAND:
2542 2554
2543 Define this if you have a NAND device which you want to use 2555 Define this if you have a NAND device which you want to use
2544 for the environment. 2556 for the environment.
2545 2557
2546 - CONFIG_ENV_OFFSET: 2558 - CONFIG_ENV_OFFSET:
2547 - CONFIG_ENV_SIZE: 2559 - CONFIG_ENV_SIZE:
2548 2560
2549 These two #defines specify the offset and size of the environment 2561 These two #defines specify the offset and size of the environment
2550 area within the first NAND device. CONFIG_ENV_OFFSET must be 2562 area within the first NAND device. CONFIG_ENV_OFFSET must be
2551 aligned to an erase block boundary. 2563 aligned to an erase block boundary.
2552 2564
2553 - CONFIG_ENV_OFFSET_REDUND (optional): 2565 - CONFIG_ENV_OFFSET_REDUND (optional):
2554 2566
2555 This setting describes a second storage area of CONFIG_ENV_SIZE 2567 This setting describes a second storage area of CONFIG_ENV_SIZE
2556 size used to hold a redundant copy of the environment data, so 2568 size used to hold a redundant copy of the environment data, so
2557 that there is a valid backup copy in case there is a power failure 2569 that there is a valid backup copy in case there is a power failure
2558 during a "saveenv" operation. CONFIG_ENV_OFFSET_RENDUND must be 2570 during a "saveenv" operation. CONFIG_ENV_OFFSET_RENDUND must be
2559 aligned to an erase block boundary. 2571 aligned to an erase block boundary.
2560 2572
2561 - CONFIG_ENV_RANGE (optional): 2573 - CONFIG_ENV_RANGE (optional):
2562 2574
2563 Specifies the length of the region in which the environment 2575 Specifies the length of the region in which the environment
2564 can be written. This should be a multiple of the NAND device's 2576 can be written. This should be a multiple of the NAND device's
2565 block size. Specifying a range with more erase blocks than 2577 block size. Specifying a range with more erase blocks than
2566 are needed to hold CONFIG_ENV_SIZE allows bad blocks within 2578 are needed to hold CONFIG_ENV_SIZE allows bad blocks within
2567 the range to be avoided. 2579 the range to be avoided.
2568 2580
2569 - CONFIG_ENV_OFFSET_OOB (optional): 2581 - CONFIG_ENV_OFFSET_OOB (optional):
2570 2582
2571 Enables support for dynamically retrieving the offset of the 2583 Enables support for dynamically retrieving the offset of the
2572 environment from block zero's out-of-band data. The 2584 environment from block zero's out-of-band data. The
2573 "nand env.oob" command can be used to record this offset. 2585 "nand env.oob" command can be used to record this offset.
2574 Currently, CONFIG_ENV_OFFSET_REDUND is not supported when 2586 Currently, CONFIG_ENV_OFFSET_REDUND is not supported when
2575 using CONFIG_ENV_OFFSET_OOB. 2587 using CONFIG_ENV_OFFSET_OOB.
2576 2588
2577 - CONFIG_NAND_ENV_DST 2589 - CONFIG_NAND_ENV_DST
2578 2590
2579 Defines address in RAM to which the nand_spl code should copy the 2591 Defines address in RAM to which the nand_spl code should copy the
2580 environment. If redundant environment is used, it will be copied to 2592 environment. If redundant environment is used, it will be copied to
2581 CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE. 2593 CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE.
2582 2594
2583 - CONFIG_SYS_SPI_INIT_OFFSET 2595 - CONFIG_SYS_SPI_INIT_OFFSET
2584 2596
2585 Defines offset to the initial SPI buffer area in DPRAM. The 2597 Defines offset to the initial SPI buffer area in DPRAM. The
2586 area is used at an early stage (ROM part) if the environment 2598 area is used at an early stage (ROM part) if the environment
2587 is configured to reside in the SPI EEPROM: We need a 520 byte 2599 is configured to reside in the SPI EEPROM: We need a 520 byte
2588 scratch DPRAM area. It is used between the two initialization 2600 scratch DPRAM area. It is used between the two initialization
2589 calls (spi_init_f() and spi_init_r()). A value of 0xB00 seems 2601 calls (spi_init_f() and spi_init_r()). A value of 0xB00 seems
2590 to be a good choice since it makes it far enough from the 2602 to be a good choice since it makes it far enough from the
2591 start of the data area as well as from the stack pointer. 2603 start of the data area as well as from the stack pointer.
2592 2604
2593 Please note that the environment is read-only until the monitor 2605 Please note that the environment is read-only until the monitor
2594 has been relocated to RAM and a RAM copy of the environment has been 2606 has been relocated to RAM and a RAM copy of the environment has been
2595 created; also, when using EEPROM you will have to use getenv_f() 2607 created; also, when using EEPROM you will have to use getenv_f()
2596 until then to read environment variables. 2608 until then to read environment variables.
2597 2609
2598 The environment is protected by a CRC32 checksum. Before the monitor 2610 The environment is protected by a CRC32 checksum. Before the monitor
2599 is relocated into RAM, as a result of a bad CRC you will be working 2611 is relocated into RAM, as a result of a bad CRC you will be working
2600 with the compiled-in default environment - *silently*!!! [This is 2612 with the compiled-in default environment - *silently*!!! [This is
2601 necessary, because the first environment variable we need is the 2613 necessary, because the first environment variable we need is the
2602 "baudrate" setting for the console - if we have a bad CRC, we don't 2614 "baudrate" setting for the console - if we have a bad CRC, we don't
2603 have any device yet where we could complain.] 2615 have any device yet where we could complain.]
2604 2616
2605 Note: once the monitor has been relocated, then it will complain if 2617 Note: once the monitor has been relocated, then it will complain if
2606 the default environment is used; a new CRC is computed as soon as you 2618 the default environment is used; a new CRC is computed as soon as you
2607 use the "saveenv" command to store a valid environment. 2619 use the "saveenv" command to store a valid environment.
2608 2620
2609 - CONFIG_SYS_FAULT_ECHO_LINK_DOWN: 2621 - CONFIG_SYS_FAULT_ECHO_LINK_DOWN:
2610 Echo the inverted Ethernet link state to the fault LED. 2622 Echo the inverted Ethernet link state to the fault LED.
2611 2623
2612 Note: If this option is active, then CONFIG_SYS_FAULT_MII_ADDR 2624 Note: If this option is active, then CONFIG_SYS_FAULT_MII_ADDR
2613 also needs to be defined. 2625 also needs to be defined.
2614 2626
2615 - CONFIG_SYS_FAULT_MII_ADDR: 2627 - CONFIG_SYS_FAULT_MII_ADDR:
2616 MII address of the PHY to check for the Ethernet link state. 2628 MII address of the PHY to check for the Ethernet link state.
2617 2629
2618 - CONFIG_NS16550_MIN_FUNCTIONS: 2630 - CONFIG_NS16550_MIN_FUNCTIONS:
2619 Define this if you desire to only have use of the NS16550_init 2631 Define this if you desire to only have use of the NS16550_init
2620 and NS16550_putc functions for the serial driver located at 2632 and NS16550_putc functions for the serial driver located at
2621 drivers/serial/ns16550.c. This option is useful for saving 2633 drivers/serial/ns16550.c. This option is useful for saving
2622 space for already greatly restricted images, including but not 2634 space for already greatly restricted images, including but not
2623 limited to NAND_SPL configurations. 2635 limited to NAND_SPL configurations.
2624 2636
2625 Low Level (hardware related) configuration options: 2637 Low Level (hardware related) configuration options:
2626 --------------------------------------------------- 2638 ---------------------------------------------------
2627 2639
2628 - CONFIG_SYS_CACHELINE_SIZE: 2640 - CONFIG_SYS_CACHELINE_SIZE:
2629 Cache Line Size of the CPU. 2641 Cache Line Size of the CPU.
2630 2642
2631 - CONFIG_SYS_DEFAULT_IMMR: 2643 - CONFIG_SYS_DEFAULT_IMMR:
2632 Default address of the IMMR after system reset. 2644 Default address of the IMMR after system reset.
2633 2645
2634 Needed on some 8260 systems (MPC8260ADS, PQ2FADS-ZU, 2646 Needed on some 8260 systems (MPC8260ADS, PQ2FADS-ZU,
2635 and RPXsuper) to be able to adjust the position of 2647 and RPXsuper) to be able to adjust the position of
2636 the IMMR register after a reset. 2648 the IMMR register after a reset.
2637 2649
2638 - Floppy Disk Support: 2650 - Floppy Disk Support:
2639 CONFIG_SYS_FDC_DRIVE_NUMBER 2651 CONFIG_SYS_FDC_DRIVE_NUMBER
2640 2652
2641 the default drive number (default value 0) 2653 the default drive number (default value 0)
2642 2654
2643 CONFIG_SYS_ISA_IO_STRIDE 2655 CONFIG_SYS_ISA_IO_STRIDE
2644 2656
2645 defines the spacing between FDC chipset registers 2657 defines the spacing between FDC chipset registers
2646 (default value 1) 2658 (default value 1)
2647 2659
2648 CONFIG_SYS_ISA_IO_OFFSET 2660 CONFIG_SYS_ISA_IO_OFFSET
2649 2661
2650 defines the offset of register from address. It 2662 defines the offset of register from address. It
2651 depends on which part of the data bus is connected to 2663 depends on which part of the data bus is connected to
2652 the FDC chipset. (default value 0) 2664 the FDC chipset. (default value 0)
2653 2665
2654 If CONFIG_SYS_ISA_IO_STRIDE CONFIG_SYS_ISA_IO_OFFSET and 2666 If CONFIG_SYS_ISA_IO_STRIDE CONFIG_SYS_ISA_IO_OFFSET and
2655 CONFIG_SYS_FDC_DRIVE_NUMBER are undefined, they take their 2667 CONFIG_SYS_FDC_DRIVE_NUMBER are undefined, they take their
2656 default value. 2668 default value.
2657 2669
2658 if CONFIG_SYS_FDC_HW_INIT is defined, then the function 2670 if CONFIG_SYS_FDC_HW_INIT is defined, then the function
2659 fdc_hw_init() is called at the beginning of the FDC 2671 fdc_hw_init() is called at the beginning of the FDC
2660 setup. fdc_hw_init() must be provided by the board 2672 setup. fdc_hw_init() must be provided by the board
2661 source code. It is used to make hardware dependant 2673 source code. It is used to make hardware dependant
2662 initializations. 2674 initializations.
2663 2675
2664 - CONFIG_SYS_IMMR: Physical address of the Internal Memory. 2676 - CONFIG_SYS_IMMR: Physical address of the Internal Memory.
2665 DO NOT CHANGE unless you know exactly what you're 2677 DO NOT CHANGE unless you know exactly what you're
2666 doing! (11-4) [MPC8xx/82xx systems only] 2678 doing! (11-4) [MPC8xx/82xx systems only]
2667 2679
2668 - CONFIG_SYS_INIT_RAM_ADDR: 2680 - CONFIG_SYS_INIT_RAM_ADDR:
2669 2681
2670 Start address of memory area that can be used for 2682 Start address of memory area that can be used for
2671 initial data and stack; please note that this must be 2683 initial data and stack; please note that this must be
2672 writable memory that is working WITHOUT special 2684 writable memory that is working WITHOUT special
2673 initialization, i. e. you CANNOT use normal RAM which 2685 initialization, i. e. you CANNOT use normal RAM which
2674 will become available only after programming the 2686 will become available only after programming the
2675 memory controller and running certain initialization 2687 memory controller and running certain initialization
2676 sequences. 2688 sequences.
2677 2689
2678 U-Boot uses the following memory types: 2690 U-Boot uses the following memory types:
2679 - MPC8xx and MPC8260: IMMR (internal memory of the CPU) 2691 - MPC8xx and MPC8260: IMMR (internal memory of the CPU)
2680 - MPC824X: data cache 2692 - MPC824X: data cache
2681 - PPC4xx: data cache 2693 - PPC4xx: data cache
2682 2694
2683 - CONFIG_SYS_GBL_DATA_OFFSET: 2695 - CONFIG_SYS_GBL_DATA_OFFSET:
2684 2696
2685 Offset of the initial data structure in the memory 2697 Offset of the initial data structure in the memory
2686 area defined by CONFIG_SYS_INIT_RAM_ADDR. Usually 2698 area defined by CONFIG_SYS_INIT_RAM_ADDR. Usually
2687 CONFIG_SYS_GBL_DATA_OFFSET is chosen such that the initial 2699 CONFIG_SYS_GBL_DATA_OFFSET is chosen such that the initial
2688 data is located at the end of the available space 2700 data is located at the end of the available space
2689 (sometimes written as (CONFIG_SYS_INIT_RAM_SIZE - 2701 (sometimes written as (CONFIG_SYS_INIT_RAM_SIZE -
2690 CONFIG_SYS_INIT_DATA_SIZE), and the initial stack is just 2702 CONFIG_SYS_INIT_DATA_SIZE), and the initial stack is just
2691 below that area (growing from (CONFIG_SYS_INIT_RAM_ADDR + 2703 below that area (growing from (CONFIG_SYS_INIT_RAM_ADDR +
2692 CONFIG_SYS_GBL_DATA_OFFSET) downward. 2704 CONFIG_SYS_GBL_DATA_OFFSET) downward.
2693 2705
2694 Note: 2706 Note:
2695 On the MPC824X (or other systems that use the data 2707 On the MPC824X (or other systems that use the data
2696 cache for initial memory) the address chosen for 2708 cache for initial memory) the address chosen for
2697 CONFIG_SYS_INIT_RAM_ADDR is basically arbitrary - it must 2709 CONFIG_SYS_INIT_RAM_ADDR is basically arbitrary - it must
2698 point to an otherwise UNUSED address space between 2710 point to an otherwise UNUSED address space between
2699 the top of RAM and the start of the PCI space. 2711 the top of RAM and the start of the PCI space.
2700 2712
2701 - CONFIG_SYS_SIUMCR: SIU Module Configuration (11-6) 2713 - CONFIG_SYS_SIUMCR: SIU Module Configuration (11-6)
2702 2714
2703 - CONFIG_SYS_SYPCR: System Protection Control (11-9) 2715 - CONFIG_SYS_SYPCR: System Protection Control (11-9)
2704 2716
2705 - CONFIG_SYS_TBSCR: Time Base Status and Control (11-26) 2717 - CONFIG_SYS_TBSCR: Time Base Status and Control (11-26)
2706 2718
2707 - CONFIG_SYS_PISCR: Periodic Interrupt Status and Control (11-31) 2719 - CONFIG_SYS_PISCR: Periodic Interrupt Status and Control (11-31)
2708 2720
2709 - CONFIG_SYS_PLPRCR: PLL, Low-Power, and Reset Control Register (15-30) 2721 - CONFIG_SYS_PLPRCR: PLL, Low-Power, and Reset Control Register (15-30)
2710 2722
2711 - CONFIG_SYS_SCCR: System Clock and reset Control Register (15-27) 2723 - CONFIG_SYS_SCCR: System Clock and reset Control Register (15-27)
2712 2724
2713 - CONFIG_SYS_OR_TIMING_SDRAM: 2725 - CONFIG_SYS_OR_TIMING_SDRAM:
2714 SDRAM timing 2726 SDRAM timing
2715 2727
2716 - CONFIG_SYS_MAMR_PTA: 2728 - CONFIG_SYS_MAMR_PTA:
2717 periodic timer for refresh 2729 periodic timer for refresh
2718 2730
2719 - CONFIG_SYS_DER: Debug Event Register (37-47) 2731 - CONFIG_SYS_DER: Debug Event Register (37-47)
2720 2732
2721 - FLASH_BASE0_PRELIM, FLASH_BASE1_PRELIM, CONFIG_SYS_REMAP_OR_AM, 2733 - FLASH_BASE0_PRELIM, FLASH_BASE1_PRELIM, CONFIG_SYS_REMAP_OR_AM,
2722 CONFIG_SYS_PRELIM_OR_AM, CONFIG_SYS_OR_TIMING_FLASH, CONFIG_SYS_OR0_REMAP, 2734 CONFIG_SYS_PRELIM_OR_AM, CONFIG_SYS_OR_TIMING_FLASH, CONFIG_SYS_OR0_REMAP,
2723 CONFIG_SYS_OR0_PRELIM, CONFIG_SYS_BR0_PRELIM, CONFIG_SYS_OR1_REMAP, CONFIG_SYS_OR1_PRELIM, 2735 CONFIG_SYS_OR0_PRELIM, CONFIG_SYS_BR0_PRELIM, CONFIG_SYS_OR1_REMAP, CONFIG_SYS_OR1_PRELIM,
2724 CONFIG_SYS_BR1_PRELIM: 2736 CONFIG_SYS_BR1_PRELIM:
2725 Memory Controller Definitions: BR0/1 and OR0/1 (FLASH) 2737 Memory Controller Definitions: BR0/1 and OR0/1 (FLASH)
2726 2738
2727 - SDRAM_BASE2_PRELIM, SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE, 2739 - SDRAM_BASE2_PRELIM, SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE,
2728 CONFIG_SYS_OR_TIMING_SDRAM, CONFIG_SYS_OR2_PRELIM, CONFIG_SYS_BR2_PRELIM, 2740 CONFIG_SYS_OR_TIMING_SDRAM, CONFIG_SYS_OR2_PRELIM, CONFIG_SYS_BR2_PRELIM,
2729 CONFIG_SYS_OR3_PRELIM, CONFIG_SYS_BR3_PRELIM: 2741 CONFIG_SYS_OR3_PRELIM, CONFIG_SYS_BR3_PRELIM:
2730 Memory Controller Definitions: BR2/3 and OR2/3 (SDRAM) 2742 Memory Controller Definitions: BR2/3 and OR2/3 (SDRAM)
2731 2743
2732 - CONFIG_SYS_MAMR_PTA, CONFIG_SYS_MPTPR_2BK_4K, CONFIG_SYS_MPTPR_1BK_4K, CONFIG_SYS_MPTPR_2BK_8K, 2744 - CONFIG_SYS_MAMR_PTA, CONFIG_SYS_MPTPR_2BK_4K, CONFIG_SYS_MPTPR_1BK_4K, CONFIG_SYS_MPTPR_2BK_8K,
2733 CONFIG_SYS_MPTPR_1BK_8K, CONFIG_SYS_MAMR_8COL, CONFIG_SYS_MAMR_9COL: 2745 CONFIG_SYS_MPTPR_1BK_8K, CONFIG_SYS_MAMR_8COL, CONFIG_SYS_MAMR_9COL:
2734 Machine Mode Register and Memory Periodic Timer 2746 Machine Mode Register and Memory Periodic Timer
2735 Prescaler definitions (SDRAM timing) 2747 Prescaler definitions (SDRAM timing)
2736 2748
2737 - CONFIG_SYS_I2C_UCODE_PATCH, CONFIG_SYS_I2C_DPMEM_OFFSET [0x1FC0]: 2749 - CONFIG_SYS_I2C_UCODE_PATCH, CONFIG_SYS_I2C_DPMEM_OFFSET [0x1FC0]:
2738 enable I2C microcode relocation patch (MPC8xx); 2750 enable I2C microcode relocation patch (MPC8xx);
2739 define relocation offset in DPRAM [DSP2] 2751 define relocation offset in DPRAM [DSP2]
2740 2752
2741 - CONFIG_SYS_SMC_UCODE_PATCH, CONFIG_SYS_SMC_DPMEM_OFFSET [0x1FC0]: 2753 - CONFIG_SYS_SMC_UCODE_PATCH, CONFIG_SYS_SMC_DPMEM_OFFSET [0x1FC0]:
2742 enable SMC microcode relocation patch (MPC8xx); 2754 enable SMC microcode relocation patch (MPC8xx);
2743 define relocation offset in DPRAM [SMC1] 2755 define relocation offset in DPRAM [SMC1]
2744 2756
2745 - CONFIG_SYS_SPI_UCODE_PATCH, CONFIG_SYS_SPI_DPMEM_OFFSET [0x1FC0]: 2757 - CONFIG_SYS_SPI_UCODE_PATCH, CONFIG_SYS_SPI_DPMEM_OFFSET [0x1FC0]:
2746 enable SPI microcode relocation patch (MPC8xx); 2758 enable SPI microcode relocation patch (MPC8xx);
2747 define relocation offset in DPRAM [SCC4] 2759 define relocation offset in DPRAM [SCC4]
2748 2760
2749 - CONFIG_SYS_USE_OSCCLK: 2761 - CONFIG_SYS_USE_OSCCLK:
2750 Use OSCM clock mode on MBX8xx board. Be careful, 2762 Use OSCM clock mode on MBX8xx board. Be careful,
2751 wrong setting might damage your board. Read 2763 wrong setting might damage your board. Read
2752 doc/README.MBX before setting this variable! 2764 doc/README.MBX before setting this variable!
2753 2765
2754 - CONFIG_SYS_CPM_POST_WORD_ADDR: (MPC8xx, MPC8260 only) 2766 - CONFIG_SYS_CPM_POST_WORD_ADDR: (MPC8xx, MPC8260 only)
2755 Offset of the bootmode word in DPRAM used by post 2767 Offset of the bootmode word in DPRAM used by post
2756 (Power On Self Tests). This definition overrides 2768 (Power On Self Tests). This definition overrides
2757 #define'd default value in commproc.h resp. 2769 #define'd default value in commproc.h resp.
2758 cpm_8260.h. 2770 cpm_8260.h.
2759 2771
2760 - CONFIG_SYS_PCI_SLV_MEM_LOCAL, CONFIG_SYS_PCI_SLV_MEM_BUS, CONFIG_SYS_PICMR0_MASK_ATTRIB, 2772 - CONFIG_SYS_PCI_SLV_MEM_LOCAL, CONFIG_SYS_PCI_SLV_MEM_BUS, CONFIG_SYS_PICMR0_MASK_ATTRIB,
2761 CONFIG_SYS_PCI_MSTR0_LOCAL, CONFIG_SYS_PCIMSK0_MASK, CONFIG_SYS_PCI_MSTR1_LOCAL, 2773 CONFIG_SYS_PCI_MSTR0_LOCAL, CONFIG_SYS_PCIMSK0_MASK, CONFIG_SYS_PCI_MSTR1_LOCAL,
2762 CONFIG_SYS_PCIMSK1_MASK, CONFIG_SYS_PCI_MSTR_MEM_LOCAL, CONFIG_SYS_PCI_MSTR_MEM_BUS, 2774 CONFIG_SYS_PCIMSK1_MASK, CONFIG_SYS_PCI_MSTR_MEM_LOCAL, CONFIG_SYS_PCI_MSTR_MEM_BUS,
2763 CONFIG_SYS_CPU_PCI_MEM_START, CONFIG_SYS_PCI_MSTR_MEM_SIZE, CONFIG_SYS_POCMR0_MASK_ATTRIB, 2775 CONFIG_SYS_CPU_PCI_MEM_START, CONFIG_SYS_PCI_MSTR_MEM_SIZE, CONFIG_SYS_POCMR0_MASK_ATTRIB,
2764 CONFIG_SYS_PCI_MSTR_MEMIO_LOCAL, CONFIG_SYS_PCI_MSTR_MEMIO_BUS, CPU_PCI_MEMIO_START, 2776 CONFIG_SYS_PCI_MSTR_MEMIO_LOCAL, CONFIG_SYS_PCI_MSTR_MEMIO_BUS, CPU_PCI_MEMIO_START,
2765 CONFIG_SYS_PCI_MSTR_MEMIO_SIZE, CONFIG_SYS_POCMR1_MASK_ATTRIB, CONFIG_SYS_PCI_MSTR_IO_LOCAL, 2777 CONFIG_SYS_PCI_MSTR_MEMIO_SIZE, CONFIG_SYS_POCMR1_MASK_ATTRIB, CONFIG_SYS_PCI_MSTR_IO_LOCAL,
2766 CONFIG_SYS_PCI_MSTR_IO_BUS, CONFIG_SYS_CPU_PCI_IO_START, CONFIG_SYS_PCI_MSTR_IO_SIZE, 2778 CONFIG_SYS_PCI_MSTR_IO_BUS, CONFIG_SYS_CPU_PCI_IO_START, CONFIG_SYS_PCI_MSTR_IO_SIZE,
2767 CONFIG_SYS_POCMR2_MASK_ATTRIB: (MPC826x only) 2779 CONFIG_SYS_POCMR2_MASK_ATTRIB: (MPC826x only)
2768 Overrides the default PCI memory map in arch/powerpc/cpu/mpc8260/pci.c if set. 2780 Overrides the default PCI memory map in arch/powerpc/cpu/mpc8260/pci.c if set.
2769 2781
2770 - CONFIG_PCI_DISABLE_PCIE: 2782 - CONFIG_PCI_DISABLE_PCIE:
2771 Disable PCI-Express on systems where it is supported but not 2783 Disable PCI-Express on systems where it is supported but not
2772 required. 2784 required.
2773 2785
2774 - CONFIG_SPD_EEPROM 2786 - CONFIG_SPD_EEPROM
2775 Get DDR timing information from an I2C EEPROM. Common 2787 Get DDR timing information from an I2C EEPROM. Common
2776 with pluggable memory modules such as SODIMMs 2788 with pluggable memory modules such as SODIMMs
2777 2789
2778 SPD_EEPROM_ADDRESS 2790 SPD_EEPROM_ADDRESS
2779 I2C address of the SPD EEPROM 2791 I2C address of the SPD EEPROM
2780 2792
2781 - CONFIG_SYS_SPD_BUS_NUM 2793 - CONFIG_SYS_SPD_BUS_NUM
2782 If SPD EEPROM is on an I2C bus other than the first 2794 If SPD EEPROM is on an I2C bus other than the first
2783 one, specify here. Note that the value must resolve 2795 one, specify here. Note that the value must resolve
2784 to something your driver can deal with. 2796 to something your driver can deal with.
2785 2797
2786 - CONFIG_SYS_83XX_DDR_USES_CS0 2798 - CONFIG_SYS_83XX_DDR_USES_CS0
2787 Only for 83xx systems. If specified, then DDR should 2799 Only for 83xx systems. If specified, then DDR should
2788 be configured using CS0 and CS1 instead of CS2 and CS3. 2800 be configured using CS0 and CS1 instead of CS2 and CS3.
2789 2801
2790 - CONFIG_ETHER_ON_FEC[12] 2802 - CONFIG_ETHER_ON_FEC[12]
2791 Define to enable FEC[12] on a 8xx series processor. 2803 Define to enable FEC[12] on a 8xx series processor.
2792 2804
2793 - CONFIG_FEC[12]_PHY 2805 - CONFIG_FEC[12]_PHY
2794 Define to the hardcoded PHY address which corresponds 2806 Define to the hardcoded PHY address which corresponds
2795 to the given FEC; i. e. 2807 to the given FEC; i. e.
2796 #define CONFIG_FEC1_PHY 4 2808 #define CONFIG_FEC1_PHY 4
2797 means that the PHY with address 4 is connected to FEC1 2809 means that the PHY with address 4 is connected to FEC1
2798 2810
2799 When set to -1, means to probe for first available. 2811 When set to -1, means to probe for first available.
2800 2812
2801 - CONFIG_FEC[12]_PHY_NORXERR 2813 - CONFIG_FEC[12]_PHY_NORXERR
2802 The PHY does not have a RXERR line (RMII only). 2814 The PHY does not have a RXERR line (RMII only).
2803 (so program the FEC to ignore it). 2815 (so program the FEC to ignore it).
2804 2816
2805 - CONFIG_RMII 2817 - CONFIG_RMII
2806 Enable RMII mode for all FECs. 2818 Enable RMII mode for all FECs.
2807 Note that this is a global option, we can't 2819 Note that this is a global option, we can't
2808 have one FEC in standard MII mode and another in RMII mode. 2820 have one FEC in standard MII mode and another in RMII mode.
2809 2821
2810 - CONFIG_CRC32_VERIFY 2822 - CONFIG_CRC32_VERIFY
2811 Add a verify option to the crc32 command. 2823 Add a verify option to the crc32 command.
2812 The syntax is: 2824 The syntax is:
2813 2825
2814 => crc32 -v <address> <count> <crc32> 2826 => crc32 -v <address> <count> <crc32>
2815 2827
2816 Where address/count indicate a memory area 2828 Where address/count indicate a memory area
2817 and crc32 is the correct crc32 which the 2829 and crc32 is the correct crc32 which the
2818 area should have. 2830 area should have.
2819 2831
2820 - CONFIG_LOOPW 2832 - CONFIG_LOOPW
2821 Add the "loopw" memory command. This only takes effect if 2833 Add the "loopw" memory command. This only takes effect if
2822 the memory commands are activated globally (CONFIG_CMD_MEM). 2834 the memory commands are activated globally (CONFIG_CMD_MEM).
2823 2835
2824 - CONFIG_MX_CYCLIC 2836 - CONFIG_MX_CYCLIC
2825 Add the "mdc" and "mwc" memory commands. These are cyclic 2837 Add the "mdc" and "mwc" memory commands. These are cyclic
2826 "md/mw" commands. 2838 "md/mw" commands.
2827 Examples: 2839 Examples:
2828 2840
2829 => mdc.b 10 4 500 2841 => mdc.b 10 4 500
2830 This command will print 4 bytes (10,11,12,13) each 500 ms. 2842 This command will print 4 bytes (10,11,12,13) each 500 ms.
2831 2843
2832 => mwc.l 100 12345678 10 2844 => mwc.l 100 12345678 10
2833 This command will write 12345678 to address 100 all 10 ms. 2845 This command will write 12345678 to address 100 all 10 ms.
2834 2846
2835 This only takes effect if the memory commands are activated 2847 This only takes effect if the memory commands are activated
2836 globally (CONFIG_CMD_MEM). 2848 globally (CONFIG_CMD_MEM).
2837 2849
2838 - CONFIG_SKIP_LOWLEVEL_INIT 2850 - CONFIG_SKIP_LOWLEVEL_INIT
2839 [ARM only] If this variable is defined, then certain 2851 [ARM only] If this variable is defined, then certain
2840 low level initializations (like setting up the memory 2852 low level initializations (like setting up the memory
2841 controller) are omitted and/or U-Boot does not 2853 controller) are omitted and/or U-Boot does not
2842 relocate itself into RAM. 2854 relocate itself into RAM.
2843 2855
2844 Normally this variable MUST NOT be defined. The only 2856 Normally this variable MUST NOT be defined. The only
2845 exception is when U-Boot is loaded (to RAM) by some 2857 exception is when U-Boot is loaded (to RAM) by some
2846 other boot loader or by a debugger which performs 2858 other boot loader or by a debugger which performs
2847 these initializations itself. 2859 these initializations itself.
2848 2860
2849 - CONFIG_PRELOADER 2861 - CONFIG_PRELOADER
2850 Modifies the behaviour of start.S when compiling a loader 2862 Modifies the behaviour of start.S when compiling a loader
2851 that is executed before the actual U-Boot. E.g. when 2863 that is executed before the actual U-Boot. E.g. when
2852 compiling a NAND SPL. 2864 compiling a NAND SPL.
2853 2865
2854 Building the Software: 2866 Building the Software:
2855 ====================== 2867 ======================
2856 2868
2857 Building U-Boot has been tested in several native build environments 2869 Building U-Boot has been tested in several native build environments
2858 and in many different cross environments. Of course we cannot support 2870 and in many different cross environments. Of course we cannot support
2859 all possibly existing versions of cross development tools in all 2871 all possibly existing versions of cross development tools in all
2860 (potentially obsolete) versions. In case of tool chain problems we 2872 (potentially obsolete) versions. In case of tool chain problems we
2861 recommend to use the ELDK (see http://www.denx.de/wiki/DULG/ELDK) 2873 recommend to use the ELDK (see http://www.denx.de/wiki/DULG/ELDK)
2862 which is extensively used to build and test U-Boot. 2874 which is extensively used to build and test U-Boot.
2863 2875
2864 If you are not using a native environment, it is assumed that you 2876 If you are not using a native environment, it is assumed that you
2865 have GNU cross compiling tools available in your path. In this case, 2877 have GNU cross compiling tools available in your path. In this case,
2866 you must set the environment variable CROSS_COMPILE in your shell. 2878 you must set the environment variable CROSS_COMPILE in your shell.
2867 Note that no changes to the Makefile or any other source files are 2879 Note that no changes to the Makefile or any other source files are
2868 necessary. For example using the ELDK on a 4xx CPU, please enter: 2880 necessary. For example using the ELDK on a 4xx CPU, please enter:
2869 2881
2870 $ CROSS_COMPILE=ppc_4xx- 2882 $ CROSS_COMPILE=ppc_4xx-
2871 $ export CROSS_COMPILE 2883 $ export CROSS_COMPILE
2872 2884
2873 Note: If you wish to generate Windows versions of the utilities in 2885 Note: If you wish to generate Windows versions of the utilities in
2874 the tools directory you can use the MinGW toolchain 2886 the tools directory you can use the MinGW toolchain
2875 (http://www.mingw.org). Set your HOST tools to the MinGW 2887 (http://www.mingw.org). Set your HOST tools to the MinGW
2876 toolchain and execute 'make tools'. For example: 2888 toolchain and execute 'make tools'. For example:
2877 2889
2878 $ make HOSTCC=i586-mingw32msvc-gcc HOSTSTRIP=i586-mingw32msvc-strip tools 2890 $ make HOSTCC=i586-mingw32msvc-gcc HOSTSTRIP=i586-mingw32msvc-strip tools
2879 2891
2880 Binaries such as tools/mkimage.exe will be created which can 2892 Binaries such as tools/mkimage.exe will be created which can
2881 be executed on computers running Windows. 2893 be executed on computers running Windows.
2882 2894
2883 U-Boot is intended to be simple to build. After installing the 2895 U-Boot is intended to be simple to build. After installing the
2884 sources you must configure U-Boot for one specific board type. This 2896 sources you must configure U-Boot for one specific board type. This
2885 is done by typing: 2897 is done by typing:
2886 2898
2887 make NAME_config 2899 make NAME_config
2888 2900
2889 where "NAME_config" is the name of one of the existing configu- 2901 where "NAME_config" is the name of one of the existing configu-
2890 rations; see the main Makefile for supported names. 2902 rations; see the main Makefile for supported names.
2891 2903
2892 Note: for some board special configuration names may exist; check if 2904 Note: for some board special configuration names may exist; check if
2893 additional information is available from the board vendor; for 2905 additional information is available from the board vendor; for
2894 instance, the TQM823L systems are available without (standard) 2906 instance, the TQM823L systems are available without (standard)
2895 or with LCD support. You can select such additional "features" 2907 or with LCD support. You can select such additional "features"
2896 when choosing the configuration, i. e. 2908 when choosing the configuration, i. e.
2897 2909
2898 make TQM823L_config 2910 make TQM823L_config
2899 - will configure for a plain TQM823L, i. e. no LCD support 2911 - will configure for a plain TQM823L, i. e. no LCD support
2900 2912
2901 make TQM823L_LCD_config 2913 make TQM823L_LCD_config
2902 - will configure for a TQM823L with U-Boot console on LCD 2914 - will configure for a TQM823L with U-Boot console on LCD
2903 2915
2904 etc. 2916 etc.
2905 2917
2906 2918
2907 Finally, type "make all", and you should get some working U-Boot 2919 Finally, type "make all", and you should get some working U-Boot
2908 images ready for download to / installation on your system: 2920 images ready for download to / installation on your system:
2909 2921
2910 - "u-boot.bin" is a raw binary image 2922 - "u-boot.bin" is a raw binary image
2911 - "u-boot" is an image in ELF binary format 2923 - "u-boot" is an image in ELF binary format
2912 - "u-boot.srec" is in Motorola S-Record format 2924 - "u-boot.srec" is in Motorola S-Record format
2913 2925
2914 By default the build is performed locally and the objects are saved 2926 By default the build is performed locally and the objects are saved
2915 in the source directory. One of the two methods can be used to change 2927 in the source directory. One of the two methods can be used to change
2916 this behavior and build U-Boot to some external directory: 2928 this behavior and build U-Boot to some external directory:
2917 2929
2918 1. Add O= to the make command line invocations: 2930 1. Add O= to the make command line invocations:
2919 2931
2920 make O=/tmp/build distclean 2932 make O=/tmp/build distclean
2921 make O=/tmp/build NAME_config 2933 make O=/tmp/build NAME_config
2922 make O=/tmp/build all 2934 make O=/tmp/build all
2923 2935
2924 2. Set environment variable BUILD_DIR to point to the desired location: 2936 2. Set environment variable BUILD_DIR to point to the desired location:
2925 2937
2926 export BUILD_DIR=/tmp/build 2938 export BUILD_DIR=/tmp/build
2927 make distclean 2939 make distclean
2928 make NAME_config 2940 make NAME_config
2929 make all 2941 make all
2930 2942
2931 Note that the command line "O=" setting overrides the BUILD_DIR environment 2943 Note that the command line "O=" setting overrides the BUILD_DIR environment
2932 variable. 2944 variable.
2933 2945
2934 2946
2935 Please be aware that the Makefiles assume you are using GNU make, so 2947 Please be aware that the Makefiles assume you are using GNU make, so
2936 for instance on NetBSD you might need to use "gmake" instead of 2948 for instance on NetBSD you might need to use "gmake" instead of
2937 native "make". 2949 native "make".
2938 2950
2939 2951
2940 If the system board that you have is not listed, then you will need 2952 If the system board that you have is not listed, then you will need
2941 to port U-Boot to your hardware platform. To do this, follow these 2953 to port U-Boot to your hardware platform. To do this, follow these
2942 steps: 2954 steps:
2943 2955
2944 1. Add a new configuration option for your board to the toplevel 2956 1. Add a new configuration option for your board to the toplevel
2945 "Makefile" and to the "MAKEALL" script, using the existing 2957 "Makefile" and to the "MAKEALL" script, using the existing
2946 entries as examples. Note that here and at many other places 2958 entries as examples. Note that here and at many other places
2947 boards and other names are listed in alphabetical sort order. Please 2959 boards and other names are listed in alphabetical sort order. Please
2948 keep this order. 2960 keep this order.
2949 2. Create a new directory to hold your board specific code. Add any 2961 2. Create a new directory to hold your board specific code. Add any
2950 files you need. In your board directory, you will need at least 2962 files you need. In your board directory, you will need at least
2951 the "Makefile", a "<board>.c", "flash.c" and "u-boot.lds". 2963 the "Makefile", a "<board>.c", "flash.c" and "u-boot.lds".
2952 3. Create a new configuration file "include/configs/<board>.h" for 2964 3. Create a new configuration file "include/configs/<board>.h" for
2953 your board 2965 your board
2954 3. If you're porting U-Boot to a new CPU, then also create a new 2966 3. If you're porting U-Boot to a new CPU, then also create a new
2955 directory to hold your CPU specific code. Add any files you need. 2967 directory to hold your CPU specific code. Add any files you need.
2956 4. Run "make <board>_config" with your new name. 2968 4. Run "make <board>_config" with your new name.
2957 5. Type "make", and you should get a working "u-boot.srec" file 2969 5. Type "make", and you should get a working "u-boot.srec" file
2958 to be installed on your target system. 2970 to be installed on your target system.
2959 6. Debug and solve any problems that might arise. 2971 6. Debug and solve any problems that might arise.
2960 [Of course, this last step is much harder than it sounds.] 2972 [Of course, this last step is much harder than it sounds.]
2961 2973
2962 2974
2963 Testing of U-Boot Modifications, Ports to New Hardware, etc.: 2975 Testing of U-Boot Modifications, Ports to New Hardware, etc.:
2964 ============================================================== 2976 ==============================================================
2965 2977
2966 If you have modified U-Boot sources (for instance added a new board 2978 If you have modified U-Boot sources (for instance added a new board
2967 or support for new devices, a new CPU, etc.) you are expected to 2979 or support for new devices, a new CPU, etc.) you are expected to
2968 provide feedback to the other developers. The feedback normally takes 2980 provide feedback to the other developers. The feedback normally takes
2969 the form of a "patch", i. e. a context diff against a certain (latest 2981 the form of a "patch", i. e. a context diff against a certain (latest
2970 official or latest in the git repository) version of U-Boot sources. 2982 official or latest in the git repository) version of U-Boot sources.
2971 2983
2972 But before you submit such a patch, please verify that your modifi- 2984 But before you submit such a patch, please verify that your modifi-
2973 cation did not break existing code. At least make sure that *ALL* of 2985 cation did not break existing code. At least make sure that *ALL* of
2974 the supported boards compile WITHOUT ANY compiler warnings. To do so, 2986 the supported boards compile WITHOUT ANY compiler warnings. To do so,
2975 just run the "MAKEALL" script, which will configure and build U-Boot 2987 just run the "MAKEALL" script, which will configure and build U-Boot
2976 for ALL supported system. Be warned, this will take a while. You can 2988 for ALL supported system. Be warned, this will take a while. You can
2977 select which (cross) compiler to use by passing a `CROSS_COMPILE' 2989 select which (cross) compiler to use by passing a `CROSS_COMPILE'
2978 environment variable to the script, i. e. to use the ELDK cross tools 2990 environment variable to the script, i. e. to use the ELDK cross tools
2979 you can type 2991 you can type
2980 2992
2981 CROSS_COMPILE=ppc_8xx- MAKEALL 2993 CROSS_COMPILE=ppc_8xx- MAKEALL
2982 2994
2983 or to build on a native PowerPC system you can type 2995 or to build on a native PowerPC system you can type
2984 2996
2985 CROSS_COMPILE=' ' MAKEALL 2997 CROSS_COMPILE=' ' MAKEALL
2986 2998
2987 When using the MAKEALL script, the default behaviour is to build 2999 When using the MAKEALL script, the default behaviour is to build
2988 U-Boot in the source directory. This location can be changed by 3000 U-Boot in the source directory. This location can be changed by
2989 setting the BUILD_DIR environment variable. Also, for each target 3001 setting the BUILD_DIR environment variable. Also, for each target
2990 built, the MAKEALL script saves two log files (<target>.ERR and 3002 built, the MAKEALL script saves two log files (<target>.ERR and
2991 <target>.MAKEALL) in the <source dir>/LOG directory. This default 3003 <target>.MAKEALL) in the <source dir>/LOG directory. This default
2992 location can be changed by setting the MAKEALL_LOGDIR environment 3004 location can be changed by setting the MAKEALL_LOGDIR environment
2993 variable. For example: 3005 variable. For example:
2994 3006
2995 export BUILD_DIR=/tmp/build 3007 export BUILD_DIR=/tmp/build
2996 export MAKEALL_LOGDIR=/tmp/log 3008 export MAKEALL_LOGDIR=/tmp/log
2997 CROSS_COMPILE=ppc_8xx- MAKEALL 3009 CROSS_COMPILE=ppc_8xx- MAKEALL
2998 3010
2999 With the above settings build objects are saved in the /tmp/build, 3011 With the above settings build objects are saved in the /tmp/build,
3000 log files are saved in the /tmp/log and the source tree remains clean 3012 log files are saved in the /tmp/log and the source tree remains clean
3001 during the whole build process. 3013 during the whole build process.
3002 3014
3003 3015
3004 See also "U-Boot Porting Guide" below. 3016 See also "U-Boot Porting Guide" below.
3005 3017
3006 3018
3007 Monitor Commands - Overview: 3019 Monitor Commands - Overview:
3008 ============================ 3020 ============================
3009 3021
3010 go - start application at address 'addr' 3022 go - start application at address 'addr'
3011 run - run commands in an environment variable 3023 run - run commands in an environment variable
3012 bootm - boot application image from memory 3024 bootm - boot application image from memory
3013 bootp - boot image via network using BootP/TFTP protocol 3025 bootp - boot image via network using BootP/TFTP protocol
3014 tftpboot- boot image via network using TFTP protocol 3026 tftpboot- boot image via network using TFTP protocol
3015 and env variables "ipaddr" and "serverip" 3027 and env variables "ipaddr" and "serverip"
3016 (and eventually "gatewayip") 3028 (and eventually "gatewayip")
3017 rarpboot- boot image via network using RARP/TFTP protocol 3029 rarpboot- boot image via network using RARP/TFTP protocol
3018 diskboot- boot from IDE devicebootd - boot default, i.e., run 'bootcmd' 3030 diskboot- boot from IDE devicebootd - boot default, i.e., run 'bootcmd'
3019 loads - load S-Record file over serial line 3031 loads - load S-Record file over serial line
3020 loadb - load binary file over serial line (kermit mode) 3032 loadb - load binary file over serial line (kermit mode)
3021 md - memory display 3033 md - memory display
3022 mm - memory modify (auto-incrementing) 3034 mm - memory modify (auto-incrementing)
3023 nm - memory modify (constant address) 3035 nm - memory modify (constant address)
3024 mw - memory write (fill) 3036 mw - memory write (fill)
3025 cp - memory copy 3037 cp - memory copy
3026 cmp - memory compare 3038 cmp - memory compare
3027 crc32 - checksum calculation 3039 crc32 - checksum calculation
3028 i2c - I2C sub-system 3040 i2c - I2C sub-system
3029 sspi - SPI utility commands 3041 sspi - SPI utility commands
3030 base - print or set address offset 3042 base - print or set address offset
3031 printenv- print environment variables 3043 printenv- print environment variables
3032 setenv - set environment variables 3044 setenv - set environment variables
3033 saveenv - save environment variables to persistent storage 3045 saveenv - save environment variables to persistent storage
3034 protect - enable or disable FLASH write protection 3046 protect - enable or disable FLASH write protection
3035 erase - erase FLASH memory 3047 erase - erase FLASH memory
3036 flinfo - print FLASH memory information 3048 flinfo - print FLASH memory information
3037 bdinfo - print Board Info structure 3049 bdinfo - print Board Info structure
3038 iminfo - print header information for application image 3050 iminfo - print header information for application image
3039 coninfo - print console devices and informations 3051 coninfo - print console devices and informations
3040 ide - IDE sub-system 3052 ide - IDE sub-system
3041 loop - infinite loop on address range 3053 loop - infinite loop on address range
3042 loopw - infinite write loop on address range 3054 loopw - infinite write loop on address range
3043 mtest - simple RAM test 3055 mtest - simple RAM test
3044 icache - enable or disable instruction cache 3056 icache - enable or disable instruction cache
3045 dcache - enable or disable data cache 3057 dcache - enable or disable data cache
3046 reset - Perform RESET of the CPU 3058 reset - Perform RESET of the CPU
3047 echo - echo args to console 3059 echo - echo args to console
3048 version - print monitor version 3060 version - print monitor version
3049 help - print online help 3061 help - print online help
3050 ? - alias for 'help' 3062 ? - alias for 'help'
3051 3063
3052 3064
3053 Monitor Commands - Detailed Description: 3065 Monitor Commands - Detailed Description:
3054 ======================================== 3066 ========================================
3055 3067
3056 TODO. 3068 TODO.
3057 3069
3058 For now: just type "help <command>". 3070 For now: just type "help <command>".
3059 3071
3060 3072
3061 Environment Variables: 3073 Environment Variables:
3062 ====================== 3074 ======================
3063 3075
3064 U-Boot supports user configuration using Environment Variables which 3076 U-Boot supports user configuration using Environment Variables which
3065 can be made persistent by saving to Flash memory. 3077 can be made persistent by saving to Flash memory.
3066 3078
3067 Environment Variables are set using "setenv", printed using 3079 Environment Variables are set using "setenv", printed using
3068 "printenv", and saved to Flash using "saveenv". Using "setenv" 3080 "printenv", and saved to Flash using "saveenv". Using "setenv"
3069 without a value can be used to delete a variable from the 3081 without a value can be used to delete a variable from the
3070 environment. As long as you don't save the environment you are 3082 environment. As long as you don't save the environment you are
3071 working with an in-memory copy. In case the Flash area containing the 3083 working with an in-memory copy. In case the Flash area containing the
3072 environment is erased by accident, a default environment is provided. 3084 environment is erased by accident, a default environment is provided.
3073 3085
3074 Some configuration options can be set using Environment Variables. 3086 Some configuration options can be set using Environment Variables.
3075 3087
3076 List of environment variables (most likely not complete): 3088 List of environment variables (most likely not complete):
3077 3089
3078 baudrate - see CONFIG_BAUDRATE 3090 baudrate - see CONFIG_BAUDRATE
3079 3091
3080 bootdelay - see CONFIG_BOOTDELAY 3092 bootdelay - see CONFIG_BOOTDELAY
3081 3093
3082 bootcmd - see CONFIG_BOOTCOMMAND 3094 bootcmd - see CONFIG_BOOTCOMMAND
3083 3095
3084 bootargs - Boot arguments when booting an RTOS image 3096 bootargs - Boot arguments when booting an RTOS image
3085 3097
3086 bootfile - Name of the image to load with TFTP 3098 bootfile - Name of the image to load with TFTP
3087 3099
3088 bootm_low - Memory range available for image processing in the bootm 3100 bootm_low - Memory range available for image processing in the bootm
3089 command can be restricted. This variable is given as 3101 command can be restricted. This variable is given as
3090 a hexadecimal number and defines lowest address allowed 3102 a hexadecimal number and defines lowest address allowed
3091 for use by the bootm command. See also "bootm_size" 3103 for use by the bootm command. See also "bootm_size"
3092 environment variable. Address defined by "bootm_low" is 3104 environment variable. Address defined by "bootm_low" is
3093 also the base of the initial memory mapping for the Linux 3105 also the base of the initial memory mapping for the Linux
3094 kernel -- see the description of CONFIG_SYS_BOOTMAPSZ. 3106 kernel -- see the description of CONFIG_SYS_BOOTMAPSZ.
3095 3107
3096 bootm_size - Memory range available for image processing in the bootm 3108 bootm_size - Memory range available for image processing in the bootm
3097 command can be restricted. This variable is given as 3109 command can be restricted. This variable is given as
3098 a hexadecimal number and defines the size of the region 3110 a hexadecimal number and defines the size of the region
3099 allowed for use by the bootm command. See also "bootm_low" 3111 allowed for use by the bootm command. See also "bootm_low"
3100 environment variable. 3112 environment variable.
3101 3113
3102 updatefile - Location of the software update file on a TFTP server, used 3114 updatefile - Location of the software update file on a TFTP server, used
3103 by the automatic software update feature. Please refer to 3115 by the automatic software update feature. Please refer to
3104 documentation in doc/README.update for more details. 3116 documentation in doc/README.update for more details.
3105 3117
3106 autoload - if set to "no" (any string beginning with 'n'), 3118 autoload - if set to "no" (any string beginning with 'n'),
3107 "bootp" will just load perform a lookup of the 3119 "bootp" will just load perform a lookup of the
3108 configuration from the BOOTP server, but not try to 3120 configuration from the BOOTP server, but not try to
3109 load any image using TFTP 3121 load any image using TFTP
3110 3122
3111 autostart - if set to "yes", an image loaded using the "bootp", 3123 autostart - if set to "yes", an image loaded using the "bootp",
3112 "rarpboot", "tftpboot" or "diskboot" commands will 3124 "rarpboot", "tftpboot" or "diskboot" commands will
3113 be automatically started (by internally calling 3125 be automatically started (by internally calling
3114 "bootm") 3126 "bootm")
3115 3127
3116 If set to "no", a standalone image passed to the 3128 If set to "no", a standalone image passed to the
3117 "bootm" command will be copied to the load address 3129 "bootm" command will be copied to the load address
3118 (and eventually uncompressed), but NOT be started. 3130 (and eventually uncompressed), but NOT be started.
3119 This can be used to load and uncompress arbitrary 3131 This can be used to load and uncompress arbitrary
3120 data. 3132 data.
3121 3133
3122 i2cfast - (PPC405GP|PPC405EP only) 3134 i2cfast - (PPC405GP|PPC405EP only)
3123 if set to 'y' configures Linux I2C driver for fast 3135 if set to 'y' configures Linux I2C driver for fast
3124 mode (400kHZ). This environment variable is used in 3136 mode (400kHZ). This environment variable is used in
3125 initialization code. So, for changes to be effective 3137 initialization code. So, for changes to be effective
3126 it must be saved and board must be reset. 3138 it must be saved and board must be reset.
3127 3139
3128 initrd_high - restrict positioning of initrd images: 3140 initrd_high - restrict positioning of initrd images:
3129 If this variable is not set, initrd images will be 3141 If this variable is not set, initrd images will be
3130 copied to the highest possible address in RAM; this 3142 copied to the highest possible address in RAM; this
3131 is usually what you want since it allows for 3143 is usually what you want since it allows for
3132 maximum initrd size. If for some reason you want to 3144 maximum initrd size. If for some reason you want to
3133 make sure that the initrd image is loaded below the 3145 make sure that the initrd image is loaded below the
3134 CONFIG_SYS_BOOTMAPSZ limit, you can set this environment 3146 CONFIG_SYS_BOOTMAPSZ limit, you can set this environment
3135 variable to a value of "no" or "off" or "0". 3147 variable to a value of "no" or "off" or "0".
3136 Alternatively, you can set it to a maximum upper 3148 Alternatively, you can set it to a maximum upper
3137 address to use (U-Boot will still check that it 3149 address to use (U-Boot will still check that it
3138 does not overwrite the U-Boot stack and data). 3150 does not overwrite the U-Boot stack and data).
3139 3151
3140 For instance, when you have a system with 16 MB 3152 For instance, when you have a system with 16 MB
3141 RAM, and want to reserve 4 MB from use by Linux, 3153 RAM, and want to reserve 4 MB from use by Linux,
3142 you can do this by adding "mem=12M" to the value of 3154 you can do this by adding "mem=12M" to the value of
3143 the "bootargs" variable. However, now you must make 3155 the "bootargs" variable. However, now you must make
3144 sure that the initrd image is placed in the first 3156 sure that the initrd image is placed in the first
3145 12 MB as well - this can be done with 3157 12 MB as well - this can be done with
3146 3158
3147 setenv initrd_high 00c00000 3159 setenv initrd_high 00c00000
3148 3160
3149 If you set initrd_high to 0xFFFFFFFF, this is an 3161 If you set initrd_high to 0xFFFFFFFF, this is an
3150 indication to U-Boot that all addresses are legal 3162 indication to U-Boot that all addresses are legal
3151 for the Linux kernel, including addresses in flash 3163 for the Linux kernel, including addresses in flash
3152 memory. In this case U-Boot will NOT COPY the 3164 memory. In this case U-Boot will NOT COPY the
3153 ramdisk at all. This may be useful to reduce the 3165 ramdisk at all. This may be useful to reduce the
3154 boot time on your system, but requires that this 3166 boot time on your system, but requires that this
3155 feature is supported by your Linux kernel. 3167 feature is supported by your Linux kernel.
3156 3168
3157 ipaddr - IP address; needed for tftpboot command 3169 ipaddr - IP address; needed for tftpboot command
3158 3170
3159 loadaddr - Default load address for commands like "bootp", 3171 loadaddr - Default load address for commands like "bootp",
3160 "rarpboot", "tftpboot", "loadb" or "diskboot" 3172 "rarpboot", "tftpboot", "loadb" or "diskboot"
3161 3173
3162 loads_echo - see CONFIG_LOADS_ECHO 3174 loads_echo - see CONFIG_LOADS_ECHO
3163 3175
3164 serverip - TFTP server IP address; needed for tftpboot command 3176 serverip - TFTP server IP address; needed for tftpboot command
3165 3177
3166 bootretry - see CONFIG_BOOT_RETRY_TIME 3178 bootretry - see CONFIG_BOOT_RETRY_TIME
3167 3179
3168 bootdelaykey - see CONFIG_AUTOBOOT_DELAY_STR 3180 bootdelaykey - see CONFIG_AUTOBOOT_DELAY_STR
3169 3181
3170 bootstopkey - see CONFIG_AUTOBOOT_STOP_STR 3182 bootstopkey - see CONFIG_AUTOBOOT_STOP_STR
3171 3183
3172 ethprime - When CONFIG_NET_MULTI is enabled controls which 3184 ethprime - When CONFIG_NET_MULTI is enabled controls which
3173 interface is used first. 3185 interface is used first.
3174 3186
3175 ethact - When CONFIG_NET_MULTI is enabled controls which 3187 ethact - When CONFIG_NET_MULTI is enabled controls which
3176 interface is currently active. For example you 3188 interface is currently active. For example you
3177 can do the following 3189 can do the following
3178 3190
3179 => setenv ethact FEC 3191 => setenv ethact FEC
3180 => ping 192.168.0.1 # traffic sent on FEC 3192 => ping 192.168.0.1 # traffic sent on FEC
3181 => setenv ethact SCC 3193 => setenv ethact SCC
3182 => ping 10.0.0.1 # traffic sent on SCC 3194 => ping 10.0.0.1 # traffic sent on SCC
3183 3195
3184 ethrotate - When set to "no" U-Boot does not go through all 3196 ethrotate - When set to "no" U-Boot does not go through all
3185 available network interfaces. 3197 available network interfaces.
3186 It just stays at the currently selected interface. 3198 It just stays at the currently selected interface.
3187 3199
3188 netretry - When set to "no" each network operation will 3200 netretry - When set to "no" each network operation will
3189 either succeed or fail without retrying. 3201 either succeed or fail without retrying.
3190 When set to "once" the network operation will 3202 When set to "once" the network operation will
3191 fail when all the available network interfaces 3203 fail when all the available network interfaces
3192 are tried once without success. 3204 are tried once without success.
3193 Useful on scripts which control the retry operation 3205 Useful on scripts which control the retry operation
3194 themselves. 3206 themselves.
3195 3207
3196 npe_ucode - set load address for the NPE microcode 3208 npe_ucode - set load address for the NPE microcode
3197 3209
3198 tftpsrcport - If this is set, the value is used for TFTP's 3210 tftpsrcport - If this is set, the value is used for TFTP's
3199 UDP source port. 3211 UDP source port.
3200 3212
3201 tftpdstport - If this is set, the value is used for TFTP's UDP 3213 tftpdstport - If this is set, the value is used for TFTP's UDP
3202 destination port instead of the Well Know Port 69. 3214 destination port instead of the Well Know Port 69.
3203 3215
3204 tftpblocksize - Block size to use for TFTP transfers; if not set, 3216 tftpblocksize - Block size to use for TFTP transfers; if not set,
3205 we use the TFTP server's default block size 3217 we use the TFTP server's default block size
3206 3218
3207 tftptimeout - Retransmission timeout for TFTP packets (in milli- 3219 tftptimeout - Retransmission timeout for TFTP packets (in milli-
3208 seconds, minimum value is 1000 = 1 second). Defines 3220 seconds, minimum value is 1000 = 1 second). Defines
3209 when a packet is considered to be lost so it has to 3221 when a packet is considered to be lost so it has to
3210 be retransmitted. The default is 5000 = 5 seconds. 3222 be retransmitted. The default is 5000 = 5 seconds.
3211 Lowering this value may make downloads succeed 3223 Lowering this value may make downloads succeed
3212 faster in networks with high packet loss rates or 3224 faster in networks with high packet loss rates or
3213 with unreliable TFTP servers. 3225 with unreliable TFTP servers.
3214 3226
3215 vlan - When set to a value < 4095 the traffic over 3227 vlan - When set to a value < 4095 the traffic over
3216 Ethernet is encapsulated/received over 802.1q 3228 Ethernet is encapsulated/received over 802.1q
3217 VLAN tagged frames. 3229 VLAN tagged frames.
3218 3230
3219 The following environment variables may be used and automatically 3231 The following environment variables may be used and automatically
3220 updated by the network boot commands ("bootp" and "rarpboot"), 3232 updated by the network boot commands ("bootp" and "rarpboot"),
3221 depending the information provided by your boot server: 3233 depending the information provided by your boot server:
3222 3234
3223 bootfile - see above 3235 bootfile - see above
3224 dnsip - IP address of your Domain Name Server 3236 dnsip - IP address of your Domain Name Server
3225 dnsip2 - IP address of your secondary Domain Name Server 3237 dnsip2 - IP address of your secondary Domain Name Server
3226 gatewayip - IP address of the Gateway (Router) to use 3238 gatewayip - IP address of the Gateway (Router) to use
3227 hostname - Target hostname 3239 hostname - Target hostname
3228 ipaddr - see above 3240 ipaddr - see above
3229 netmask - Subnet Mask 3241 netmask - Subnet Mask
3230 rootpath - Pathname of the root filesystem on the NFS server 3242 rootpath - Pathname of the root filesystem on the NFS server
3231 serverip - see above 3243 serverip - see above
3232 3244
3233 3245
3234 There are two special Environment Variables: 3246 There are two special Environment Variables:
3235 3247
3236 serial# - contains hardware identification information such 3248 serial# - contains hardware identification information such
3237 as type string and/or serial number 3249 as type string and/or serial number
3238 ethaddr - Ethernet address 3250 ethaddr - Ethernet address
3239 3251
3240 These variables can be set only once (usually during manufacturing of 3252 These variables can be set only once (usually during manufacturing of
3241 the board). U-Boot refuses to delete or overwrite these variables 3253 the board). U-Boot refuses to delete or overwrite these variables
3242 once they have been set once. 3254 once they have been set once.
3243 3255
3244 3256
3245 Further special Environment Variables: 3257 Further special Environment Variables:
3246 3258
3247 ver - Contains the U-Boot version string as printed 3259 ver - Contains the U-Boot version string as printed
3248 with the "version" command. This variable is 3260 with the "version" command. This variable is
3249 readonly (see CONFIG_VERSION_VARIABLE). 3261 readonly (see CONFIG_VERSION_VARIABLE).
3250 3262
3251 3263
3252 Please note that changes to some configuration parameters may take 3264 Please note that changes to some configuration parameters may take
3253 only effect after the next boot (yes, that's just like Windoze :-). 3265 only effect after the next boot (yes, that's just like Windoze :-).
3254 3266
3255 3267
3256 Command Line Parsing: 3268 Command Line Parsing:
3257 ===================== 3269 =====================
3258 3270
3259 There are two different command line parsers available with U-Boot: 3271 There are two different command line parsers available with U-Boot:
3260 the old "simple" one, and the much more powerful "hush" shell: 3272 the old "simple" one, and the much more powerful "hush" shell:
3261 3273
3262 Old, simple command line parser: 3274 Old, simple command line parser:
3263 -------------------------------- 3275 --------------------------------
3264 3276
3265 - supports environment variables (through setenv / saveenv commands) 3277 - supports environment variables (through setenv / saveenv commands)
3266 - several commands on one line, separated by ';' 3278 - several commands on one line, separated by ';'
3267 - variable substitution using "... ${name} ..." syntax 3279 - variable substitution using "... ${name} ..." syntax
3268 - special characters ('$', ';') can be escaped by prefixing with '\', 3280 - special characters ('$', ';') can be escaped by prefixing with '\',
3269 for example: 3281 for example:
3270 setenv bootcmd bootm \${address} 3282 setenv bootcmd bootm \${address}
3271 - You can also escape text by enclosing in single apostrophes, for example: 3283 - You can also escape text by enclosing in single apostrophes, for example:
3272 setenv addip 'setenv bootargs $bootargs ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname::off' 3284 setenv addip 'setenv bootargs $bootargs ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname::off'
3273 3285
3274 Hush shell: 3286 Hush shell:
3275 ----------- 3287 -----------
3276 3288
3277 - similar to Bourne shell, with control structures like 3289 - similar to Bourne shell, with control structures like
3278 if...then...else...fi, for...do...done; while...do...done, 3290 if...then...else...fi, for...do...done; while...do...done,
3279 until...do...done, ... 3291 until...do...done, ...
3280 - supports environment ("global") variables (through setenv / saveenv 3292 - supports environment ("global") variables (through setenv / saveenv
3281 commands) and local shell variables (through standard shell syntax 3293 commands) and local shell variables (through standard shell syntax
3282 "name=value"); only environment variables can be used with "run" 3294 "name=value"); only environment variables can be used with "run"
3283 command 3295 command
3284 3296
3285 General rules: 3297 General rules:
3286 -------------- 3298 --------------
3287 3299
3288 (1) If a command line (or an environment variable executed by a "run" 3300 (1) If a command line (or an environment variable executed by a "run"
3289 command) contains several commands separated by semicolon, and 3301 command) contains several commands separated by semicolon, and
3290 one of these commands fails, then the remaining commands will be 3302 one of these commands fails, then the remaining commands will be
3291 executed anyway. 3303 executed anyway.
3292 3304
3293 (2) If you execute several variables with one call to run (i. e. 3305 (2) If you execute several variables with one call to run (i. e.
3294 calling run with a list of variables as arguments), any failing 3306 calling run with a list of variables as arguments), any failing
3295 command will cause "run" to terminate, i. e. the remaining 3307 command will cause "run" to terminate, i. e. the remaining
3296 variables are not executed. 3308 variables are not executed.
3297 3309
3298 Note for Redundant Ethernet Interfaces: 3310 Note for Redundant Ethernet Interfaces:
3299 ======================================= 3311 =======================================
3300 3312
3301 Some boards come with redundant Ethernet interfaces; U-Boot supports 3313 Some boards come with redundant Ethernet interfaces; U-Boot supports
3302 such configurations and is capable of automatic selection of a 3314 such configurations and is capable of automatic selection of a
3303 "working" interface when needed. MAC assignment works as follows: 3315 "working" interface when needed. MAC assignment works as follows:
3304 3316
3305 Network interfaces are numbered eth0, eth1, eth2, ... Corresponding 3317 Network interfaces are numbered eth0, eth1, eth2, ... Corresponding
3306 MAC addresses can be stored in the environment as "ethaddr" (=>eth0), 3318 MAC addresses can be stored in the environment as "ethaddr" (=>eth0),
3307 "eth1addr" (=>eth1), "eth2addr", ... 3319 "eth1addr" (=>eth1), "eth2addr", ...
3308 3320
3309 If the network interface stores some valid MAC address (for instance 3321 If the network interface stores some valid MAC address (for instance
3310 in SROM), this is used as default address if there is NO correspon- 3322 in SROM), this is used as default address if there is NO correspon-
3311 ding setting in the environment; if the corresponding environment 3323 ding setting in the environment; if the corresponding environment
3312 variable is set, this overrides the settings in the card; that means: 3324 variable is set, this overrides the settings in the card; that means:
3313 3325
3314 o If the SROM has a valid MAC address, and there is no address in the 3326 o If the SROM has a valid MAC address, and there is no address in the
3315 environment, the SROM's address is used. 3327 environment, the SROM's address is used.
3316 3328
3317 o If there is no valid address in the SROM, and a definition in the 3329 o If there is no valid address in the SROM, and a definition in the
3318 environment exists, then the value from the environment variable is 3330 environment exists, then the value from the environment variable is
3319 used. 3331 used.
3320 3332
3321 o If both the SROM and the environment contain a MAC address, and 3333 o If both the SROM and the environment contain a MAC address, and
3322 both addresses are the same, this MAC address is used. 3334 both addresses are the same, this MAC address is used.
3323 3335
3324 o If both the SROM and the environment contain a MAC address, and the 3336 o If both the SROM and the environment contain a MAC address, and the
3325 addresses differ, the value from the environment is used and a 3337 addresses differ, the value from the environment is used and a
3326 warning is printed. 3338 warning is printed.
3327 3339
3328 o If neither SROM nor the environment contain a MAC address, an error 3340 o If neither SROM nor the environment contain a MAC address, an error
3329 is raised. 3341 is raised.
3330 3342
3331 If Ethernet drivers implement the 'write_hwaddr' function, valid MAC addresses 3343 If Ethernet drivers implement the 'write_hwaddr' function, valid MAC addresses
3332 will be programmed into hardware as part of the initialization process. This 3344 will be programmed into hardware as part of the initialization process. This
3333 may be skipped by setting the appropriate 'ethmacskip' environment variable. 3345 may be skipped by setting the appropriate 'ethmacskip' environment variable.
3334 The naming convention is as follows: 3346 The naming convention is as follows:
3335 "ethmacskip" (=>eth0), "eth1macskip" (=>eth1) etc. 3347 "ethmacskip" (=>eth0), "eth1macskip" (=>eth1) etc.
3336 3348
3337 Image Formats: 3349 Image Formats:
3338 ============== 3350 ==============
3339 3351
3340 U-Boot is capable of booting (and performing other auxiliary operations on) 3352 U-Boot is capable of booting (and performing other auxiliary operations on)
3341 images in two formats: 3353 images in two formats:
3342 3354
3343 New uImage format (FIT) 3355 New uImage format (FIT)
3344 ----------------------- 3356 -----------------------
3345 3357
3346 Flexible and powerful format based on Flattened Image Tree -- FIT (similar 3358 Flexible and powerful format based on Flattened Image Tree -- FIT (similar
3347 to Flattened Device Tree). It allows the use of images with multiple 3359 to Flattened Device Tree). It allows the use of images with multiple
3348 components (several kernels, ramdisks, etc.), with contents protected by 3360 components (several kernels, ramdisks, etc.), with contents protected by
3349 SHA1, MD5 or CRC32. More details are found in the doc/uImage.FIT directory. 3361 SHA1, MD5 or CRC32. More details are found in the doc/uImage.FIT directory.
3350 3362
3351 3363
3352 Old uImage format 3364 Old uImage format
3353 ----------------- 3365 -----------------
3354 3366
3355 Old image format is based on binary files which can be basically anything, 3367 Old image format is based on binary files which can be basically anything,
3356 preceded by a special header; see the definitions in include/image.h for 3368 preceded by a special header; see the definitions in include/image.h for
3357 details; basically, the header defines the following image properties: 3369 details; basically, the header defines the following image properties:
3358 3370
3359 * Target Operating System (Provisions for OpenBSD, NetBSD, FreeBSD, 3371 * Target Operating System (Provisions for OpenBSD, NetBSD, FreeBSD,
3360 4.4BSD, Linux, SVR4, Esix, Solaris, Irix, SCO, Dell, NCR, VxWorks, 3372 4.4BSD, Linux, SVR4, Esix, Solaris, Irix, SCO, Dell, NCR, VxWorks,
3361 LynxOS, pSOS, QNX, RTEMS, INTEGRITY; 3373 LynxOS, pSOS, QNX, RTEMS, INTEGRITY;
3362 Currently supported: Linux, NetBSD, VxWorks, QNX, RTEMS, LynxOS, 3374 Currently supported: Linux, NetBSD, VxWorks, QNX, RTEMS, LynxOS,
3363 INTEGRITY). 3375 INTEGRITY).
3364 * Target CPU Architecture (Provisions for Alpha, ARM, AVR32, Intel x86, 3376 * Target CPU Architecture (Provisions for Alpha, ARM, AVR32, Intel x86,
3365 IA64, MIPS, Nios II, PowerPC, IBM S390, SuperH, Sparc, Sparc 64 Bit; 3377 IA64, MIPS, Nios II, PowerPC, IBM S390, SuperH, Sparc, Sparc 64 Bit;
3366 Currently supported: ARM, AVR32, Intel x86, MIPS, Nios II, PowerPC). 3378 Currently supported: ARM, AVR32, Intel x86, MIPS, Nios II, PowerPC).
3367 * Compression Type (uncompressed, gzip, bzip2) 3379 * Compression Type (uncompressed, gzip, bzip2)
3368 * Load Address 3380 * Load Address
3369 * Entry Point 3381 * Entry Point
3370 * Image Name 3382 * Image Name
3371 * Image Timestamp 3383 * Image Timestamp
3372 3384
3373 The header is marked by a special Magic Number, and both the header 3385 The header is marked by a special Magic Number, and both the header
3374 and the data portions of the image are secured against corruption by 3386 and the data portions of the image are secured against corruption by
3375 CRC32 checksums. 3387 CRC32 checksums.
3376 3388
3377 3389
3378 Linux Support: 3390 Linux Support:
3379 ============== 3391 ==============
3380 3392
3381 Although U-Boot should support any OS or standalone application 3393 Although U-Boot should support any OS or standalone application
3382 easily, the main focus has always been on Linux during the design of 3394 easily, the main focus has always been on Linux during the design of
3383 U-Boot. 3395 U-Boot.
3384 3396
3385 U-Boot includes many features that so far have been part of some 3397 U-Boot includes many features that so far have been part of some
3386 special "boot loader" code within the Linux kernel. Also, any 3398 special "boot loader" code within the Linux kernel. Also, any
3387 "initrd" images to be used are no longer part of one big Linux image; 3399 "initrd" images to be used are no longer part of one big Linux image;
3388 instead, kernel and "initrd" are separate images. This implementation 3400 instead, kernel and "initrd" are separate images. This implementation
3389 serves several purposes: 3401 serves several purposes:
3390 3402
3391 - the same features can be used for other OS or standalone 3403 - the same features can be used for other OS or standalone
3392 applications (for instance: using compressed images to reduce the 3404 applications (for instance: using compressed images to reduce the
3393 Flash memory footprint) 3405 Flash memory footprint)
3394 3406
3395 - it becomes much easier to port new Linux kernel versions because 3407 - it becomes much easier to port new Linux kernel versions because
3396 lots of low-level, hardware dependent stuff are done by U-Boot 3408 lots of low-level, hardware dependent stuff are done by U-Boot
3397 3409
3398 - the same Linux kernel image can now be used with different "initrd" 3410 - the same Linux kernel image can now be used with different "initrd"
3399 images; of course this also means that different kernel images can 3411 images; of course this also means that different kernel images can
3400 be run with the same "initrd". This makes testing easier (you don't 3412 be run with the same "initrd". This makes testing easier (you don't
3401 have to build a new "zImage.initrd" Linux image when you just 3413 have to build a new "zImage.initrd" Linux image when you just
3402 change a file in your "initrd"). Also, a field-upgrade of the 3414 change a file in your "initrd"). Also, a field-upgrade of the
3403 software is easier now. 3415 software is easier now.
3404 3416
3405 3417
3406 Linux HOWTO: 3418 Linux HOWTO:
3407 ============ 3419 ============
3408 3420
3409 Porting Linux to U-Boot based systems: 3421 Porting Linux to U-Boot based systems:
3410 --------------------------------------- 3422 ---------------------------------------
3411 3423
3412 U-Boot cannot save you from doing all the necessary modifications to 3424 U-Boot cannot save you from doing all the necessary modifications to
3413 configure the Linux device drivers for use with your target hardware 3425 configure the Linux device drivers for use with your target hardware
3414 (no, we don't intend to provide a full virtual machine interface to 3426 (no, we don't intend to provide a full virtual machine interface to
3415 Linux :-). 3427 Linux :-).
3416 3428
3417 But now you can ignore ALL boot loader code (in arch/powerpc/mbxboot). 3429 But now you can ignore ALL boot loader code (in arch/powerpc/mbxboot).
3418 3430
3419 Just make sure your machine specific header file (for instance 3431 Just make sure your machine specific header file (for instance
3420 include/asm-ppc/tqm8xx.h) includes the same definition of the Board 3432 include/asm-ppc/tqm8xx.h) includes the same definition of the Board
3421 Information structure as we define in include/asm-<arch>/u-boot.h, 3433 Information structure as we define in include/asm-<arch>/u-boot.h,
3422 and make sure that your definition of IMAP_ADDR uses the same value 3434 and make sure that your definition of IMAP_ADDR uses the same value
3423 as your U-Boot configuration in CONFIG_SYS_IMMR. 3435 as your U-Boot configuration in CONFIG_SYS_IMMR.
3424 3436
3425 3437
3426 Configuring the Linux kernel: 3438 Configuring the Linux kernel:
3427 ----------------------------- 3439 -----------------------------
3428 3440
3429 No specific requirements for U-Boot. Make sure you have some root 3441 No specific requirements for U-Boot. Make sure you have some root
3430 device (initial ramdisk, NFS) for your target system. 3442 device (initial ramdisk, NFS) for your target system.
3431 3443
3432 3444
3433 Building a Linux Image: 3445 Building a Linux Image:
3434 ----------------------- 3446 -----------------------
3435 3447
3436 With U-Boot, "normal" build targets like "zImage" or "bzImage" are 3448 With U-Boot, "normal" build targets like "zImage" or "bzImage" are
3437 not used. If you use recent kernel source, a new build target 3449 not used. If you use recent kernel source, a new build target
3438 "uImage" will exist which automatically builds an image usable by 3450 "uImage" will exist which automatically builds an image usable by
3439 U-Boot. Most older kernels also have support for a "pImage" target, 3451 U-Boot. Most older kernels also have support for a "pImage" target,
3440 which was introduced for our predecessor project PPCBoot and uses a 3452 which was introduced for our predecessor project PPCBoot and uses a
3441 100% compatible format. 3453 100% compatible format.
3442 3454
3443 Example: 3455 Example:
3444 3456
3445 make TQM850L_config 3457 make TQM850L_config
3446 make oldconfig 3458 make oldconfig
3447 make dep 3459 make dep
3448 make uImage 3460 make uImage
3449 3461
3450 The "uImage" build target uses a special tool (in 'tools/mkimage') to 3462 The "uImage" build target uses a special tool (in 'tools/mkimage') to
3451 encapsulate a compressed Linux kernel image with header information, 3463 encapsulate a compressed Linux kernel image with header information,
3452 CRC32 checksum etc. for use with U-Boot. This is what we are doing: 3464 CRC32 checksum etc. for use with U-Boot. This is what we are doing:
3453 3465
3454 * build a standard "vmlinux" kernel image (in ELF binary format): 3466 * build a standard "vmlinux" kernel image (in ELF binary format):
3455 3467
3456 * convert the kernel into a raw binary image: 3468 * convert the kernel into a raw binary image:
3457 3469
3458 ${CROSS_COMPILE}-objcopy -O binary \ 3470 ${CROSS_COMPILE}-objcopy -O binary \
3459 -R .note -R .comment \ 3471 -R .note -R .comment \
3460 -S vmlinux linux.bin 3472 -S vmlinux linux.bin
3461 3473
3462 * compress the binary image: 3474 * compress the binary image:
3463 3475
3464 gzip -9 linux.bin 3476 gzip -9 linux.bin
3465 3477
3466 * package compressed binary image for U-Boot: 3478 * package compressed binary image for U-Boot:
3467 3479
3468 mkimage -A ppc -O linux -T kernel -C gzip \ 3480 mkimage -A ppc -O linux -T kernel -C gzip \
3469 -a 0 -e 0 -n "Linux Kernel Image" \ 3481 -a 0 -e 0 -n "Linux Kernel Image" \
3470 -d linux.bin.gz uImage 3482 -d linux.bin.gz uImage
3471 3483
3472 3484
3473 The "mkimage" tool can also be used to create ramdisk images for use 3485 The "mkimage" tool can also be used to create ramdisk images for use
3474 with U-Boot, either separated from the Linux kernel image, or 3486 with U-Boot, either separated from the Linux kernel image, or
3475 combined into one file. "mkimage" encapsulates the images with a 64 3487 combined into one file. "mkimage" encapsulates the images with a 64
3476 byte header containing information about target architecture, 3488 byte header containing information about target architecture,
3477 operating system, image type, compression method, entry points, time 3489 operating system, image type, compression method, entry points, time
3478 stamp, CRC32 checksums, etc. 3490 stamp, CRC32 checksums, etc.
3479 3491
3480 "mkimage" can be called in two ways: to verify existing images and 3492 "mkimage" can be called in two ways: to verify existing images and
3481 print the header information, or to build new images. 3493 print the header information, or to build new images.
3482 3494
3483 In the first form (with "-l" option) mkimage lists the information 3495 In the first form (with "-l" option) mkimage lists the information
3484 contained in the header of an existing U-Boot image; this includes 3496 contained in the header of an existing U-Boot image; this includes
3485 checksum verification: 3497 checksum verification:
3486 3498
3487 tools/mkimage -l image 3499 tools/mkimage -l image
3488 -l ==> list image header information 3500 -l ==> list image header information
3489 3501
3490 The second form (with "-d" option) is used to build a U-Boot image 3502 The second form (with "-d" option) is used to build a U-Boot image
3491 from a "data file" which is used as image payload: 3503 from a "data file" which is used as image payload:
3492 3504
3493 tools/mkimage -A arch -O os -T type -C comp -a addr -e ep \ 3505 tools/mkimage -A arch -O os -T type -C comp -a addr -e ep \
3494 -n name -d data_file image 3506 -n name -d data_file image
3495 -A ==> set architecture to 'arch' 3507 -A ==> set architecture to 'arch'
3496 -O ==> set operating system to 'os' 3508 -O ==> set operating system to 'os'
3497 -T ==> set image type to 'type' 3509 -T ==> set image type to 'type'
3498 -C ==> set compression type 'comp' 3510 -C ==> set compression type 'comp'
3499 -a ==> set load address to 'addr' (hex) 3511 -a ==> set load address to 'addr' (hex)
3500 -e ==> set entry point to 'ep' (hex) 3512 -e ==> set entry point to 'ep' (hex)
3501 -n ==> set image name to 'name' 3513 -n ==> set image name to 'name'
3502 -d ==> use image data from 'datafile' 3514 -d ==> use image data from 'datafile'
3503 3515
3504 Right now, all Linux kernels for PowerPC systems use the same load 3516 Right now, all Linux kernels for PowerPC systems use the same load
3505 address (0x00000000), but the entry point address depends on the 3517 address (0x00000000), but the entry point address depends on the
3506 kernel version: 3518 kernel version:
3507 3519
3508 - 2.2.x kernels have the entry point at 0x0000000C, 3520 - 2.2.x kernels have the entry point at 0x0000000C,
3509 - 2.3.x and later kernels have the entry point at 0x00000000. 3521 - 2.3.x and later kernels have the entry point at 0x00000000.
3510 3522
3511 So a typical call to build a U-Boot image would read: 3523 So a typical call to build a U-Boot image would read:
3512 3524
3513 -> tools/mkimage -n '2.4.4 kernel for TQM850L' \ 3525 -> tools/mkimage -n '2.4.4 kernel for TQM850L' \
3514 > -A ppc -O linux -T kernel -C gzip -a 0 -e 0 \ 3526 > -A ppc -O linux -T kernel -C gzip -a 0 -e 0 \
3515 > -d /opt/elsk/ppc_8xx/usr/src/linux-2.4.4/arch/powerpc/coffboot/vmlinux.gz \ 3527 > -d /opt/elsk/ppc_8xx/usr/src/linux-2.4.4/arch/powerpc/coffboot/vmlinux.gz \
3516 > examples/uImage.TQM850L 3528 > examples/uImage.TQM850L
3517 Image Name: 2.4.4 kernel for TQM850L 3529 Image Name: 2.4.4 kernel for TQM850L
3518 Created: Wed Jul 19 02:34:59 2000 3530 Created: Wed Jul 19 02:34:59 2000
3519 Image Type: PowerPC Linux Kernel Image (gzip compressed) 3531 Image Type: PowerPC Linux Kernel Image (gzip compressed)
3520 Data Size: 335725 Bytes = 327.86 kB = 0.32 MB 3532 Data Size: 335725 Bytes = 327.86 kB = 0.32 MB
3521 Load Address: 0x00000000 3533 Load Address: 0x00000000
3522 Entry Point: 0x00000000 3534 Entry Point: 0x00000000
3523 3535
3524 To verify the contents of the image (or check for corruption): 3536 To verify the contents of the image (or check for corruption):
3525 3537
3526 -> tools/mkimage -l examples/uImage.TQM850L 3538 -> tools/mkimage -l examples/uImage.TQM850L
3527 Image Name: 2.4.4 kernel for TQM850L 3539 Image Name: 2.4.4 kernel for TQM850L
3528 Created: Wed Jul 19 02:34:59 2000 3540 Created: Wed Jul 19 02:34:59 2000
3529 Image Type: PowerPC Linux Kernel Image (gzip compressed) 3541 Image Type: PowerPC Linux Kernel Image (gzip compressed)
3530 Data Size: 335725 Bytes = 327.86 kB = 0.32 MB 3542 Data Size: 335725 Bytes = 327.86 kB = 0.32 MB
3531 Load Address: 0x00000000 3543 Load Address: 0x00000000
3532 Entry Point: 0x00000000 3544 Entry Point: 0x00000000
3533 3545
3534 NOTE: for embedded systems where boot time is critical you can trade 3546 NOTE: for embedded systems where boot time is critical you can trade
3535 speed for memory and install an UNCOMPRESSED image instead: this 3547 speed for memory and install an UNCOMPRESSED image instead: this
3536 needs more space in Flash, but boots much faster since it does not 3548 needs more space in Flash, but boots much faster since it does not
3537 need to be uncompressed: 3549 need to be uncompressed:
3538 3550
3539 -> gunzip /opt/elsk/ppc_8xx/usr/src/linux-2.4.4/arch/powerpc/coffboot/vmlinux.gz 3551 -> gunzip /opt/elsk/ppc_8xx/usr/src/linux-2.4.4/arch/powerpc/coffboot/vmlinux.gz
3540 -> tools/mkimage -n '2.4.4 kernel for TQM850L' \ 3552 -> tools/mkimage -n '2.4.4 kernel for TQM850L' \
3541 > -A ppc -O linux -T kernel -C none -a 0 -e 0 \ 3553 > -A ppc -O linux -T kernel -C none -a 0 -e 0 \
3542 > -d /opt/elsk/ppc_8xx/usr/src/linux-2.4.4/arch/powerpc/coffboot/vmlinux \ 3554 > -d /opt/elsk/ppc_8xx/usr/src/linux-2.4.4/arch/powerpc/coffboot/vmlinux \
3543 > examples/uImage.TQM850L-uncompressed 3555 > examples/uImage.TQM850L-uncompressed
3544 Image Name: 2.4.4 kernel for TQM850L 3556 Image Name: 2.4.4 kernel for TQM850L
3545 Created: Wed Jul 19 02:34:59 2000 3557 Created: Wed Jul 19 02:34:59 2000
3546 Image Type: PowerPC Linux Kernel Image (uncompressed) 3558 Image Type: PowerPC Linux Kernel Image (uncompressed)
3547 Data Size: 792160 Bytes = 773.59 kB = 0.76 MB 3559 Data Size: 792160 Bytes = 773.59 kB = 0.76 MB
3548 Load Address: 0x00000000 3560 Load Address: 0x00000000
3549 Entry Point: 0x00000000 3561 Entry Point: 0x00000000
3550 3562
3551 3563
3552 Similar you can build U-Boot images from a 'ramdisk.image.gz' file 3564 Similar you can build U-Boot images from a 'ramdisk.image.gz' file
3553 when your kernel is intended to use an initial ramdisk: 3565 when your kernel is intended to use an initial ramdisk:
3554 3566
3555 -> tools/mkimage -n 'Simple Ramdisk Image' \ 3567 -> tools/mkimage -n 'Simple Ramdisk Image' \
3556 > -A ppc -O linux -T ramdisk -C gzip \ 3568 > -A ppc -O linux -T ramdisk -C gzip \
3557 > -d /LinuxPPC/images/SIMPLE-ramdisk.image.gz examples/simple-initrd 3569 > -d /LinuxPPC/images/SIMPLE-ramdisk.image.gz examples/simple-initrd
3558 Image Name: Simple Ramdisk Image 3570 Image Name: Simple Ramdisk Image
3559 Created: Wed Jan 12 14:01:50 2000 3571 Created: Wed Jan 12 14:01:50 2000
3560 Image Type: PowerPC Linux RAMDisk Image (gzip compressed) 3572 Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
3561 Data Size: 566530 Bytes = 553.25 kB = 0.54 MB 3573 Data Size: 566530 Bytes = 553.25 kB = 0.54 MB
3562 Load Address: 0x00000000 3574 Load Address: 0x00000000
3563 Entry Point: 0x00000000 3575 Entry Point: 0x00000000
3564 3576
3565 3577
3566 Installing a Linux Image: 3578 Installing a Linux Image:
3567 ------------------------- 3579 -------------------------
3568 3580
3569 To downloading a U-Boot image over the serial (console) interface, 3581 To downloading a U-Boot image over the serial (console) interface,
3570 you must convert the image to S-Record format: 3582 you must convert the image to S-Record format:
3571 3583
3572 objcopy -I binary -O srec examples/image examples/image.srec 3584 objcopy -I binary -O srec examples/image examples/image.srec
3573 3585
3574 The 'objcopy' does not understand the information in the U-Boot 3586 The 'objcopy' does not understand the information in the U-Boot
3575 image header, so the resulting S-Record file will be relative to 3587 image header, so the resulting S-Record file will be relative to
3576 address 0x00000000. To load it to a given address, you need to 3588 address 0x00000000. To load it to a given address, you need to
3577 specify the target address as 'offset' parameter with the 'loads' 3589 specify the target address as 'offset' parameter with the 'loads'
3578 command. 3590 command.
3579 3591
3580 Example: install the image to address 0x40100000 (which on the 3592 Example: install the image to address 0x40100000 (which on the
3581 TQM8xxL is in the first Flash bank): 3593 TQM8xxL is in the first Flash bank):
3582 3594
3583 => erase 40100000 401FFFFF 3595 => erase 40100000 401FFFFF
3584 3596
3585 .......... done 3597 .......... done
3586 Erased 8 sectors 3598 Erased 8 sectors
3587 3599
3588 => loads 40100000 3600 => loads 40100000
3589 ## Ready for S-Record download ... 3601 ## Ready for S-Record download ...
3590 ~>examples/image.srec 3602 ~>examples/image.srec
3591 1 2 3 4 5 6 7 8 9 10 11 12 13 ... 3603 1 2 3 4 5 6 7 8 9 10 11 12 13 ...
3592 ... 3604 ...
3593 15989 15990 15991 15992 3605 15989 15990 15991 15992
3594 [file transfer complete] 3606 [file transfer complete]
3595 [connected] 3607 [connected]
3596 ## Start Addr = 0x00000000 3608 ## Start Addr = 0x00000000
3597 3609
3598 3610
3599 You can check the success of the download using the 'iminfo' command; 3611 You can check the success of the download using the 'iminfo' command;
3600 this includes a checksum verification so you can be sure no data 3612 this includes a checksum verification so you can be sure no data
3601 corruption happened: 3613 corruption happened:
3602 3614
3603 => imi 40100000 3615 => imi 40100000
3604 3616
3605 ## Checking Image at 40100000 ... 3617 ## Checking Image at 40100000 ...
3606 Image Name: 2.2.13 for initrd on TQM850L 3618 Image Name: 2.2.13 for initrd on TQM850L
3607 Image Type: PowerPC Linux Kernel Image (gzip compressed) 3619 Image Type: PowerPC Linux Kernel Image (gzip compressed)
3608 Data Size: 335725 Bytes = 327 kB = 0 MB 3620 Data Size: 335725 Bytes = 327 kB = 0 MB
3609 Load Address: 00000000 3621 Load Address: 00000000
3610 Entry Point: 0000000c 3622 Entry Point: 0000000c
3611 Verifying Checksum ... OK 3623 Verifying Checksum ... OK
3612 3624
3613 3625
3614 Boot Linux: 3626 Boot Linux:
3615 ----------- 3627 -----------
3616 3628
3617 The "bootm" command is used to boot an application that is stored in 3629 The "bootm" command is used to boot an application that is stored in
3618 memory (RAM or Flash). In case of a Linux kernel image, the contents 3630 memory (RAM or Flash). In case of a Linux kernel image, the contents
3619 of the "bootargs" environment variable is passed to the kernel as 3631 of the "bootargs" environment variable is passed to the kernel as
3620 parameters. You can check and modify this variable using the 3632 parameters. You can check and modify this variable using the
3621 "printenv" and "setenv" commands: 3633 "printenv" and "setenv" commands:
3622 3634
3623 3635
3624 => printenv bootargs 3636 => printenv bootargs
3625 bootargs=root=/dev/ram 3637 bootargs=root=/dev/ram
3626 3638
3627 => setenv bootargs root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2 3639 => setenv bootargs root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2
3628 3640
3629 => printenv bootargs 3641 => printenv bootargs
3630 bootargs=root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2 3642 bootargs=root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2
3631 3643
3632 => bootm 40020000 3644 => bootm 40020000
3633 ## Booting Linux kernel at 40020000 ... 3645 ## Booting Linux kernel at 40020000 ...
3634 Image Name: 2.2.13 for NFS on TQM850L 3646 Image Name: 2.2.13 for NFS on TQM850L
3635 Image Type: PowerPC Linux Kernel Image (gzip compressed) 3647 Image Type: PowerPC Linux Kernel Image (gzip compressed)
3636 Data Size: 381681 Bytes = 372 kB = 0 MB 3648 Data Size: 381681 Bytes = 372 kB = 0 MB
3637 Load Address: 00000000 3649 Load Address: 00000000
3638 Entry Point: 0000000c 3650 Entry Point: 0000000c
3639 Verifying Checksum ... OK 3651 Verifying Checksum ... OK
3640 Uncompressing Kernel Image ... OK 3652 Uncompressing Kernel Image ... OK
3641 Linux version 2.2.13 (wd@denx.local.net) (gcc version 2.95.2 19991024 (release)) #1 Wed Jul 19 02:35:17 MEST 2000 3653 Linux version 2.2.13 (wd@denx.local.net) (gcc version 2.95.2 19991024 (release)) #1 Wed Jul 19 02:35:17 MEST 2000
3642 Boot arguments: root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2 3654 Boot arguments: root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2
3643 time_init: decrementer frequency = 187500000/60 3655 time_init: decrementer frequency = 187500000/60
3644 Calibrating delay loop... 49.77 BogoMIPS 3656 Calibrating delay loop... 49.77 BogoMIPS
3645 Memory: 15208k available (700k kernel code, 444k data, 32k init) [c0000000,c1000000] 3657 Memory: 15208k available (700k kernel code, 444k data, 32k init) [c0000000,c1000000]
3646 ... 3658 ...
3647 3659
3648 If you want to boot a Linux kernel with initial RAM disk, you pass 3660 If you want to boot a Linux kernel with initial RAM disk, you pass
3649 the memory addresses of both the kernel and the initrd image (PPBCOOT 3661 the memory addresses of both the kernel and the initrd image (PPBCOOT
3650 format!) to the "bootm" command: 3662 format!) to the "bootm" command:
3651 3663
3652 => imi 40100000 40200000 3664 => imi 40100000 40200000
3653 3665
3654 ## Checking Image at 40100000 ... 3666 ## Checking Image at 40100000 ...
3655 Image Name: 2.2.13 for initrd on TQM850L 3667 Image Name: 2.2.13 for initrd on TQM850L
3656 Image Type: PowerPC Linux Kernel Image (gzip compressed) 3668 Image Type: PowerPC Linux Kernel Image (gzip compressed)
3657 Data Size: 335725 Bytes = 327 kB = 0 MB 3669 Data Size: 335725 Bytes = 327 kB = 0 MB
3658 Load Address: 00000000 3670 Load Address: 00000000
3659 Entry Point: 0000000c 3671 Entry Point: 0000000c
3660 Verifying Checksum ... OK 3672 Verifying Checksum ... OK
3661 3673
3662 ## Checking Image at 40200000 ... 3674 ## Checking Image at 40200000 ...
3663 Image Name: Simple Ramdisk Image 3675 Image Name: Simple Ramdisk Image
3664 Image Type: PowerPC Linux RAMDisk Image (gzip compressed) 3676 Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
3665 Data Size: 566530 Bytes = 553 kB = 0 MB 3677 Data Size: 566530 Bytes = 553 kB = 0 MB
3666 Load Address: 00000000 3678 Load Address: 00000000
3667 Entry Point: 00000000 3679 Entry Point: 00000000
3668 Verifying Checksum ... OK 3680 Verifying Checksum ... OK
3669 3681
3670 => bootm 40100000 40200000 3682 => bootm 40100000 40200000
3671 ## Booting Linux kernel at 40100000 ... 3683 ## Booting Linux kernel at 40100000 ...
3672 Image Name: 2.2.13 for initrd on TQM850L 3684 Image Name: 2.2.13 for initrd on TQM850L
3673 Image Type: PowerPC Linux Kernel Image (gzip compressed) 3685 Image Type: PowerPC Linux Kernel Image (gzip compressed)
3674 Data Size: 335725 Bytes = 327 kB = 0 MB 3686 Data Size: 335725 Bytes = 327 kB = 0 MB
3675 Load Address: 00000000 3687 Load Address: 00000000
3676 Entry Point: 0000000c 3688 Entry Point: 0000000c
3677 Verifying Checksum ... OK 3689 Verifying Checksum ... OK
3678 Uncompressing Kernel Image ... OK 3690 Uncompressing Kernel Image ... OK
3679 ## Loading RAMDisk Image at 40200000 ... 3691 ## Loading RAMDisk Image at 40200000 ...
3680 Image Name: Simple Ramdisk Image 3692 Image Name: Simple Ramdisk Image
3681 Image Type: PowerPC Linux RAMDisk Image (gzip compressed) 3693 Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
3682 Data Size: 566530 Bytes = 553 kB = 0 MB 3694 Data Size: 566530 Bytes = 553 kB = 0 MB
3683 Load Address: 00000000 3695 Load Address: 00000000
3684 Entry Point: 00000000 3696 Entry Point: 00000000
3685 Verifying Checksum ... OK 3697 Verifying Checksum ... OK
3686 Loading Ramdisk ... OK 3698 Loading Ramdisk ... OK
3687 Linux version 2.2.13 (wd@denx.local.net) (gcc version 2.95.2 19991024 (release)) #1 Wed Jul 19 02:32:08 MEST 2000 3699 Linux version 2.2.13 (wd@denx.local.net) (gcc version 2.95.2 19991024 (release)) #1 Wed Jul 19 02:32:08 MEST 2000
3688 Boot arguments: root=/dev/ram 3700 Boot arguments: root=/dev/ram
3689 time_init: decrementer frequency = 187500000/60 3701 time_init: decrementer frequency = 187500000/60
3690 Calibrating delay loop... 49.77 BogoMIPS 3702 Calibrating delay loop... 49.77 BogoMIPS
3691 ... 3703 ...
3692 RAMDISK: Compressed image found at block 0 3704 RAMDISK: Compressed image found at block 0
3693 VFS: Mounted root (ext2 filesystem). 3705 VFS: Mounted root (ext2 filesystem).
3694 3706
3695 bash# 3707 bash#
3696 3708
3697 Boot Linux and pass a flat device tree: 3709 Boot Linux and pass a flat device tree:
3698 ----------- 3710 -----------
3699 3711
3700 First, U-Boot must be compiled with the appropriate defines. See the section 3712 First, U-Boot must be compiled with the appropriate defines. See the section
3701 titled "Linux Kernel Interface" above for a more in depth explanation. The 3713 titled "Linux Kernel Interface" above for a more in depth explanation. The
3702 following is an example of how to start a kernel and pass an updated 3714 following is an example of how to start a kernel and pass an updated
3703 flat device tree: 3715 flat device tree:
3704 3716
3705 => print oftaddr 3717 => print oftaddr
3706 oftaddr=0x300000 3718 oftaddr=0x300000
3707 => print oft 3719 => print oft
3708 oft=oftrees/mpc8540ads.dtb 3720 oft=oftrees/mpc8540ads.dtb
3709 => tftp $oftaddr $oft 3721 => tftp $oftaddr $oft
3710 Speed: 1000, full duplex 3722 Speed: 1000, full duplex
3711 Using TSEC0 device 3723 Using TSEC0 device
3712 TFTP from server 192.168.1.1; our IP address is 192.168.1.101 3724 TFTP from server 192.168.1.1; our IP address is 192.168.1.101
3713 Filename 'oftrees/mpc8540ads.dtb'. 3725 Filename 'oftrees/mpc8540ads.dtb'.
3714 Load address: 0x300000 3726 Load address: 0x300000
3715 Loading: # 3727 Loading: #
3716 done 3728 done
3717 Bytes transferred = 4106 (100a hex) 3729 Bytes transferred = 4106 (100a hex)
3718 => tftp $loadaddr $bootfile 3730 => tftp $loadaddr $bootfile
3719 Speed: 1000, full duplex 3731 Speed: 1000, full duplex
3720 Using TSEC0 device 3732 Using TSEC0 device
3721 TFTP from server 192.168.1.1; our IP address is 192.168.1.2 3733 TFTP from server 192.168.1.1; our IP address is 192.168.1.2
3722 Filename 'uImage'. 3734 Filename 'uImage'.
3723 Load address: 0x200000 3735 Load address: 0x200000
3724 Loading:############ 3736 Loading:############
3725 done 3737 done
3726 Bytes transferred = 1029407 (fb51f hex) 3738 Bytes transferred = 1029407 (fb51f hex)
3727 => print loadaddr 3739 => print loadaddr
3728 loadaddr=200000 3740 loadaddr=200000
3729 => print oftaddr 3741 => print oftaddr
3730 oftaddr=0x300000 3742 oftaddr=0x300000
3731 => bootm $loadaddr - $oftaddr 3743 => bootm $loadaddr - $oftaddr
3732 ## Booting image at 00200000 ... 3744 ## Booting image at 00200000 ...
3733 Image Name: Linux-2.6.17-dirty 3745 Image Name: Linux-2.6.17-dirty
3734 Image Type: PowerPC Linux Kernel Image (gzip compressed) 3746 Image Type: PowerPC Linux Kernel Image (gzip compressed)
3735 Data Size: 1029343 Bytes = 1005.2 kB 3747 Data Size: 1029343 Bytes = 1005.2 kB
3736 Load Address: 00000000 3748 Load Address: 00000000
3737 Entry Point: 00000000 3749 Entry Point: 00000000
3738 Verifying Checksum ... OK 3750 Verifying Checksum ... OK
3739 Uncompressing Kernel Image ... OK 3751 Uncompressing Kernel Image ... OK
3740 Booting using flat device tree at 0x300000 3752 Booting using flat device tree at 0x300000
3741 Using MPC85xx ADS machine description 3753 Using MPC85xx ADS machine description
3742 Memory CAM mapping: CAM0=256Mb, CAM1=256Mb, CAM2=0Mb residual: 0Mb 3754 Memory CAM mapping: CAM0=256Mb, CAM1=256Mb, CAM2=0Mb residual: 0Mb
3743 [snip] 3755 [snip]
3744 3756
3745 3757
3746 More About U-Boot Image Types: 3758 More About U-Boot Image Types:
3747 ------------------------------ 3759 ------------------------------
3748 3760
3749 U-Boot supports the following image types: 3761 U-Boot supports the following image types:
3750 3762
3751 "Standalone Programs" are directly runnable in the environment 3763 "Standalone Programs" are directly runnable in the environment
3752 provided by U-Boot; it is expected that (if they behave 3764 provided by U-Boot; it is expected that (if they behave
3753 well) you can continue to work in U-Boot after return from 3765 well) you can continue to work in U-Boot after return from
3754 the Standalone Program. 3766 the Standalone Program.
3755 "OS Kernel Images" are usually images of some Embedded OS which 3767 "OS Kernel Images" are usually images of some Embedded OS which
3756 will take over control completely. Usually these programs 3768 will take over control completely. Usually these programs
3757 will install their own set of exception handlers, device 3769 will install their own set of exception handlers, device
3758 drivers, set up the MMU, etc. - this means, that you cannot 3770 drivers, set up the MMU, etc. - this means, that you cannot
3759 expect to re-enter U-Boot except by resetting the CPU. 3771 expect to re-enter U-Boot except by resetting the CPU.
3760 "RAMDisk Images" are more or less just data blocks, and their 3772 "RAMDisk Images" are more or less just data blocks, and their
3761 parameters (address, size) are passed to an OS kernel that is 3773 parameters (address, size) are passed to an OS kernel that is
3762 being started. 3774 being started.
3763 "Multi-File Images" contain several images, typically an OS 3775 "Multi-File Images" contain several images, typically an OS
3764 (Linux) kernel image and one or more data images like 3776 (Linux) kernel image and one or more data images like
3765 RAMDisks. This construct is useful for instance when you want 3777 RAMDisks. This construct is useful for instance when you want
3766 to boot over the network using BOOTP etc., where the boot 3778 to boot over the network using BOOTP etc., where the boot
3767 server provides just a single image file, but you want to get 3779 server provides just a single image file, but you want to get
3768 for instance an OS kernel and a RAMDisk image. 3780 for instance an OS kernel and a RAMDisk image.
3769 3781
3770 "Multi-File Images" start with a list of image sizes, each 3782 "Multi-File Images" start with a list of image sizes, each
3771 image size (in bytes) specified by an "uint32_t" in network 3783 image size (in bytes) specified by an "uint32_t" in network
3772 byte order. This list is terminated by an "(uint32_t)0". 3784 byte order. This list is terminated by an "(uint32_t)0".
3773 Immediately after the terminating 0 follow the images, one by 3785 Immediately after the terminating 0 follow the images, one by
3774 one, all aligned on "uint32_t" boundaries (size rounded up to 3786 one, all aligned on "uint32_t" boundaries (size rounded up to
3775 a multiple of 4 bytes). 3787 a multiple of 4 bytes).
3776 3788
3777 "Firmware Images" are binary images containing firmware (like 3789 "Firmware Images" are binary images containing firmware (like
3778 U-Boot or FPGA images) which usually will be programmed to 3790 U-Boot or FPGA images) which usually will be programmed to
3779 flash memory. 3791 flash memory.
3780 3792
3781 "Script files" are command sequences that will be executed by 3793 "Script files" are command sequences that will be executed by
3782 U-Boot's command interpreter; this feature is especially 3794 U-Boot's command interpreter; this feature is especially
3783 useful when you configure U-Boot to use a real shell (hush) 3795 useful when you configure U-Boot to use a real shell (hush)
3784 as command interpreter. 3796 as command interpreter.
3785 3797
3786 3798
3787 Standalone HOWTO: 3799 Standalone HOWTO:
3788 ================= 3800 =================
3789 3801
3790 One of the features of U-Boot is that you can dynamically load and 3802 One of the features of U-Boot is that you can dynamically load and
3791 run "standalone" applications, which can use some resources of 3803 run "standalone" applications, which can use some resources of
3792 U-Boot like console I/O functions or interrupt services. 3804 U-Boot like console I/O functions or interrupt services.
3793 3805
3794 Two simple examples are included with the sources: 3806 Two simple examples are included with the sources:
3795 3807
3796 "Hello World" Demo: 3808 "Hello World" Demo:
3797 ------------------- 3809 -------------------
3798 3810
3799 'examples/hello_world.c' contains a small "Hello World" Demo 3811 'examples/hello_world.c' contains a small "Hello World" Demo
3800 application; it is automatically compiled when you build U-Boot. 3812 application; it is automatically compiled when you build U-Boot.
3801 It's configured to run at address 0x00040004, so you can play with it 3813 It's configured to run at address 0x00040004, so you can play with it
3802 like that: 3814 like that:
3803 3815
3804 => loads 3816 => loads
3805 ## Ready for S-Record download ... 3817 ## Ready for S-Record download ...
3806 ~>examples/hello_world.srec 3818 ~>examples/hello_world.srec
3807 1 2 3 4 5 6 7 8 9 10 11 ... 3819 1 2 3 4 5 6 7 8 9 10 11 ...
3808 [file transfer complete] 3820 [file transfer complete]
3809 [connected] 3821 [connected]
3810 ## Start Addr = 0x00040004 3822 ## Start Addr = 0x00040004
3811 3823
3812 => go 40004 Hello World! This is a test. 3824 => go 40004 Hello World! This is a test.
3813 ## Starting application at 0x00040004 ... 3825 ## Starting application at 0x00040004 ...
3814 Hello World 3826 Hello World
3815 argc = 7 3827 argc = 7
3816 argv[0] = "40004" 3828 argv[0] = "40004"
3817 argv[1] = "Hello" 3829 argv[1] = "Hello"
3818 argv[2] = "World!" 3830 argv[2] = "World!"
3819 argv[3] = "This" 3831 argv[3] = "This"
3820 argv[4] = "is" 3832 argv[4] = "is"
3821 argv[5] = "a" 3833 argv[5] = "a"
3822 argv[6] = "test." 3834 argv[6] = "test."
3823 argv[7] = "<NULL>" 3835 argv[7] = "<NULL>"
3824 Hit any key to exit ... 3836 Hit any key to exit ...
3825 3837
3826 ## Application terminated, rc = 0x0 3838 ## Application terminated, rc = 0x0
3827 3839
3828 Another example, which demonstrates how to register a CPM interrupt 3840 Another example, which demonstrates how to register a CPM interrupt
3829 handler with the U-Boot code, can be found in 'examples/timer.c'. 3841 handler with the U-Boot code, can be found in 'examples/timer.c'.
3830 Here, a CPM timer is set up to generate an interrupt every second. 3842 Here, a CPM timer is set up to generate an interrupt every second.
3831 The interrupt service routine is trivial, just printing a '.' 3843 The interrupt service routine is trivial, just printing a '.'
3832 character, but this is just a demo program. The application can be 3844 character, but this is just a demo program. The application can be
3833 controlled by the following keys: 3845 controlled by the following keys:
3834 3846
3835 ? - print current values og the CPM Timer registers 3847 ? - print current values og the CPM Timer registers
3836 b - enable interrupts and start timer 3848 b - enable interrupts and start timer
3837 e - stop timer and disable interrupts 3849 e - stop timer and disable interrupts
3838 q - quit application 3850 q - quit application
3839 3851
3840 => loads 3852 => loads
3841 ## Ready for S-Record download ... 3853 ## Ready for S-Record download ...
3842 ~>examples/timer.srec 3854 ~>examples/timer.srec
3843 1 2 3 4 5 6 7 8 9 10 11 ... 3855 1 2 3 4 5 6 7 8 9 10 11 ...
3844 [file transfer complete] 3856 [file transfer complete]
3845 [connected] 3857 [connected]
3846 ## Start Addr = 0x00040004 3858 ## Start Addr = 0x00040004
3847 3859
3848 => go 40004 3860 => go 40004
3849 ## Starting application at 0x00040004 ... 3861 ## Starting application at 0x00040004 ...
3850 TIMERS=0xfff00980 3862 TIMERS=0xfff00980
3851 Using timer 1 3863 Using timer 1
3852 tgcr @ 0xfff00980, tmr @ 0xfff00990, trr @ 0xfff00994, tcr @ 0xfff00998, tcn @ 0xfff0099c, ter @ 0xfff009b0 3864 tgcr @ 0xfff00980, tmr @ 0xfff00990, trr @ 0xfff00994, tcr @ 0xfff00998, tcn @ 0xfff0099c, ter @ 0xfff009b0
3853 3865
3854 Hit 'b': 3866 Hit 'b':
3855 [q, b, e, ?] Set interval 1000000 us 3867 [q, b, e, ?] Set interval 1000000 us
3856 Enabling timer 3868 Enabling timer
3857 Hit '?': 3869 Hit '?':
3858 [q, b, e, ?] ........ 3870 [q, b, e, ?] ........
3859 tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0xef6, ter=0x0 3871 tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0xef6, ter=0x0
3860 Hit '?': 3872 Hit '?':
3861 [q, b, e, ?] . 3873 [q, b, e, ?] .
3862 tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0x2ad4, ter=0x0 3874 tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0x2ad4, ter=0x0
3863 Hit '?': 3875 Hit '?':
3864 [q, b, e, ?] . 3876 [q, b, e, ?] .
3865 tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0x1efc, ter=0x0 3877 tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0x1efc, ter=0x0
3866 Hit '?': 3878 Hit '?':
3867 [q, b, e, ?] . 3879 [q, b, e, ?] .
3868 tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0x169d, ter=0x0 3880 tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0x169d, ter=0x0
3869 Hit 'e': 3881 Hit 'e':
3870 [q, b, e, ?] ...Stopping timer 3882 [q, b, e, ?] ...Stopping timer
3871 Hit 'q': 3883 Hit 'q':
3872 [q, b, e, ?] ## Application terminated, rc = 0x0 3884 [q, b, e, ?] ## Application terminated, rc = 0x0
3873 3885
3874 3886
3875 Minicom warning: 3887 Minicom warning:
3876 ================ 3888 ================
3877 3889
3878 Over time, many people have reported problems when trying to use the 3890 Over time, many people have reported problems when trying to use the
3879 "minicom" terminal emulation program for serial download. I (wd) 3891 "minicom" terminal emulation program for serial download. I (wd)
3880 consider minicom to be broken, and recommend not to use it. Under 3892 consider minicom to be broken, and recommend not to use it. Under
3881 Unix, I recommend to use C-Kermit for general purpose use (and 3893 Unix, I recommend to use C-Kermit for general purpose use (and
3882 especially for kermit binary protocol download ("loadb" command), and 3894 especially for kermit binary protocol download ("loadb" command), and
3883 use "cu" for S-Record download ("loads" command). 3895 use "cu" for S-Record download ("loads" command).
3884 3896
3885 Nevertheless, if you absolutely want to use it try adding this 3897 Nevertheless, if you absolutely want to use it try adding this
3886 configuration to your "File transfer protocols" section: 3898 configuration to your "File transfer protocols" section:
3887 3899
3888 Name Program Name U/D FullScr IO-Red. Multi 3900 Name Program Name U/D FullScr IO-Red. Multi
3889 X kermit /usr/bin/kermit -i -l %l -s Y U Y N N 3901 X kermit /usr/bin/kermit -i -l %l -s Y U Y N N
3890 Y kermit /usr/bin/kermit -i -l %l -r N D Y N N 3902 Y kermit /usr/bin/kermit -i -l %l -r N D Y N N
3891 3903
3892 3904
3893 NetBSD Notes: 3905 NetBSD Notes:
3894 ============= 3906 =============
3895 3907
3896 Starting at version 0.9.2, U-Boot supports NetBSD both as host 3908 Starting at version 0.9.2, U-Boot supports NetBSD both as host
3897 (build U-Boot) and target system (boots NetBSD/mpc8xx). 3909 (build U-Boot) and target system (boots NetBSD/mpc8xx).
3898 3910
3899 Building requires a cross environment; it is known to work on 3911 Building requires a cross environment; it is known to work on
3900 NetBSD/i386 with the cross-powerpc-netbsd-1.3 package (you will also 3912 NetBSD/i386 with the cross-powerpc-netbsd-1.3 package (you will also
3901 need gmake since the Makefiles are not compatible with BSD make). 3913 need gmake since the Makefiles are not compatible with BSD make).
3902 Note that the cross-powerpc package does not install include files; 3914 Note that the cross-powerpc package does not install include files;
3903 attempting to build U-Boot will fail because <machine/ansi.h> is 3915 attempting to build U-Boot will fail because <machine/ansi.h> is
3904 missing. This file has to be installed and patched manually: 3916 missing. This file has to be installed and patched manually:
3905 3917
3906 # cd /usr/pkg/cross/powerpc-netbsd/include 3918 # cd /usr/pkg/cross/powerpc-netbsd/include
3907 # mkdir powerpc 3919 # mkdir powerpc
3908 # ln -s powerpc machine 3920 # ln -s powerpc machine
3909 # cp /usr/src/sys/arch/powerpc/include/ansi.h powerpc/ansi.h 3921 # cp /usr/src/sys/arch/powerpc/include/ansi.h powerpc/ansi.h
3910 # ${EDIT} powerpc/ansi.h ## must remove __va_list, _BSD_VA_LIST 3922 # ${EDIT} powerpc/ansi.h ## must remove __va_list, _BSD_VA_LIST
3911 3923
3912 Native builds *don't* work due to incompatibilities between native 3924 Native builds *don't* work due to incompatibilities between native
3913 and U-Boot include files. 3925 and U-Boot include files.
3914 3926
3915 Booting assumes that (the first part of) the image booted is a 3927 Booting assumes that (the first part of) the image booted is a
3916 stage-2 loader which in turn loads and then invokes the kernel 3928 stage-2 loader which in turn loads and then invokes the kernel
3917 proper. Loader sources will eventually appear in the NetBSD source 3929 proper. Loader sources will eventually appear in the NetBSD source
3918 tree (probably in sys/arc/mpc8xx/stand/u-boot_stage2/); in the 3930 tree (probably in sys/arc/mpc8xx/stand/u-boot_stage2/); in the
3919 meantime, see ftp://ftp.denx.de/pub/u-boot/ppcboot_stage2.tar.gz 3931 meantime, see ftp://ftp.denx.de/pub/u-boot/ppcboot_stage2.tar.gz
3920 3932
3921 3933
3922 Implementation Internals: 3934 Implementation Internals:
3923 ========================= 3935 =========================
3924 3936
3925 The following is not intended to be a complete description of every 3937 The following is not intended to be a complete description of every
3926 implementation detail. However, it should help to understand the 3938 implementation detail. However, it should help to understand the
3927 inner workings of U-Boot and make it easier to port it to custom 3939 inner workings of U-Boot and make it easier to port it to custom
3928 hardware. 3940 hardware.
3929 3941
3930 3942
3931 Initial Stack, Global Data: 3943 Initial Stack, Global Data:
3932 --------------------------- 3944 ---------------------------
3933 3945
3934 The implementation of U-Boot is complicated by the fact that U-Boot 3946 The implementation of U-Boot is complicated by the fact that U-Boot
3935 starts running out of ROM (flash memory), usually without access to 3947 starts running out of ROM (flash memory), usually without access to
3936 system RAM (because the memory controller is not initialized yet). 3948 system RAM (because the memory controller is not initialized yet).
3937 This means that we don't have writable Data or BSS segments, and BSS 3949 This means that we don't have writable Data or BSS segments, and BSS
3938 is not initialized as zero. To be able to get a C environment working 3950 is not initialized as zero. To be able to get a C environment working
3939 at all, we have to allocate at least a minimal stack. Implementation 3951 at all, we have to allocate at least a minimal stack. Implementation
3940 options for this are defined and restricted by the CPU used: Some CPU 3952 options for this are defined and restricted by the CPU used: Some CPU
3941 models provide on-chip memory (like the IMMR area on MPC8xx and 3953 models provide on-chip memory (like the IMMR area on MPC8xx and
3942 MPC826x processors), on others (parts of) the data cache can be 3954 MPC826x processors), on others (parts of) the data cache can be
3943 locked as (mis-) used as memory, etc. 3955 locked as (mis-) used as memory, etc.
3944 3956
3945 Chris Hallinan posted a good summary of these issues to the 3957 Chris Hallinan posted a good summary of these issues to the
3946 U-Boot mailing list: 3958 U-Boot mailing list:
3947 3959
3948 Subject: RE: [U-Boot-Users] RE: More On Memory Bank x (nothingness)? 3960 Subject: RE: [U-Boot-Users] RE: More On Memory Bank x (nothingness)?
3949 From: "Chris Hallinan" <clh@net1plus.com> 3961 From: "Chris Hallinan" <clh@net1plus.com>
3950 Date: Mon, 10 Feb 2003 16:43:46 -0500 (22:43 MET) 3962 Date: Mon, 10 Feb 2003 16:43:46 -0500 (22:43 MET)
3951 ... 3963 ...
3952 3964
3953 Correct me if I'm wrong, folks, but the way I understand it 3965 Correct me if I'm wrong, folks, but the way I understand it
3954 is this: Using DCACHE as initial RAM for Stack, etc, does not 3966 is this: Using DCACHE as initial RAM for Stack, etc, does not
3955 require any physical RAM backing up the cache. The cleverness 3967 require any physical RAM backing up the cache. The cleverness
3956 is that the cache is being used as a temporary supply of 3968 is that the cache is being used as a temporary supply of
3957 necessary storage before the SDRAM controller is setup. It's 3969 necessary storage before the SDRAM controller is setup. It's
3958 beyond the scope of this list to explain the details, but you 3970 beyond the scope of this list to explain the details, but you
3959 can see how this works by studying the cache architecture and 3971 can see how this works by studying the cache architecture and
3960 operation in the architecture and processor-specific manuals. 3972 operation in the architecture and processor-specific manuals.
3961 3973
3962 OCM is On Chip Memory, which I believe the 405GP has 4K. It 3974 OCM is On Chip Memory, which I believe the 405GP has 4K. It
3963 is another option for the system designer to use as an 3975 is another option for the system designer to use as an
3964 initial stack/RAM area prior to SDRAM being available. Either 3976 initial stack/RAM area prior to SDRAM being available. Either
3965 option should work for you. Using CS 4 should be fine if your 3977 option should work for you. Using CS 4 should be fine if your
3966 board designers haven't used it for something that would 3978 board designers haven't used it for something that would
3967 cause you grief during the initial boot! It is frequently not 3979 cause you grief during the initial boot! It is frequently not
3968 used. 3980 used.
3969 3981
3970 CONFIG_SYS_INIT_RAM_ADDR should be somewhere that won't interfere 3982 CONFIG_SYS_INIT_RAM_ADDR should be somewhere that won't interfere
3971 with your processor/board/system design. The default value 3983 with your processor/board/system design. The default value
3972 you will find in any recent u-boot distribution in 3984 you will find in any recent u-boot distribution in
3973 walnut.h should work for you. I'd set it to a value larger 3985 walnut.h should work for you. I'd set it to a value larger
3974 than your SDRAM module. If you have a 64MB SDRAM module, set 3986 than your SDRAM module. If you have a 64MB SDRAM module, set
3975 it above 400_0000. Just make sure your board has no resources 3987 it above 400_0000. Just make sure your board has no resources
3976 that are supposed to respond to that address! That code in 3988 that are supposed to respond to that address! That code in
3977 start.S has been around a while and should work as is when 3989 start.S has been around a while and should work as is when
3978 you get the config right. 3990 you get the config right.
3979 3991
3980 -Chris Hallinan 3992 -Chris Hallinan
3981 DS4.COM, Inc. 3993 DS4.COM, Inc.
3982 3994
3983 It is essential to remember this, since it has some impact on the C 3995 It is essential to remember this, since it has some impact on the C
3984 code for the initialization procedures: 3996 code for the initialization procedures:
3985 3997
3986 * Initialized global data (data segment) is read-only. Do not attempt 3998 * Initialized global data (data segment) is read-only. Do not attempt
3987 to write it. 3999 to write it.
3988 4000
3989 * Do not use any uninitialized global data (or implicitely initialized 4001 * Do not use any uninitialized global data (or implicitely initialized
3990 as zero data - BSS segment) at all - this is undefined, initiali- 4002 as zero data - BSS segment) at all - this is undefined, initiali-
3991 zation is performed later (when relocating to RAM). 4003 zation is performed later (when relocating to RAM).
3992 4004
3993 * Stack space is very limited. Avoid big data buffers or things like 4005 * Stack space is very limited. Avoid big data buffers or things like
3994 that. 4006 that.
3995 4007
3996 Having only the stack as writable memory limits means we cannot use 4008 Having only the stack as writable memory limits means we cannot use
3997 normal global data to share information beween the code. But it 4009 normal global data to share information beween the code. But it
3998 turned out that the implementation of U-Boot can be greatly 4010 turned out that the implementation of U-Boot can be greatly
3999 simplified by making a global data structure (gd_t) available to all 4011 simplified by making a global data structure (gd_t) available to all
4000 functions. We could pass a pointer to this data as argument to _all_ 4012 functions. We could pass a pointer to this data as argument to _all_
4001 functions, but this would bloat the code. Instead we use a feature of 4013 functions, but this would bloat the code. Instead we use a feature of
4002 the GCC compiler (Global Register Variables) to share the data: we 4014 the GCC compiler (Global Register Variables) to share the data: we
4003 place a pointer (gd) to the global data into a register which we 4015 place a pointer (gd) to the global data into a register which we
4004 reserve for this purpose. 4016 reserve for this purpose.
4005 4017
4006 When choosing a register for such a purpose we are restricted by the 4018 When choosing a register for such a purpose we are restricted by the
4007 relevant (E)ABI specifications for the current architecture, and by 4019 relevant (E)ABI specifications for the current architecture, and by
4008 GCC's implementation. 4020 GCC's implementation.
4009 4021
4010 For PowerPC, the following registers have specific use: 4022 For PowerPC, the following registers have specific use:
4011 R1: stack pointer 4023 R1: stack pointer
4012 R2: reserved for system use 4024 R2: reserved for system use
4013 R3-R4: parameter passing and return values 4025 R3-R4: parameter passing and return values
4014 R5-R10: parameter passing 4026 R5-R10: parameter passing
4015 R13: small data area pointer 4027 R13: small data area pointer
4016 R30: GOT pointer 4028 R30: GOT pointer
4017 R31: frame pointer 4029 R31: frame pointer
4018 4030
4019 (U-Boot also uses R12 as internal GOT pointer. r12 4031 (U-Boot also uses R12 as internal GOT pointer. r12
4020 is a volatile register so r12 needs to be reset when 4032 is a volatile register so r12 needs to be reset when
4021 going back and forth between asm and C) 4033 going back and forth between asm and C)
4022 4034
4023 ==> U-Boot will use R2 to hold a pointer to the global data 4035 ==> U-Boot will use R2 to hold a pointer to the global data
4024 4036
4025 Note: on PPC, we could use a static initializer (since the 4037 Note: on PPC, we could use a static initializer (since the
4026 address of the global data structure is known at compile time), 4038 address of the global data structure is known at compile time),
4027 but it turned out that reserving a register results in somewhat 4039 but it turned out that reserving a register results in somewhat
4028 smaller code - although the code savings are not that big (on 4040 smaller code - although the code savings are not that big (on
4029 average for all boards 752 bytes for the whole U-Boot image, 4041 average for all boards 752 bytes for the whole U-Boot image,
4030 624 text + 127 data). 4042 624 text + 127 data).
4031 4043
4032 On Blackfin, the normal C ABI (except for P3) is followed as documented here: 4044 On Blackfin, the normal C ABI (except for P3) is followed as documented here:
4033 http://docs.blackfin.uclinux.org/doku.php?id=application_binary_interface 4045 http://docs.blackfin.uclinux.org/doku.php?id=application_binary_interface
4034 4046
4035 ==> U-Boot will use P3 to hold a pointer to the global data 4047 ==> U-Boot will use P3 to hold a pointer to the global data
4036 4048
4037 On ARM, the following registers are used: 4049 On ARM, the following registers are used:
4038 4050
4039 R0: function argument word/integer result 4051 R0: function argument word/integer result
4040 R1-R3: function argument word 4052 R1-R3: function argument word
4041 R9: GOT pointer 4053 R9: GOT pointer
4042 R10: stack limit (used only if stack checking if enabled) 4054 R10: stack limit (used only if stack checking if enabled)
4043 R11: argument (frame) pointer 4055 R11: argument (frame) pointer
4044 R12: temporary workspace 4056 R12: temporary workspace
4045 R13: stack pointer 4057 R13: stack pointer
4046 R14: link register 4058 R14: link register
4047 R15: program counter 4059 R15: program counter
4048 4060
4049 ==> U-Boot will use R8 to hold a pointer to the global data 4061 ==> U-Boot will use R8 to hold a pointer to the global data
4050 4062
4051 On Nios II, the ABI is documented here: 4063 On Nios II, the ABI is documented here:
4052 http://www.altera.com/literature/hb/nios2/n2cpu_nii51016.pdf 4064 http://www.altera.com/literature/hb/nios2/n2cpu_nii51016.pdf
4053 4065
4054 ==> U-Boot will use gp to hold a pointer to the global data 4066 ==> U-Boot will use gp to hold a pointer to the global data
4055 4067
4056 Note: on Nios II, we give "-G0" option to gcc and don't use gp 4068 Note: on Nios II, we give "-G0" option to gcc and don't use gp
4057 to access small data sections, so gp is free. 4069 to access small data sections, so gp is free.
4058 4070
4059 NOTE: DECLARE_GLOBAL_DATA_PTR must be used with file-global scope, 4071 NOTE: DECLARE_GLOBAL_DATA_PTR must be used with file-global scope,
4060 or current versions of GCC may "optimize" the code too much. 4072 or current versions of GCC may "optimize" the code too much.
4061 4073
4062 Memory Management: 4074 Memory Management:
4063 ------------------ 4075 ------------------
4064 4076
4065 U-Boot runs in system state and uses physical addresses, i.e. the 4077 U-Boot runs in system state and uses physical addresses, i.e. the
4066 MMU is not used either for address mapping nor for memory protection. 4078 MMU is not used either for address mapping nor for memory protection.
4067 4079
4068 The available memory is mapped to fixed addresses using the memory 4080 The available memory is mapped to fixed addresses using the memory
4069 controller. In this process, a contiguous block is formed for each 4081 controller. In this process, a contiguous block is formed for each
4070 memory type (Flash, SDRAM, SRAM), even when it consists of several 4082 memory type (Flash, SDRAM, SRAM), even when it consists of several
4071 physical memory banks. 4083 physical memory banks.
4072 4084
4073 U-Boot is installed in the first 128 kB of the first Flash bank (on 4085 U-Boot is installed in the first 128 kB of the first Flash bank (on
4074 TQM8xxL modules this is the range 0x40000000 ... 0x4001FFFF). After 4086 TQM8xxL modules this is the range 0x40000000 ... 0x4001FFFF). After
4075 booting and sizing and initializing DRAM, the code relocates itself 4087 booting and sizing and initializing DRAM, the code relocates itself
4076 to the upper end of DRAM. Immediately below the U-Boot code some 4088 to the upper end of DRAM. Immediately below the U-Boot code some
4077 memory is reserved for use by malloc() [see CONFIG_SYS_MALLOC_LEN 4089 memory is reserved for use by malloc() [see CONFIG_SYS_MALLOC_LEN
4078 configuration setting]. Below that, a structure with global Board 4090 configuration setting]. Below that, a structure with global Board
4079 Info data is placed, followed by the stack (growing downward). 4091 Info data is placed, followed by the stack (growing downward).
4080 4092
4081 Additionally, some exception handler code is copied to the low 8 kB 4093 Additionally, some exception handler code is copied to the low 8 kB
4082 of DRAM (0x00000000 ... 0x00001FFF). 4094 of DRAM (0x00000000 ... 0x00001FFF).
4083 4095
4084 So a typical memory configuration with 16 MB of DRAM could look like 4096 So a typical memory configuration with 16 MB of DRAM could look like
4085 this: 4097 this:
4086 4098
4087 0x0000 0000 Exception Vector code 4099 0x0000 0000 Exception Vector code
4088 : 4100 :
4089 0x0000 1FFF 4101 0x0000 1FFF
4090 0x0000 2000 Free for Application Use 4102 0x0000 2000 Free for Application Use
4091 : 4103 :
4092 : 4104 :
4093 4105
4094 : 4106 :
4095 : 4107 :
4096 0x00FB FF20 Monitor Stack (Growing downward) 4108 0x00FB FF20 Monitor Stack (Growing downward)
4097 0x00FB FFAC Board Info Data and permanent copy of global data 4109 0x00FB FFAC Board Info Data and permanent copy of global data
4098 0x00FC 0000 Malloc Arena 4110 0x00FC 0000 Malloc Arena
4099 : 4111 :
4100 0x00FD FFFF 4112 0x00FD FFFF
4101 0x00FE 0000 RAM Copy of Monitor Code 4113 0x00FE 0000 RAM Copy of Monitor Code
4102 ... eventually: LCD or video framebuffer 4114 ... eventually: LCD or video framebuffer
4103 ... eventually: pRAM (Protected RAM - unchanged by reset) 4115 ... eventually: pRAM (Protected RAM - unchanged by reset)
4104 0x00FF FFFF [End of RAM] 4116 0x00FF FFFF [End of RAM]
4105 4117
4106 4118
4107 System Initialization: 4119 System Initialization:
4108 ---------------------- 4120 ----------------------
4109 4121
4110 In the reset configuration, U-Boot starts at the reset entry point 4122 In the reset configuration, U-Boot starts at the reset entry point
4111 (on most PowerPC systems at address 0x00000100). Because of the reset 4123 (on most PowerPC systems at address 0x00000100). Because of the reset
4112 configuration for CS0# this is a mirror of the onboard Flash memory. 4124 configuration for CS0# this is a mirror of the onboard Flash memory.
4113 To be able to re-map memory U-Boot then jumps to its link address. 4125 To be able to re-map memory U-Boot then jumps to its link address.
4114 To be able to implement the initialization code in C, a (small!) 4126 To be able to implement the initialization code in C, a (small!)
4115 initial stack is set up in the internal Dual Ported RAM (in case CPUs 4127 initial stack is set up in the internal Dual Ported RAM (in case CPUs
4116 which provide such a feature like MPC8xx or MPC8260), or in a locked 4128 which provide such a feature like MPC8xx or MPC8260), or in a locked
4117 part of the data cache. After that, U-Boot initializes the CPU core, 4129 part of the data cache. After that, U-Boot initializes the CPU core,
4118 the caches and the SIU. 4130 the caches and the SIU.
4119 4131
4120 Next, all (potentially) available memory banks are mapped using a 4132 Next, all (potentially) available memory banks are mapped using a
4121 preliminary mapping. For example, we put them on 512 MB boundaries 4133 preliminary mapping. For example, we put them on 512 MB boundaries
4122 (multiples of 0x20000000: SDRAM on 0x00000000 and 0x20000000, Flash 4134 (multiples of 0x20000000: SDRAM on 0x00000000 and 0x20000000, Flash
4123 on 0x40000000 and 0x60000000, SRAM on 0x80000000). Then UPM A is 4135 on 0x40000000 and 0x60000000, SRAM on 0x80000000). Then UPM A is
4124 programmed for SDRAM access. Using the temporary configuration, a 4136 programmed for SDRAM access. Using the temporary configuration, a
4125 simple memory test is run that determines the size of the SDRAM 4137 simple memory test is run that determines the size of the SDRAM
4126 banks. 4138 banks.
4127 4139
4128 When there is more than one SDRAM bank, and the banks are of 4140 When there is more than one SDRAM bank, and the banks are of
4129 different size, the largest is mapped first. For equal size, the first 4141 different size, the largest is mapped first. For equal size, the first
4130 bank (CS2#) is mapped first. The first mapping is always for address 4142 bank (CS2#) is mapped first. The first mapping is always for address
4131 0x00000000, with any additional banks following immediately to create 4143 0x00000000, with any additional banks following immediately to create
4132 contiguous memory starting from 0. 4144 contiguous memory starting from 0.
4133 4145
4134 Then, the monitor installs itself at the upper end of the SDRAM area 4146 Then, the monitor installs itself at the upper end of the SDRAM area
4135 and allocates memory for use by malloc() and for the global Board 4147 and allocates memory for use by malloc() and for the global Board
4136 Info data; also, the exception vector code is copied to the low RAM 4148 Info data; also, the exception vector code is copied to the low RAM
4137 pages, and the final stack is set up. 4149 pages, and the final stack is set up.
4138 4150
4139 Only after this relocation will you have a "normal" C environment; 4151 Only after this relocation will you have a "normal" C environment;
4140 until that you are restricted in several ways, mostly because you are 4152 until that you are restricted in several ways, mostly because you are
4141 running from ROM, and because the code will have to be relocated to a 4153 running from ROM, and because the code will have to be relocated to a
4142 new address in RAM. 4154 new address in RAM.
4143 4155
4144 4156
4145 U-Boot Porting Guide: 4157 U-Boot Porting Guide:
4146 ---------------------- 4158 ----------------------
4147 4159
4148 [Based on messages by Jerry Van Baren in the U-Boot-Users mailing 4160 [Based on messages by Jerry Van Baren in the U-Boot-Users mailing
4149 list, October 2002] 4161 list, October 2002]
4150 4162
4151 4163
4152 int main(int argc, char *argv[]) 4164 int main(int argc, char *argv[])
4153 { 4165 {
4154 sighandler_t no_more_time; 4166 sighandler_t no_more_time;
4155 4167
4156 signal(SIGALRM, no_more_time); 4168 signal(SIGALRM, no_more_time);
4157 alarm(PROJECT_DEADLINE - toSec (3 * WEEK)); 4169 alarm(PROJECT_DEADLINE - toSec (3 * WEEK));
4158 4170
4159 if (available_money > available_manpower) { 4171 if (available_money > available_manpower) {
4160 Pay consultant to port U-Boot; 4172 Pay consultant to port U-Boot;
4161 return 0; 4173 return 0;
4162 } 4174 }
4163 4175
4164 Download latest U-Boot source; 4176 Download latest U-Boot source;
4165 4177
4166 Subscribe to u-boot mailing list; 4178 Subscribe to u-boot mailing list;
4167 4179
4168 if (clueless) 4180 if (clueless)
4169 email("Hi, I am new to U-Boot, how do I get started?"); 4181 email("Hi, I am new to U-Boot, how do I get started?");
4170 4182
4171 while (learning) { 4183 while (learning) {
4172 Read the README file in the top level directory; 4184 Read the README file in the top level directory;
4173 Read http://www.denx.de/twiki/bin/view/DULG/Manual; 4185 Read http://www.denx.de/twiki/bin/view/DULG/Manual;
4174 Read applicable doc/*.README; 4186 Read applicable doc/*.README;
4175 Read the source, Luke; 4187 Read the source, Luke;
4176 /* find . -name "*.[chS]" | xargs grep -i <keyword> */ 4188 /* find . -name "*.[chS]" | xargs grep -i <keyword> */
4177 } 4189 }
4178 4190
4179 if (available_money > toLocalCurrency ($2500)) 4191 if (available_money > toLocalCurrency ($2500))
4180 Buy a BDI3000; 4192 Buy a BDI3000;
4181 else 4193 else
4182 Add a lot of aggravation and time; 4194 Add a lot of aggravation and time;
4183 4195
4184 if (a similar board exists) { /* hopefully... */ 4196 if (a similar board exists) { /* hopefully... */
4185 cp -a board/<similar> board/<myboard> 4197 cp -a board/<similar> board/<myboard>
4186 cp include/configs/<similar>.h include/configs/<myboard>.h 4198 cp include/configs/<similar>.h include/configs/<myboard>.h
4187 } else { 4199 } else {
4188 Create your own board support subdirectory; 4200 Create your own board support subdirectory;
4189 Create your own board include/configs/<myboard>.h file; 4201 Create your own board include/configs/<myboard>.h file;
4190 } 4202 }
4191 Edit new board/<myboard> files 4203 Edit new board/<myboard> files
4192 Edit new include/configs/<myboard>.h 4204 Edit new include/configs/<myboard>.h
4193 4205
4194 while (!accepted) { 4206 while (!accepted) {
4195 while (!running) { 4207 while (!running) {
4196 do { 4208 do {
4197 Add / modify source code; 4209 Add / modify source code;
4198 } until (compiles); 4210 } until (compiles);
4199 Debug; 4211 Debug;
4200 if (clueless) 4212 if (clueless)
4201 email("Hi, I am having problems..."); 4213 email("Hi, I am having problems...");
4202 } 4214 }
4203 Send patch file to the U-Boot email list; 4215 Send patch file to the U-Boot email list;
4204 if (reasonable critiques) 4216 if (reasonable critiques)
4205 Incorporate improvements from email list code review; 4217 Incorporate improvements from email list code review;
4206 else 4218 else
4207 Defend code as written; 4219 Defend code as written;
4208 } 4220 }
4209 4221
4210 return 0; 4222 return 0;
4211 } 4223 }
4212 4224
4213 void no_more_time (int sig) 4225 void no_more_time (int sig)
4214 { 4226 {
4215 hire_a_guru(); 4227 hire_a_guru();
4216 } 4228 }
4217 4229
4218 4230
4219 Coding Standards: 4231 Coding Standards:
4220 ----------------- 4232 -----------------
4221 4233
4222 All contributions to U-Boot should conform to the Linux kernel 4234 All contributions to U-Boot should conform to the Linux kernel
4223 coding style; see the file "Documentation/CodingStyle" and the script 4235 coding style; see the file "Documentation/CodingStyle" and the script
4224 "scripts/Lindent" in your Linux kernel source directory. In sources 4236 "scripts/Lindent" in your Linux kernel source directory. In sources
4225 originating from U-Boot a style corresponding to "Lindent -pcs" (adding 4237 originating from U-Boot a style corresponding to "Lindent -pcs" (adding
4226 spaces before parameters to function calls) is actually used. 4238 spaces before parameters to function calls) is actually used.
4227 4239
4228 Source files originating from a different project (for example the 4240 Source files originating from a different project (for example the
4229 MTD subsystem) are generally exempt from these guidelines and are not 4241 MTD subsystem) are generally exempt from these guidelines and are not
4230 reformated to ease subsequent migration to newer versions of those 4242 reformated to ease subsequent migration to newer versions of those
4231 sources. 4243 sources.
4232 4244
4233 Please note that U-Boot is implemented in C (and to some small parts in 4245 Please note that U-Boot is implemented in C (and to some small parts in
4234 Assembler); no C++ is used, so please do not use C++ style comments (//) 4246 Assembler); no C++ is used, so please do not use C++ style comments (//)
4235 in your code. 4247 in your code.
4236 4248
4237 Please also stick to the following formatting rules: 4249 Please also stick to the following formatting rules:
4238 - remove any trailing white space 4250 - remove any trailing white space
4239 - use TAB characters for indentation, not spaces 4251 - use TAB characters for indentation, not spaces
4240 - make sure NOT to use DOS '\r\n' line feeds 4252 - make sure NOT to use DOS '\r\n' line feeds
4241 - do not add more than 2 empty lines to source files 4253 - do not add more than 2 empty lines to source files
4242 - do not add trailing empty lines to source files 4254 - do not add trailing empty lines to source files
4243 4255
4244 Submissions which do not conform to the standards may be returned 4256 Submissions which do not conform to the standards may be returned
4245 with a request to reformat the changes. 4257 with a request to reformat the changes.
4246 4258
4247 4259
4248 Submitting Patches: 4260 Submitting Patches:
4249 ------------------- 4261 -------------------
4250 4262
4251 Since the number of patches for U-Boot is growing, we need to 4263 Since the number of patches for U-Boot is growing, we need to
4252 establish some rules. Submissions which do not conform to these rules 4264 establish some rules. Submissions which do not conform to these rules
4253 may be rejected, even when they contain important and valuable stuff. 4265 may be rejected, even when they contain important and valuable stuff.
4254 4266
4255 Please see http://www.denx.de/wiki/U-Boot/Patches for details. 4267 Please see http://www.denx.de/wiki/U-Boot/Patches for details.
4256 4268
4257 Patches shall be sent to the u-boot mailing list <u-boot@lists.denx.de>; 4269 Patches shall be sent to the u-boot mailing list <u-boot@lists.denx.de>;
4258 see http://lists.denx.de/mailman/listinfo/u-boot 4270 see http://lists.denx.de/mailman/listinfo/u-boot
4259 4271
4260 When you send a patch, please include the following information with 4272 When you send a patch, please include the following information with
4261 it: 4273 it:
4262 4274
4263 * For bug fixes: a description of the bug and how your patch fixes 4275 * For bug fixes: a description of the bug and how your patch fixes
4264 this bug. Please try to include a way of demonstrating that the 4276 this bug. Please try to include a way of demonstrating that the
4265 patch actually fixes something. 4277 patch actually fixes something.
4266 4278
4267 * For new features: a description of the feature and your 4279 * For new features: a description of the feature and your
4268 implementation. 4280 implementation.
4269 4281
4270 * A CHANGELOG entry as plaintext (separate from the patch) 4282 * A CHANGELOG entry as plaintext (separate from the patch)
4271 4283
4272 * For major contributions, your entry to the CREDITS file 4284 * For major contributions, your entry to the CREDITS file
4273 4285
4274 * When you add support for a new board, don't forget to add this 4286 * When you add support for a new board, don't forget to add this
4275 board to the MAKEALL script, too. 4287 board to the MAKEALL script, too.
4276 4288
4277 * If your patch adds new configuration options, don't forget to 4289 * If your patch adds new configuration options, don't forget to
4278 document these in the README file. 4290 document these in the README file.
4279 4291
4280 * The patch itself. If you are using git (which is *strongly* 4292 * The patch itself. If you are using git (which is *strongly*
4281 recommended) you can easily generate the patch using the 4293 recommended) you can easily generate the patch using the
4282 "git-format-patch". If you then use "git-send-email" to send it to 4294 "git-format-patch". If you then use "git-send-email" to send it to
4283 the U-Boot mailing list, you will avoid most of the common problems 4295 the U-Boot mailing list, you will avoid most of the common problems
4284 with some other mail clients. 4296 with some other mail clients.
4285 4297
4286 If you cannot use git, use "diff -purN OLD NEW". If your version of 4298 If you cannot use git, use "diff -purN OLD NEW". If your version of
4287 diff does not support these options, then get the latest version of 4299 diff does not support these options, then get the latest version of
4288 GNU diff. 4300 GNU diff.
4289 4301
4290 The current directory when running this command shall be the parent 4302 The current directory when running this command shall be the parent
4291 directory of the U-Boot source tree (i. e. please make sure that 4303 directory of the U-Boot source tree (i. e. please make sure that
4292 your patch includes sufficient directory information for the 4304 your patch includes sufficient directory information for the
4293 affected files). 4305 affected files).
4294 4306
4295 We prefer patches as plain text. MIME attachments are discouraged, 4307 We prefer patches as plain text. MIME attachments are discouraged,
4296 and compressed attachments must not be used. 4308 and compressed attachments must not be used.
4297 4309
4298 * If one logical set of modifications affects or creates several 4310 * If one logical set of modifications affects or creates several
4299 files, all these changes shall be submitted in a SINGLE patch file. 4311 files, all these changes shall be submitted in a SINGLE patch file.
4300 4312
4301 * Changesets that contain different, unrelated modifications shall be 4313 * Changesets that contain different, unrelated modifications shall be
4302 submitted as SEPARATE patches, one patch per changeset. 4314 submitted as SEPARATE patches, one patch per changeset.
4303 4315
4304 4316
4305 Notes: 4317 Notes:
4306 4318
4307 * Before sending the patch, run the MAKEALL script on your patched 4319 * Before sending the patch, run the MAKEALL script on your patched
4308 source tree and make sure that no errors or warnings are reported 4320 source tree and make sure that no errors or warnings are reported
4309 for any of the boards. 4321 for any of the boards.
4310 4322
4311 * Keep your modifications to the necessary minimum: A patch 4323 * Keep your modifications to the necessary minimum: A patch
4312 containing several unrelated changes or arbitrary reformats will be 4324 containing several unrelated changes or arbitrary reformats will be
4313 returned with a request to re-formatting / split it. 4325 returned with a request to re-formatting / split it.
4314 4326
4315 * If you modify existing code, make sure that your new code does not 4327 * If you modify existing code, make sure that your new code does not
4316 add to the memory footprint of the code ;-) Small is beautiful! 4328 add to the memory footprint of the code ;-) Small is beautiful!
4317 When adding new features, these should compile conditionally only 4329 When adding new features, these should compile conditionally only
4318 (using #ifdef), and the resulting code with the new feature 4330 (using #ifdef), and the resulting code with the new feature
4319 disabled must not need more memory than the old code without your 4331 disabled must not need more memory than the old code without your
4320 modification. 4332 modification.
4321 4333
4322 * Remember that there is a size limit of 100 kB per message on the 4334 * Remember that there is a size limit of 100 kB per message on the
4323 u-boot mailing list. Bigger patches will be moderated. If they are 4335 u-boot mailing list. Bigger patches will be moderated. If they are
4324 reasonable and not too big, they will be acknowledged. But patches 4336 reasonable and not too big, they will be acknowledged. But patches
4325 bigger than the size limit should be avoided. 4337 bigger than the size limit should be avoided.
4326 4338
drivers/net/Makefile
1 # 1 #
2 # (C) Copyright 2006 2 # (C) Copyright 2006
3 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 3 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 # 4 #
5 # See file CREDITS for list of people who contributed to this 5 # See file CREDITS for list of people who contributed to this
6 # project. 6 # project.
7 # 7 #
8 # This program is free software; you can redistribute it and/or 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 9 # modify it under the terms of the GNU General Public License as
10 # published by the Free Software Foundation; either version 2 of 10 # published by the Free Software Foundation; either version 2 of
11 # the License, or (at your option) any later version. 11 # the License, or (at your option) any later version.
12 # 12 #
13 # This program is distributed in the hope that it will be useful, 13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details. 16 # GNU General Public License for more details.
17 # 17 #
18 # You should have received a copy of the GNU General Public License 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 19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 # MA 02111-1307 USA 21 # MA 02111-1307 USA
22 # 22 #
23 23
24 include $(TOPDIR)/config.mk 24 include $(TOPDIR)/config.mk
25 25
26 LIB := $(obj)libnet.o 26 LIB := $(obj)libnet.o
27 27
28 COBJS-$(CONFIG_DRIVER_3C589) += 3c589.o 28 COBJS-$(CONFIG_DRIVER_3C589) += 3c589.o
29 COBJS-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o 29 COBJS-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o
30 COBJS-$(CONFIG_ALTERA_TSE) += altera_tse.o 30 COBJS-$(CONFIG_ALTERA_TSE) += altera_tse.o
31 COBJS-$(CONFIG_DRIVER_AT91EMAC) += at91_emac.o 31 COBJS-$(CONFIG_DRIVER_AT91EMAC) += at91_emac.o
32 COBJS-$(CONFIG_DRIVER_AX88180) += ax88180.o 32 COBJS-$(CONFIG_DRIVER_AX88180) += ax88180.o
33 COBJS-$(CONFIG_BCM570x) += bcm570x.o 33 COBJS-$(CONFIG_BCM570x) += bcm570x.o
34 COBJS-$(CONFIG_BCM570x) += bcm570x_autoneg.o 34 COBJS-$(CONFIG_BCM570x) += bcm570x_autoneg.o
35 COBJS-$(CONFIG_BCM570x) += 5701rls.o 35 COBJS-$(CONFIG_BCM570x) += 5701rls.o
36 COBJS-$(CONFIG_BFIN_MAC) += bfin_mac.o 36 COBJS-$(CONFIG_BFIN_MAC) += bfin_mac.o
37 COBJS-$(CONFIG_CS8900) += cs8900.o 37 COBJS-$(CONFIG_CS8900) += cs8900.o
38 COBJS-$(CONFIG_TULIP) += dc2114x.o 38 COBJS-$(CONFIG_TULIP) += dc2114x.o
39 COBJS-$(CONFIG_DESIGNWARE_ETH) += designware.o 39 COBJS-$(CONFIG_DESIGNWARE_ETH) += designware.o
40 COBJS-$(CONFIG_DRIVER_DM9000) += dm9000x.o 40 COBJS-$(CONFIG_DRIVER_DM9000) += dm9000x.o
41 COBJS-$(CONFIG_DNET) += dnet.o 41 COBJS-$(CONFIG_DNET) += dnet.o
42 COBJS-$(CONFIG_E1000) += e1000.o 42 COBJS-$(CONFIG_E1000) += e1000.o
43 COBJS-$(CONFIG_EEPRO100) += eepro100.o 43 COBJS-$(CONFIG_EEPRO100) += eepro100.o
44 COBJS-$(CONFIG_ENC28J60) += enc28j60.o 44 COBJS-$(CONFIG_ENC28J60) += enc28j60.o
45 COBJS-$(CONFIG_ENC28J60_LPC2292) += enc28j60_lpc2292.o 45 COBJS-$(CONFIG_ENC28J60_LPC2292) += enc28j60_lpc2292.o
46 COBJS-$(CONFIG_EP93XX) += ep93xx_eth.o 46 COBJS-$(CONFIG_EP93XX) += ep93xx_eth.o
47 COBJS-$(CONFIG_ETHOC) += ethoc.o 47 COBJS-$(CONFIG_ETHOC) += ethoc.o
48 COBJS-$(CONFIG_FEC_MXC) += fec_mxc.o 48 COBJS-$(CONFIG_FEC_MXC) += fec_mxc.o
49 COBJS-$(CONFIG_FSLDMAFEC) += fsl_mcdmafec.o mcfmii.o 49 COBJS-$(CONFIG_FSLDMAFEC) += fsl_mcdmafec.o mcfmii.o
50 COBJS-$(CONFIG_FTGMAC100) += ftgmac100.o
50 COBJS-$(CONFIG_FTMAC100) += ftmac100.o 51 COBJS-$(CONFIG_FTMAC100) += ftmac100.o
51 COBJS-$(CONFIG_GRETH) += greth.o 52 COBJS-$(CONFIG_GRETH) += greth.o
52 COBJS-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.o 53 COBJS-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.o
53 COBJS-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o 54 COBJS-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o
54 COBJS-$(CONFIG_LAN91C96) += lan91c96.o 55 COBJS-$(CONFIG_LAN91C96) += lan91c96.o
55 COBJS-$(CONFIG_MACB) += macb.o 56 COBJS-$(CONFIG_MACB) += macb.o
56 COBJS-$(CONFIG_MCFFEC) += mcffec.o mcfmii.o 57 COBJS-$(CONFIG_MCFFEC) += mcffec.o mcfmii.o
57 COBJS-$(CONFIG_MPC5xxx_FEC) += mpc5xxx_fec.o 58 COBJS-$(CONFIG_MPC5xxx_FEC) += mpc5xxx_fec.o
58 COBJS-$(CONFIG_MPC512x_FEC) += mpc512x_fec.o 59 COBJS-$(CONFIG_MPC512x_FEC) += mpc512x_fec.o
59 COBJS-$(CONFIG_MVGBE) += mvgbe.o 60 COBJS-$(CONFIG_MVGBE) += mvgbe.o
60 COBJS-$(CONFIG_NATSEMI) += natsemi.o 61 COBJS-$(CONFIG_NATSEMI) += natsemi.o
61 COBJS-$(CONFIG_DRIVER_NE2000) += ne2000.o ne2000_base.o 62 COBJS-$(CONFIG_DRIVER_NE2000) += ne2000.o ne2000_base.o
62 COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o ne2000_base.o 63 COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o ne2000_base.o
63 COBJS-$(CONFIG_DRIVER_NETARMETH) += netarm_eth.o 64 COBJS-$(CONFIG_DRIVER_NETARMETH) += netarm_eth.o
64 COBJS-$(CONFIG_NETCONSOLE) += netconsole.o 65 COBJS-$(CONFIG_NETCONSOLE) += netconsole.o
65 COBJS-$(CONFIG_DRIVER_NS7520_ETHERNET) += ns7520_eth.o 66 COBJS-$(CONFIG_DRIVER_NS7520_ETHERNET) += ns7520_eth.o
66 COBJS-$(CONFIG_NS8382X) += ns8382x.o 67 COBJS-$(CONFIG_NS8382X) += ns8382x.o
67 COBJS-$(CONFIG_DRIVER_NS9750_ETHERNET) += ns9750_eth.o 68 COBJS-$(CONFIG_DRIVER_NS9750_ETHERNET) += ns9750_eth.o
68 COBJS-$(CONFIG_PCNET) += pcnet.o 69 COBJS-$(CONFIG_PCNET) += pcnet.o
69 COBJS-$(CONFIG_PLB2800_ETHER) += plb2800_eth.o 70 COBJS-$(CONFIG_PLB2800_ETHER) += plb2800_eth.o
70 COBJS-$(CONFIG_DRIVER_RTL8019) += rtl8019.o 71 COBJS-$(CONFIG_DRIVER_RTL8019) += rtl8019.o
71 COBJS-$(CONFIG_RTL8139) += rtl8139.o 72 COBJS-$(CONFIG_RTL8139) += rtl8139.o
72 COBJS-$(CONFIG_RTL8169) += rtl8169.o 73 COBJS-$(CONFIG_RTL8169) += rtl8169.o
73 COBJS-$(CONFIG_DRIVER_S3C4510_ETH) += s3c4510b_eth.o 74 COBJS-$(CONFIG_DRIVER_S3C4510_ETH) += s3c4510b_eth.o
74 COBJS-$(CONFIG_SH_ETHER) += sh_eth.o 75 COBJS-$(CONFIG_SH_ETHER) += sh_eth.o
75 COBJS-$(CONFIG_SMC91111) += smc91111.o 76 COBJS-$(CONFIG_SMC91111) += smc91111.o
76 COBJS-$(CONFIG_SMC911X) += smc911x.o 77 COBJS-$(CONFIG_SMC911X) += smc911x.o
77 COBJS-$(CONFIG_TIGON3) += tigon3.o 78 COBJS-$(CONFIG_TIGON3) += tigon3.o
78 COBJS-$(CONFIG_TIGON3) += bcm570x_autoneg.o 79 COBJS-$(CONFIG_TIGON3) += bcm570x_autoneg.o
79 COBJS-$(CONFIG_TIGON3) += 5701rls.o 80 COBJS-$(CONFIG_TIGON3) += 5701rls.o
80 COBJS-$(CONFIG_DRIVER_TI_EMAC) += davinci_emac.o 81 COBJS-$(CONFIG_DRIVER_TI_EMAC) += davinci_emac.o
81 COBJS-$(CONFIG_TSEC_ENET) += tsec.o 82 COBJS-$(CONFIG_TSEC_ENET) += tsec.o
82 COBJS-$(CONFIG_TSI108_ETH) += tsi108_eth.o 83 COBJS-$(CONFIG_TSI108_ETH) += tsi108_eth.o
83 COBJS-$(CONFIG_ULI526X) += uli526x.o 84 COBJS-$(CONFIG_ULI526X) += uli526x.o
84 COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o 85 COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o
85 COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o 86 COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o
86 87
87 COBJS := $(sort $(COBJS-y)) 88 COBJS := $(sort $(COBJS-y))
88 SRCS := $(COBJS:.o=.c) 89 SRCS := $(COBJS:.o=.c)
89 OBJS := $(addprefix $(obj),$(COBJS)) 90 OBJS := $(addprefix $(obj),$(COBJS))
90 91
91 all: $(LIB) 92 all: $(LIB)
92 93
93 $(LIB): $(obj).depend $(OBJS) 94 $(LIB): $(obj).depend $(OBJS)
94 $(call cmd_link_o_target, $(OBJS)) 95 $(call cmd_link_o_target, $(OBJS))
95 96
96 ######################################################################### 97 #########################################################################
97 98
98 # defines $(obj).depend target 99 # defines $(obj).depend target
99 include $(SRCTREE)/rules.mk 100 include $(SRCTREE)/rules.mk
100 101
101 sinclude $(obj).depend 102 sinclude $(obj).depend
102 103
103 ######################################################################### 104 #########################################################################
104 105
drivers/net/ftgmac100.c
File was created 1 /*
2 * Faraday FTGMAC100 Ethernet
3 *
4 * (C) Copyright 2009 Faraday Technology
5 * Po-Yu Chuang <ratbert@faraday-tech.com>
6 *
7 * (C) Copyright 2010 Andes Technology
8 * Macpaul Lin <macpaul@andestech.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */
24
25 #include <config.h>
26 #include <common.h>
27 #include <malloc.h>
28 #include <net.h>
29 #include <asm/io.h>
30 #include <linux/mii.h>
31
32 #include "ftgmac100.h"
33
34 #define ETH_ZLEN 60
35
36 #define mdelay(n) ({unsigned long msec = (n); while (msec--) udelay(1000); })
37
38 /* RBSR - hw default init value is also 0x640 */
39 #define RBSR_DEFAULT_VALUE 0x640
40
41 /* PKTBUFSTX/PKTBUFSRX must both be power of 2 */
42 #define PKTBUFSTX 4 /* must be power of 2 */
43
44 struct ftgmac100_data {
45 struct ftgmac100_txdes txdes[PKTBUFSTX];
46 struct ftgmac100_rxdes rxdes[PKTBUFSRX];
47 int tx_index;
48 int rx_index;
49 int phy_addr;
50 };
51
52 /*
53 * struct mii_bus functions
54 */
55 static int ftgmac100_mdiobus_read(struct eth_device *dev, int phy_addr,
56 int regnum)
57 {
58 struct ftgmac100 *ftgmac100 = (struct ftgmac100 *)dev->iobase;
59 int phycr;
60 int i;
61
62 phycr = readl(&ftgmac100->phycr);
63
64 /* preserve MDC cycle threshold */
65 phycr &= FTGMAC100_PHYCR_MDC_CYCTHR_MASK;
66
67 phycr |= FTGMAC100_PHYCR_PHYAD(phy_addr)
68 | FTGMAC100_PHYCR_REGAD(regnum)
69 | FTGMAC100_PHYCR_MIIRD;
70
71 writel(phycr, &ftgmac100->phycr);
72
73 for (i = 0; i < 10; i++) {
74 phycr = readl(&ftgmac100->phycr);
75
76 if ((phycr & FTGMAC100_PHYCR_MIIRD) == 0) {
77 int data;
78
79 data = readl(&ftgmac100->phydata);
80 return FTGMAC100_PHYDATA_MIIRDATA(data);
81 }
82
83 mdelay(10);
84 }
85
86 debug("mdio read timed out\n");
87 return -1;
88 }
89
90 static int ftgmac100_mdiobus_write(struct eth_device *dev, int phy_addr,
91 int regnum, u16 value)
92 {
93 struct ftgmac100 *ftgmac100 = (struct ftgmac100 *)dev->iobase;
94 int phycr;
95 int data;
96 int i;
97
98 phycr = readl(&ftgmac100->phycr);
99
100 /* preserve MDC cycle threshold */
101 phycr &= FTGMAC100_PHYCR_MDC_CYCTHR_MASK;
102
103 phycr |= FTGMAC100_PHYCR_PHYAD(phy_addr)
104 | FTGMAC100_PHYCR_REGAD(regnum)
105 | FTGMAC100_PHYCR_MIIWR;
106
107 data = FTGMAC100_PHYDATA_MIIWDATA(value);
108
109 writel(data, &ftgmac100->phydata);
110 writel(phycr, &ftgmac100->phycr);
111
112 for (i = 0; i < 10; i++) {
113 phycr = readl(&ftgmac100->phycr);
114
115 if ((phycr & FTGMAC100_PHYCR_MIIWR) == 0) {
116 debug("(phycr & FTGMAC100_PHYCR_MIIWR) == 0: " \
117 "phy_addr: %x\n", phy_addr);
118 return 0;
119 }
120
121 mdelay(1);
122 }
123
124 debug("mdio write timed out\n");
125 return -1;
126 }
127
128 int ftgmac100_phy_read(struct eth_device *dev, int addr, int reg, u16 *value)
129 {
130 *value = ftgmac100_mdiobus_read(dev , addr, reg);
131
132 if (*value == -1)
133 return -1;
134
135 return 0;
136 }
137
138 int ftgmac100_phy_write(struct eth_device *dev, int addr, int reg, u16 value)
139 {
140 if (ftgmac100_mdiobus_write(dev, addr, reg, value) == -1)
141 return -1;
142
143 return 0;
144 }
145
146 static int ftgmac100_phy_reset(struct eth_device *dev)
147 {
148 struct ftgmac100_data *priv = dev->priv;
149 int i;
150 u16 status, adv;
151
152 adv = ADVERTISE_CSMA | ADVERTISE_ALL;
153
154 ftgmac100_phy_write(dev, priv->phy_addr, MII_ADVERTISE, adv);
155
156 printf("%s: Starting autonegotiation...\n", dev->name);
157
158 ftgmac100_phy_write(dev, priv->phy_addr,
159 MII_BMCR, (BMCR_ANENABLE | BMCR_ANRESTART));
160
161 for (i = 0; i < 100000 / 100; i++) {
162 ftgmac100_phy_read(dev, priv->phy_addr, MII_BMSR, &status);
163
164 if (status & BMSR_ANEGCOMPLETE)
165 break;
166 mdelay(1);
167 }
168
169 if (status & BMSR_ANEGCOMPLETE) {
170 printf("%s: Autonegotiation complete\n", dev->name);
171 } else {
172 printf("%s: Autonegotiation timed out (status=0x%04x)\n",
173 dev->name, status);
174 return 0;
175 }
176
177 return 1;
178 }
179
180 static int ftgmac100_phy_init(struct eth_device *dev)
181 {
182 struct ftgmac100_data *priv = dev->priv;
183
184 int phy_addr;
185 u16 phy_id, status, adv, lpa, stat_ge;
186 int media, speed, duplex;
187 int i;
188
189 /* Check if the PHY is up to snuff... */
190 for (phy_addr = 0; phy_addr < CONFIG_PHY_MAX_ADDR; phy_addr++) {
191
192 ftgmac100_phy_read(dev, phy_addr, MII_PHYSID1, &phy_id);
193
194 /*
195 * When it is unable to found PHY,
196 * the interface usually return 0xffff or 0x0000
197 */
198 if (phy_id != 0xffff && phy_id != 0x0) {
199 printf("%s: found PHY at 0x%02x\n",
200 dev->name, phy_addr);
201 priv->phy_addr = phy_addr;
202 break;
203 }
204 }
205
206 if (phy_id == 0xffff || phy_id == 0x0) {
207 printf("%s: no PHY present\n", dev->name);
208 return 0;
209 }
210
211 ftgmac100_phy_read(dev, priv->phy_addr, MII_BMSR, &status);
212
213 if (!(status & BMSR_LSTATUS)) {
214 /* Try to re-negotiate if we don't have link already. */
215 ftgmac100_phy_reset(dev);
216
217 for (i = 0; i < 100000 / 100; i++) {
218 ftgmac100_phy_read(dev, priv->phy_addr,
219 MII_BMSR, &status);
220 if (status & BMSR_LSTATUS)
221 break;
222 udelay(100);
223 }
224 }
225
226 if (!(status & BMSR_LSTATUS)) {
227 printf("%s: link down\n", dev->name);
228 return 0;
229 }
230
231 #ifdef CONFIG_FTGMAC100_EGIGA
232 /* 1000 Base-T Status Register */
233 ftgmac100_phy_read(dev, priv->phy_addr,
234 MII_STAT1000, &stat_ge);
235
236 speed = (stat_ge & (LPA_1000FULL | LPA_1000HALF)
237 ? 1 : 0);
238
239 duplex = ((stat_ge & LPA_1000FULL)
240 ? 1 : 0);
241
242 if (speed) { /* Speed is 1000 */
243 printf("%s: link up, 1000bps %s-duplex\n",
244 dev->name, duplex ? "full" : "half");
245 return 0;
246 }
247 #endif
248
249 ftgmac100_phy_read(dev, priv->phy_addr, MII_ADVERTISE, &adv);
250 ftgmac100_phy_read(dev, priv->phy_addr, MII_LPA, &lpa);
251
252 media = mii_nway_result(lpa & adv);
253 speed = (media & (ADVERTISE_100FULL | ADVERTISE_100HALF) ? 1 : 0);
254 duplex = (media & ADVERTISE_FULL) ? 1 : 0;
255
256 printf("%s: link up, %sMbps %s-duplex\n",
257 dev->name, speed ? "100" : "10", duplex ? "full" : "half");
258
259 return 1;
260 }
261
262 static int ftgmac100_update_link_speed(struct eth_device *dev)
263 {
264 struct ftgmac100 *ftgmac100 = (struct ftgmac100 *)dev->iobase;
265 struct ftgmac100_data *priv = dev->priv;
266
267 unsigned short stat_fe;
268 unsigned short stat_ge;
269 unsigned int maccr;
270
271 #ifdef CONFIG_FTGMAC100_EGIGA
272 /* 1000 Base-T Status Register */
273 ftgmac100_phy_read(dev, priv->phy_addr, MII_STAT1000, &stat_ge);
274 #endif
275
276 ftgmac100_phy_read(dev, priv->phy_addr, MII_BMSR, &stat_fe);
277
278 if (!(stat_fe & BMSR_LSTATUS)) /* link status up? */
279 return 0;
280
281 /* read MAC control register and clear related bits */
282 maccr = readl(&ftgmac100->maccr) &
283 ~(FTGMAC100_MACCR_GIGA_MODE |
284 FTGMAC100_MACCR_FAST_MODE |
285 FTGMAC100_MACCR_FULLDUP);
286
287 #ifdef CONFIG_FTGMAC100_EGIGA
288 if (stat_ge & LPA_1000FULL) {
289 /* set gmac for 1000BaseTX and Full Duplex */
290 maccr |= FTGMAC100_MACCR_GIGA_MODE | FTGMAC100_MACCR_FULLDUP;
291 }
292
293 if (stat_ge & LPA_1000HALF) {
294 /* set gmac for 1000BaseTX and Half Duplex */
295 maccr |= FTGMAC100_MACCR_GIGA_MODE;
296 }
297 #endif
298
299 if (stat_fe & BMSR_100FULL) {
300 /* set MII for 100BaseTX and Full Duplex */
301 maccr |= FTGMAC100_MACCR_FAST_MODE | FTGMAC100_MACCR_FULLDUP;
302 }
303
304 if (stat_fe & BMSR_10FULL) {
305 /* set MII for 10BaseT and Full Duplex */
306 maccr |= FTGMAC100_MACCR_FULLDUP;
307 }
308
309 if (stat_fe & BMSR_100HALF) {
310 /* set MII for 100BaseTX and Half Duplex */
311 maccr |= FTGMAC100_MACCR_FAST_MODE;
312 }
313
314 if (stat_fe & BMSR_10HALF) {
315 /* set MII for 10BaseT and Half Duplex */
316 /* we have already clear these bits, do nothing */
317 ;
318 }
319
320 /* update MII config into maccr */
321 writel(maccr, &ftgmac100->maccr);
322
323 return 1;
324 }
325
326 /*
327 * Reset MAC
328 */
329 static void ftgmac100_reset(struct eth_device *dev)
330 {
331 struct ftgmac100 *ftgmac100 = (struct ftgmac100 *)dev->iobase;
332
333 debug("%s()\n", __func__);
334
335 writel(FTGMAC100_MACCR_SW_RST, &ftgmac100->maccr);
336
337 while (readl(&ftgmac100->maccr) & FTGMAC100_MACCR_SW_RST)
338 ;
339 }
340
341 /*
342 * Set MAC address
343 */
344 static void ftgmac100_set_mac(struct eth_device *dev,
345 const unsigned char *mac)
346 {
347 struct ftgmac100 *ftgmac100 = (struct ftgmac100 *)dev->iobase;
348 unsigned int maddr = mac[0] << 8 | mac[1];
349 unsigned int laddr = mac[2] << 24 | mac[3] << 16 | mac[4] << 8 | mac[5];
350
351 debug("%s(%x %x)\n", __func__, maddr, laddr);
352
353 writel(maddr, &ftgmac100->mac_madr);
354 writel(laddr, &ftgmac100->mac_ladr);
355 }
356
357 static void ftgmac100_set_mac_from_env(struct eth_device *dev)
358 {
359 eth_getenv_enetaddr("ethaddr", dev->enetaddr);
360
361 ftgmac100_set_mac(dev, dev->enetaddr);
362 }
363
364 /*
365 * disable transmitter, receiver
366 */
367 static void ftgmac100_halt(struct eth_device *dev)
368 {
369 struct ftgmac100 *ftgmac100 = (struct ftgmac100 *)dev->iobase;
370
371 debug("%s()\n", __func__);
372
373 writel(0, &ftgmac100->maccr);
374 }
375
376 static int ftgmac100_init(struct eth_device *dev, bd_t *bd)
377 {
378 struct ftgmac100 *ftgmac100 = (struct ftgmac100 *)dev->iobase;
379 struct ftgmac100_data *priv = dev->priv;
380 struct ftgmac100_txdes *txdes = priv->txdes;
381 struct ftgmac100_rxdes *rxdes = priv->rxdes;
382 unsigned int maccr;
383 int i;
384
385 debug("%s()\n", __func__);
386
387 ftgmac100_reset(dev);
388
389 /* set the ethernet address */
390 ftgmac100_set_mac_from_env(dev);
391
392 /* disable all interrupts */
393 writel(0, &ftgmac100->ier);
394
395 /* initialize descriptors */
396 priv->tx_index = 0;
397 priv->rx_index = 0;
398
399 txdes[PKTBUFSTX - 1].txdes0 = FTGMAC100_TXDES0_EDOTR;
400 rxdes[PKTBUFSRX - 1].rxdes0 = FTGMAC100_RXDES0_EDORR;
401
402 for (i = 0; i < PKTBUFSTX; i++) {
403 /* TXBUF_BADR */
404 txdes[i].txdes3 = 0;
405 txdes[i].txdes1 = 0;
406 }
407
408 for (i = 0; i < PKTBUFSRX; i++) {
409 /* RXBUF_BADR */
410 rxdes[i].rxdes3 = (unsigned int)NetRxPackets[i];
411 rxdes[i].rxdes0 &= ~FTGMAC100_RXDES0_RXPKT_RDY;
412 }
413
414 /* transmit ring */
415 writel((unsigned int)txdes, &ftgmac100->txr_badr);
416
417 /* receive ring */
418 writel((unsigned int)rxdes, &ftgmac100->rxr_badr);
419
420 /* poll receive descriptor automatically */
421 writel(FTGMAC100_APTC_RXPOLL_CNT(1), &ftgmac100->aptc);
422
423 /* config receive buffer size register */
424 writel(FTGMAC100_RBSR_SIZE(RBSR_DEFAULT_VALUE), &ftgmac100->rbsr);
425
426 /* enable transmitter, receiver */
427 maccr = FTGMAC100_MACCR_TXMAC_EN |
428 FTGMAC100_MACCR_RXMAC_EN |
429 FTGMAC100_MACCR_TXDMA_EN |
430 FTGMAC100_MACCR_RXDMA_EN |
431 FTGMAC100_MACCR_CRC_APD |
432 FTGMAC100_MACCR_FULLDUP |
433 FTGMAC100_MACCR_RX_RUNT |
434 FTGMAC100_MACCR_RX_BROADPKT;
435
436 writel(maccr, &ftgmac100->maccr);
437
438 if (!ftgmac100_phy_init(dev)) {
439 if (!ftgmac100_update_link_speed(dev))
440 return -1;
441 }
442
443 return 0;
444 }
445
446 /*
447 * Get a data block via Ethernet
448 */
449 static int ftgmac100_recv(struct eth_device *dev)
450 {
451 struct ftgmac100_data *priv = dev->priv;
452 struct ftgmac100_rxdes *curr_des;
453 unsigned short rxlen;
454
455 curr_des = &priv->rxdes[priv->rx_index];
456
457 if (!(curr_des->rxdes0 & FTGMAC100_RXDES0_RXPKT_RDY))
458 return -1;
459
460 if (curr_des->rxdes0 & (FTGMAC100_RXDES0_RX_ERR |
461 FTGMAC100_RXDES0_CRC_ERR |
462 FTGMAC100_RXDES0_FTL |
463 FTGMAC100_RXDES0_RUNT |
464 FTGMAC100_RXDES0_RX_ODD_NB)) {
465 return -1;
466 }
467
468 rxlen = FTGMAC100_RXDES0_VDBC(curr_des->rxdes0);
469
470 debug("%s(): RX buffer %d, %x received\n",
471 __func__, priv->rx_index, rxlen);
472
473 /* pass the packet up to the protocol layers. */
474 NetReceive((void *)curr_des->rxdes3, rxlen);
475
476 /* release buffer to DMA */
477 curr_des->rxdes0 &= ~FTGMAC100_RXDES0_RXPKT_RDY;
478
479 priv->rx_index = (priv->rx_index + 1) % PKTBUFSRX;
480
481 return 0;
482 }
483
484 /*
485 * Send a data block via Ethernet
486 */
487 static int
488 ftgmac100_send(struct eth_device *dev, void *packet, int length)
489 {
490 struct ftgmac100 *ftgmac100 = (struct ftgmac100 *)dev->iobase;
491 struct ftgmac100_data *priv = dev->priv;
492 struct ftgmac100_txdes *curr_des = &priv->txdes[priv->tx_index];
493 int start;
494
495 if (curr_des->txdes0 & FTGMAC100_TXDES0_TXDMA_OWN) {
496 debug("%s(): no TX descriptor available\n", __func__);
497 return -1;
498 }
499
500 debug("%s(%x, %x)\n", __func__, (int)packet, length);
501
502 length = (length < ETH_ZLEN) ? ETH_ZLEN : length;
503
504 /* initiate a transmit sequence */
505 curr_des->txdes3 = (unsigned int)packet; /* TXBUF_BADR */
506
507 /* only one descriptor on TXBUF */
508 curr_des->txdes0 &= FTGMAC100_TXDES0_EDOTR;
509 curr_des->txdes0 |= FTGMAC100_TXDES0_FTS |
510 FTGMAC100_TXDES0_LTS |
511 FTGMAC100_TXDES0_TXBUF_SIZE(length) |
512 FTGMAC100_TXDES0_TXDMA_OWN ;
513
514 /* start transmit */
515 writel(1, &ftgmac100->txpd);
516
517 /* wait for transfer to succeed */
518 start = get_timer(0);
519 while (curr_des->txdes0 & FTGMAC100_TXDES0_TXDMA_OWN) {
520 if (get_timer(0) >= 5) {
521 debug("%s(): timed out\n", __func__);
522 return -1;
523 }
524 }
525
526 debug("%s(): packet sent\n", __func__);
527
528 priv->tx_index = (priv->tx_index + 1) % PKTBUFSTX;
529
530 return 0;
531 }
532
533 int ftgmac100_initialize(bd_t *bd)
534 {
535 struct eth_device *dev;
536 struct ftgmac100_data *priv;
537
538 dev = malloc(sizeof *dev);
539 if (!dev) {
540 printf("%s(): failed to allocate dev\n", __func__);
541 goto out;
542 }
543
544 /* Transmit and receive descriptors should align to 16 bytes */
545 priv = memalign(16, sizeof(struct ftgmac100_data));
546 if (!priv) {
547 printf("%s(): failed to allocate priv\n", __func__);
548 goto free_dev;
549 }
550
551 memset(dev, 0, sizeof(*dev));
552 memset(priv, 0, sizeof(*priv));
553
554 sprintf(dev->name, "FTGMAC100");
555 dev->iobase = CONFIG_FTGMAC100_BASE;
556 dev->init = ftgmac100_init;
557 dev->halt = ftgmac100_halt;
558 dev->send = ftgmac100_send;
559 dev->recv = ftgmac100_recv;
560 dev->priv = priv;
561
562 eth_register(dev);
563
564 return 1;
565
566 free_dev:
567 free(dev);
568 out:
569 return 0;
570 }
571
drivers/net/ftgmac100.h
File was created 1 /*
2 * Faraday FTGMAC100 Ethernet
3 *
4 * (C) Copyright 2010 Faraday Technology
5 * Po-Yu Chuang <ratbert@faraday-tech.com>
6 *
7 * (C) Copyright 2010 Andes Technology
8 * Macpaul Lin <macpaul@andestech.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */
24
25 #ifndef __FTGMAC100_H
26 #define __FTGMAC100_H
27
28 /* The registers offset table of ftgmac100 */
29 struct ftgmac100 {
30 unsigned int isr; /* 0x00 */
31 unsigned int ier; /* 0x04 */
32 unsigned int mac_madr; /* 0x08 */
33 unsigned int mac_ladr; /* 0x0c */
34 unsigned int maht0; /* 0x10 */
35 unsigned int maht1; /* 0x14 */
36 unsigned int txpd; /* 0x18 */
37 unsigned int rxpd; /* 0x1c */
38 unsigned int txr_badr; /* 0x20 */
39 unsigned int rxr_badr; /* 0x24 */
40 unsigned int hptxpd; /* 0x28 */
41 unsigned int hptxpd_badr; /* 0x2c */
42 unsigned int itc; /* 0x30 */
43 unsigned int aptc; /* 0x34 */
44 unsigned int dblac; /* 0x38 */
45 unsigned int dmafifos; /* 0x3c */
46 unsigned int revr; /* 0x40 */
47 unsigned int fear; /* 0x44 */
48 unsigned int tpafcr; /* 0x48 */
49 unsigned int rbsr; /* 0x4c */
50 unsigned int maccr; /* 0x50 */
51 unsigned int macsr; /* 0x54 */
52 unsigned int tm; /* 0x58 */
53 unsigned int resv1; /* 0x5c */ /* not defined in spec */
54 unsigned int phycr; /* 0x60 */
55 unsigned int phydata; /* 0x64 */
56 unsigned int fcr; /* 0x68 */
57 unsigned int bpr; /* 0x6c */
58 unsigned int wolcr; /* 0x70 */
59 unsigned int wolsr; /* 0x74 */
60 unsigned int wfcrc; /* 0x78 */
61 unsigned int resv2; /* 0x7c */ /* not defined in spec */
62 unsigned int wfbm1; /* 0x80 */
63 unsigned int wfbm2; /* 0x84 */
64 unsigned int wfbm3; /* 0x88 */
65 unsigned int wfbm4; /* 0x8c */
66 unsigned int nptxr_ptr; /* 0x90 */
67 unsigned int hptxr_ptr; /* 0x94 */
68 unsigned int rxr_ptr; /* 0x98 */
69 unsigned int resv3; /* 0x9c */ /* not defined in spec */
70 unsigned int tx; /* 0xa0 */
71 unsigned int tx_mcol_scol; /* 0xa4 */
72 unsigned int tx_ecol_fail; /* 0xa8 */
73 unsigned int tx_lcol_und; /* 0xac */
74 unsigned int rx; /* 0xb0 */
75 unsigned int rx_bc; /* 0xb4 */
76 unsigned int rx_mc; /* 0xb8 */
77 unsigned int rx_pf_aep; /* 0xbc */
78 unsigned int rx_runt; /* 0xc0 */
79 unsigned int rx_crcer_ftl; /* 0xc4 */
80 unsigned int rx_col_lost; /* 0xc8 */
81 };
82
83 /*
84 * Interrupt status register & interrupt enable register
85 */
86 #define FTGMAC100_INT_RPKT_BUF (1 << 0)
87 #define FTGMAC100_INT_RPKT_FIFO (1 << 1)
88 #define FTGMAC100_INT_NO_RXBUF (1 << 2)
89 #define FTGMAC100_INT_RPKT_LOST (1 << 3)
90 #define FTGMAC100_INT_XPKT_ETH (1 << 4)
91 #define FTGMAC100_INT_XPKT_FIFO (1 << 5)
92 #define FTGMAC100_INT_NO_NPTXBUF (1 << 6)
93 #define FTGMAC100_INT_XPKT_LOST (1 << 7)
94 #define FTGMAC100_INT_AHB_ERR (1 << 8)
95 #define FTGMAC100_INT_PHYSTS_CHG (1 << 9)
96 #define FTGMAC100_INT_NO_HPTXBUF (1 << 10)
97
98 /*
99 * Interrupt timer control register
100 */
101 #define FTGMAC100_ITC_RXINT_CNT(x) (((x) & 0xf) << 0)
102 #define FTGMAC100_ITC_RXINT_THR(x) (((x) & 0x7) << 4)
103 #define FTGMAC100_ITC_RXINT_TIME_SEL (1 << 7)
104 #define FTGMAC100_ITC_TXINT_CNT(x) (((x) & 0xf) << 8)
105 #define FTGMAC100_ITC_TXINT_THR(x) (((x) & 0x7) << 12)
106 #define FTGMAC100_ITC_TXINT_TIME_SEL (1 << 15)
107
108 /*
109 * Automatic polling timer control register
110 */
111 #define FTGMAC100_APTC_RXPOLL_CNT(x) (((x) & 0xf) << 0)
112 #define FTGMAC100_APTC_RXPOLL_TIME_SEL (1 << 4)
113 #define FTGMAC100_APTC_TXPOLL_CNT(x) (((x) & 0xf) << 8)
114 #define FTGMAC100_APTC_TXPOLL_TIME_SEL (1 << 12)
115
116 /*
117 * DMA burst length and arbitration control register
118 */
119 #define FTGMAC100_DBLAC_RXFIFO_LTHR(x) (((x) & 0x7) << 0)
120 #define FTGMAC100_DBLAC_RXFIFO_HTHR(x) (((x) & 0x7) << 3)
121 #define FTGMAC100_DBLAC_RX_THR_EN (1 << 6)
122 #define FTGMAC100_DBLAC_RXBURST_SIZE(x) (((x) & 0x3) << 8)
123 #define FTGMAC100_DBLAC_TXBURST_SIZE(x) (((x) & 0x3) << 10)
124 #define FTGMAC100_DBLAC_RXDES_SIZE(x) (((x) & 0xf) << 12)
125 #define FTGMAC100_DBLAC_TXDES_SIZE(x) (((x) & 0xf) << 16)
126 #define FTGMAC100_DBLAC_IFG_CNT(x) (((x) & 0x7) << 20)
127 #define FTGMAC100_DBLAC_IFG_INC (1 << 23)
128
129 /*
130 * DMA FIFO status register
131 */
132 #define FTGMAC100_DMAFIFOS_RXDMA1_SM(dmafifos) ((dmafifos) & 0xf)
133 #define FTGMAC100_DMAFIFOS_RXDMA2_SM(dmafifos) (((dmafifos) >> 4) & 0xf)
134 #define FTGMAC100_DMAFIFOS_RXDMA3_SM(dmafifos) (((dmafifos) >> 8) & 0x7)
135 #define FTGMAC100_DMAFIFOS_TXDMA1_SM(dmafifos) (((dmafifos) >> 12) & 0xf)
136 #define FTGMAC100_DMAFIFOS_TXDMA2_SM(dmafifos) (((dmafifos) >> 16) & 0x3)
137 #define FTGMAC100_DMAFIFOS_TXDMA3_SM(dmafifos) (((dmafifos) >> 18) & 0xf)
138 #define FTGMAC100_DMAFIFOS_RXFIFO_EMPTY (1 << 26)
139 #define FTGMAC100_DMAFIFOS_TXFIFO_EMPTY (1 << 27)
140 #define FTGMAC100_DMAFIFOS_RXDMA_GRANT (1 << 28)
141 #define FTGMAC100_DMAFIFOS_TXDMA_GRANT (1 << 29)
142 #define FTGMAC100_DMAFIFOS_RXDMA_REQ (1 << 30)
143 #define FTGMAC100_DMAFIFOS_TXDMA_REQ (1 << 31)
144
145 /*
146 * Receive buffer size register
147 */
148 #define FTGMAC100_RBSR_SIZE(x) ((x) & 0x3fff)
149
150 /*
151 * MAC control register
152 */
153 #define FTGMAC100_MACCR_TXDMA_EN (1 << 0)
154 #define FTGMAC100_MACCR_RXDMA_EN (1 << 1)
155 #define FTGMAC100_MACCR_TXMAC_EN (1 << 2)
156 #define FTGMAC100_MACCR_RXMAC_EN (1 << 3)
157 #define FTGMAC100_MACCR_RM_VLAN (1 << 4)
158 #define FTGMAC100_MACCR_HPTXR_EN (1 << 5)
159 #define FTGMAC100_MACCR_LOOP_EN (1 << 6)
160 #define FTGMAC100_MACCR_ENRX_IN_HALFTX (1 << 7)
161 #define FTGMAC100_MACCR_FULLDUP (1 << 8)
162 #define FTGMAC100_MACCR_GIGA_MODE (1 << 9)
163 #define FTGMAC100_MACCR_CRC_APD (1 << 10)
164 #define FTGMAC100_MACCR_RX_RUNT (1 << 12)
165 #define FTGMAC100_MACCR_JUMBO_LF (1 << 13)
166 #define FTGMAC100_MACCR_RX_ALL (1 << 14)
167 #define FTGMAC100_MACCR_HT_MULTI_EN (1 << 15)
168 #define FTGMAC100_MACCR_RX_MULTIPKT (1 << 16)
169 #define FTGMAC100_MACCR_RX_BROADPKT (1 << 17)
170 #define FTGMAC100_MACCR_DISCARD_CRCERR (1 << 18)
171 #define FTGMAC100_MACCR_FAST_MODE (1 << 19)
172 #define FTGMAC100_MACCR_SW_RST (1 << 31)
173
174 /*
175 * PHY control register
176 */
177 #define FTGMAC100_PHYCR_MDC_CYCTHR_MASK 0x3f
178 #define FTGMAC100_PHYCR_MDC_CYCTHR(x) ((x) & 0x3f)
179 #define FTGMAC100_PHYCR_PHYAD(x) (((x) & 0x1f) << 16)
180 #define FTGMAC100_PHYCR_REGAD(x) (((x) & 0x1f) << 21)
181 #define FTGMAC100_PHYCR_MIIRD (1 << 26)
182 #define FTGMAC100_PHYCR_MIIWR (1 << 27)
183
184 /*
185 * PHY data register
186 */
187 #define FTGMAC100_PHYDATA_MIIWDATA(x) ((x) & 0xffff)
188 #define FTGMAC100_PHYDATA_MIIRDATA(phydata) (((phydata) >> 16) & 0xffff)
189
190 /*
191 * Transmit descriptor, aligned to 16 bytes
192 */
193 struct ftgmac100_txdes {
194 unsigned int txdes0;
195 unsigned int txdes1;
196 unsigned int txdes2; /* not used by HW */
197 unsigned int txdes3; /* TXBUF_BADR */
198 } __attribute__ ((aligned(16)));
199
200 #define FTGMAC100_TXDES0_TXBUF_SIZE(x) ((x) & 0x3fff)
201 #define FTGMAC100_TXDES0_EDOTR (1 << 15)
202 #define FTGMAC100_TXDES0_CRC_ERR (1 << 19)
203 #define FTGMAC100_TXDES0_LTS (1 << 28)
204 #define FTGMAC100_TXDES0_FTS (1 << 29)
205 #define FTGMAC100_TXDES0_TXDMA_OWN (1 << 31)
206
207 #define FTGMAC100_TXDES1_VLANTAG_CI(x) ((x) & 0xffff)
208 #define FTGMAC100_TXDES1_INS_VLANTAG (1 << 16)
209 #define FTGMAC100_TXDES1_TCP_CHKSUM (1 << 17)
210 #define FTGMAC100_TXDES1_UDP_CHKSUM (1 << 18)
211 #define FTGMAC100_TXDES1_IP_CHKSUM (1 << 19)
212 #define FTGMAC100_TXDES1_LLC (1 << 22)
213 #define FTGMAC100_TXDES1_TX2FIC (1 << 30)
214 #define FTGMAC100_TXDES1_TXIC (1 << 31)
215
216 /*
217 * Receive descriptor, aligned to 16 bytes
218 */
219 struct ftgmac100_rxdes {
220 unsigned int rxdes0;
221 unsigned int rxdes1;
222 unsigned int rxdes2; /* not used by HW */
223 unsigned int rxdes3; /* RXBUF_BADR */
224 } __attribute__ ((aligned(16)));
225
226 #define FTGMAC100_RXDES0_VDBC(x) ((x) & 0x3fff)
227 #define FTGMAC100_RXDES0_EDORR (1 << 15)
228 #define FTGMAC100_RXDES0_MULTICAST (1 << 16)
229 #define FTGMAC100_RXDES0_BROADCAST (1 << 17)
230 #define FTGMAC100_RXDES0_RX_ERR (1 << 18)
231 #define FTGMAC100_RXDES0_CRC_ERR (1 << 19)
232 #define FTGMAC100_RXDES0_FTL (1 << 20)
233 #define FTGMAC100_RXDES0_RUNT (1 << 21)
234 #define FTGMAC100_RXDES0_RX_ODD_NB (1 << 22)
235 #define FTGMAC100_RXDES0_FIFO_FULL (1 << 23)
236 #define FTGMAC100_RXDES0_PAUSE_OPCODE (1 << 24)
237 #define FTGMAC100_RXDES0_PAUSE_FRAME (1 << 25)
238 #define FTGMAC100_RXDES0_LRS (1 << 28)
239 #define FTGMAC100_RXDES0_FRS (1 << 29)
240 #define FTGMAC100_RXDES0_RXPKT_RDY (1 << 31)
241
242 #define FTGMAC100_RXDES1_VLANTAG_CI 0xffff
243 #define FTGMAC100_RXDES1_PROT_MASK (0x3 << 20)
244 #define FTGMAC100_RXDES1_PROT_NONIP (0x0 << 20)
245 #define FTGMAC100_RXDES1_PROT_IP (0x1 << 20)
246 #define FTGMAC100_RXDES1_PROT_TCPIP (0x2 << 20)
247 #define FTGMAC100_RXDES1_PROT_UDPIP (0x3 << 20)
248 #define FTGMAC100_RXDES1_LLC (1 << 22)
249 #define FTGMAC100_RXDES1_DF (1 << 23)
250 #define FTGMAC100_RXDES1_VLANTAG_AVAIL (1 << 24)
251 #define FTGMAC100_RXDES1_TCP_CHKSUM_ERR (1 << 25)
252 #define FTGMAC100_RXDES1_UDP_CHKSUM_ERR (1 << 26)
253 #define FTGMAC100_RXDES1_IP_CHKSUM_ERR (1 << 27)
254
255 #endif /* __FTGMAC100_H */
256
1 /* 1 /*
2 * (C) Copyright 2008 2 * (C) Copyright 2008
3 * Benjamin Warren, biggerbadderben@gmail.com 3 * Benjamin Warren, biggerbadderben@gmail.com
4 * 4 *
5 * See file CREDITS for list of people who contributed to this 5 * See file CREDITS for list of people who contributed to this
6 * project. 6 * project.
7 * 7 *
8 * This program is free software; you can redistribute it and/or 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 9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of 10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version. 11 * the License, or (at your option) any later version.
12 * 12 *
13 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details. 16 * GNU General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU General Public License 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 19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 * MA 02111-1307 USA 21 * MA 02111-1307 USA
22 */ 22 */
23 23
24 /* 24 /*
25 * netdev.h - definitions an prototypes for network devices 25 * netdev.h - definitions an prototypes for network devices
26 */ 26 */
27 27
28 #ifndef _NETDEV_H_ 28 #ifndef _NETDEV_H_
29 #define _NETDEV_H_ 29 #define _NETDEV_H_
30 30
31 /* 31 /*
32 * Board and CPU-specific initialization functions 32 * Board and CPU-specific initialization functions
33 * board_eth_init() has highest priority. cpu_eth_init() only 33 * board_eth_init() has highest priority. cpu_eth_init() only
34 * gets called if board_eth_init() isn't instantiated or fails. 34 * gets called if board_eth_init() isn't instantiated or fails.
35 * Return values: 35 * Return values:
36 * 0: success 36 * 0: success
37 * -1: failure 37 * -1: failure
38 */ 38 */
39 39
40 int board_eth_init(bd_t *bis); 40 int board_eth_init(bd_t *bis);
41 int cpu_eth_init(bd_t *bis); 41 int cpu_eth_init(bd_t *bis);
42 42
43 /* Driver initialization prototypes */ 43 /* Driver initialization prototypes */
44 int altera_tse_initialize(u8 dev_num, int mac_base, 44 int altera_tse_initialize(u8 dev_num, int mac_base,
45 int sgdma_rx_base, int sgdma_tx_base); 45 int sgdma_rx_base, int sgdma_tx_base);
46 int ax88180_initialize(bd_t *bis); 46 int ax88180_initialize(bd_t *bis);
47 int au1x00_enet_initialize(bd_t*); 47 int au1x00_enet_initialize(bd_t*);
48 int at91emac_register(bd_t *bis, unsigned long iobase); 48 int at91emac_register(bd_t *bis, unsigned long iobase);
49 int bfin_EMAC_initialize(bd_t *bis); 49 int bfin_EMAC_initialize(bd_t *bis);
50 int cs8900_initialize(u8 dev_num, int base_addr); 50 int cs8900_initialize(u8 dev_num, int base_addr);
51 int dc21x4x_initialize(bd_t *bis); 51 int dc21x4x_initialize(bd_t *bis);
52 int davinci_emac_initialize(void); 52 int davinci_emac_initialize(void);
53 int designware_initialize(u32 id, ulong base_addr, u32 phy_addr); 53 int designware_initialize(u32 id, ulong base_addr, u32 phy_addr);
54 int dnet_eth_initialize(int id, void *regs, unsigned int phy_addr); 54 int dnet_eth_initialize(int id, void *regs, unsigned int phy_addr);
55 int e1000_initialize(bd_t *bis); 55 int e1000_initialize(bd_t *bis);
56 int eepro100_initialize(bd_t *bis); 56 int eepro100_initialize(bd_t *bis);
57 int enc28j60_initialize(unsigned int bus, unsigned int cs, 57 int enc28j60_initialize(unsigned int bus, unsigned int cs,
58 unsigned int max_hz, unsigned int mode); 58 unsigned int max_hz, unsigned int mode);
59 int ep93xx_eth_initialize(u8 dev_num, int base_addr); 59 int ep93xx_eth_initialize(u8 dev_num, int base_addr);
60 int ethoc_initialize(u8 dev_num, int base_addr); 60 int ethoc_initialize(u8 dev_num, int base_addr);
61 int eth_3com_initialize (bd_t * bis); 61 int eth_3com_initialize (bd_t * bis);
62 int fec_initialize (bd_t *bis); 62 int fec_initialize (bd_t *bis);
63 int fecmxc_initialize (bd_t *bis); 63 int fecmxc_initialize (bd_t *bis);
64 int ftgmac100_initialize(bd_t *bits);
64 int ftmac100_initialize(bd_t *bits); 65 int ftmac100_initialize(bd_t *bits);
65 int greth_initialize(bd_t *bis); 66 int greth_initialize(bd_t *bis);
66 void gt6426x_eth_initialize(bd_t *bis); 67 void gt6426x_eth_initialize(bd_t *bis);
67 int inca_switch_initialize(bd_t *bis); 68 int inca_switch_initialize(bd_t *bis);
68 int lan91c96_initialize(u8 dev_num, int base_addr); 69 int lan91c96_initialize(u8 dev_num, int base_addr);
69 int macb_eth_initialize(int id, void *regs, unsigned int phy_addr); 70 int macb_eth_initialize(int id, void *regs, unsigned int phy_addr);
70 int mcdmafec_initialize(bd_t *bis); 71 int mcdmafec_initialize(bd_t *bis);
71 int mcffec_initialize(bd_t *bis); 72 int mcffec_initialize(bd_t *bis);
72 int mpc512x_fec_initialize(bd_t *bis); 73 int mpc512x_fec_initialize(bd_t *bis);
73 int mpc5xxx_fec_initialize(bd_t *bis); 74 int mpc5xxx_fec_initialize(bd_t *bis);
74 int mpc8220_fec_initialize(bd_t *bis); 75 int mpc8220_fec_initialize(bd_t *bis);
75 int mpc82xx_scc_enet_initialize(bd_t *bis); 76 int mpc82xx_scc_enet_initialize(bd_t *bis);
76 int mvgbe_initialize(bd_t *bis); 77 int mvgbe_initialize(bd_t *bis);
77 int natsemi_initialize(bd_t *bis); 78 int natsemi_initialize(bd_t *bis);
78 int npe_initialize(bd_t *bis); 79 int npe_initialize(bd_t *bis);
79 int ns8382x_initialize(bd_t *bis); 80 int ns8382x_initialize(bd_t *bis);
80 int pcnet_initialize(bd_t *bis); 81 int pcnet_initialize(bd_t *bis);
81 int plb2800_eth_initialize(bd_t *bis); 82 int plb2800_eth_initialize(bd_t *bis);
82 int ppc_4xx_eth_initialize (bd_t *bis); 83 int ppc_4xx_eth_initialize (bd_t *bis);
83 int rtl8139_initialize(bd_t *bis); 84 int rtl8139_initialize(bd_t *bis);
84 int rtl8169_initialize(bd_t *bis); 85 int rtl8169_initialize(bd_t *bis);
85 int scc_initialize(bd_t *bis); 86 int scc_initialize(bd_t *bis);
86 int skge_initialize(bd_t *bis); 87 int skge_initialize(bd_t *bis);
87 int smc911x_initialize(u8 dev_num, int base_addr); 88 int smc911x_initialize(u8 dev_num, int base_addr);
88 int smc91111_initialize(u8 dev_num, int base_addr); 89 int smc91111_initialize(u8 dev_num, int base_addr);
89 int tsi108_eth_initialize(bd_t *bis); 90 int tsi108_eth_initialize(bd_t *bis);
90 int uec_standard_init(bd_t *bis); 91 int uec_standard_init(bd_t *bis);
91 int uli526x_initialize(bd_t *bis); 92 int uli526x_initialize(bd_t *bis);
92 int xilinx_emaclite_initialize (bd_t *bis, int base_addr); 93 int xilinx_emaclite_initialize (bd_t *bis, int base_addr);
93 int sh_eth_initialize(bd_t *bis); 94 int sh_eth_initialize(bd_t *bis);
94 int dm9000_initialize(bd_t *bis); 95 int dm9000_initialize(bd_t *bis);
95 96
96 /* Boards with PCI network controllers can call this from their board_eth_init() 97 /* Boards with PCI network controllers can call this from their board_eth_init()
97 * function to initialize whatever's on board. 98 * function to initialize whatever's on board.
98 * Return value is total # of devices found */ 99 * Return value is total # of devices found */
99 100
100 static inline int pci_eth_init(bd_t *bis) 101 static inline int pci_eth_init(bd_t *bis)
101 { 102 {
102 int num = 0; 103 int num = 0;
103 104
104 #ifdef CONFIG_PCI 105 #ifdef CONFIG_PCI
105 106
106 #ifdef CONFIG_EEPRO100 107 #ifdef CONFIG_EEPRO100
107 num += eepro100_initialize(bis); 108 num += eepro100_initialize(bis);
108 #endif 109 #endif
109 #ifdef CONFIG_TULIP 110 #ifdef CONFIG_TULIP
110 num += dc21x4x_initialize(bis); 111 num += dc21x4x_initialize(bis);
111 #endif 112 #endif
112 #ifdef CONFIG_E1000 113 #ifdef CONFIG_E1000
113 num += e1000_initialize(bis); 114 num += e1000_initialize(bis);
114 #endif 115 #endif
115 #ifdef CONFIG_PCNET 116 #ifdef CONFIG_PCNET
116 num += pcnet_initialize(bis); 117 num += pcnet_initialize(bis);
117 #endif 118 #endif
118 #ifdef CONFIG_NATSEMI 119 #ifdef CONFIG_NATSEMI
119 num += natsemi_initialize(bis); 120 num += natsemi_initialize(bis);
120 #endif 121 #endif
121 #ifdef CONFIG_NS8382X 122 #ifdef CONFIG_NS8382X
122 num += ns8382x_initialize(bis); 123 num += ns8382x_initialize(bis);
123 #endif 124 #endif
124 #if defined(CONFIG_RTL8139) 125 #if defined(CONFIG_RTL8139)
125 num += rtl8139_initialize(bis); 126 num += rtl8139_initialize(bis);
126 #endif 127 #endif
127 #if defined(CONFIG_RTL8169) 128 #if defined(CONFIG_RTL8169)
128 num += rtl8169_initialize(bis); 129 num += rtl8169_initialize(bis);
129 #endif 130 #endif
130 #if defined(CONFIG_ULI526X) 131 #if defined(CONFIG_ULI526X)
131 num += uli526x_initialize(bis); 132 num += uli526x_initialize(bis);
132 #endif 133 #endif
133 134
134 #endif /* CONFIG_PCI */ 135 #endif /* CONFIG_PCI */
135 return num; 136 return num;
136 } 137 }
137 138
138 /* 139 /*
139 * Boards with mv88e61xx switch can use this by defining 140 * Boards with mv88e61xx switch can use this by defining
140 * CONFIG_MV88E61XX_SWITCH in respective board configheader file 141 * CONFIG_MV88E61XX_SWITCH in respective board configheader file
141 * the stuct and enums here are used to specify switch configuration params 142 * the stuct and enums here are used to specify switch configuration params
142 */ 143 */
143 #if defined(CONFIG_MV88E61XX_SWITCH) 144 #if defined(CONFIG_MV88E61XX_SWITCH)
144 enum mv88e61xx_cfg_vlan { 145 enum mv88e61xx_cfg_vlan {
145 MV88E61XX_VLANCFG_DEFAULT, 146 MV88E61XX_VLANCFG_DEFAULT,
146 MV88E61XX_VLANCFG_ROUTER 147 MV88E61XX_VLANCFG_ROUTER
147 }; 148 };
148 149
149 enum mv88e61xx_cfg_mdip { 150 enum mv88e61xx_cfg_mdip {
150 MV88E61XX_MDIP_NOCHANGE, 151 MV88E61XX_MDIP_NOCHANGE,
151 MV88E61XX_MDIP_REVERSE 152 MV88E61XX_MDIP_REVERSE
152 }; 153 };
153 154
154 enum mv88e61xx_cfg_ledinit { 155 enum mv88e61xx_cfg_ledinit {
155 MV88E61XX_LED_INIT_DIS, 156 MV88E61XX_LED_INIT_DIS,
156 MV88E61XX_LED_INIT_EN 157 MV88E61XX_LED_INIT_EN
157 }; 158 };
158 159
159 enum mv88e61xx_cfg_rgmiid { 160 enum mv88e61xx_cfg_rgmiid {
160 MV88E61XX_RGMII_DELAY_DIS, 161 MV88E61XX_RGMII_DELAY_DIS,
161 MV88E61XX_RGMII_DELAY_EN 162 MV88E61XX_RGMII_DELAY_EN
162 }; 163 };
163 164
164 enum mv88e61xx_cfg_prtstt { 165 enum mv88e61xx_cfg_prtstt {
165 MV88E61XX_PORTSTT_DISABLED, 166 MV88E61XX_PORTSTT_DISABLED,
166 MV88E61XX_PORTSTT_BLOCKING, 167 MV88E61XX_PORTSTT_BLOCKING,
167 MV88E61XX_PORTSTT_LEARNING, 168 MV88E61XX_PORTSTT_LEARNING,
168 MV88E61XX_PORTSTT_FORWARDING 169 MV88E61XX_PORTSTT_FORWARDING
169 }; 170 };
170 171
171 struct mv88e61xx_config { 172 struct mv88e61xx_config {
172 char *name; 173 char *name;
173 enum mv88e61xx_cfg_vlan vlancfg; 174 enum mv88e61xx_cfg_vlan vlancfg;
174 enum mv88e61xx_cfg_rgmiid rgmii_delay; 175 enum mv88e61xx_cfg_rgmiid rgmii_delay;
175 enum mv88e61xx_cfg_prtstt portstate; 176 enum mv88e61xx_cfg_prtstt portstate;
176 enum mv88e61xx_cfg_ledinit led_init; 177 enum mv88e61xx_cfg_ledinit led_init;
177 enum mv88e61xx_cfg_mdip mdip; 178 enum mv88e61xx_cfg_mdip mdip;
178 u32 ports_enabled; 179 u32 ports_enabled;
179 u8 cpuport; 180 u8 cpuport;
180 }; 181 };
181 182
182 int mv88e61xx_switch_initialize(struct mv88e61xx_config *swconfig); 183 int mv88e61xx_switch_initialize(struct mv88e61xx_config *swconfig);
183 #endif /* CONFIG_MV88E61XX_SWITCH */ 184 #endif /* CONFIG_MV88E61XX_SWITCH */
184 185
185 #endif /* _NETDEV_H_ */ 186 #endif /* _NETDEV_H_ */
186 187