Commit d48eb5131d287f52bb85b4c58c8680a2e8e3b641
Committed by
Wolfgang Denk
1 parent
655b34a78a
Exists in
master
and in
54 other branches
i2c: Remove deprecated individual i2c commands
The following individual I2C commands have been removed: imd, imm, inm, imw, icrc32, iprobe, iloop, isdram. The functionality of the individual commands is still available via the 'i2c' command. This change only has an impact on those boards which did not have CONFIG_I2C_CMD_TREE defined. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Showing 26 changed files with 0 additions and 98 deletions Inline Diff
- README
- common/cmd_i2c.c
- doc/feature-removal-schedule.txt
- include/configs/DU405.h
- include/configs/DU440.h
- include/configs/MPC8313ERDB.h
- include/configs/MPC8349EMDS.h
- include/configs/MPC8349ITX.h
- include/configs/MPC8360ERDK.h
- include/configs/MPC8536DS.h
- include/configs/MPC8568MDS.h
- include/configs/MPC8569MDS.h
- include/configs/MPC8572DS.h
- include/configs/MVBLM7.h
- include/configs/PMC440.h
- include/configs/SIMPC8313.h
- include/configs/XPEDITE5200.h
- include/configs/XPEDITE5370.h
- include/configs/ads5121.h
- include/configs/at91rm9200ek.h
- include/configs/katmai.h
- include/configs/keymile-common.h
- include/configs/kmeter1.h
- include/configs/korat.h
- include/configs/sbc8349.h
- include/configs/socrates.h
README
1 | # | 1 | # |
2 | # (C) Copyright 2000 - 2008 | 2 | # (C) Copyright 2000 - 2008 |
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 | U-Boot uses a 3 level version number containing a version, a | 129 | U-Boot uses a 3 level version number containing a version, a |
130 | sub-version, and a patchlevel: "U-Boot-2.34.5" means version "2", | 130 | sub-version, and a patchlevel: "U-Boot-2.34.5" means version "2", |
131 | sub-version "34", and patchlevel "4". | 131 | sub-version "34", and patchlevel "4". |
132 | 132 | ||
133 | The patchlevel is used to indicate certain stages of development | 133 | The patchlevel is used to indicate certain stages of development |
134 | between released versions, i. e. officially released versions of | 134 | between released versions, i. e. officially released versions of |
135 | U-Boot will always have a patchlevel of "0". | 135 | U-Boot will always have a patchlevel of "0". |
136 | 136 | ||
137 | 137 | ||
138 | Directory Hierarchy: | 138 | Directory Hierarchy: |
139 | ==================== | 139 | ==================== |
140 | 140 | ||
141 | - board Board dependent files | 141 | - board Board dependent files |
142 | - common Misc architecture independent functions | 142 | - common Misc architecture independent functions |
143 | - cpu CPU specific files | 143 | - cpu CPU specific files |
144 | - 74xx_7xx Files specific to Freescale MPC74xx and 7xx CPUs | 144 | - 74xx_7xx Files specific to Freescale MPC74xx and 7xx CPUs |
145 | - arm720t Files specific to ARM 720 CPUs | 145 | - arm720t Files specific to ARM 720 CPUs |
146 | - arm920t Files specific to ARM 920 CPUs | 146 | - arm920t Files specific to ARM 920 CPUs |
147 | - at91rm9200 Files specific to Atmel AT91RM9200 CPU | 147 | - at91rm9200 Files specific to Atmel AT91RM9200 CPU |
148 | - imx Files specific to Freescale MC9328 i.MX CPUs | 148 | - imx Files specific to Freescale MC9328 i.MX CPUs |
149 | - s3c24x0 Files specific to Samsung S3C24X0 CPUs | 149 | - s3c24x0 Files specific to Samsung S3C24X0 CPUs |
150 | - arm925t Files specific to ARM 925 CPUs | 150 | - arm925t Files specific to ARM 925 CPUs |
151 | - arm926ejs Files specific to ARM 926 CPUs | 151 | - arm926ejs Files specific to ARM 926 CPUs |
152 | - arm1136 Files specific to ARM 1136 CPUs | 152 | - arm1136 Files specific to ARM 1136 CPUs |
153 | - at32ap Files specific to Atmel AVR32 AP CPUs | 153 | - at32ap Files specific to Atmel AVR32 AP CPUs |
154 | - blackfin Files specific to Analog Devices Blackfin CPUs | 154 | - blackfin Files specific to Analog Devices Blackfin CPUs |
155 | - i386 Files specific to i386 CPUs | 155 | - i386 Files specific to i386 CPUs |
156 | - ixp Files specific to Intel XScale IXP CPUs | 156 | - ixp Files specific to Intel XScale IXP CPUs |
157 | - leon2 Files specific to Gaisler LEON2 SPARC CPU | 157 | - leon2 Files specific to Gaisler LEON2 SPARC CPU |
158 | - leon3 Files specific to Gaisler LEON3 SPARC CPU | 158 | - leon3 Files specific to Gaisler LEON3 SPARC CPU |
159 | - mcf52x2 Files specific to Freescale ColdFire MCF52x2 CPUs | 159 | - mcf52x2 Files specific to Freescale ColdFire MCF52x2 CPUs |
160 | - mcf5227x Files specific to Freescale ColdFire MCF5227x CPUs | 160 | - mcf5227x Files specific to Freescale ColdFire MCF5227x CPUs |
161 | - mcf532x Files specific to Freescale ColdFire MCF5329 CPUs | 161 | - mcf532x Files specific to Freescale ColdFire MCF5329 CPUs |
162 | - mcf5445x Files specific to Freescale ColdFire MCF5445x CPUs | 162 | - mcf5445x Files specific to Freescale ColdFire MCF5445x CPUs |
163 | - mcf547x_8x Files specific to Freescale ColdFire MCF547x_8x CPUs | 163 | - mcf547x_8x Files specific to Freescale ColdFire MCF547x_8x CPUs |
164 | - mips Files specific to MIPS CPUs | 164 | - mips Files specific to MIPS CPUs |
165 | - mpc5xx Files specific to Freescale MPC5xx CPUs | 165 | - mpc5xx Files specific to Freescale MPC5xx CPUs |
166 | - mpc5xxx Files specific to Freescale MPC5xxx CPUs | 166 | - mpc5xxx Files specific to Freescale MPC5xxx CPUs |
167 | - mpc8xx Files specific to Freescale MPC8xx CPUs | 167 | - mpc8xx Files specific to Freescale MPC8xx CPUs |
168 | - mpc8220 Files specific to Freescale MPC8220 CPUs | 168 | - mpc8220 Files specific to Freescale MPC8220 CPUs |
169 | - mpc824x Files specific to Freescale MPC824x CPUs | 169 | - mpc824x Files specific to Freescale MPC824x CPUs |
170 | - mpc8260 Files specific to Freescale MPC8260 CPUs | 170 | - mpc8260 Files specific to Freescale MPC8260 CPUs |
171 | - mpc85xx Files specific to Freescale MPC85xx CPUs | 171 | - mpc85xx Files specific to Freescale MPC85xx CPUs |
172 | - nios Files specific to Altera NIOS CPUs | 172 | - nios Files specific to Altera NIOS CPUs |
173 | - nios2 Files specific to Altera Nios-II CPUs | 173 | - nios2 Files specific to Altera Nios-II CPUs |
174 | - ppc4xx Files specific to AMCC PowerPC 4xx CPUs | 174 | - ppc4xx Files specific to AMCC PowerPC 4xx CPUs |
175 | - pxa Files specific to Intel XScale PXA CPUs | 175 | - pxa Files specific to Intel XScale PXA CPUs |
176 | - s3c44b0 Files specific to Samsung S3C44B0 CPUs | 176 | - s3c44b0 Files specific to Samsung S3C44B0 CPUs |
177 | - sa1100 Files specific to Intel StrongARM SA1100 CPUs | 177 | - sa1100 Files specific to Intel StrongARM SA1100 CPUs |
178 | - disk Code for disk drive partition handling | 178 | - disk Code for disk drive partition handling |
179 | - doc Documentation (don't expect too much) | 179 | - doc Documentation (don't expect too much) |
180 | - drivers Commonly used device drivers | 180 | - drivers Commonly used device drivers |
181 | - dtt Digital Thermometer and Thermostat drivers | 181 | - dtt Digital Thermometer and Thermostat drivers |
182 | - examples Example code for standalone applications, etc. | 182 | - examples Example code for standalone applications, etc. |
183 | - include Header Files | 183 | - include Header Files |
184 | - lib_arm Files generic to ARM architecture | 184 | - lib_arm Files generic to ARM architecture |
185 | - lib_avr32 Files generic to AVR32 architecture | 185 | - lib_avr32 Files generic to AVR32 architecture |
186 | - lib_blackfin Files generic to Blackfin architecture | 186 | - lib_blackfin Files generic to Blackfin architecture |
187 | - lib_generic Files generic to all architectures | 187 | - lib_generic Files generic to all architectures |
188 | - lib_i386 Files generic to i386 architecture | 188 | - lib_i386 Files generic to i386 architecture |
189 | - lib_m68k Files generic to m68k architecture | 189 | - lib_m68k Files generic to m68k architecture |
190 | - lib_mips Files generic to MIPS architecture | 190 | - lib_mips Files generic to MIPS architecture |
191 | - lib_nios Files generic to NIOS architecture | 191 | - lib_nios Files generic to NIOS architecture |
192 | - lib_ppc Files generic to PowerPC architecture | 192 | - lib_ppc Files generic to PowerPC architecture |
193 | - lib_sparc Files generic to SPARC architecture | 193 | - lib_sparc Files generic to SPARC architecture |
194 | - libfdt Library files to support flattened device trees | 194 | - libfdt Library files to support flattened device trees |
195 | - net Networking code | 195 | - net Networking code |
196 | - post Power On Self Test | 196 | - post Power On Self Test |
197 | - rtc Real Time Clock drivers | 197 | - rtc Real Time Clock drivers |
198 | - tools Tools to build S-Record or U-Boot images, etc. | 198 | - tools Tools to build S-Record or U-Boot images, etc. |
199 | 199 | ||
200 | Software Configuration: | 200 | Software Configuration: |
201 | ======================= | 201 | ======================= |
202 | 202 | ||
203 | Configuration is usually done using C preprocessor defines; the | 203 | Configuration is usually done using C preprocessor defines; the |
204 | rationale behind that is to avoid dead code whenever possible. | 204 | rationale behind that is to avoid dead code whenever possible. |
205 | 205 | ||
206 | There are two classes of configuration variables: | 206 | There are two classes of configuration variables: |
207 | 207 | ||
208 | * Configuration _OPTIONS_: | 208 | * Configuration _OPTIONS_: |
209 | These are selectable by the user and have names beginning with | 209 | These are selectable by the user and have names beginning with |
210 | "CONFIG_". | 210 | "CONFIG_". |
211 | 211 | ||
212 | * Configuration _SETTINGS_: | 212 | * Configuration _SETTINGS_: |
213 | These depend on the hardware etc. and should not be meddled with if | 213 | These depend on the hardware etc. and should not be meddled with if |
214 | you don't know what you're doing; they have names beginning with | 214 | you don't know what you're doing; they have names beginning with |
215 | "CONFIG_SYS_". | 215 | "CONFIG_SYS_". |
216 | 216 | ||
217 | Later we will add a configuration tool - probably similar to or even | 217 | Later we will add a configuration tool - probably similar to or even |
218 | identical to what's used for the Linux kernel. Right now, we have to | 218 | identical to what's used for the Linux kernel. Right now, we have to |
219 | do the configuration by hand, which means creating some symbolic | 219 | do the configuration by hand, which means creating some symbolic |
220 | links and editing some configuration files. We use the TQM8xxL boards | 220 | links and editing some configuration files. We use the TQM8xxL boards |
221 | as an example here. | 221 | as an example here. |
222 | 222 | ||
223 | 223 | ||
224 | Selection of Processor Architecture and Board Type: | 224 | Selection of Processor Architecture and Board Type: |
225 | --------------------------------------------------- | 225 | --------------------------------------------------- |
226 | 226 | ||
227 | For all supported boards there are ready-to-use default | 227 | For all supported boards there are ready-to-use default |
228 | configurations available; just type "make <board_name>_config". | 228 | configurations available; just type "make <board_name>_config". |
229 | 229 | ||
230 | Example: For a TQM823L module type: | 230 | Example: For a TQM823L module type: |
231 | 231 | ||
232 | cd u-boot | 232 | cd u-boot |
233 | make TQM823L_config | 233 | make TQM823L_config |
234 | 234 | ||
235 | For the Cogent platform, you need to specify the CPU type as well; | 235 | For the Cogent platform, you need to specify the CPU type as well; |
236 | e.g. "make cogent_mpc8xx_config". And also configure the cogent | 236 | e.g. "make cogent_mpc8xx_config". And also configure the cogent |
237 | directory according to the instructions in cogent/README. | 237 | directory according to the instructions in cogent/README. |
238 | 238 | ||
239 | 239 | ||
240 | Configuration Options: | 240 | Configuration Options: |
241 | ---------------------- | 241 | ---------------------- |
242 | 242 | ||
243 | Configuration depends on the combination of board and CPU type; all | 243 | Configuration depends on the combination of board and CPU type; all |
244 | such information is kept in a configuration file | 244 | such information is kept in a configuration file |
245 | "include/configs/<board_name>.h". | 245 | "include/configs/<board_name>.h". |
246 | 246 | ||
247 | Example: For a TQM823L module, all configuration settings are in | 247 | Example: For a TQM823L module, all configuration settings are in |
248 | "include/configs/TQM823L.h". | 248 | "include/configs/TQM823L.h". |
249 | 249 | ||
250 | 250 | ||
251 | Many of the options are named exactly as the corresponding Linux | 251 | Many of the options are named exactly as the corresponding Linux |
252 | kernel configuration options. The intention is to make it easier to | 252 | kernel configuration options. The intention is to make it easier to |
253 | build a config tool - later. | 253 | build a config tool - later. |
254 | 254 | ||
255 | 255 | ||
256 | The following options need to be configured: | 256 | The following options need to be configured: |
257 | 257 | ||
258 | - CPU Type: Define exactly one, e.g. CONFIG_MPC85XX. | 258 | - CPU Type: Define exactly one, e.g. CONFIG_MPC85XX. |
259 | 259 | ||
260 | - Board Type: Define exactly one, e.g. CONFIG_MPC8540ADS. | 260 | - Board Type: Define exactly one, e.g. CONFIG_MPC8540ADS. |
261 | 261 | ||
262 | - CPU Daughterboard Type: (if CONFIG_ATSTK1000 is defined) | 262 | - CPU Daughterboard Type: (if CONFIG_ATSTK1000 is defined) |
263 | Define exactly one, e.g. CONFIG_ATSTK1002 | 263 | Define exactly one, e.g. CONFIG_ATSTK1002 |
264 | 264 | ||
265 | - CPU Module Type: (if CONFIG_COGENT is defined) | 265 | - CPU Module Type: (if CONFIG_COGENT is defined) |
266 | Define exactly one of | 266 | Define exactly one of |
267 | CONFIG_CMA286_60_OLD | 267 | CONFIG_CMA286_60_OLD |
268 | --- FIXME --- not tested yet: | 268 | --- FIXME --- not tested yet: |
269 | CONFIG_CMA286_60, CONFIG_CMA286_21, CONFIG_CMA286_60P, | 269 | CONFIG_CMA286_60, CONFIG_CMA286_21, CONFIG_CMA286_60P, |
270 | CONFIG_CMA287_23, CONFIG_CMA287_50 | 270 | CONFIG_CMA287_23, CONFIG_CMA287_50 |
271 | 271 | ||
272 | - Motherboard Type: (if CONFIG_COGENT is defined) | 272 | - Motherboard Type: (if CONFIG_COGENT is defined) |
273 | Define exactly one of | 273 | Define exactly one of |
274 | CONFIG_CMA101, CONFIG_CMA102 | 274 | CONFIG_CMA101, CONFIG_CMA102 |
275 | 275 | ||
276 | - Motherboard I/O Modules: (if CONFIG_COGENT is defined) | 276 | - Motherboard I/O Modules: (if CONFIG_COGENT is defined) |
277 | Define one or more of | 277 | Define one or more of |
278 | CONFIG_CMA302 | 278 | CONFIG_CMA302 |
279 | 279 | ||
280 | - Motherboard Options: (if CONFIG_CMA101 or CONFIG_CMA102 are defined) | 280 | - Motherboard Options: (if CONFIG_CMA101 or CONFIG_CMA102 are defined) |
281 | Define one or more of | 281 | Define one or more of |
282 | CONFIG_LCD_HEARTBEAT - update a character position on | 282 | CONFIG_LCD_HEARTBEAT - update a character position on |
283 | the LCD display every second with | 283 | the LCD display every second with |
284 | a "rotator" |\-/|\-/ | 284 | a "rotator" |\-/|\-/ |
285 | 285 | ||
286 | - Board flavour: (if CONFIG_MPC8260ADS is defined) | 286 | - Board flavour: (if CONFIG_MPC8260ADS is defined) |
287 | CONFIG_ADSTYPE | 287 | CONFIG_ADSTYPE |
288 | Possible values are: | 288 | Possible values are: |
289 | CONFIG_SYS_8260ADS - original MPC8260ADS | 289 | CONFIG_SYS_8260ADS - original MPC8260ADS |
290 | CONFIG_SYS_8266ADS - MPC8266ADS | 290 | CONFIG_SYS_8266ADS - MPC8266ADS |
291 | CONFIG_SYS_PQ2FADS - PQ2FADS-ZU or PQ2FADS-VR | 291 | CONFIG_SYS_PQ2FADS - PQ2FADS-ZU or PQ2FADS-VR |
292 | CONFIG_SYS_8272ADS - MPC8272ADS | 292 | CONFIG_SYS_8272ADS - MPC8272ADS |
293 | 293 | ||
294 | - MPC824X Family Member (if CONFIG_MPC824X is defined) | 294 | - MPC824X Family Member (if CONFIG_MPC824X is defined) |
295 | Define exactly one of | 295 | Define exactly one of |
296 | CONFIG_MPC8240, CONFIG_MPC8245 | 296 | CONFIG_MPC8240, CONFIG_MPC8245 |
297 | 297 | ||
298 | - 8xx CPU Options: (if using an MPC8xx CPU) | 298 | - 8xx CPU Options: (if using an MPC8xx CPU) |
299 | CONFIG_8xx_GCLK_FREQ - deprecated: CPU clock if | 299 | CONFIG_8xx_GCLK_FREQ - deprecated: CPU clock if |
300 | get_gclk_freq() cannot work | 300 | get_gclk_freq() cannot work |
301 | e.g. if there is no 32KHz | 301 | e.g. if there is no 32KHz |
302 | reference PIT/RTC clock | 302 | reference PIT/RTC clock |
303 | CONFIG_8xx_OSCLK - PLL input clock (either EXTCLK | 303 | CONFIG_8xx_OSCLK - PLL input clock (either EXTCLK |
304 | or XTAL/EXTAL) | 304 | or XTAL/EXTAL) |
305 | 305 | ||
306 | - 859/866/885 CPU options: (if using a MPC859 or MPC866 or MPC885 CPU): | 306 | - 859/866/885 CPU options: (if using a MPC859 or MPC866 or MPC885 CPU): |
307 | CONFIG_SYS_8xx_CPUCLK_MIN | 307 | CONFIG_SYS_8xx_CPUCLK_MIN |
308 | CONFIG_SYS_8xx_CPUCLK_MAX | 308 | CONFIG_SYS_8xx_CPUCLK_MAX |
309 | CONFIG_8xx_CPUCLK_DEFAULT | 309 | CONFIG_8xx_CPUCLK_DEFAULT |
310 | See doc/README.MPC866 | 310 | See doc/README.MPC866 |
311 | 311 | ||
312 | CONFIG_SYS_MEASURE_CPUCLK | 312 | CONFIG_SYS_MEASURE_CPUCLK |
313 | 313 | ||
314 | Define this to measure the actual CPU clock instead | 314 | Define this to measure the actual CPU clock instead |
315 | of relying on the correctness of the configured | 315 | of relying on the correctness of the configured |
316 | values. Mostly useful for board bringup to make sure | 316 | values. Mostly useful for board bringup to make sure |
317 | the PLL is locked at the intended frequency. Note | 317 | the PLL is locked at the intended frequency. Note |
318 | that this requires a (stable) reference clock (32 kHz | 318 | that this requires a (stable) reference clock (32 kHz |
319 | RTC clock or CONFIG_SYS_8XX_XIN) | 319 | RTC clock or CONFIG_SYS_8XX_XIN) |
320 | 320 | ||
321 | CONFIG_SYS_DELAYED_ICACHE | 321 | CONFIG_SYS_DELAYED_ICACHE |
322 | 322 | ||
323 | Define this option if you want to enable the | 323 | Define this option if you want to enable the |
324 | ICache only when Code runs from RAM. | 324 | ICache only when Code runs from RAM. |
325 | 325 | ||
326 | - Intel Monahans options: | 326 | - Intel Monahans options: |
327 | CONFIG_SYS_MONAHANS_RUN_MODE_OSC_RATIO | 327 | CONFIG_SYS_MONAHANS_RUN_MODE_OSC_RATIO |
328 | 328 | ||
329 | Defines the Monahans run mode to oscillator | 329 | Defines the Monahans run mode to oscillator |
330 | ratio. Valid values are 8, 16, 24, 31. The core | 330 | ratio. Valid values are 8, 16, 24, 31. The core |
331 | frequency is this value multiplied by 13 MHz. | 331 | frequency is this value multiplied by 13 MHz. |
332 | 332 | ||
333 | CONFIG_SYS_MONAHANS_TURBO_RUN_MODE_RATIO | 333 | CONFIG_SYS_MONAHANS_TURBO_RUN_MODE_RATIO |
334 | 334 | ||
335 | Defines the Monahans turbo mode to oscillator | 335 | Defines the Monahans turbo mode to oscillator |
336 | ratio. Valid values are 1 (default if undefined) and | 336 | ratio. Valid values are 1 (default if undefined) and |
337 | 2. The core frequency as calculated above is multiplied | 337 | 2. The core frequency as calculated above is multiplied |
338 | by this value. | 338 | by this value. |
339 | 339 | ||
340 | - Linux Kernel Interface: | 340 | - Linux Kernel Interface: |
341 | CONFIG_CLOCKS_IN_MHZ | 341 | CONFIG_CLOCKS_IN_MHZ |
342 | 342 | ||
343 | U-Boot stores all clock information in Hz | 343 | U-Boot stores all clock information in Hz |
344 | internally. For binary compatibility with older Linux | 344 | internally. For binary compatibility with older Linux |
345 | kernels (which expect the clocks passed in the | 345 | kernels (which expect the clocks passed in the |
346 | bd_info data to be in MHz) the environment variable | 346 | bd_info data to be in MHz) the environment variable |
347 | "clocks_in_mhz" can be defined so that U-Boot | 347 | "clocks_in_mhz" can be defined so that U-Boot |
348 | converts clock data to MHZ before passing it to the | 348 | converts clock data to MHZ before passing it to the |
349 | Linux kernel. | 349 | Linux kernel. |
350 | When CONFIG_CLOCKS_IN_MHZ is defined, a definition of | 350 | When CONFIG_CLOCKS_IN_MHZ is defined, a definition of |
351 | "clocks_in_mhz=1" is automatically included in the | 351 | "clocks_in_mhz=1" is automatically included in the |
352 | default environment. | 352 | default environment. |
353 | 353 | ||
354 | CONFIG_MEMSIZE_IN_BYTES [relevant for MIPS only] | 354 | CONFIG_MEMSIZE_IN_BYTES [relevant for MIPS only] |
355 | 355 | ||
356 | When transferring memsize parameter to linux, some versions | 356 | When transferring memsize parameter to linux, some versions |
357 | expect it to be in bytes, others in MB. | 357 | expect it to be in bytes, others in MB. |
358 | Define CONFIG_MEMSIZE_IN_BYTES to make it in bytes. | 358 | Define CONFIG_MEMSIZE_IN_BYTES to make it in bytes. |
359 | 359 | ||
360 | CONFIG_OF_LIBFDT | 360 | CONFIG_OF_LIBFDT |
361 | 361 | ||
362 | New kernel versions are expecting firmware settings to be | 362 | New kernel versions are expecting firmware settings to be |
363 | passed using flattened device trees (based on open firmware | 363 | passed using flattened device trees (based on open firmware |
364 | concepts). | 364 | concepts). |
365 | 365 | ||
366 | CONFIG_OF_LIBFDT | 366 | CONFIG_OF_LIBFDT |
367 | * New libfdt-based support | 367 | * New libfdt-based support |
368 | * Adds the "fdt" command | 368 | * Adds the "fdt" command |
369 | * The bootm command automatically updates the fdt | 369 | * The bootm command automatically updates the fdt |
370 | 370 | ||
371 | OF_CPU - The proper name of the cpus node. | 371 | OF_CPU - The proper name of the cpus node. |
372 | OF_SOC - The proper name of the soc node. | 372 | OF_SOC - The proper name of the soc node. |
373 | OF_TBCLK - The timebase frequency. | 373 | OF_TBCLK - The timebase frequency. |
374 | OF_STDOUT_PATH - The path to the console device | 374 | OF_STDOUT_PATH - The path to the console device |
375 | 375 | ||
376 | boards with QUICC Engines require OF_QE to set UCC MAC | 376 | boards with QUICC Engines require OF_QE to set UCC MAC |
377 | addresses | 377 | addresses |
378 | 378 | ||
379 | CONFIG_OF_BOARD_SETUP | 379 | CONFIG_OF_BOARD_SETUP |
380 | 380 | ||
381 | Board code has addition modification that it wants to make | 381 | Board code has addition modification that it wants to make |
382 | to the flat device tree before handing it off to the kernel | 382 | to the flat device tree before handing it off to the kernel |
383 | 383 | ||
384 | CONFIG_OF_BOOT_CPU | 384 | CONFIG_OF_BOOT_CPU |
385 | 385 | ||
386 | This define fills in the correct boot CPU in the boot | 386 | This define fills in the correct boot CPU in the boot |
387 | param header, the default value is zero if undefined. | 387 | param header, the default value is zero if undefined. |
388 | 388 | ||
389 | - vxWorks boot parameters: | 389 | - vxWorks boot parameters: |
390 | 390 | ||
391 | bootvx constructs a valid bootline using the following | 391 | bootvx constructs a valid bootline using the following |
392 | environments variables: bootfile, ipaddr, serverip, hostname. | 392 | environments variables: bootfile, ipaddr, serverip, hostname. |
393 | It loads the vxWorks image pointed bootfile. | 393 | It loads the vxWorks image pointed bootfile. |
394 | 394 | ||
395 | CONFIG_SYS_VXWORKS_BOOT_DEVICE - The vxworks device name | 395 | CONFIG_SYS_VXWORKS_BOOT_DEVICE - The vxworks device name |
396 | CONFIG_SYS_VXWORKS_MAC_PTR - Ethernet 6 byte MA -address | 396 | CONFIG_SYS_VXWORKS_MAC_PTR - Ethernet 6 byte MA -address |
397 | CONFIG_SYS_VXWORKS_SERVERNAME - Name of the server | 397 | CONFIG_SYS_VXWORKS_SERVERNAME - Name of the server |
398 | CONFIG_SYS_VXWORKS_BOOT_ADDR - Address of boot parameters | 398 | CONFIG_SYS_VXWORKS_BOOT_ADDR - Address of boot parameters |
399 | 399 | ||
400 | CONFIG_SYS_VXWORKS_ADD_PARAMS | 400 | CONFIG_SYS_VXWORKS_ADD_PARAMS |
401 | 401 | ||
402 | Add it at the end of the bootline. E.g "u=username pw=secret" | 402 | Add it at the end of the bootline. E.g "u=username pw=secret" |
403 | 403 | ||
404 | Note: If a "bootargs" environment is defined, it will overwride | 404 | Note: If a "bootargs" environment is defined, it will overwride |
405 | the defaults discussed just above. | 405 | the defaults discussed just above. |
406 | 406 | ||
407 | - Serial Ports: | 407 | - Serial Ports: |
408 | CONFIG_PL010_SERIAL | 408 | CONFIG_PL010_SERIAL |
409 | 409 | ||
410 | Define this if you want support for Amba PrimeCell PL010 UARTs. | 410 | Define this if you want support for Amba PrimeCell PL010 UARTs. |
411 | 411 | ||
412 | CONFIG_PL011_SERIAL | 412 | CONFIG_PL011_SERIAL |
413 | 413 | ||
414 | Define this if you want support for Amba PrimeCell PL011 UARTs. | 414 | Define this if you want support for Amba PrimeCell PL011 UARTs. |
415 | 415 | ||
416 | CONFIG_PL011_CLOCK | 416 | CONFIG_PL011_CLOCK |
417 | 417 | ||
418 | If you have Amba PrimeCell PL011 UARTs, set this variable to | 418 | If you have Amba PrimeCell PL011 UARTs, set this variable to |
419 | the clock speed of the UARTs. | 419 | the clock speed of the UARTs. |
420 | 420 | ||
421 | CONFIG_PL01x_PORTS | 421 | CONFIG_PL01x_PORTS |
422 | 422 | ||
423 | If you have Amba PrimeCell PL010 or PL011 UARTs on your board, | 423 | If you have Amba PrimeCell PL010 or PL011 UARTs on your board, |
424 | define this to a list of base addresses for each (supported) | 424 | define this to a list of base addresses for each (supported) |
425 | port. See e.g. include/configs/versatile.h | 425 | port. See e.g. include/configs/versatile.h |
426 | 426 | ||
427 | 427 | ||
428 | - Console Interface: | 428 | - Console Interface: |
429 | Depending on board, define exactly one serial port | 429 | Depending on board, define exactly one serial port |
430 | (like CONFIG_8xx_CONS_SMC1, CONFIG_8xx_CONS_SMC2, | 430 | (like CONFIG_8xx_CONS_SMC1, CONFIG_8xx_CONS_SMC2, |
431 | CONFIG_8xx_CONS_SCC1, ...), or switch off the serial | 431 | CONFIG_8xx_CONS_SCC1, ...), or switch off the serial |
432 | console by defining CONFIG_8xx_CONS_NONE | 432 | console by defining CONFIG_8xx_CONS_NONE |
433 | 433 | ||
434 | Note: if CONFIG_8xx_CONS_NONE is defined, the serial | 434 | Note: if CONFIG_8xx_CONS_NONE is defined, the serial |
435 | port routines must be defined elsewhere | 435 | port routines must be defined elsewhere |
436 | (i.e. serial_init(), serial_getc(), ...) | 436 | (i.e. serial_init(), serial_getc(), ...) |
437 | 437 | ||
438 | CONFIG_CFB_CONSOLE | 438 | CONFIG_CFB_CONSOLE |
439 | Enables console device for a color framebuffer. Needs following | 439 | Enables console device for a color framebuffer. Needs following |
440 | defines (cf. smiLynxEM, i8042, board/eltec/bab7xx) | 440 | defines (cf. smiLynxEM, i8042, board/eltec/bab7xx) |
441 | VIDEO_FB_LITTLE_ENDIAN graphic memory organisation | 441 | VIDEO_FB_LITTLE_ENDIAN graphic memory organisation |
442 | (default big endian) | 442 | (default big endian) |
443 | VIDEO_HW_RECTFILL graphic chip supports | 443 | VIDEO_HW_RECTFILL graphic chip supports |
444 | rectangle fill | 444 | rectangle fill |
445 | (cf. smiLynxEM) | 445 | (cf. smiLynxEM) |
446 | VIDEO_HW_BITBLT graphic chip supports | 446 | VIDEO_HW_BITBLT graphic chip supports |
447 | bit-blit (cf. smiLynxEM) | 447 | bit-blit (cf. smiLynxEM) |
448 | VIDEO_VISIBLE_COLS visible pixel columns | 448 | VIDEO_VISIBLE_COLS visible pixel columns |
449 | (cols=pitch) | 449 | (cols=pitch) |
450 | VIDEO_VISIBLE_ROWS visible pixel rows | 450 | VIDEO_VISIBLE_ROWS visible pixel rows |
451 | VIDEO_PIXEL_SIZE bytes per pixel | 451 | VIDEO_PIXEL_SIZE bytes per pixel |
452 | VIDEO_DATA_FORMAT graphic data format | 452 | VIDEO_DATA_FORMAT graphic data format |
453 | (0-5, cf. cfb_console.c) | 453 | (0-5, cf. cfb_console.c) |
454 | VIDEO_FB_ADRS framebuffer address | 454 | VIDEO_FB_ADRS framebuffer address |
455 | VIDEO_KBD_INIT_FCT keyboard int fct | 455 | VIDEO_KBD_INIT_FCT keyboard int fct |
456 | (i.e. i8042_kbd_init()) | 456 | (i.e. i8042_kbd_init()) |
457 | VIDEO_TSTC_FCT test char fct | 457 | VIDEO_TSTC_FCT test char fct |
458 | (i.e. i8042_tstc) | 458 | (i.e. i8042_tstc) |
459 | VIDEO_GETC_FCT get char fct | 459 | VIDEO_GETC_FCT get char fct |
460 | (i.e. i8042_getc) | 460 | (i.e. i8042_getc) |
461 | CONFIG_CONSOLE_CURSOR cursor drawing on/off | 461 | CONFIG_CONSOLE_CURSOR cursor drawing on/off |
462 | (requires blink timer | 462 | (requires blink timer |
463 | cf. i8042.c) | 463 | cf. i8042.c) |
464 | CONFIG_SYS_CONSOLE_BLINK_COUNT blink interval (cf. i8042.c) | 464 | CONFIG_SYS_CONSOLE_BLINK_COUNT blink interval (cf. i8042.c) |
465 | CONFIG_CONSOLE_TIME display time/date info in | 465 | CONFIG_CONSOLE_TIME display time/date info in |
466 | upper right corner | 466 | upper right corner |
467 | (requires CONFIG_CMD_DATE) | 467 | (requires CONFIG_CMD_DATE) |
468 | CONFIG_VIDEO_LOGO display Linux logo in | 468 | CONFIG_VIDEO_LOGO display Linux logo in |
469 | upper left corner | 469 | upper left corner |
470 | CONFIG_VIDEO_BMP_LOGO use bmp_logo.h instead of | 470 | CONFIG_VIDEO_BMP_LOGO use bmp_logo.h instead of |
471 | linux_logo.h for logo. | 471 | linux_logo.h for logo. |
472 | Requires CONFIG_VIDEO_LOGO | 472 | Requires CONFIG_VIDEO_LOGO |
473 | CONFIG_CONSOLE_EXTRA_INFO | 473 | CONFIG_CONSOLE_EXTRA_INFO |
474 | additional board info beside | 474 | additional board info beside |
475 | the logo | 475 | the logo |
476 | 476 | ||
477 | When CONFIG_CFB_CONSOLE is defined, video console is | 477 | When CONFIG_CFB_CONSOLE is defined, video console is |
478 | default i/o. Serial console can be forced with | 478 | default i/o. Serial console can be forced with |
479 | environment 'console=serial'. | 479 | environment 'console=serial'. |
480 | 480 | ||
481 | When CONFIG_SILENT_CONSOLE is defined, all console | 481 | When CONFIG_SILENT_CONSOLE is defined, all console |
482 | messages (by U-Boot and Linux!) can be silenced with | 482 | messages (by U-Boot and Linux!) can be silenced with |
483 | the "silent" environment variable. See | 483 | the "silent" environment variable. See |
484 | doc/README.silent for more information. | 484 | doc/README.silent for more information. |
485 | 485 | ||
486 | - Console Baudrate: | 486 | - Console Baudrate: |
487 | CONFIG_BAUDRATE - in bps | 487 | CONFIG_BAUDRATE - in bps |
488 | Select one of the baudrates listed in | 488 | Select one of the baudrates listed in |
489 | CONFIG_SYS_BAUDRATE_TABLE, see below. | 489 | CONFIG_SYS_BAUDRATE_TABLE, see below. |
490 | CONFIG_SYS_BRGCLK_PRESCALE, baudrate prescale | 490 | CONFIG_SYS_BRGCLK_PRESCALE, baudrate prescale |
491 | 491 | ||
492 | - Console Rx buffer length | 492 | - Console Rx buffer length |
493 | With CONFIG_SYS_SMC_RXBUFLEN it is possible to define | 493 | With CONFIG_SYS_SMC_RXBUFLEN it is possible to define |
494 | the maximum receive buffer length for the SMC. | 494 | the maximum receive buffer length for the SMC. |
495 | This option is actual only for 82xx and 8xx possible. | 495 | This option is actual only for 82xx and 8xx possible. |
496 | If using CONFIG_SYS_SMC_RXBUFLEN also CONFIG_SYS_MAXIDLE | 496 | If using CONFIG_SYS_SMC_RXBUFLEN also CONFIG_SYS_MAXIDLE |
497 | must be defined, to setup the maximum idle timeout for | 497 | must be defined, to setup the maximum idle timeout for |
498 | the SMC. | 498 | the SMC. |
499 | 499 | ||
500 | - Interrupt driven serial port input: | 500 | - Interrupt driven serial port input: |
501 | CONFIG_SERIAL_SOFTWARE_FIFO | 501 | CONFIG_SERIAL_SOFTWARE_FIFO |
502 | 502 | ||
503 | PPC405GP only. | 503 | PPC405GP only. |
504 | Use an interrupt handler for receiving data on the | 504 | Use an interrupt handler for receiving data on the |
505 | serial port. It also enables using hardware handshake | 505 | serial port. It also enables using hardware handshake |
506 | (RTS/CTS) and UART's built-in FIFO. Set the number of | 506 | (RTS/CTS) and UART's built-in FIFO. Set the number of |
507 | bytes the interrupt driven input buffer should have. | 507 | bytes the interrupt driven input buffer should have. |
508 | 508 | ||
509 | Leave undefined to disable this feature, including | 509 | Leave undefined to disable this feature, including |
510 | disable the buffer and hardware handshake. | 510 | disable the buffer and hardware handshake. |
511 | 511 | ||
512 | - Console UART Number: | 512 | - Console UART Number: |
513 | CONFIG_UART1_CONSOLE | 513 | CONFIG_UART1_CONSOLE |
514 | 514 | ||
515 | AMCC PPC4xx only. | 515 | AMCC PPC4xx only. |
516 | If defined internal UART1 (and not UART0) is used | 516 | If defined internal UART1 (and not UART0) is used |
517 | as default U-Boot console. | 517 | as default U-Boot console. |
518 | 518 | ||
519 | - Boot Delay: CONFIG_BOOTDELAY - in seconds | 519 | - Boot Delay: CONFIG_BOOTDELAY - in seconds |
520 | Delay before automatically booting the default image; | 520 | Delay before automatically booting the default image; |
521 | set to -1 to disable autoboot. | 521 | set to -1 to disable autoboot. |
522 | 522 | ||
523 | See doc/README.autoboot for these options that | 523 | See doc/README.autoboot for these options that |
524 | work with CONFIG_BOOTDELAY. None are required. | 524 | work with CONFIG_BOOTDELAY. None are required. |
525 | CONFIG_BOOT_RETRY_TIME | 525 | CONFIG_BOOT_RETRY_TIME |
526 | CONFIG_BOOT_RETRY_MIN | 526 | CONFIG_BOOT_RETRY_MIN |
527 | CONFIG_AUTOBOOT_KEYED | 527 | CONFIG_AUTOBOOT_KEYED |
528 | CONFIG_AUTOBOOT_PROMPT | 528 | CONFIG_AUTOBOOT_PROMPT |
529 | CONFIG_AUTOBOOT_DELAY_STR | 529 | CONFIG_AUTOBOOT_DELAY_STR |
530 | CONFIG_AUTOBOOT_STOP_STR | 530 | CONFIG_AUTOBOOT_STOP_STR |
531 | CONFIG_AUTOBOOT_DELAY_STR2 | 531 | CONFIG_AUTOBOOT_DELAY_STR2 |
532 | CONFIG_AUTOBOOT_STOP_STR2 | 532 | CONFIG_AUTOBOOT_STOP_STR2 |
533 | CONFIG_ZERO_BOOTDELAY_CHECK | 533 | CONFIG_ZERO_BOOTDELAY_CHECK |
534 | CONFIG_RESET_TO_RETRY | 534 | CONFIG_RESET_TO_RETRY |
535 | 535 | ||
536 | - Autoboot Command: | 536 | - Autoboot Command: |
537 | CONFIG_BOOTCOMMAND | 537 | CONFIG_BOOTCOMMAND |
538 | Only needed when CONFIG_BOOTDELAY is enabled; | 538 | Only needed when CONFIG_BOOTDELAY is enabled; |
539 | define a command string that is automatically executed | 539 | define a command string that is automatically executed |
540 | when no character is read on the console interface | 540 | when no character is read on the console interface |
541 | within "Boot Delay" after reset. | 541 | within "Boot Delay" after reset. |
542 | 542 | ||
543 | CONFIG_BOOTARGS | 543 | CONFIG_BOOTARGS |
544 | This can be used to pass arguments to the bootm | 544 | This can be used to pass arguments to the bootm |
545 | command. The value of CONFIG_BOOTARGS goes into the | 545 | command. The value of CONFIG_BOOTARGS goes into the |
546 | environment value "bootargs". | 546 | environment value "bootargs". |
547 | 547 | ||
548 | CONFIG_RAMBOOT and CONFIG_NFSBOOT | 548 | CONFIG_RAMBOOT and CONFIG_NFSBOOT |
549 | The value of these goes into the environment as | 549 | The value of these goes into the environment as |
550 | "ramboot" and "nfsboot" respectively, and can be used | 550 | "ramboot" and "nfsboot" respectively, and can be used |
551 | as a convenience, when switching between booting from | 551 | as a convenience, when switching between booting from |
552 | RAM and NFS. | 552 | RAM and NFS. |
553 | 553 | ||
554 | - Pre-Boot Commands: | 554 | - Pre-Boot Commands: |
555 | CONFIG_PREBOOT | 555 | CONFIG_PREBOOT |
556 | 556 | ||
557 | When this option is #defined, the existence of the | 557 | When this option is #defined, the existence of the |
558 | environment variable "preboot" will be checked | 558 | environment variable "preboot" will be checked |
559 | immediately before starting the CONFIG_BOOTDELAY | 559 | immediately before starting the CONFIG_BOOTDELAY |
560 | countdown and/or running the auto-boot command resp. | 560 | countdown and/or running the auto-boot command resp. |
561 | entering interactive mode. | 561 | entering interactive mode. |
562 | 562 | ||
563 | This feature is especially useful when "preboot" is | 563 | This feature is especially useful when "preboot" is |
564 | automatically generated or modified. For an example | 564 | automatically generated or modified. For an example |
565 | see the LWMON board specific code: here "preboot" is | 565 | see the LWMON board specific code: here "preboot" is |
566 | modified when the user holds down a certain | 566 | modified when the user holds down a certain |
567 | combination of keys on the (special) keyboard when | 567 | combination of keys on the (special) keyboard when |
568 | booting the systems | 568 | booting the systems |
569 | 569 | ||
570 | - Serial Download Echo Mode: | 570 | - Serial Download Echo Mode: |
571 | CONFIG_LOADS_ECHO | 571 | CONFIG_LOADS_ECHO |
572 | If defined to 1, all characters received during a | 572 | If defined to 1, all characters received during a |
573 | serial download (using the "loads" command) are | 573 | serial download (using the "loads" command) are |
574 | echoed back. This might be needed by some terminal | 574 | echoed back. This might be needed by some terminal |
575 | emulations (like "cu"), but may as well just take | 575 | emulations (like "cu"), but may as well just take |
576 | time on others. This setting #define's the initial | 576 | time on others. This setting #define's the initial |
577 | value of the "loads_echo" environment variable. | 577 | value of the "loads_echo" environment variable. |
578 | 578 | ||
579 | - Kgdb Serial Baudrate: (if CONFIG_CMD_KGDB is defined) | 579 | - Kgdb Serial Baudrate: (if CONFIG_CMD_KGDB is defined) |
580 | CONFIG_KGDB_BAUDRATE | 580 | CONFIG_KGDB_BAUDRATE |
581 | Select one of the baudrates listed in | 581 | Select one of the baudrates listed in |
582 | CONFIG_SYS_BAUDRATE_TABLE, see below. | 582 | CONFIG_SYS_BAUDRATE_TABLE, see below. |
583 | 583 | ||
584 | - Monitor Functions: | 584 | - Monitor Functions: |
585 | Monitor commands can be included or excluded | 585 | Monitor commands can be included or excluded |
586 | from the build by using the #include files | 586 | from the build by using the #include files |
587 | "config_cmd_all.h" and #undef'ing unwanted | 587 | "config_cmd_all.h" and #undef'ing unwanted |
588 | commands, or using "config_cmd_default.h" | 588 | commands, or using "config_cmd_default.h" |
589 | and augmenting with additional #define's | 589 | and augmenting with additional #define's |
590 | for wanted commands. | 590 | for wanted commands. |
591 | 591 | ||
592 | The default command configuration includes all commands | 592 | The default command configuration includes all commands |
593 | except those marked below with a "*". | 593 | except those marked below with a "*". |
594 | 594 | ||
595 | CONFIG_CMD_ASKENV * ask for env variable | 595 | CONFIG_CMD_ASKENV * ask for env variable |
596 | CONFIG_CMD_BDI bdinfo | 596 | CONFIG_CMD_BDI bdinfo |
597 | CONFIG_CMD_BEDBUG * Include BedBug Debugger | 597 | CONFIG_CMD_BEDBUG * Include BedBug Debugger |
598 | CONFIG_CMD_BMP * BMP support | 598 | CONFIG_CMD_BMP * BMP support |
599 | CONFIG_CMD_BSP * Board specific commands | 599 | CONFIG_CMD_BSP * Board specific commands |
600 | CONFIG_CMD_BOOTD bootd | 600 | CONFIG_CMD_BOOTD bootd |
601 | CONFIG_CMD_CACHE * icache, dcache | 601 | CONFIG_CMD_CACHE * icache, dcache |
602 | CONFIG_CMD_CONSOLE coninfo | 602 | CONFIG_CMD_CONSOLE coninfo |
603 | CONFIG_CMD_DATE * support for RTC, date/time... | 603 | CONFIG_CMD_DATE * support for RTC, date/time... |
604 | CONFIG_CMD_DHCP * DHCP support | 604 | CONFIG_CMD_DHCP * DHCP support |
605 | CONFIG_CMD_DIAG * Diagnostics | 605 | CONFIG_CMD_DIAG * Diagnostics |
606 | CONFIG_CMD_DOC * Disk-On-Chip Support | 606 | CONFIG_CMD_DOC * Disk-On-Chip Support |
607 | CONFIG_CMD_DS4510 * ds4510 I2C gpio commands | 607 | CONFIG_CMD_DS4510 * ds4510 I2C gpio commands |
608 | CONFIG_CMD_DS4510_INFO * ds4510 I2C info command | 608 | CONFIG_CMD_DS4510_INFO * ds4510 I2C info command |
609 | CONFIG_CMD_DS4510_MEM * ds4510 I2C eeprom/sram commansd | 609 | CONFIG_CMD_DS4510_MEM * ds4510 I2C eeprom/sram commansd |
610 | CONFIG_CMD_DS4510_RST * ds4510 I2C rst command | 610 | CONFIG_CMD_DS4510_RST * ds4510 I2C rst command |
611 | CONFIG_CMD_DTT * Digital Therm and Thermostat | 611 | CONFIG_CMD_DTT * Digital Therm and Thermostat |
612 | CONFIG_CMD_ECHO echo arguments | 612 | CONFIG_CMD_ECHO echo arguments |
613 | CONFIG_CMD_EEPROM * EEPROM read/write support | 613 | CONFIG_CMD_EEPROM * EEPROM read/write support |
614 | CONFIG_CMD_ELF * bootelf, bootvx | 614 | CONFIG_CMD_ELF * bootelf, bootvx |
615 | CONFIG_CMD_SAVEENV saveenv | 615 | CONFIG_CMD_SAVEENV saveenv |
616 | CONFIG_CMD_FDC * Floppy Disk Support | 616 | CONFIG_CMD_FDC * Floppy Disk Support |
617 | CONFIG_CMD_FAT * FAT partition support | 617 | CONFIG_CMD_FAT * FAT partition support |
618 | CONFIG_CMD_FDOS * Dos diskette Support | 618 | CONFIG_CMD_FDOS * Dos diskette Support |
619 | CONFIG_CMD_FLASH flinfo, erase, protect | 619 | CONFIG_CMD_FLASH flinfo, erase, protect |
620 | CONFIG_CMD_FPGA FPGA device initialization support | 620 | CONFIG_CMD_FPGA FPGA device initialization support |
621 | CONFIG_CMD_HWFLOW * RTS/CTS hw flow control | 621 | CONFIG_CMD_HWFLOW * RTS/CTS hw flow control |
622 | CONFIG_CMD_I2C * I2C serial bus support | 622 | CONFIG_CMD_I2C * I2C serial bus support |
623 | CONFIG_CMD_IDE * IDE harddisk support | 623 | CONFIG_CMD_IDE * IDE harddisk support |
624 | CONFIG_CMD_IMI iminfo | 624 | CONFIG_CMD_IMI iminfo |
625 | CONFIG_CMD_IMLS List all found images | 625 | CONFIG_CMD_IMLS List all found images |
626 | CONFIG_CMD_IMMAP * IMMR dump support | 626 | CONFIG_CMD_IMMAP * IMMR dump support |
627 | CONFIG_CMD_IRQ * irqinfo | 627 | CONFIG_CMD_IRQ * irqinfo |
628 | CONFIG_CMD_ITEST Integer/string test of 2 values | 628 | CONFIG_CMD_ITEST Integer/string test of 2 values |
629 | CONFIG_CMD_JFFS2 * JFFS2 Support | 629 | CONFIG_CMD_JFFS2 * JFFS2 Support |
630 | CONFIG_CMD_KGDB * kgdb | 630 | CONFIG_CMD_KGDB * kgdb |
631 | CONFIG_CMD_LOADB loadb | 631 | CONFIG_CMD_LOADB loadb |
632 | CONFIG_CMD_LOADS loads | 632 | CONFIG_CMD_LOADS loads |
633 | CONFIG_CMD_MEMORY md, mm, nm, mw, cp, cmp, crc, base, | 633 | CONFIG_CMD_MEMORY md, mm, nm, mw, cp, cmp, crc, base, |
634 | loop, loopw, mtest | 634 | loop, loopw, mtest |
635 | CONFIG_CMD_MISC Misc functions like sleep etc | 635 | CONFIG_CMD_MISC Misc functions like sleep etc |
636 | CONFIG_CMD_MMC * MMC memory mapped support | 636 | CONFIG_CMD_MMC * MMC memory mapped support |
637 | CONFIG_CMD_MII * MII utility commands | 637 | CONFIG_CMD_MII * MII utility commands |
638 | CONFIG_CMD_MTDPARTS * MTD partition support | 638 | CONFIG_CMD_MTDPARTS * MTD partition support |
639 | CONFIG_CMD_NAND * NAND support | 639 | CONFIG_CMD_NAND * NAND support |
640 | CONFIG_CMD_NET bootp, tftpboot, rarpboot | 640 | CONFIG_CMD_NET bootp, tftpboot, rarpboot |
641 | CONFIG_CMD_PCA953X * PCA953x I2C gpio commands | 641 | CONFIG_CMD_PCA953X * PCA953x I2C gpio commands |
642 | CONFIG_CMD_PCA953X_INFO * PCA953x I2C gpio info command | 642 | CONFIG_CMD_PCA953X_INFO * PCA953x I2C gpio info command |
643 | CONFIG_CMD_PCI * pciinfo | 643 | CONFIG_CMD_PCI * pciinfo |
644 | CONFIG_CMD_PCMCIA * PCMCIA support | 644 | CONFIG_CMD_PCMCIA * PCMCIA support |
645 | CONFIG_CMD_PING * send ICMP ECHO_REQUEST to network | 645 | CONFIG_CMD_PING * send ICMP ECHO_REQUEST to network |
646 | host | 646 | host |
647 | CONFIG_CMD_PORTIO * Port I/O | 647 | CONFIG_CMD_PORTIO * Port I/O |
648 | CONFIG_CMD_REGINFO * Register dump | 648 | CONFIG_CMD_REGINFO * Register dump |
649 | CONFIG_CMD_RUN run command in env variable | 649 | CONFIG_CMD_RUN run command in env variable |
650 | CONFIG_CMD_SAVES * save S record dump | 650 | CONFIG_CMD_SAVES * save S record dump |
651 | CONFIG_CMD_SCSI * SCSI Support | 651 | CONFIG_CMD_SCSI * SCSI Support |
652 | CONFIG_CMD_SDRAM * print SDRAM configuration information | 652 | CONFIG_CMD_SDRAM * print SDRAM configuration information |
653 | (requires CONFIG_CMD_I2C) | 653 | (requires CONFIG_CMD_I2C) |
654 | CONFIG_CMD_SETGETDCR Support for DCR Register access | 654 | CONFIG_CMD_SETGETDCR Support for DCR Register access |
655 | (4xx only) | 655 | (4xx only) |
656 | CONFIG_CMD_SOURCE "source" command Support | 656 | CONFIG_CMD_SOURCE "source" command Support |
657 | CONFIG_CMD_SPI * SPI serial bus support | 657 | CONFIG_CMD_SPI * SPI serial bus support |
658 | CONFIG_CMD_USB * USB support | 658 | CONFIG_CMD_USB * USB support |
659 | CONFIG_CMD_VFD * VFD support (TRAB) | 659 | CONFIG_CMD_VFD * VFD support (TRAB) |
660 | CONFIG_CMD_CDP * Cisco Discover Protocol support | 660 | CONFIG_CMD_CDP * Cisco Discover Protocol support |
661 | CONFIG_CMD_FSL * Microblaze FSL support | 661 | CONFIG_CMD_FSL * Microblaze FSL support |
662 | 662 | ||
663 | 663 | ||
664 | EXAMPLE: If you want all functions except of network | 664 | EXAMPLE: If you want all functions except of network |
665 | support you can write: | 665 | support you can write: |
666 | 666 | ||
667 | #include "config_cmd_all.h" | 667 | #include "config_cmd_all.h" |
668 | #undef CONFIG_CMD_NET | 668 | #undef CONFIG_CMD_NET |
669 | 669 | ||
670 | Other Commands: | 670 | Other Commands: |
671 | fdt (flattened device tree) command: CONFIG_OF_LIBFDT | 671 | fdt (flattened device tree) command: CONFIG_OF_LIBFDT |
672 | 672 | ||
673 | Note: Don't enable the "icache" and "dcache" commands | 673 | Note: Don't enable the "icache" and "dcache" commands |
674 | (configuration option CONFIG_CMD_CACHE) unless you know | 674 | (configuration option CONFIG_CMD_CACHE) unless you know |
675 | what you (and your U-Boot users) are doing. Data | 675 | what you (and your U-Boot users) are doing. Data |
676 | cache cannot be enabled on systems like the 8xx or | 676 | cache cannot be enabled on systems like the 8xx or |
677 | 8260 (where accesses to the IMMR region must be | 677 | 8260 (where accesses to the IMMR region must be |
678 | uncached), and it cannot be disabled on all other | 678 | uncached), and it cannot be disabled on all other |
679 | systems where we (mis-) use the data cache to hold an | 679 | systems where we (mis-) use the data cache to hold an |
680 | initial stack and some data. | 680 | initial stack and some data. |
681 | 681 | ||
682 | 682 | ||
683 | XXX - this list needs to get updated! | 683 | XXX - this list needs to get updated! |
684 | 684 | ||
685 | - Watchdog: | 685 | - Watchdog: |
686 | CONFIG_WATCHDOG | 686 | CONFIG_WATCHDOG |
687 | If this variable is defined, it enables watchdog | 687 | If this variable is defined, it enables watchdog |
688 | support. There must be support in the platform specific | 688 | support. There must be support in the platform specific |
689 | code for a watchdog. For the 8xx and 8260 CPUs, the | 689 | code for a watchdog. For the 8xx and 8260 CPUs, the |
690 | SIU Watchdog feature is enabled in the SYPCR | 690 | SIU Watchdog feature is enabled in the SYPCR |
691 | register. | 691 | register. |
692 | 692 | ||
693 | - U-Boot Version: | 693 | - U-Boot Version: |
694 | CONFIG_VERSION_VARIABLE | 694 | CONFIG_VERSION_VARIABLE |
695 | If this variable is defined, an environment variable | 695 | If this variable is defined, an environment variable |
696 | named "ver" is created by U-Boot showing the U-Boot | 696 | named "ver" is created by U-Boot showing the U-Boot |
697 | version as printed by the "version" command. | 697 | version as printed by the "version" command. |
698 | This variable is readonly. | 698 | This variable is readonly. |
699 | 699 | ||
700 | - Real-Time Clock: | 700 | - Real-Time Clock: |
701 | 701 | ||
702 | When CONFIG_CMD_DATE is selected, the type of the RTC | 702 | When CONFIG_CMD_DATE is selected, the type of the RTC |
703 | has to be selected, too. Define exactly one of the | 703 | has to be selected, too. Define exactly one of the |
704 | following options: | 704 | following options: |
705 | 705 | ||
706 | CONFIG_RTC_MPC8xx - use internal RTC of MPC8xx | 706 | CONFIG_RTC_MPC8xx - use internal RTC of MPC8xx |
707 | CONFIG_RTC_PCF8563 - use Philips PCF8563 RTC | 707 | CONFIG_RTC_PCF8563 - use Philips PCF8563 RTC |
708 | CONFIG_RTC_MC13783 - use MC13783 RTC | 708 | CONFIG_RTC_MC13783 - use MC13783 RTC |
709 | CONFIG_RTC_MC146818 - use MC146818 RTC | 709 | CONFIG_RTC_MC146818 - use MC146818 RTC |
710 | CONFIG_RTC_DS1307 - use Maxim, Inc. DS1307 RTC | 710 | CONFIG_RTC_DS1307 - use Maxim, Inc. DS1307 RTC |
711 | CONFIG_RTC_DS1337 - use Maxim, Inc. DS1337 RTC | 711 | CONFIG_RTC_DS1337 - use Maxim, Inc. DS1337 RTC |
712 | CONFIG_RTC_DS1338 - use Maxim, Inc. DS1338 RTC | 712 | CONFIG_RTC_DS1338 - use Maxim, Inc. DS1338 RTC |
713 | CONFIG_RTC_DS164x - use Dallas DS164x RTC | 713 | CONFIG_RTC_DS164x - use Dallas DS164x RTC |
714 | CONFIG_RTC_ISL1208 - use Intersil ISL1208 RTC | 714 | CONFIG_RTC_ISL1208 - use Intersil ISL1208 RTC |
715 | CONFIG_RTC_MAX6900 - use Maxim, Inc. MAX6900 RTC | 715 | CONFIG_RTC_MAX6900 - use Maxim, Inc. MAX6900 RTC |
716 | CONFIG_SYS_RTC_DS1337_NOOSC - Turn off the OSC output for DS1337 | 716 | CONFIG_SYS_RTC_DS1337_NOOSC - Turn off the OSC output for DS1337 |
717 | 717 | ||
718 | Note that if the RTC uses I2C, then the I2C interface | 718 | Note that if the RTC uses I2C, then the I2C interface |
719 | must also be configured. See I2C Support, below. | 719 | must also be configured. See I2C Support, below. |
720 | 720 | ||
721 | - GPIO Support: | 721 | - GPIO Support: |
722 | CONFIG_PCA953X - use NXP's PCA953X series I2C GPIO | 722 | CONFIG_PCA953X - use NXP's PCA953X series I2C GPIO |
723 | CONFIG_PCA953X_INFO - enable pca953x info command | 723 | CONFIG_PCA953X_INFO - enable pca953x info command |
724 | 724 | ||
725 | Note that if the GPIO device uses I2C, then the I2C interface | 725 | Note that if the GPIO device uses I2C, then the I2C interface |
726 | must also be configured. See I2C Support, below. | 726 | must also be configured. See I2C Support, below. |
727 | 727 | ||
728 | - Timestamp Support: | 728 | - Timestamp Support: |
729 | 729 | ||
730 | When CONFIG_TIMESTAMP is selected, the timestamp | 730 | When CONFIG_TIMESTAMP is selected, the timestamp |
731 | (date and time) of an image is printed by image | 731 | (date and time) of an image is printed by image |
732 | commands like bootm or iminfo. This option is | 732 | commands like bootm or iminfo. This option is |
733 | automatically enabled when you select CONFIG_CMD_DATE . | 733 | automatically enabled when you select CONFIG_CMD_DATE . |
734 | 734 | ||
735 | - Partition Support: | 735 | - Partition Support: |
736 | CONFIG_MAC_PARTITION and/or CONFIG_DOS_PARTITION | 736 | CONFIG_MAC_PARTITION and/or CONFIG_DOS_PARTITION |
737 | and/or CONFIG_ISO_PARTITION and/or CONFIG_EFI_PARTITION | 737 | and/or CONFIG_ISO_PARTITION and/or CONFIG_EFI_PARTITION |
738 | 738 | ||
739 | If IDE or SCSI support is enabled (CONFIG_CMD_IDE or | 739 | If IDE or SCSI support is enabled (CONFIG_CMD_IDE or |
740 | CONFIG_CMD_SCSI) you must configure support for at | 740 | CONFIG_CMD_SCSI) you must configure support for at |
741 | least one partition type as well. | 741 | least one partition type as well. |
742 | 742 | ||
743 | - IDE Reset method: | 743 | - IDE Reset method: |
744 | CONFIG_IDE_RESET_ROUTINE - this is defined in several | 744 | CONFIG_IDE_RESET_ROUTINE - this is defined in several |
745 | board configurations files but used nowhere! | 745 | board configurations files but used nowhere! |
746 | 746 | ||
747 | CONFIG_IDE_RESET - is this is defined, IDE Reset will | 747 | CONFIG_IDE_RESET - is this is defined, IDE Reset will |
748 | be performed by calling the function | 748 | be performed by calling the function |
749 | ide_set_reset(int reset) | 749 | ide_set_reset(int reset) |
750 | which has to be defined in a board specific file | 750 | which has to be defined in a board specific file |
751 | 751 | ||
752 | - ATAPI Support: | 752 | - ATAPI Support: |
753 | CONFIG_ATAPI | 753 | CONFIG_ATAPI |
754 | 754 | ||
755 | Set this to enable ATAPI support. | 755 | Set this to enable ATAPI support. |
756 | 756 | ||
757 | - LBA48 Support | 757 | - LBA48 Support |
758 | CONFIG_LBA48 | 758 | CONFIG_LBA48 |
759 | 759 | ||
760 | Set this to enable support for disks larger than 137GB | 760 | Set this to enable support for disks larger than 137GB |
761 | Also look at CONFIG_SYS_64BIT_LBA ,CONFIG_SYS_64BIT_VSPRINTF and CONFIG_SYS_64BIT_STRTOUL | 761 | Also look at CONFIG_SYS_64BIT_LBA ,CONFIG_SYS_64BIT_VSPRINTF and CONFIG_SYS_64BIT_STRTOUL |
762 | Whithout these , LBA48 support uses 32bit variables and will 'only' | 762 | Whithout these , LBA48 support uses 32bit variables and will 'only' |
763 | support disks up to 2.1TB. | 763 | support disks up to 2.1TB. |
764 | 764 | ||
765 | CONFIG_SYS_64BIT_LBA: | 765 | CONFIG_SYS_64BIT_LBA: |
766 | When enabled, makes the IDE subsystem use 64bit sector addresses. | 766 | When enabled, makes the IDE subsystem use 64bit sector addresses. |
767 | Default is 32bit. | 767 | Default is 32bit. |
768 | 768 | ||
769 | - SCSI Support: | 769 | - SCSI Support: |
770 | At the moment only there is only support for the | 770 | At the moment only there is only support for the |
771 | SYM53C8XX SCSI controller; define | 771 | SYM53C8XX SCSI controller; define |
772 | CONFIG_SCSI_SYM53C8XX to enable it. | 772 | CONFIG_SCSI_SYM53C8XX to enable it. |
773 | 773 | ||
774 | CONFIG_SYS_SCSI_MAX_LUN [8], CONFIG_SYS_SCSI_MAX_SCSI_ID [7] and | 774 | CONFIG_SYS_SCSI_MAX_LUN [8], CONFIG_SYS_SCSI_MAX_SCSI_ID [7] and |
775 | CONFIG_SYS_SCSI_MAX_DEVICE [CONFIG_SYS_SCSI_MAX_SCSI_ID * | 775 | CONFIG_SYS_SCSI_MAX_DEVICE [CONFIG_SYS_SCSI_MAX_SCSI_ID * |
776 | CONFIG_SYS_SCSI_MAX_LUN] can be adjusted to define the | 776 | CONFIG_SYS_SCSI_MAX_LUN] can be adjusted to define the |
777 | maximum numbers of LUNs, SCSI ID's and target | 777 | maximum numbers of LUNs, SCSI ID's and target |
778 | devices. | 778 | devices. |
779 | CONFIG_SYS_SCSI_SYM53C8XX_CCF to fix clock timing (80Mhz) | 779 | CONFIG_SYS_SCSI_SYM53C8XX_CCF to fix clock timing (80Mhz) |
780 | 780 | ||
781 | - NETWORK Support (PCI): | 781 | - NETWORK Support (PCI): |
782 | CONFIG_E1000 | 782 | CONFIG_E1000 |
783 | Support for Intel 8254x gigabit chips. | 783 | Support for Intel 8254x gigabit chips. |
784 | 784 | ||
785 | CONFIG_E1000_FALLBACK_MAC | 785 | CONFIG_E1000_FALLBACK_MAC |
786 | default MAC for empty EEPROM after production. | 786 | default MAC for empty EEPROM after production. |
787 | 787 | ||
788 | CONFIG_EEPRO100 | 788 | CONFIG_EEPRO100 |
789 | Support for Intel 82557/82559/82559ER chips. | 789 | Support for Intel 82557/82559/82559ER chips. |
790 | Optional CONFIG_EEPRO100_SROM_WRITE enables EEPROM | 790 | Optional CONFIG_EEPRO100_SROM_WRITE enables EEPROM |
791 | write routine for first time initialisation. | 791 | write routine for first time initialisation. |
792 | 792 | ||
793 | CONFIG_TULIP | 793 | CONFIG_TULIP |
794 | Support for Digital 2114x chips. | 794 | Support for Digital 2114x chips. |
795 | Optional CONFIG_TULIP_SELECT_MEDIA for board specific | 795 | Optional CONFIG_TULIP_SELECT_MEDIA for board specific |
796 | modem chip initialisation (KS8761/QS6611). | 796 | modem chip initialisation (KS8761/QS6611). |
797 | 797 | ||
798 | CONFIG_NATSEMI | 798 | CONFIG_NATSEMI |
799 | Support for National dp83815 chips. | 799 | Support for National dp83815 chips. |
800 | 800 | ||
801 | CONFIG_NS8382X | 801 | CONFIG_NS8382X |
802 | Support for National dp8382[01] gigabit chips. | 802 | Support for National dp8382[01] gigabit chips. |
803 | 803 | ||
804 | - NETWORK Support (other): | 804 | - NETWORK Support (other): |
805 | 805 | ||
806 | CONFIG_DRIVER_LAN91C96 | 806 | CONFIG_DRIVER_LAN91C96 |
807 | Support for SMSC's LAN91C96 chips. | 807 | Support for SMSC's LAN91C96 chips. |
808 | 808 | ||
809 | CONFIG_LAN91C96_BASE | 809 | CONFIG_LAN91C96_BASE |
810 | Define this to hold the physical address | 810 | Define this to hold the physical address |
811 | of the LAN91C96's I/O space | 811 | of the LAN91C96's I/O space |
812 | 812 | ||
813 | CONFIG_LAN91C96_USE_32_BIT | 813 | CONFIG_LAN91C96_USE_32_BIT |
814 | Define this to enable 32 bit addressing | 814 | Define this to enable 32 bit addressing |
815 | 815 | ||
816 | CONFIG_DRIVER_SMC91111 | 816 | CONFIG_DRIVER_SMC91111 |
817 | Support for SMSC's LAN91C111 chip | 817 | Support for SMSC's LAN91C111 chip |
818 | 818 | ||
819 | CONFIG_SMC91111_BASE | 819 | CONFIG_SMC91111_BASE |
820 | Define this to hold the physical address | 820 | Define this to hold the physical address |
821 | of the device (I/O space) | 821 | of the device (I/O space) |
822 | 822 | ||
823 | CONFIG_SMC_USE_32_BIT | 823 | CONFIG_SMC_USE_32_BIT |
824 | Define this if data bus is 32 bits | 824 | Define this if data bus is 32 bits |
825 | 825 | ||
826 | CONFIG_SMC_USE_IOFUNCS | 826 | CONFIG_SMC_USE_IOFUNCS |
827 | Define this to use i/o functions instead of macros | 827 | Define this to use i/o functions instead of macros |
828 | (some hardware wont work with macros) | 828 | (some hardware wont work with macros) |
829 | 829 | ||
830 | CONFIG_DRIVER_SMC911X | 830 | CONFIG_DRIVER_SMC911X |
831 | Support for SMSC's LAN911x and LAN921x chips | 831 | Support for SMSC's LAN911x and LAN921x chips |
832 | 832 | ||
833 | CONFIG_DRIVER_SMC911X_BASE | 833 | CONFIG_DRIVER_SMC911X_BASE |
834 | Define this to hold the physical address | 834 | Define this to hold the physical address |
835 | of the device (I/O space) | 835 | of the device (I/O space) |
836 | 836 | ||
837 | CONFIG_DRIVER_SMC911X_32_BIT | 837 | CONFIG_DRIVER_SMC911X_32_BIT |
838 | Define this if data bus is 32 bits | 838 | Define this if data bus is 32 bits |
839 | 839 | ||
840 | CONFIG_DRIVER_SMC911X_16_BIT | 840 | CONFIG_DRIVER_SMC911X_16_BIT |
841 | Define this if data bus is 16 bits. If your processor | 841 | Define this if data bus is 16 bits. If your processor |
842 | automatically converts one 32 bit word to two 16 bit | 842 | automatically converts one 32 bit word to two 16 bit |
843 | words you may also try CONFIG_DRIVER_SMC911X_32_BIT. | 843 | words you may also try CONFIG_DRIVER_SMC911X_32_BIT. |
844 | 844 | ||
845 | - USB Support: | 845 | - USB Support: |
846 | At the moment only the UHCI host controller is | 846 | At the moment only the UHCI host controller is |
847 | supported (PIP405, MIP405, MPC5200); define | 847 | supported (PIP405, MIP405, MPC5200); define |
848 | CONFIG_USB_UHCI to enable it. | 848 | CONFIG_USB_UHCI to enable it. |
849 | define CONFIG_USB_KEYBOARD to enable the USB Keyboard | 849 | define CONFIG_USB_KEYBOARD to enable the USB Keyboard |
850 | and define CONFIG_USB_STORAGE to enable the USB | 850 | and define CONFIG_USB_STORAGE to enable the USB |
851 | storage devices. | 851 | storage devices. |
852 | Note: | 852 | Note: |
853 | Supported are USB Keyboards and USB Floppy drives | 853 | Supported are USB Keyboards and USB Floppy drives |
854 | (TEAC FD-05PUB). | 854 | (TEAC FD-05PUB). |
855 | MPC5200 USB requires additional defines: | 855 | MPC5200 USB requires additional defines: |
856 | CONFIG_USB_CLOCK | 856 | CONFIG_USB_CLOCK |
857 | for 528 MHz Clock: 0x0001bbbb | 857 | for 528 MHz Clock: 0x0001bbbb |
858 | CONFIG_USB_CONFIG | 858 | CONFIG_USB_CONFIG |
859 | for differential drivers: 0x00001000 | 859 | for differential drivers: 0x00001000 |
860 | for single ended drivers: 0x00005000 | 860 | for single ended drivers: 0x00005000 |
861 | CONFIG_SYS_USB_EVENT_POLL | 861 | CONFIG_SYS_USB_EVENT_POLL |
862 | May be defined to allow interrupt polling | 862 | May be defined to allow interrupt polling |
863 | instead of using asynchronous interrupts | 863 | instead of using asynchronous interrupts |
864 | 864 | ||
865 | - USB Device: | 865 | - USB Device: |
866 | Define the below if you wish to use the USB console. | 866 | Define the below if you wish to use the USB console. |
867 | Once firmware is rebuilt from a serial console issue the | 867 | Once firmware is rebuilt from a serial console issue the |
868 | command "setenv stdin usbtty; setenv stdout usbtty" and | 868 | command "setenv stdin usbtty; setenv stdout usbtty" and |
869 | attach your USB cable. The Unix command "dmesg" should print | 869 | attach your USB cable. The Unix command "dmesg" should print |
870 | it has found a new device. The environment variable usbtty | 870 | it has found a new device. The environment variable usbtty |
871 | can be set to gserial or cdc_acm to enable your device to | 871 | can be set to gserial or cdc_acm to enable your device to |
872 | appear to a USB host as a Linux gserial device or a | 872 | appear to a USB host as a Linux gserial device or a |
873 | Common Device Class Abstract Control Model serial device. | 873 | Common Device Class Abstract Control Model serial device. |
874 | If you select usbtty = gserial you should be able to enumerate | 874 | If you select usbtty = gserial you should be able to enumerate |
875 | a Linux host by | 875 | a Linux host by |
876 | # modprobe usbserial vendor=0xVendorID product=0xProductID | 876 | # modprobe usbserial vendor=0xVendorID product=0xProductID |
877 | else if using cdc_acm, simply setting the environment | 877 | else if using cdc_acm, simply setting the environment |
878 | variable usbtty to be cdc_acm should suffice. The following | 878 | variable usbtty to be cdc_acm should suffice. The following |
879 | might be defined in YourBoardName.h | 879 | might be defined in YourBoardName.h |
880 | 880 | ||
881 | CONFIG_USB_DEVICE | 881 | CONFIG_USB_DEVICE |
882 | Define this to build a UDC device | 882 | Define this to build a UDC device |
883 | 883 | ||
884 | CONFIG_USB_TTY | 884 | CONFIG_USB_TTY |
885 | Define this to have a tty type of device available to | 885 | Define this to have a tty type of device available to |
886 | talk to the UDC device | 886 | talk to the UDC device |
887 | 887 | ||
888 | CONFIG_SYS_CONSOLE_IS_IN_ENV | 888 | CONFIG_SYS_CONSOLE_IS_IN_ENV |
889 | Define this if you want stdin, stdout &/or stderr to | 889 | Define this if you want stdin, stdout &/or stderr to |
890 | be set to usbtty. | 890 | be set to usbtty. |
891 | 891 | ||
892 | mpc8xx: | 892 | mpc8xx: |
893 | CONFIG_SYS_USB_EXTC_CLK 0xBLAH | 893 | CONFIG_SYS_USB_EXTC_CLK 0xBLAH |
894 | Derive USB clock from external clock "blah" | 894 | Derive USB clock from external clock "blah" |
895 | - CONFIG_SYS_USB_EXTC_CLK 0x02 | 895 | - CONFIG_SYS_USB_EXTC_CLK 0x02 |
896 | 896 | ||
897 | CONFIG_SYS_USB_BRG_CLK 0xBLAH | 897 | CONFIG_SYS_USB_BRG_CLK 0xBLAH |
898 | Derive USB clock from brgclk | 898 | Derive USB clock from brgclk |
899 | - CONFIG_SYS_USB_BRG_CLK 0x04 | 899 | - CONFIG_SYS_USB_BRG_CLK 0x04 |
900 | 900 | ||
901 | If you have a USB-IF assigned VendorID then you may wish to | 901 | If you have a USB-IF assigned VendorID then you may wish to |
902 | define your own vendor specific values either in BoardName.h | 902 | define your own vendor specific values either in BoardName.h |
903 | or directly in usbd_vendor_info.h. If you don't define | 903 | or directly in usbd_vendor_info.h. If you don't define |
904 | CONFIG_USBD_MANUFACTURER, CONFIG_USBD_PRODUCT_NAME, | 904 | CONFIG_USBD_MANUFACTURER, CONFIG_USBD_PRODUCT_NAME, |
905 | CONFIG_USBD_VENDORID and CONFIG_USBD_PRODUCTID, then U-Boot | 905 | CONFIG_USBD_VENDORID and CONFIG_USBD_PRODUCTID, then U-Boot |
906 | should pretend to be a Linux device to it's target host. | 906 | should pretend to be a Linux device to it's target host. |
907 | 907 | ||
908 | CONFIG_USBD_MANUFACTURER | 908 | CONFIG_USBD_MANUFACTURER |
909 | Define this string as the name of your company for | 909 | Define this string as the name of your company for |
910 | - CONFIG_USBD_MANUFACTURER "my company" | 910 | - CONFIG_USBD_MANUFACTURER "my company" |
911 | 911 | ||
912 | CONFIG_USBD_PRODUCT_NAME | 912 | CONFIG_USBD_PRODUCT_NAME |
913 | Define this string as the name of your product | 913 | Define this string as the name of your product |
914 | - CONFIG_USBD_PRODUCT_NAME "acme usb device" | 914 | - CONFIG_USBD_PRODUCT_NAME "acme usb device" |
915 | 915 | ||
916 | CONFIG_USBD_VENDORID | 916 | CONFIG_USBD_VENDORID |
917 | Define this as your assigned Vendor ID from the USB | 917 | Define this as your assigned Vendor ID from the USB |
918 | Implementors Forum. This *must* be a genuine Vendor ID | 918 | Implementors Forum. This *must* be a genuine Vendor ID |
919 | to avoid polluting the USB namespace. | 919 | to avoid polluting the USB namespace. |
920 | - CONFIG_USBD_VENDORID 0xFFFF | 920 | - CONFIG_USBD_VENDORID 0xFFFF |
921 | 921 | ||
922 | CONFIG_USBD_PRODUCTID | 922 | CONFIG_USBD_PRODUCTID |
923 | Define this as the unique Product ID | 923 | Define this as the unique Product ID |
924 | for your device | 924 | for your device |
925 | - CONFIG_USBD_PRODUCTID 0xFFFF | 925 | - CONFIG_USBD_PRODUCTID 0xFFFF |
926 | 926 | ||
927 | 927 | ||
928 | - MMC Support: | 928 | - MMC Support: |
929 | The MMC controller on the Intel PXA is supported. To | 929 | The MMC controller on the Intel PXA is supported. To |
930 | enable this define CONFIG_MMC. The MMC can be | 930 | enable this define CONFIG_MMC. The MMC can be |
931 | accessed from the boot prompt by mapping the device | 931 | accessed from the boot prompt by mapping the device |
932 | to physical memory similar to flash. Command line is | 932 | to physical memory similar to flash. Command line is |
933 | enabled with CONFIG_CMD_MMC. The MMC driver also works with | 933 | enabled with CONFIG_CMD_MMC. The MMC driver also works with |
934 | the FAT fs. This is enabled with CONFIG_CMD_FAT. | 934 | the FAT fs. This is enabled with CONFIG_CMD_FAT. |
935 | 935 | ||
936 | - Journaling Flash filesystem support: | 936 | - Journaling Flash filesystem support: |
937 | CONFIG_JFFS2_NAND, CONFIG_JFFS2_NAND_OFF, CONFIG_JFFS2_NAND_SIZE, | 937 | CONFIG_JFFS2_NAND, CONFIG_JFFS2_NAND_OFF, CONFIG_JFFS2_NAND_SIZE, |
938 | CONFIG_JFFS2_NAND_DEV | 938 | CONFIG_JFFS2_NAND_DEV |
939 | Define these for a default partition on a NAND device | 939 | Define these for a default partition on a NAND device |
940 | 940 | ||
941 | CONFIG_SYS_JFFS2_FIRST_SECTOR, | 941 | CONFIG_SYS_JFFS2_FIRST_SECTOR, |
942 | CONFIG_SYS_JFFS2_FIRST_BANK, CONFIG_SYS_JFFS2_NUM_BANKS | 942 | CONFIG_SYS_JFFS2_FIRST_BANK, CONFIG_SYS_JFFS2_NUM_BANKS |
943 | Define these for a default partition on a NOR device | 943 | Define these for a default partition on a NOR device |
944 | 944 | ||
945 | CONFIG_SYS_JFFS_CUSTOM_PART | 945 | CONFIG_SYS_JFFS_CUSTOM_PART |
946 | Define this to create an own partition. You have to provide a | 946 | Define this to create an own partition. You have to provide a |
947 | function struct part_info* jffs2_part_info(int part_num) | 947 | function struct part_info* jffs2_part_info(int part_num) |
948 | 948 | ||
949 | If you define only one JFFS2 partition you may also want to | 949 | If you define only one JFFS2 partition you may also want to |
950 | #define CONFIG_SYS_JFFS_SINGLE_PART 1 | 950 | #define CONFIG_SYS_JFFS_SINGLE_PART 1 |
951 | to disable the command chpart. This is the default when you | 951 | to disable the command chpart. This is the default when you |
952 | have not defined a custom partition | 952 | have not defined a custom partition |
953 | 953 | ||
954 | - Keyboard Support: | 954 | - Keyboard Support: |
955 | CONFIG_ISA_KEYBOARD | 955 | CONFIG_ISA_KEYBOARD |
956 | 956 | ||
957 | Define this to enable standard (PC-Style) keyboard | 957 | Define this to enable standard (PC-Style) keyboard |
958 | support | 958 | support |
959 | 959 | ||
960 | CONFIG_I8042_KBD | 960 | CONFIG_I8042_KBD |
961 | Standard PC keyboard driver with US (is default) and | 961 | Standard PC keyboard driver with US (is default) and |
962 | GERMAN key layout (switch via environment 'keymap=de') support. | 962 | GERMAN key layout (switch via environment 'keymap=de') support. |
963 | Export function i8042_kbd_init, i8042_tstc and i8042_getc | 963 | Export function i8042_kbd_init, i8042_tstc and i8042_getc |
964 | for cfb_console. Supports cursor blinking. | 964 | for cfb_console. Supports cursor blinking. |
965 | 965 | ||
966 | - Video support: | 966 | - Video support: |
967 | CONFIG_VIDEO | 967 | CONFIG_VIDEO |
968 | 968 | ||
969 | Define this to enable video support (for output to | 969 | Define this to enable video support (for output to |
970 | video). | 970 | video). |
971 | 971 | ||
972 | CONFIG_VIDEO_CT69000 | 972 | CONFIG_VIDEO_CT69000 |
973 | 973 | ||
974 | Enable Chips & Technologies 69000 Video chip | 974 | Enable Chips & Technologies 69000 Video chip |
975 | 975 | ||
976 | CONFIG_VIDEO_SMI_LYNXEM | 976 | CONFIG_VIDEO_SMI_LYNXEM |
977 | Enable Silicon Motion SMI 712/710/810 Video chip. The | 977 | Enable Silicon Motion SMI 712/710/810 Video chip. The |
978 | video output is selected via environment 'videoout' | 978 | video output is selected via environment 'videoout' |
979 | (1 = LCD and 2 = CRT). If videoout is undefined, CRT is | 979 | (1 = LCD and 2 = CRT). If videoout is undefined, CRT is |
980 | assumed. | 980 | assumed. |
981 | 981 | ||
982 | For the CT69000 and SMI_LYNXEM drivers, videomode is | 982 | For the CT69000 and SMI_LYNXEM drivers, videomode is |
983 | selected via environment 'videomode'. Two different ways | 983 | selected via environment 'videomode'. Two different ways |
984 | are possible: | 984 | are possible: |
985 | - "videomode=num" 'num' is a standard LiLo mode numbers. | 985 | - "videomode=num" 'num' is a standard LiLo mode numbers. |
986 | Following standard modes are supported (* is default): | 986 | Following standard modes are supported (* is default): |
987 | 987 | ||
988 | Colors 640x480 800x600 1024x768 1152x864 1280x1024 | 988 | Colors 640x480 800x600 1024x768 1152x864 1280x1024 |
989 | -------------+--------------------------------------------- | 989 | -------------+--------------------------------------------- |
990 | 8 bits | 0x301* 0x303 0x305 0x161 0x307 | 990 | 8 bits | 0x301* 0x303 0x305 0x161 0x307 |
991 | 15 bits | 0x310 0x313 0x316 0x162 0x319 | 991 | 15 bits | 0x310 0x313 0x316 0x162 0x319 |
992 | 16 bits | 0x311 0x314 0x317 0x163 0x31A | 992 | 16 bits | 0x311 0x314 0x317 0x163 0x31A |
993 | 24 bits | 0x312 0x315 0x318 ? 0x31B | 993 | 24 bits | 0x312 0x315 0x318 ? 0x31B |
994 | -------------+--------------------------------------------- | 994 | -------------+--------------------------------------------- |
995 | (i.e. setenv videomode 317; saveenv; reset;) | 995 | (i.e. setenv videomode 317; saveenv; reset;) |
996 | 996 | ||
997 | - "videomode=bootargs" all the video parameters are parsed | 997 | - "videomode=bootargs" all the video parameters are parsed |
998 | from the bootargs. (See drivers/video/videomodes.c) | 998 | from the bootargs. (See drivers/video/videomodes.c) |
999 | 999 | ||
1000 | 1000 | ||
1001 | CONFIG_VIDEO_SED13806 | 1001 | CONFIG_VIDEO_SED13806 |
1002 | Enable Epson SED13806 driver. This driver supports 8bpp | 1002 | Enable Epson SED13806 driver. This driver supports 8bpp |
1003 | and 16bpp modes defined by CONFIG_VIDEO_SED13806_8BPP | 1003 | and 16bpp modes defined by CONFIG_VIDEO_SED13806_8BPP |
1004 | or CONFIG_VIDEO_SED13806_16BPP | 1004 | or CONFIG_VIDEO_SED13806_16BPP |
1005 | 1005 | ||
1006 | - Keyboard Support: | 1006 | - Keyboard Support: |
1007 | CONFIG_KEYBOARD | 1007 | CONFIG_KEYBOARD |
1008 | 1008 | ||
1009 | Define this to enable a custom keyboard support. | 1009 | Define this to enable a custom keyboard support. |
1010 | This simply calls drv_keyboard_init() which must be | 1010 | This simply calls drv_keyboard_init() which must be |
1011 | defined in your board-specific files. | 1011 | defined in your board-specific files. |
1012 | The only board using this so far is RBC823. | 1012 | The only board using this so far is RBC823. |
1013 | 1013 | ||
1014 | - LCD Support: CONFIG_LCD | 1014 | - LCD Support: CONFIG_LCD |
1015 | 1015 | ||
1016 | Define this to enable LCD support (for output to LCD | 1016 | Define this to enable LCD support (for output to LCD |
1017 | display); also select one of the supported displays | 1017 | display); also select one of the supported displays |
1018 | by defining one of these: | 1018 | by defining one of these: |
1019 | 1019 | ||
1020 | CONFIG_ATMEL_LCD: | 1020 | CONFIG_ATMEL_LCD: |
1021 | 1021 | ||
1022 | HITACHI TX09D70VM1CCA, 3.5", 240x320. | 1022 | HITACHI TX09D70VM1CCA, 3.5", 240x320. |
1023 | 1023 | ||
1024 | CONFIG_NEC_NL6448AC33: | 1024 | CONFIG_NEC_NL6448AC33: |
1025 | 1025 | ||
1026 | NEC NL6448AC33-18. Active, color, single scan. | 1026 | NEC NL6448AC33-18. Active, color, single scan. |
1027 | 1027 | ||
1028 | CONFIG_NEC_NL6448BC20 | 1028 | CONFIG_NEC_NL6448BC20 |
1029 | 1029 | ||
1030 | NEC NL6448BC20-08. 6.5", 640x480. | 1030 | NEC NL6448BC20-08. 6.5", 640x480. |
1031 | Active, color, single scan. | 1031 | Active, color, single scan. |
1032 | 1032 | ||
1033 | CONFIG_NEC_NL6448BC33_54 | 1033 | CONFIG_NEC_NL6448BC33_54 |
1034 | 1034 | ||
1035 | NEC NL6448BC33-54. 10.4", 640x480. | 1035 | NEC NL6448BC33-54. 10.4", 640x480. |
1036 | Active, color, single scan. | 1036 | Active, color, single scan. |
1037 | 1037 | ||
1038 | CONFIG_SHARP_16x9 | 1038 | CONFIG_SHARP_16x9 |
1039 | 1039 | ||
1040 | Sharp 320x240. Active, color, single scan. | 1040 | Sharp 320x240. Active, color, single scan. |
1041 | It isn't 16x9, and I am not sure what it is. | 1041 | It isn't 16x9, and I am not sure what it is. |
1042 | 1042 | ||
1043 | CONFIG_SHARP_LQ64D341 | 1043 | CONFIG_SHARP_LQ64D341 |
1044 | 1044 | ||
1045 | Sharp LQ64D341 display, 640x480. | 1045 | Sharp LQ64D341 display, 640x480. |
1046 | Active, color, single scan. | 1046 | Active, color, single scan. |
1047 | 1047 | ||
1048 | CONFIG_HLD1045 | 1048 | CONFIG_HLD1045 |
1049 | 1049 | ||
1050 | HLD1045 display, 640x480. | 1050 | HLD1045 display, 640x480. |
1051 | Active, color, single scan. | 1051 | Active, color, single scan. |
1052 | 1052 | ||
1053 | CONFIG_OPTREX_BW | 1053 | CONFIG_OPTREX_BW |
1054 | 1054 | ||
1055 | Optrex CBL50840-2 NF-FW 99 22 M5 | 1055 | Optrex CBL50840-2 NF-FW 99 22 M5 |
1056 | or | 1056 | or |
1057 | Hitachi LMG6912RPFC-00T | 1057 | Hitachi LMG6912RPFC-00T |
1058 | or | 1058 | or |
1059 | Hitachi SP14Q002 | 1059 | Hitachi SP14Q002 |
1060 | 1060 | ||
1061 | 320x240. Black & white. | 1061 | 320x240. Black & white. |
1062 | 1062 | ||
1063 | Normally display is black on white background; define | 1063 | Normally display is black on white background; define |
1064 | CONFIG_SYS_WHITE_ON_BLACK to get it inverted. | 1064 | CONFIG_SYS_WHITE_ON_BLACK to get it inverted. |
1065 | 1065 | ||
1066 | - Splash Screen Support: CONFIG_SPLASH_SCREEN | 1066 | - Splash Screen Support: CONFIG_SPLASH_SCREEN |
1067 | 1067 | ||
1068 | If this option is set, the environment is checked for | 1068 | If this option is set, the environment is checked for |
1069 | a variable "splashimage". If found, the usual display | 1069 | a variable "splashimage". If found, the usual display |
1070 | of logo, copyright and system information on the LCD | 1070 | of logo, copyright and system information on the LCD |
1071 | is suppressed and the BMP image at the address | 1071 | is suppressed and the BMP image at the address |
1072 | specified in "splashimage" is loaded instead. The | 1072 | specified in "splashimage" is loaded instead. The |
1073 | console is redirected to the "nulldev", too. This | 1073 | console is redirected to the "nulldev", too. This |
1074 | allows for a "silent" boot where a splash screen is | 1074 | allows for a "silent" boot where a splash screen is |
1075 | loaded very quickly after power-on. | 1075 | loaded very quickly after power-on. |
1076 | 1076 | ||
1077 | - Gzip compressed BMP image support: CONFIG_VIDEO_BMP_GZIP | 1077 | - Gzip compressed BMP image support: CONFIG_VIDEO_BMP_GZIP |
1078 | 1078 | ||
1079 | If this option is set, additionally to standard BMP | 1079 | If this option is set, additionally to standard BMP |
1080 | images, gzipped BMP images can be displayed via the | 1080 | images, gzipped BMP images can be displayed via the |
1081 | splashscreen support or the bmp command. | 1081 | splashscreen support or the bmp command. |
1082 | 1082 | ||
1083 | - Compression support: | 1083 | - Compression support: |
1084 | CONFIG_BZIP2 | 1084 | CONFIG_BZIP2 |
1085 | 1085 | ||
1086 | If this option is set, support for bzip2 compressed | 1086 | If this option is set, support for bzip2 compressed |
1087 | images is included. If not, only uncompressed and gzip | 1087 | images is included. If not, only uncompressed and gzip |
1088 | compressed images are supported. | 1088 | compressed images are supported. |
1089 | 1089 | ||
1090 | NOTE: the bzip2 algorithm requires a lot of RAM, so | 1090 | NOTE: the bzip2 algorithm requires a lot of RAM, so |
1091 | the malloc area (as defined by CONFIG_SYS_MALLOC_LEN) should | 1091 | the malloc area (as defined by CONFIG_SYS_MALLOC_LEN) should |
1092 | be at least 4MB. | 1092 | be at least 4MB. |
1093 | 1093 | ||
1094 | CONFIG_LZMA | 1094 | CONFIG_LZMA |
1095 | 1095 | ||
1096 | If this option is set, support for lzma compressed | 1096 | If this option is set, support for lzma compressed |
1097 | images is included. | 1097 | images is included. |
1098 | 1098 | ||
1099 | Note: The LZMA algorithm adds between 2 and 4KB of code and it | 1099 | Note: The LZMA algorithm adds between 2 and 4KB of code and it |
1100 | requires an amount of dynamic memory that is given by the | 1100 | requires an amount of dynamic memory that is given by the |
1101 | formula: | 1101 | formula: |
1102 | 1102 | ||
1103 | (1846 + 768 << (lc + lp)) * sizeof(uint16) | 1103 | (1846 + 768 << (lc + lp)) * sizeof(uint16) |
1104 | 1104 | ||
1105 | Where lc and lp stand for, respectively, Literal context bits | 1105 | Where lc and lp stand for, respectively, Literal context bits |
1106 | and Literal pos bits. | 1106 | and Literal pos bits. |
1107 | 1107 | ||
1108 | This value is upper-bounded by 14MB in the worst case. Anyway, | 1108 | This value is upper-bounded by 14MB in the worst case. Anyway, |
1109 | for a ~4MB large kernel image, we have lc=3 and lp=0 for a | 1109 | for a ~4MB large kernel image, we have lc=3 and lp=0 for a |
1110 | total amount of (1846 + 768 << (3 + 0)) * 2 = ~41KB... that is | 1110 | total amount of (1846 + 768 << (3 + 0)) * 2 = ~41KB... that is |
1111 | a very small buffer. | 1111 | a very small buffer. |
1112 | 1112 | ||
1113 | Use the lzmainfo tool to determinate the lc and lp values and | 1113 | Use the lzmainfo tool to determinate the lc and lp values and |
1114 | then calculate the amount of needed dynamic memory (ensuring | 1114 | then calculate the amount of needed dynamic memory (ensuring |
1115 | the appropriate CONFIG_SYS_MALLOC_LEN value). | 1115 | the appropriate CONFIG_SYS_MALLOC_LEN value). |
1116 | 1116 | ||
1117 | - MII/PHY support: | 1117 | - MII/PHY support: |
1118 | CONFIG_PHY_ADDR | 1118 | CONFIG_PHY_ADDR |
1119 | 1119 | ||
1120 | The address of PHY on MII bus. | 1120 | The address of PHY on MII bus. |
1121 | 1121 | ||
1122 | CONFIG_PHY_CLOCK_FREQ (ppc4xx) | 1122 | CONFIG_PHY_CLOCK_FREQ (ppc4xx) |
1123 | 1123 | ||
1124 | The clock frequency of the MII bus | 1124 | The clock frequency of the MII bus |
1125 | 1125 | ||
1126 | CONFIG_PHY_GIGE | 1126 | CONFIG_PHY_GIGE |
1127 | 1127 | ||
1128 | If this option is set, support for speed/duplex | 1128 | If this option is set, support for speed/duplex |
1129 | detection of gigabit PHY is included. | 1129 | detection of gigabit PHY is included. |
1130 | 1130 | ||
1131 | CONFIG_PHY_RESET_DELAY | 1131 | CONFIG_PHY_RESET_DELAY |
1132 | 1132 | ||
1133 | Some PHY like Intel LXT971A need extra delay after | 1133 | Some PHY like Intel LXT971A need extra delay after |
1134 | reset before any MII register access is possible. | 1134 | reset before any MII register access is possible. |
1135 | For such PHY, set this option to the usec delay | 1135 | For such PHY, set this option to the usec delay |
1136 | required. (minimum 300usec for LXT971A) | 1136 | required. (minimum 300usec for LXT971A) |
1137 | 1137 | ||
1138 | CONFIG_PHY_CMD_DELAY (ppc4xx) | 1138 | CONFIG_PHY_CMD_DELAY (ppc4xx) |
1139 | 1139 | ||
1140 | Some PHY like Intel LXT971A need extra delay after | 1140 | Some PHY like Intel LXT971A need extra delay after |
1141 | command issued before MII status register can be read | 1141 | command issued before MII status register can be read |
1142 | 1142 | ||
1143 | - Ethernet address: | 1143 | - Ethernet address: |
1144 | CONFIG_ETHADDR | 1144 | CONFIG_ETHADDR |
1145 | CONFIG_ETH1ADDR | 1145 | CONFIG_ETH1ADDR |
1146 | CONFIG_ETH2ADDR | 1146 | CONFIG_ETH2ADDR |
1147 | CONFIG_ETH3ADDR | 1147 | CONFIG_ETH3ADDR |
1148 | CONFIG_ETH4ADDR | 1148 | CONFIG_ETH4ADDR |
1149 | CONFIG_ETH5ADDR | 1149 | CONFIG_ETH5ADDR |
1150 | 1150 | ||
1151 | Define a default value for Ethernet address to use | 1151 | Define a default value for Ethernet address to use |
1152 | for the respective Ethernet interface, in case this | 1152 | for the respective Ethernet interface, in case this |
1153 | is not determined automatically. | 1153 | is not determined automatically. |
1154 | 1154 | ||
1155 | - IP address: | 1155 | - IP address: |
1156 | CONFIG_IPADDR | 1156 | CONFIG_IPADDR |
1157 | 1157 | ||
1158 | Define a default value for the IP address to use for | 1158 | Define a default value for the IP address to use for |
1159 | the default Ethernet interface, in case this is not | 1159 | the default Ethernet interface, in case this is not |
1160 | determined through e.g. bootp. | 1160 | determined through e.g. bootp. |
1161 | 1161 | ||
1162 | - Server IP address: | 1162 | - Server IP address: |
1163 | CONFIG_SERVERIP | 1163 | CONFIG_SERVERIP |
1164 | 1164 | ||
1165 | Defines a default value for the IP address of a TFTP | 1165 | Defines a default value for the IP address of a TFTP |
1166 | server to contact when using the "tftboot" command. | 1166 | server to contact when using the "tftboot" command. |
1167 | 1167 | ||
1168 | - Multicast TFTP Mode: | 1168 | - Multicast TFTP Mode: |
1169 | CONFIG_MCAST_TFTP | 1169 | CONFIG_MCAST_TFTP |
1170 | 1170 | ||
1171 | Defines whether you want to support multicast TFTP as per | 1171 | Defines whether you want to support multicast TFTP as per |
1172 | rfc-2090; for example to work with atftp. Lets lots of targets | 1172 | rfc-2090; for example to work with atftp. Lets lots of targets |
1173 | tftp down the same boot image concurrently. Note: the Ethernet | 1173 | tftp down the same boot image concurrently. Note: the Ethernet |
1174 | driver in use must provide a function: mcast() to join/leave a | 1174 | driver in use must provide a function: mcast() to join/leave a |
1175 | multicast group. | 1175 | multicast group. |
1176 | 1176 | ||
1177 | CONFIG_BOOTP_RANDOM_DELAY | 1177 | CONFIG_BOOTP_RANDOM_DELAY |
1178 | - BOOTP Recovery Mode: | 1178 | - BOOTP Recovery Mode: |
1179 | CONFIG_BOOTP_RANDOM_DELAY | 1179 | CONFIG_BOOTP_RANDOM_DELAY |
1180 | 1180 | ||
1181 | If you have many targets in a network that try to | 1181 | If you have many targets in a network that try to |
1182 | boot using BOOTP, you may want to avoid that all | 1182 | boot using BOOTP, you may want to avoid that all |
1183 | systems send out BOOTP requests at precisely the same | 1183 | systems send out BOOTP requests at precisely the same |
1184 | moment (which would happen for instance at recovery | 1184 | moment (which would happen for instance at recovery |
1185 | from a power failure, when all systems will try to | 1185 | from a power failure, when all systems will try to |
1186 | boot, thus flooding the BOOTP server. Defining | 1186 | boot, thus flooding the BOOTP server. Defining |
1187 | CONFIG_BOOTP_RANDOM_DELAY causes a random delay to be | 1187 | CONFIG_BOOTP_RANDOM_DELAY causes a random delay to be |
1188 | inserted before sending out BOOTP requests. The | 1188 | inserted before sending out BOOTP requests. The |
1189 | following delays are inserted then: | 1189 | following delays are inserted then: |
1190 | 1190 | ||
1191 | 1st BOOTP request: delay 0 ... 1 sec | 1191 | 1st BOOTP request: delay 0 ... 1 sec |
1192 | 2nd BOOTP request: delay 0 ... 2 sec | 1192 | 2nd BOOTP request: delay 0 ... 2 sec |
1193 | 3rd BOOTP request: delay 0 ... 4 sec | 1193 | 3rd BOOTP request: delay 0 ... 4 sec |
1194 | 4th and following | 1194 | 4th and following |
1195 | BOOTP requests: delay 0 ... 8 sec | 1195 | BOOTP requests: delay 0 ... 8 sec |
1196 | 1196 | ||
1197 | - DHCP Advanced Options: | 1197 | - DHCP Advanced Options: |
1198 | You can fine tune the DHCP functionality by defining | 1198 | You can fine tune the DHCP functionality by defining |
1199 | CONFIG_BOOTP_* symbols: | 1199 | CONFIG_BOOTP_* symbols: |
1200 | 1200 | ||
1201 | CONFIG_BOOTP_SUBNETMASK | 1201 | CONFIG_BOOTP_SUBNETMASK |
1202 | CONFIG_BOOTP_GATEWAY | 1202 | CONFIG_BOOTP_GATEWAY |
1203 | CONFIG_BOOTP_HOSTNAME | 1203 | CONFIG_BOOTP_HOSTNAME |
1204 | CONFIG_BOOTP_NISDOMAIN | 1204 | CONFIG_BOOTP_NISDOMAIN |
1205 | CONFIG_BOOTP_BOOTPATH | 1205 | CONFIG_BOOTP_BOOTPATH |
1206 | CONFIG_BOOTP_BOOTFILESIZE | 1206 | CONFIG_BOOTP_BOOTFILESIZE |
1207 | CONFIG_BOOTP_DNS | 1207 | CONFIG_BOOTP_DNS |
1208 | CONFIG_BOOTP_DNS2 | 1208 | CONFIG_BOOTP_DNS2 |
1209 | CONFIG_BOOTP_SEND_HOSTNAME | 1209 | CONFIG_BOOTP_SEND_HOSTNAME |
1210 | CONFIG_BOOTP_NTPSERVER | 1210 | CONFIG_BOOTP_NTPSERVER |
1211 | CONFIG_BOOTP_TIMEOFFSET | 1211 | CONFIG_BOOTP_TIMEOFFSET |
1212 | CONFIG_BOOTP_VENDOREX | 1212 | CONFIG_BOOTP_VENDOREX |
1213 | 1213 | ||
1214 | CONFIG_BOOTP_SERVERIP - TFTP server will be the serverip | 1214 | CONFIG_BOOTP_SERVERIP - TFTP server will be the serverip |
1215 | environment variable, not the BOOTP server. | 1215 | environment variable, not the BOOTP server. |
1216 | 1216 | ||
1217 | CONFIG_BOOTP_DNS2 - If a DHCP client requests the DNS | 1217 | CONFIG_BOOTP_DNS2 - If a DHCP client requests the DNS |
1218 | serverip from a DHCP server, it is possible that more | 1218 | serverip from a DHCP server, it is possible that more |
1219 | than one DNS serverip is offered to the client. | 1219 | than one DNS serverip is offered to the client. |
1220 | If CONFIG_BOOTP_DNS2 is enabled, the secondary DNS | 1220 | If CONFIG_BOOTP_DNS2 is enabled, the secondary DNS |
1221 | serverip will be stored in the additional environment | 1221 | serverip will be stored in the additional environment |
1222 | variable "dnsip2". The first DNS serverip is always | 1222 | variable "dnsip2". The first DNS serverip is always |
1223 | stored in the variable "dnsip", when CONFIG_BOOTP_DNS | 1223 | stored in the variable "dnsip", when CONFIG_BOOTP_DNS |
1224 | is defined. | 1224 | is defined. |
1225 | 1225 | ||
1226 | CONFIG_BOOTP_SEND_HOSTNAME - Some DHCP servers are capable | 1226 | CONFIG_BOOTP_SEND_HOSTNAME - Some DHCP servers are capable |
1227 | to do a dynamic update of a DNS server. To do this, they | 1227 | to do a dynamic update of a DNS server. To do this, they |
1228 | need the hostname of the DHCP requester. | 1228 | need the hostname of the DHCP requester. |
1229 | If CONFIG_BOOTP_SEND_HOSTNAME is defined, the content | 1229 | If CONFIG_BOOTP_SEND_HOSTNAME is defined, the content |
1230 | of the "hostname" environment variable is passed as | 1230 | of the "hostname" environment variable is passed as |
1231 | option 12 to the DHCP server. | 1231 | option 12 to the DHCP server. |
1232 | 1232 | ||
1233 | CONFIG_BOOTP_DHCP_REQUEST_DELAY | 1233 | CONFIG_BOOTP_DHCP_REQUEST_DELAY |
1234 | 1234 | ||
1235 | A 32bit value in microseconds for a delay between | 1235 | A 32bit value in microseconds for a delay between |
1236 | receiving a "DHCP Offer" and sending the "DHCP Request". | 1236 | receiving a "DHCP Offer" and sending the "DHCP Request". |
1237 | This fixes a problem with certain DHCP servers that don't | 1237 | This fixes a problem with certain DHCP servers that don't |
1238 | respond 100% of the time to a "DHCP request". E.g. On an | 1238 | respond 100% of the time to a "DHCP request". E.g. On an |
1239 | AT91RM9200 processor running at 180MHz, this delay needed | 1239 | AT91RM9200 processor running at 180MHz, this delay needed |
1240 | to be *at least* 15,000 usec before a Windows Server 2003 | 1240 | to be *at least* 15,000 usec before a Windows Server 2003 |
1241 | DHCP server would reply 100% of the time. I recommend at | 1241 | DHCP server would reply 100% of the time. I recommend at |
1242 | least 50,000 usec to be safe. The alternative is to hope | 1242 | least 50,000 usec to be safe. The alternative is to hope |
1243 | that one of the retries will be successful but note that | 1243 | that one of the retries will be successful but note that |
1244 | the DHCP timeout and retry process takes a longer than | 1244 | the DHCP timeout and retry process takes a longer than |
1245 | this delay. | 1245 | this delay. |
1246 | 1246 | ||
1247 | - CDP Options: | 1247 | - CDP Options: |
1248 | CONFIG_CDP_DEVICE_ID | 1248 | CONFIG_CDP_DEVICE_ID |
1249 | 1249 | ||
1250 | The device id used in CDP trigger frames. | 1250 | The device id used in CDP trigger frames. |
1251 | 1251 | ||
1252 | CONFIG_CDP_DEVICE_ID_PREFIX | 1252 | CONFIG_CDP_DEVICE_ID_PREFIX |
1253 | 1253 | ||
1254 | A two character string which is prefixed to the MAC address | 1254 | A two character string which is prefixed to the MAC address |
1255 | of the device. | 1255 | of the device. |
1256 | 1256 | ||
1257 | CONFIG_CDP_PORT_ID | 1257 | CONFIG_CDP_PORT_ID |
1258 | 1258 | ||
1259 | A printf format string which contains the ascii name of | 1259 | A printf format string which contains the ascii name of |
1260 | the port. Normally is set to "eth%d" which sets | 1260 | the port. Normally is set to "eth%d" which sets |
1261 | eth0 for the first Ethernet, eth1 for the second etc. | 1261 | eth0 for the first Ethernet, eth1 for the second etc. |
1262 | 1262 | ||
1263 | CONFIG_CDP_CAPABILITIES | 1263 | CONFIG_CDP_CAPABILITIES |
1264 | 1264 | ||
1265 | A 32bit integer which indicates the device capabilities; | 1265 | A 32bit integer which indicates the device capabilities; |
1266 | 0x00000010 for a normal host which does not forwards. | 1266 | 0x00000010 for a normal host which does not forwards. |
1267 | 1267 | ||
1268 | CONFIG_CDP_VERSION | 1268 | CONFIG_CDP_VERSION |
1269 | 1269 | ||
1270 | An ascii string containing the version of the software. | 1270 | An ascii string containing the version of the software. |
1271 | 1271 | ||
1272 | CONFIG_CDP_PLATFORM | 1272 | CONFIG_CDP_PLATFORM |
1273 | 1273 | ||
1274 | An ascii string containing the name of the platform. | 1274 | An ascii string containing the name of the platform. |
1275 | 1275 | ||
1276 | CONFIG_CDP_TRIGGER | 1276 | CONFIG_CDP_TRIGGER |
1277 | 1277 | ||
1278 | A 32bit integer sent on the trigger. | 1278 | A 32bit integer sent on the trigger. |
1279 | 1279 | ||
1280 | CONFIG_CDP_POWER_CONSUMPTION | 1280 | CONFIG_CDP_POWER_CONSUMPTION |
1281 | 1281 | ||
1282 | A 16bit integer containing the power consumption of the | 1282 | A 16bit integer containing the power consumption of the |
1283 | device in .1 of milliwatts. | 1283 | device in .1 of milliwatts. |
1284 | 1284 | ||
1285 | CONFIG_CDP_APPLIANCE_VLAN_TYPE | 1285 | CONFIG_CDP_APPLIANCE_VLAN_TYPE |
1286 | 1286 | ||
1287 | A byte containing the id of the VLAN. | 1287 | A byte containing the id of the VLAN. |
1288 | 1288 | ||
1289 | - Status LED: CONFIG_STATUS_LED | 1289 | - Status LED: CONFIG_STATUS_LED |
1290 | 1290 | ||
1291 | Several configurations allow to display the current | 1291 | Several configurations allow to display the current |
1292 | status using a LED. For instance, the LED will blink | 1292 | status using a LED. For instance, the LED will blink |
1293 | fast while running U-Boot code, stop blinking as | 1293 | fast while running U-Boot code, stop blinking as |
1294 | soon as a reply to a BOOTP request was received, and | 1294 | soon as a reply to a BOOTP request was received, and |
1295 | start blinking slow once the Linux kernel is running | 1295 | start blinking slow once the Linux kernel is running |
1296 | (supported by a status LED driver in the Linux | 1296 | (supported by a status LED driver in the Linux |
1297 | kernel). Defining CONFIG_STATUS_LED enables this | 1297 | kernel). Defining CONFIG_STATUS_LED enables this |
1298 | feature in U-Boot. | 1298 | feature in U-Boot. |
1299 | 1299 | ||
1300 | - CAN Support: CONFIG_CAN_DRIVER | 1300 | - CAN Support: CONFIG_CAN_DRIVER |
1301 | 1301 | ||
1302 | Defining CONFIG_CAN_DRIVER enables CAN driver support | 1302 | Defining CONFIG_CAN_DRIVER enables CAN driver support |
1303 | on those systems that support this (optional) | 1303 | on those systems that support this (optional) |
1304 | feature, like the TQM8xxL modules. | 1304 | feature, like the TQM8xxL modules. |
1305 | 1305 | ||
1306 | - I2C Support: CONFIG_HARD_I2C | CONFIG_SOFT_I2C | 1306 | - I2C Support: CONFIG_HARD_I2C | CONFIG_SOFT_I2C |
1307 | 1307 | ||
1308 | These enable I2C serial bus commands. Defining either of | 1308 | These enable I2C serial bus commands. Defining either of |
1309 | (but not both of) CONFIG_HARD_I2C or CONFIG_SOFT_I2C will | 1309 | (but not both of) CONFIG_HARD_I2C or CONFIG_SOFT_I2C will |
1310 | include the appropriate I2C driver for the selected CPU. | 1310 | include the appropriate I2C driver for the selected CPU. |
1311 | 1311 | ||
1312 | This will allow you to use i2c commands at the u-boot | 1312 | This will allow you to use i2c commands at the u-boot |
1313 | command line (as long as you set CONFIG_CMD_I2C in | 1313 | command line (as long as you set CONFIG_CMD_I2C in |
1314 | CONFIG_COMMANDS) and communicate with i2c based realtime | 1314 | CONFIG_COMMANDS) and communicate with i2c based realtime |
1315 | clock chips. See common/cmd_i2c.c for a description of the | 1315 | clock chips. See common/cmd_i2c.c for a description of the |
1316 | command line interface. | 1316 | command line interface. |
1317 | 1317 | ||
1318 | CONFIG_I2C_CMD_TREE is a recommended option that places | ||
1319 | all I2C commands under a single 'i2c' root command. The | ||
1320 | older 'imm', 'imd', 'iprobe' etc. commands are considered | ||
1321 | deprecated and may disappear in the future. | ||
1322 | |||
1323 | CONFIG_HARD_I2C selects a hardware I2C controller. | 1318 | CONFIG_HARD_I2C selects a hardware I2C controller. |
1324 | 1319 | ||
1325 | CONFIG_SOFT_I2C configures u-boot to use a software (aka | 1320 | CONFIG_SOFT_I2C configures u-boot to use a software (aka |
1326 | bit-banging) driver instead of CPM or similar hardware | 1321 | bit-banging) driver instead of CPM or similar hardware |
1327 | support for I2C. | 1322 | support for I2C. |
1328 | 1323 | ||
1329 | There are several other quantities that must also be | 1324 | There are several other quantities that must also be |
1330 | defined when you define CONFIG_HARD_I2C or CONFIG_SOFT_I2C. | 1325 | defined when you define CONFIG_HARD_I2C or CONFIG_SOFT_I2C. |
1331 | 1326 | ||
1332 | In both cases you will need to define CONFIG_SYS_I2C_SPEED | 1327 | In both cases you will need to define CONFIG_SYS_I2C_SPEED |
1333 | to be the frequency (in Hz) at which you wish your i2c bus | 1328 | to be the frequency (in Hz) at which you wish your i2c bus |
1334 | to run and CONFIG_SYS_I2C_SLAVE to be the address of this node (ie | 1329 | to run and CONFIG_SYS_I2C_SLAVE to be the address of this node (ie |
1335 | the CPU's i2c node address). | 1330 | the CPU's i2c node address). |
1336 | 1331 | ||
1337 | Now, the u-boot i2c code for the mpc8xx (cpu/mpc8xx/i2c.c) | 1332 | Now, the u-boot i2c code for the mpc8xx (cpu/mpc8xx/i2c.c) |
1338 | sets the CPU up as a master node and so its address should | 1333 | sets the CPU up as a master node and so its address should |
1339 | therefore be cleared to 0 (See, eg, MPC823e User's Manual | 1334 | therefore be cleared to 0 (See, eg, MPC823e User's Manual |
1340 | p.16-473). So, set CONFIG_SYS_I2C_SLAVE to 0. | 1335 | p.16-473). So, set CONFIG_SYS_I2C_SLAVE to 0. |
1341 | 1336 | ||
1342 | That's all that's required for CONFIG_HARD_I2C. | 1337 | That's all that's required for CONFIG_HARD_I2C. |
1343 | 1338 | ||
1344 | If you use the software i2c interface (CONFIG_SOFT_I2C) | 1339 | If you use the software i2c interface (CONFIG_SOFT_I2C) |
1345 | then the following macros need to be defined (examples are | 1340 | then the following macros need to be defined (examples are |
1346 | from include/configs/lwmon.h): | 1341 | from include/configs/lwmon.h): |
1347 | 1342 | ||
1348 | I2C_INIT | 1343 | I2C_INIT |
1349 | 1344 | ||
1350 | (Optional). Any commands necessary to enable the I2C | 1345 | (Optional). Any commands necessary to enable the I2C |
1351 | controller or configure ports. | 1346 | controller or configure ports. |
1352 | 1347 | ||
1353 | eg: #define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL) | 1348 | eg: #define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL) |
1354 | 1349 | ||
1355 | I2C_PORT | 1350 | I2C_PORT |
1356 | 1351 | ||
1357 | (Only for MPC8260 CPU). The I/O port to use (the code | 1352 | (Only for MPC8260 CPU). The I/O port to use (the code |
1358 | assumes both bits are on the same port). Valid values | 1353 | assumes both bits are on the same port). Valid values |
1359 | are 0..3 for ports A..D. | 1354 | are 0..3 for ports A..D. |
1360 | 1355 | ||
1361 | I2C_ACTIVE | 1356 | I2C_ACTIVE |
1362 | 1357 | ||
1363 | The code necessary to make the I2C data line active | 1358 | The code necessary to make the I2C data line active |
1364 | (driven). If the data line is open collector, this | 1359 | (driven). If the data line is open collector, this |
1365 | define can be null. | 1360 | define can be null. |
1366 | 1361 | ||
1367 | eg: #define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA) | 1362 | eg: #define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA) |
1368 | 1363 | ||
1369 | I2C_TRISTATE | 1364 | I2C_TRISTATE |
1370 | 1365 | ||
1371 | The code necessary to make the I2C data line tri-stated | 1366 | The code necessary to make the I2C data line tri-stated |
1372 | (inactive). If the data line is open collector, this | 1367 | (inactive). If the data line is open collector, this |
1373 | define can be null. | 1368 | define can be null. |
1374 | 1369 | ||
1375 | eg: #define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA) | 1370 | eg: #define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA) |
1376 | 1371 | ||
1377 | I2C_READ | 1372 | I2C_READ |
1378 | 1373 | ||
1379 | Code that returns TRUE if the I2C data line is high, | 1374 | Code that returns TRUE if the I2C data line is high, |
1380 | FALSE if it is low. | 1375 | FALSE if it is low. |
1381 | 1376 | ||
1382 | eg: #define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0) | 1377 | eg: #define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0) |
1383 | 1378 | ||
1384 | I2C_SDA(bit) | 1379 | I2C_SDA(bit) |
1385 | 1380 | ||
1386 | If <bit> is TRUE, sets the I2C data line high. If it | 1381 | If <bit> is TRUE, sets the I2C data line high. If it |
1387 | is FALSE, it clears it (low). | 1382 | is FALSE, it clears it (low). |
1388 | 1383 | ||
1389 | eg: #define I2C_SDA(bit) \ | 1384 | eg: #define I2C_SDA(bit) \ |
1390 | if(bit) immr->im_cpm.cp_pbdat |= PB_SDA; \ | 1385 | if(bit) immr->im_cpm.cp_pbdat |= PB_SDA; \ |
1391 | else immr->im_cpm.cp_pbdat &= ~PB_SDA | 1386 | else immr->im_cpm.cp_pbdat &= ~PB_SDA |
1392 | 1387 | ||
1393 | I2C_SCL(bit) | 1388 | I2C_SCL(bit) |
1394 | 1389 | ||
1395 | If <bit> is TRUE, sets the I2C clock line high. If it | 1390 | If <bit> is TRUE, sets the I2C clock line high. If it |
1396 | is FALSE, it clears it (low). | 1391 | is FALSE, it clears it (low). |
1397 | 1392 | ||
1398 | eg: #define I2C_SCL(bit) \ | 1393 | eg: #define I2C_SCL(bit) \ |
1399 | if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \ | 1394 | if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \ |
1400 | else immr->im_cpm.cp_pbdat &= ~PB_SCL | 1395 | else immr->im_cpm.cp_pbdat &= ~PB_SCL |
1401 | 1396 | ||
1402 | I2C_DELAY | 1397 | I2C_DELAY |
1403 | 1398 | ||
1404 | This delay is invoked four times per clock cycle so this | 1399 | This delay is invoked four times per clock cycle so this |
1405 | controls the rate of data transfer. The data rate thus | 1400 | controls the rate of data transfer. The data rate thus |
1406 | is 1 / (I2C_DELAY * 4). Often defined to be something | 1401 | is 1 / (I2C_DELAY * 4). Often defined to be something |
1407 | like: | 1402 | like: |
1408 | 1403 | ||
1409 | #define I2C_DELAY udelay(2) | 1404 | #define I2C_DELAY udelay(2) |
1410 | 1405 | ||
1411 | CONFIG_SYS_I2C_INIT_BOARD | 1406 | CONFIG_SYS_I2C_INIT_BOARD |
1412 | 1407 | ||
1413 | When a board is reset during an i2c bus transfer | 1408 | When a board is reset during an i2c bus transfer |
1414 | chips might think that the current transfer is still | 1409 | chips might think that the current transfer is still |
1415 | in progress. On some boards it is possible to access | 1410 | in progress. On some boards it is possible to access |
1416 | the i2c SCLK line directly, either by using the | 1411 | the i2c SCLK line directly, either by using the |
1417 | processor pin as a GPIO or by having a second pin | 1412 | processor pin as a GPIO or by having a second pin |
1418 | connected to the bus. If this option is defined a | 1413 | connected to the bus. If this option is defined a |
1419 | custom i2c_init_board() routine in boards/xxx/board.c | 1414 | custom i2c_init_board() routine in boards/xxx/board.c |
1420 | is run early in the boot sequence. | 1415 | is run early in the boot sequence. |
1421 | 1416 | ||
1422 | CONFIG_I2CFAST (PPC405GP|PPC405EP only) | 1417 | CONFIG_I2CFAST (PPC405GP|PPC405EP only) |
1423 | 1418 | ||
1424 | This option enables configuration of bi_iic_fast[] flags | 1419 | This option enables configuration of bi_iic_fast[] flags |
1425 | in u-boot bd_info structure based on u-boot environment | 1420 | in u-boot bd_info structure based on u-boot environment |
1426 | variable "i2cfast". (see also i2cfast) | 1421 | variable "i2cfast". (see also i2cfast) |
1427 | 1422 | ||
1428 | CONFIG_I2C_MULTI_BUS | 1423 | CONFIG_I2C_MULTI_BUS |
1429 | 1424 | ||
1430 | This option allows the use of multiple I2C buses, each of which | 1425 | This option allows the use of multiple I2C buses, each of which |
1431 | must have a controller. At any point in time, only one bus is | 1426 | must have a controller. At any point in time, only one bus is |
1432 | active. To switch to a different bus, use the 'i2c dev' command. | 1427 | active. To switch to a different bus, use the 'i2c dev' command. |
1433 | Note that bus numbering is zero-based. | 1428 | Note that bus numbering is zero-based. |
1434 | 1429 | ||
1435 | CONFIG_SYS_I2C_NOPROBES | 1430 | CONFIG_SYS_I2C_NOPROBES |
1436 | 1431 | ||
1437 | This option specifies a list of I2C devices that will be skipped | 1432 | This option specifies a list of I2C devices that will be skipped |
1438 | when the 'i2c probe' command is issued (or 'iprobe' using the legacy | 1433 | when the 'i2c probe' command is issued (or 'iprobe' using the legacy |
1439 | command). If CONFIG_I2C_MULTI_BUS is set, specify a list of bus-device | 1434 | command). If CONFIG_I2C_MULTI_BUS is set, specify a list of bus-device |
1440 | pairs. Otherwise, specify a 1D array of device addresses | 1435 | pairs. Otherwise, specify a 1D array of device addresses |
1441 | 1436 | ||
1442 | e.g. | 1437 | e.g. |
1443 | #undef CONFIG_I2C_MULTI_BUS | 1438 | #undef CONFIG_I2C_MULTI_BUS |
1444 | #define CONFIG_SYS_I2C_NOPROBES {0x50,0x68} | 1439 | #define CONFIG_SYS_I2C_NOPROBES {0x50,0x68} |
1445 | 1440 | ||
1446 | will skip addresses 0x50 and 0x68 on a board with one I2C bus | 1441 | will skip addresses 0x50 and 0x68 on a board with one I2C bus |
1447 | 1442 | ||
1448 | #define CONFIG_I2C_MULTI_BUS | 1443 | #define CONFIG_I2C_MULTI_BUS |
1449 | #define CONFIG_SYS_I2C_MULTI_NOPROBES {{0,0x50},{0,0x68},{1,0x54}} | 1444 | #define CONFIG_SYS_I2C_MULTI_NOPROBES {{0,0x50},{0,0x68},{1,0x54}} |
1450 | 1445 | ||
1451 | will skip addresses 0x50 and 0x68 on bus 0 and address 0x54 on bus 1 | 1446 | will skip addresses 0x50 and 0x68 on bus 0 and address 0x54 on bus 1 |
1452 | 1447 | ||
1453 | CONFIG_SYS_SPD_BUS_NUM | 1448 | CONFIG_SYS_SPD_BUS_NUM |
1454 | 1449 | ||
1455 | If defined, then this indicates the I2C bus number for DDR SPD. | 1450 | If defined, then this indicates the I2C bus number for DDR SPD. |
1456 | If not defined, then U-Boot assumes that SPD is on I2C bus 0. | 1451 | If not defined, then U-Boot assumes that SPD is on I2C bus 0. |
1457 | 1452 | ||
1458 | CONFIG_SYS_RTC_BUS_NUM | 1453 | CONFIG_SYS_RTC_BUS_NUM |
1459 | 1454 | ||
1460 | If defined, then this indicates the I2C bus number for the RTC. | 1455 | If defined, then this indicates the I2C bus number for the RTC. |
1461 | If not defined, then U-Boot assumes that RTC is on I2C bus 0. | 1456 | If not defined, then U-Boot assumes that RTC is on I2C bus 0. |
1462 | 1457 | ||
1463 | CONFIG_SYS_DTT_BUS_NUM | 1458 | CONFIG_SYS_DTT_BUS_NUM |
1464 | 1459 | ||
1465 | If defined, then this indicates the I2C bus number for the DTT. | 1460 | If defined, then this indicates the I2C bus number for the DTT. |
1466 | If not defined, then U-Boot assumes that DTT is on I2C bus 0. | 1461 | If not defined, then U-Boot assumes that DTT is on I2C bus 0. |
1467 | 1462 | ||
1468 | CONFIG_SYS_I2C_DTT_ADDR: | 1463 | CONFIG_SYS_I2C_DTT_ADDR: |
1469 | 1464 | ||
1470 | If defined, specifies the I2C address of the DTT device. | 1465 | If defined, specifies the I2C address of the DTT device. |
1471 | If not defined, then U-Boot uses predefined value for | 1466 | If not defined, then U-Boot uses predefined value for |
1472 | specified DTT device. | 1467 | specified DTT device. |
1473 | 1468 | ||
1474 | CONFIG_FSL_I2C | 1469 | CONFIG_FSL_I2C |
1475 | 1470 | ||
1476 | Define this option if you want to use Freescale's I2C driver in | 1471 | Define this option if you want to use Freescale's I2C driver in |
1477 | drivers/i2c/fsl_i2c.c. | 1472 | drivers/i2c/fsl_i2c.c. |
1478 | 1473 | ||
1479 | CONFIG_I2C_MUX | 1474 | CONFIG_I2C_MUX |
1480 | 1475 | ||
1481 | Define this option if you have I2C devices reached over 1 .. n | 1476 | Define this option if you have I2C devices reached over 1 .. n |
1482 | I2C Muxes like the pca9544a. This option addes a new I2C | 1477 | I2C Muxes like the pca9544a. This option addes a new I2C |
1483 | Command "i2c bus [muxtype:muxaddr:muxchannel]" which adds a | 1478 | Command "i2c bus [muxtype:muxaddr:muxchannel]" which adds a |
1484 | new I2C Bus to the existing I2C Busses. If you select the | 1479 | new I2C Bus to the existing I2C Busses. If you select the |
1485 | new Bus with "i2c dev", u-bbot sends first the commandos for | 1480 | new Bus with "i2c dev", u-bbot sends first the commandos for |
1486 | the muxes to activate this new "bus". | 1481 | the muxes to activate this new "bus". |
1487 | 1482 | ||
1488 | CONFIG_I2C_MULTI_BUS must be also defined, to use this | 1483 | CONFIG_I2C_MULTI_BUS must be also defined, to use this |
1489 | feature! | 1484 | feature! |
1490 | 1485 | ||
1491 | Example: | 1486 | Example: |
1492 | Adding a new I2C Bus reached over 2 pca9544a muxes | 1487 | Adding a new I2C Bus reached over 2 pca9544a muxes |
1493 | The First mux with address 70 and channel 6 | 1488 | The First mux with address 70 and channel 6 |
1494 | The Second mux with address 71 and channel 4 | 1489 | The Second mux with address 71 and channel 4 |
1495 | 1490 | ||
1496 | => i2c bus pca9544a:70:6:pca9544a:71:4 | 1491 | => i2c bus pca9544a:70:6:pca9544a:71:4 |
1497 | 1492 | ||
1498 | Use the "i2c bus" command without parameter, to get a list | 1493 | Use the "i2c bus" command without parameter, to get a list |
1499 | of I2C Busses with muxes: | 1494 | of I2C Busses with muxes: |
1500 | 1495 | ||
1501 | => i2c bus | 1496 | => i2c bus |
1502 | Busses reached over muxes: | 1497 | Busses reached over muxes: |
1503 | Bus ID: 2 | 1498 | Bus ID: 2 |
1504 | reached over Mux(es): | 1499 | reached over Mux(es): |
1505 | pca9544a@70 ch: 4 | 1500 | pca9544a@70 ch: 4 |
1506 | Bus ID: 3 | 1501 | Bus ID: 3 |
1507 | reached over Mux(es): | 1502 | reached over Mux(es): |
1508 | pca9544a@70 ch: 6 | 1503 | pca9544a@70 ch: 6 |
1509 | pca9544a@71 ch: 4 | 1504 | pca9544a@71 ch: 4 |
1510 | => | 1505 | => |
1511 | 1506 | ||
1512 | If you now switch to the new I2C Bus 3 with "i2c dev 3" | 1507 | If you now switch to the new I2C Bus 3 with "i2c dev 3" |
1513 | u-boot sends First the Commando to the mux@70 to enable | 1508 | u-boot sends First the Commando to the mux@70 to enable |
1514 | channel 6, and then the Commando to the mux@71 to enable | 1509 | channel 6, and then the Commando to the mux@71 to enable |
1515 | the channel 4. | 1510 | the channel 4. |
1516 | 1511 | ||
1517 | After that, you can use the "normal" i2c commands as | 1512 | After that, you can use the "normal" i2c commands as |
1518 | usual, to communicate with your I2C devices behind | 1513 | usual, to communicate with your I2C devices behind |
1519 | the 2 muxes. | 1514 | the 2 muxes. |
1520 | 1515 | ||
1521 | This option is actually implemented for the bitbanging | 1516 | This option is actually implemented for the bitbanging |
1522 | algorithm in common/soft_i2c.c and for the Hardware I2C | 1517 | algorithm in common/soft_i2c.c and for the Hardware I2C |
1523 | Bus on the MPC8260. But it should be not so difficult | 1518 | Bus on the MPC8260. But it should be not so difficult |
1524 | to add this option to other architectures. | 1519 | to add this option to other architectures. |
1525 | 1520 | ||
1526 | CONFIG_SOFT_I2C_READ_REPEATED_START | 1521 | CONFIG_SOFT_I2C_READ_REPEATED_START |
1527 | 1522 | ||
1528 | defining this will force the i2c_read() function in | 1523 | defining this will force the i2c_read() function in |
1529 | the soft_i2c driver to perform an I2C repeated start | 1524 | the soft_i2c driver to perform an I2C repeated start |
1530 | between writing the address pointer and reading the | 1525 | between writing the address pointer and reading the |
1531 | data. If this define is omitted the default behaviour | 1526 | data. If this define is omitted the default behaviour |
1532 | of doing a stop-start sequence will be used. Most I2C | 1527 | of doing a stop-start sequence will be used. Most I2C |
1533 | devices can use either method, but some require one or | 1528 | devices can use either method, but some require one or |
1534 | the other. | 1529 | the other. |
1535 | 1530 | ||
1536 | - SPI Support: CONFIG_SPI | 1531 | - SPI Support: CONFIG_SPI |
1537 | 1532 | ||
1538 | Enables SPI driver (so far only tested with | 1533 | Enables SPI driver (so far only tested with |
1539 | SPI EEPROM, also an instance works with Crystal A/D and | 1534 | SPI EEPROM, also an instance works with Crystal A/D and |
1540 | D/As on the SACSng board) | 1535 | D/As on the SACSng board) |
1541 | 1536 | ||
1542 | CONFIG_SPI_X | 1537 | CONFIG_SPI_X |
1543 | 1538 | ||
1544 | Enables extended (16-bit) SPI EEPROM addressing. | 1539 | Enables extended (16-bit) SPI EEPROM addressing. |
1545 | (symmetrical to CONFIG_I2C_X) | 1540 | (symmetrical to CONFIG_I2C_X) |
1546 | 1541 | ||
1547 | CONFIG_SOFT_SPI | 1542 | CONFIG_SOFT_SPI |
1548 | 1543 | ||
1549 | Enables a software (bit-bang) SPI driver rather than | 1544 | Enables a software (bit-bang) SPI driver rather than |
1550 | using hardware support. This is a general purpose | 1545 | using hardware support. This is a general purpose |
1551 | driver that only requires three general I/O port pins | 1546 | driver that only requires three general I/O port pins |
1552 | (two outputs, one input) to function. If this is | 1547 | (two outputs, one input) to function. If this is |
1553 | defined, the board configuration must define several | 1548 | defined, the board configuration must define several |
1554 | SPI configuration items (port pins to use, etc). For | 1549 | SPI configuration items (port pins to use, etc). For |
1555 | an example, see include/configs/sacsng.h. | 1550 | an example, see include/configs/sacsng.h. |
1556 | 1551 | ||
1557 | CONFIG_HARD_SPI | 1552 | CONFIG_HARD_SPI |
1558 | 1553 | ||
1559 | Enables a hardware SPI driver for general-purpose reads | 1554 | Enables a hardware SPI driver for general-purpose reads |
1560 | and writes. As with CONFIG_SOFT_SPI, the board configuration | 1555 | and writes. As with CONFIG_SOFT_SPI, the board configuration |
1561 | must define a list of chip-select function pointers. | 1556 | must define a list of chip-select function pointers. |
1562 | Currently supported on some MPC8xxx processors. For an | 1557 | Currently supported on some MPC8xxx processors. For an |
1563 | example, see include/configs/mpc8349emds.h. | 1558 | example, see include/configs/mpc8349emds.h. |
1564 | 1559 | ||
1565 | CONFIG_MXC_SPI | 1560 | CONFIG_MXC_SPI |
1566 | 1561 | ||
1567 | Enables the driver for the SPI controllers on i.MX and MXC | 1562 | Enables the driver for the SPI controllers on i.MX and MXC |
1568 | SoCs. Currently only i.MX31 is supported. | 1563 | SoCs. Currently only i.MX31 is supported. |
1569 | 1564 | ||
1570 | - FPGA Support: CONFIG_FPGA | 1565 | - FPGA Support: CONFIG_FPGA |
1571 | 1566 | ||
1572 | Enables FPGA subsystem. | 1567 | Enables FPGA subsystem. |
1573 | 1568 | ||
1574 | CONFIG_FPGA_<vendor> | 1569 | CONFIG_FPGA_<vendor> |
1575 | 1570 | ||
1576 | Enables support for specific chip vendors. | 1571 | Enables support for specific chip vendors. |
1577 | (ALTERA, XILINX) | 1572 | (ALTERA, XILINX) |
1578 | 1573 | ||
1579 | CONFIG_FPGA_<family> | 1574 | CONFIG_FPGA_<family> |
1580 | 1575 | ||
1581 | Enables support for FPGA family. | 1576 | Enables support for FPGA family. |
1582 | (SPARTAN2, SPARTAN3, VIRTEX2, CYCLONE2, ACEX1K, ACEX) | 1577 | (SPARTAN2, SPARTAN3, VIRTEX2, CYCLONE2, ACEX1K, ACEX) |
1583 | 1578 | ||
1584 | CONFIG_FPGA_COUNT | 1579 | CONFIG_FPGA_COUNT |
1585 | 1580 | ||
1586 | Specify the number of FPGA devices to support. | 1581 | Specify the number of FPGA devices to support. |
1587 | 1582 | ||
1588 | CONFIG_SYS_FPGA_PROG_FEEDBACK | 1583 | CONFIG_SYS_FPGA_PROG_FEEDBACK |
1589 | 1584 | ||
1590 | Enable printing of hash marks during FPGA configuration. | 1585 | Enable printing of hash marks during FPGA configuration. |
1591 | 1586 | ||
1592 | CONFIG_SYS_FPGA_CHECK_BUSY | 1587 | CONFIG_SYS_FPGA_CHECK_BUSY |
1593 | 1588 | ||
1594 | Enable checks on FPGA configuration interface busy | 1589 | Enable checks on FPGA configuration interface busy |
1595 | status by the configuration function. This option | 1590 | status by the configuration function. This option |
1596 | will require a board or device specific function to | 1591 | will require a board or device specific function to |
1597 | be written. | 1592 | be written. |
1598 | 1593 | ||
1599 | CONFIG_FPGA_DELAY | 1594 | CONFIG_FPGA_DELAY |
1600 | 1595 | ||
1601 | If defined, a function that provides delays in the FPGA | 1596 | If defined, a function that provides delays in the FPGA |
1602 | configuration driver. | 1597 | configuration driver. |
1603 | 1598 | ||
1604 | CONFIG_SYS_FPGA_CHECK_CTRLC | 1599 | CONFIG_SYS_FPGA_CHECK_CTRLC |
1605 | Allow Control-C to interrupt FPGA configuration | 1600 | Allow Control-C to interrupt FPGA configuration |
1606 | 1601 | ||
1607 | CONFIG_SYS_FPGA_CHECK_ERROR | 1602 | CONFIG_SYS_FPGA_CHECK_ERROR |
1608 | 1603 | ||
1609 | Check for configuration errors during FPGA bitfile | 1604 | Check for configuration errors during FPGA bitfile |
1610 | loading. For example, abort during Virtex II | 1605 | loading. For example, abort during Virtex II |
1611 | configuration if the INIT_B line goes low (which | 1606 | configuration if the INIT_B line goes low (which |
1612 | indicated a CRC error). | 1607 | indicated a CRC error). |
1613 | 1608 | ||
1614 | CONFIG_SYS_FPGA_WAIT_INIT | 1609 | CONFIG_SYS_FPGA_WAIT_INIT |
1615 | 1610 | ||
1616 | Maximum time to wait for the INIT_B line to deassert | 1611 | Maximum time to wait for the INIT_B line to deassert |
1617 | after PROB_B has been deasserted during a Virtex II | 1612 | after PROB_B has been deasserted during a Virtex II |
1618 | FPGA configuration sequence. The default time is 500 | 1613 | FPGA configuration sequence. The default time is 500 |
1619 | ms. | 1614 | ms. |
1620 | 1615 | ||
1621 | CONFIG_SYS_FPGA_WAIT_BUSY | 1616 | CONFIG_SYS_FPGA_WAIT_BUSY |
1622 | 1617 | ||
1623 | Maximum time to wait for BUSY to deassert during | 1618 | Maximum time to wait for BUSY to deassert during |
1624 | Virtex II FPGA configuration. The default is 5 ms. | 1619 | Virtex II FPGA configuration. The default is 5 ms. |
1625 | 1620 | ||
1626 | CONFIG_SYS_FPGA_WAIT_CONFIG | 1621 | CONFIG_SYS_FPGA_WAIT_CONFIG |
1627 | 1622 | ||
1628 | Time to wait after FPGA configuration. The default is | 1623 | Time to wait after FPGA configuration. The default is |
1629 | 200 ms. | 1624 | 200 ms. |
1630 | 1625 | ||
1631 | - Configuration Management: | 1626 | - Configuration Management: |
1632 | CONFIG_IDENT_STRING | 1627 | CONFIG_IDENT_STRING |
1633 | 1628 | ||
1634 | If defined, this string will be added to the U-Boot | 1629 | If defined, this string will be added to the U-Boot |
1635 | version information (U_BOOT_VERSION) | 1630 | version information (U_BOOT_VERSION) |
1636 | 1631 | ||
1637 | - Vendor Parameter Protection: | 1632 | - Vendor Parameter Protection: |
1638 | 1633 | ||
1639 | U-Boot considers the values of the environment | 1634 | U-Boot considers the values of the environment |
1640 | variables "serial#" (Board Serial Number) and | 1635 | variables "serial#" (Board Serial Number) and |
1641 | "ethaddr" (Ethernet Address) to be parameters that | 1636 | "ethaddr" (Ethernet Address) to be parameters that |
1642 | are set once by the board vendor / manufacturer, and | 1637 | are set once by the board vendor / manufacturer, and |
1643 | protects these variables from casual modification by | 1638 | protects these variables from casual modification by |
1644 | the user. Once set, these variables are read-only, | 1639 | the user. Once set, these variables are read-only, |
1645 | and write or delete attempts are rejected. You can | 1640 | and write or delete attempts are rejected. You can |
1646 | change this behaviour: | 1641 | change this behaviour: |
1647 | 1642 | ||
1648 | If CONFIG_ENV_OVERWRITE is #defined in your config | 1643 | If CONFIG_ENV_OVERWRITE is #defined in your config |
1649 | file, the write protection for vendor parameters is | 1644 | file, the write protection for vendor parameters is |
1650 | completely disabled. Anybody can change or delete | 1645 | completely disabled. Anybody can change or delete |
1651 | these parameters. | 1646 | these parameters. |
1652 | 1647 | ||
1653 | Alternatively, if you #define _both_ CONFIG_ETHADDR | 1648 | Alternatively, if you #define _both_ CONFIG_ETHADDR |
1654 | _and_ CONFIG_OVERWRITE_ETHADDR_ONCE, a default | 1649 | _and_ CONFIG_OVERWRITE_ETHADDR_ONCE, a default |
1655 | Ethernet address is installed in the environment, | 1650 | Ethernet address is installed in the environment, |
1656 | which can be changed exactly ONCE by the user. [The | 1651 | which can be changed exactly ONCE by the user. [The |
1657 | serial# is unaffected by this, i. e. it remains | 1652 | serial# is unaffected by this, i. e. it remains |
1658 | read-only.] | 1653 | read-only.] |
1659 | 1654 | ||
1660 | - Protected RAM: | 1655 | - Protected RAM: |
1661 | CONFIG_PRAM | 1656 | CONFIG_PRAM |
1662 | 1657 | ||
1663 | Define this variable to enable the reservation of | 1658 | Define this variable to enable the reservation of |
1664 | "protected RAM", i. e. RAM which is not overwritten | 1659 | "protected RAM", i. e. RAM which is not overwritten |
1665 | by U-Boot. Define CONFIG_PRAM to hold the number of | 1660 | by U-Boot. Define CONFIG_PRAM to hold the number of |
1666 | kB you want to reserve for pRAM. You can overwrite | 1661 | kB you want to reserve for pRAM. You can overwrite |
1667 | this default value by defining an environment | 1662 | this default value by defining an environment |
1668 | variable "pram" to the number of kB you want to | 1663 | variable "pram" to the number of kB you want to |
1669 | reserve. Note that the board info structure will | 1664 | reserve. Note that the board info structure will |
1670 | still show the full amount of RAM. If pRAM is | 1665 | still show the full amount of RAM. If pRAM is |
1671 | reserved, a new environment variable "mem" will | 1666 | reserved, a new environment variable "mem" will |
1672 | automatically be defined to hold the amount of | 1667 | automatically be defined to hold the amount of |
1673 | remaining RAM in a form that can be passed as boot | 1668 | remaining RAM in a form that can be passed as boot |
1674 | argument to Linux, for instance like that: | 1669 | argument to Linux, for instance like that: |
1675 | 1670 | ||
1676 | setenv bootargs ... mem=\${mem} | 1671 | setenv bootargs ... mem=\${mem} |
1677 | saveenv | 1672 | saveenv |
1678 | 1673 | ||
1679 | This way you can tell Linux not to use this memory, | 1674 | This way you can tell Linux not to use this memory, |
1680 | either, which results in a memory region that will | 1675 | either, which results in a memory region that will |
1681 | not be affected by reboots. | 1676 | not be affected by reboots. |
1682 | 1677 | ||
1683 | *WARNING* If your board configuration uses automatic | 1678 | *WARNING* If your board configuration uses automatic |
1684 | detection of the RAM size, you must make sure that | 1679 | detection of the RAM size, you must make sure that |
1685 | this memory test is non-destructive. So far, the | 1680 | this memory test is non-destructive. So far, the |
1686 | following board configurations are known to be | 1681 | following board configurations are known to be |
1687 | "pRAM-clean": | 1682 | "pRAM-clean": |
1688 | 1683 | ||
1689 | ETX094, IVMS8, IVML24, SPD8xx, TQM8xxL, | 1684 | ETX094, IVMS8, IVML24, SPD8xx, TQM8xxL, |
1690 | HERMES, IP860, RPXlite, LWMON, LANTEC, | 1685 | HERMES, IP860, RPXlite, LWMON, LANTEC, |
1691 | PCU_E, FLAGADM, TQM8260 | 1686 | PCU_E, FLAGADM, TQM8260 |
1692 | 1687 | ||
1693 | - Error Recovery: | 1688 | - Error Recovery: |
1694 | CONFIG_PANIC_HANG | 1689 | CONFIG_PANIC_HANG |
1695 | 1690 | ||
1696 | Define this variable to stop the system in case of a | 1691 | Define this variable to stop the system in case of a |
1697 | fatal error, so that you have to reset it manually. | 1692 | fatal error, so that you have to reset it manually. |
1698 | This is probably NOT a good idea for an embedded | 1693 | This is probably NOT a good idea for an embedded |
1699 | system where you want the system to reboot | 1694 | system where you want the system to reboot |
1700 | automatically as fast as possible, but it may be | 1695 | automatically as fast as possible, but it may be |
1701 | useful during development since you can try to debug | 1696 | useful during development since you can try to debug |
1702 | the conditions that lead to the situation. | 1697 | the conditions that lead to the situation. |
1703 | 1698 | ||
1704 | CONFIG_NET_RETRY_COUNT | 1699 | CONFIG_NET_RETRY_COUNT |
1705 | 1700 | ||
1706 | This variable defines the number of retries for | 1701 | This variable defines the number of retries for |
1707 | network operations like ARP, RARP, TFTP, or BOOTP | 1702 | network operations like ARP, RARP, TFTP, or BOOTP |
1708 | before giving up the operation. If not defined, a | 1703 | before giving up the operation. If not defined, a |
1709 | default value of 5 is used. | 1704 | default value of 5 is used. |
1710 | 1705 | ||
1711 | CONFIG_ARP_TIMEOUT | 1706 | CONFIG_ARP_TIMEOUT |
1712 | 1707 | ||
1713 | Timeout waiting for an ARP reply in milliseconds. | 1708 | Timeout waiting for an ARP reply in milliseconds. |
1714 | 1709 | ||
1715 | - Command Interpreter: | 1710 | - Command Interpreter: |
1716 | CONFIG_AUTO_COMPLETE | 1711 | CONFIG_AUTO_COMPLETE |
1717 | 1712 | ||
1718 | Enable auto completion of commands using TAB. | 1713 | Enable auto completion of commands using TAB. |
1719 | 1714 | ||
1720 | Note that this feature has NOT been implemented yet | 1715 | Note that this feature has NOT been implemented yet |
1721 | for the "hush" shell. | 1716 | for the "hush" shell. |
1722 | 1717 | ||
1723 | 1718 | ||
1724 | CONFIG_SYS_HUSH_PARSER | 1719 | CONFIG_SYS_HUSH_PARSER |
1725 | 1720 | ||
1726 | Define this variable to enable the "hush" shell (from | 1721 | Define this variable to enable the "hush" shell (from |
1727 | Busybox) as command line interpreter, thus enabling | 1722 | Busybox) as command line interpreter, thus enabling |
1728 | powerful command line syntax like | 1723 | powerful command line syntax like |
1729 | if...then...else...fi conditionals or `&&' and '||' | 1724 | if...then...else...fi conditionals or `&&' and '||' |
1730 | constructs ("shell scripts"). | 1725 | constructs ("shell scripts"). |
1731 | 1726 | ||
1732 | If undefined, you get the old, much simpler behaviour | 1727 | If undefined, you get the old, much simpler behaviour |
1733 | with a somewhat smaller memory footprint. | 1728 | with a somewhat smaller memory footprint. |
1734 | 1729 | ||
1735 | 1730 | ||
1736 | CONFIG_SYS_PROMPT_HUSH_PS2 | 1731 | CONFIG_SYS_PROMPT_HUSH_PS2 |
1737 | 1732 | ||
1738 | This defines the secondary prompt string, which is | 1733 | This defines the secondary prompt string, which is |
1739 | printed when the command interpreter needs more input | 1734 | printed when the command interpreter needs more input |
1740 | to complete a command. Usually "> ". | 1735 | to complete a command. Usually "> ". |
1741 | 1736 | ||
1742 | Note: | 1737 | Note: |
1743 | 1738 | ||
1744 | In the current implementation, the local variables | 1739 | In the current implementation, the local variables |
1745 | space and global environment variables space are | 1740 | space and global environment variables space are |
1746 | separated. Local variables are those you define by | 1741 | separated. Local variables are those you define by |
1747 | simply typing `name=value'. To access a local | 1742 | simply typing `name=value'. To access a local |
1748 | variable later on, you have write `$name' or | 1743 | variable later on, you have write `$name' or |
1749 | `${name}'; to execute the contents of a variable | 1744 | `${name}'; to execute the contents of a variable |
1750 | directly type `$name' at the command prompt. | 1745 | directly type `$name' at the command prompt. |
1751 | 1746 | ||
1752 | Global environment variables are those you use | 1747 | Global environment variables are those you use |
1753 | setenv/printenv to work with. To run a command stored | 1748 | setenv/printenv to work with. To run a command stored |
1754 | in such a variable, you need to use the run command, | 1749 | in such a variable, you need to use the run command, |
1755 | and you must not use the '$' sign to access them. | 1750 | and you must not use the '$' sign to access them. |
1756 | 1751 | ||
1757 | To store commands and special characters in a | 1752 | To store commands and special characters in a |
1758 | variable, please use double quotation marks | 1753 | variable, please use double quotation marks |
1759 | surrounding the whole text of the variable, instead | 1754 | surrounding the whole text of the variable, instead |
1760 | of the backslashes before semicolons and special | 1755 | of the backslashes before semicolons and special |
1761 | symbols. | 1756 | symbols. |
1762 | 1757 | ||
1763 | - Commandline Editing and History: | 1758 | - Commandline Editing and History: |
1764 | CONFIG_CMDLINE_EDITING | 1759 | CONFIG_CMDLINE_EDITING |
1765 | 1760 | ||
1766 | Enable editing and History functions for interactive | 1761 | Enable editing and History functions for interactive |
1767 | commandline input operations | 1762 | commandline input operations |
1768 | 1763 | ||
1769 | - Default Environment: | 1764 | - Default Environment: |
1770 | CONFIG_EXTRA_ENV_SETTINGS | 1765 | CONFIG_EXTRA_ENV_SETTINGS |
1771 | 1766 | ||
1772 | Define this to contain any number of null terminated | 1767 | Define this to contain any number of null terminated |
1773 | strings (variable = value pairs) that will be part of | 1768 | strings (variable = value pairs) that will be part of |
1774 | the default environment compiled into the boot image. | 1769 | the default environment compiled into the boot image. |
1775 | 1770 | ||
1776 | For example, place something like this in your | 1771 | For example, place something like this in your |
1777 | board's config file: | 1772 | board's config file: |
1778 | 1773 | ||
1779 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 1774 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
1780 | "myvar1=value1\0" \ | 1775 | "myvar1=value1\0" \ |
1781 | "myvar2=value2\0" | 1776 | "myvar2=value2\0" |
1782 | 1777 | ||
1783 | Warning: This method is based on knowledge about the | 1778 | Warning: This method is based on knowledge about the |
1784 | internal format how the environment is stored by the | 1779 | internal format how the environment is stored by the |
1785 | U-Boot code. This is NOT an official, exported | 1780 | U-Boot code. This is NOT an official, exported |
1786 | interface! Although it is unlikely that this format | 1781 | interface! Although it is unlikely that this format |
1787 | will change soon, there is no guarantee either. | 1782 | will change soon, there is no guarantee either. |
1788 | You better know what you are doing here. | 1783 | You better know what you are doing here. |
1789 | 1784 | ||
1790 | Note: overly (ab)use of the default environment is | 1785 | Note: overly (ab)use of the default environment is |
1791 | discouraged. Make sure to check other ways to preset | 1786 | discouraged. Make sure to check other ways to preset |
1792 | the environment like the "source" command or the | 1787 | the environment like the "source" command or the |
1793 | boot command first. | 1788 | boot command first. |
1794 | 1789 | ||
1795 | - DataFlash Support: | 1790 | - DataFlash Support: |
1796 | CONFIG_HAS_DATAFLASH | 1791 | CONFIG_HAS_DATAFLASH |
1797 | 1792 | ||
1798 | Defining this option enables DataFlash features and | 1793 | Defining this option enables DataFlash features and |
1799 | allows to read/write in Dataflash via the standard | 1794 | allows to read/write in Dataflash via the standard |
1800 | commands cp, md... | 1795 | commands cp, md... |
1801 | 1796 | ||
1802 | - SystemACE Support: | 1797 | - SystemACE Support: |
1803 | CONFIG_SYSTEMACE | 1798 | CONFIG_SYSTEMACE |
1804 | 1799 | ||
1805 | Adding this option adds support for Xilinx SystemACE | 1800 | Adding this option adds support for Xilinx SystemACE |
1806 | chips attached via some sort of local bus. The address | 1801 | chips attached via some sort of local bus. The address |
1807 | of the chip must also be defined in the | 1802 | of the chip must also be defined in the |
1808 | CONFIG_SYS_SYSTEMACE_BASE macro. For example: | 1803 | CONFIG_SYS_SYSTEMACE_BASE macro. For example: |
1809 | 1804 | ||
1810 | #define CONFIG_SYSTEMACE | 1805 | #define CONFIG_SYSTEMACE |
1811 | #define CONFIG_SYS_SYSTEMACE_BASE 0xf0000000 | 1806 | #define CONFIG_SYS_SYSTEMACE_BASE 0xf0000000 |
1812 | 1807 | ||
1813 | When SystemACE support is added, the "ace" device type | 1808 | When SystemACE support is added, the "ace" device type |
1814 | becomes available to the fat commands, i.e. fatls. | 1809 | becomes available to the fat commands, i.e. fatls. |
1815 | 1810 | ||
1816 | - TFTP Fixed UDP Port: | 1811 | - TFTP Fixed UDP Port: |
1817 | CONFIG_TFTP_PORT | 1812 | CONFIG_TFTP_PORT |
1818 | 1813 | ||
1819 | If this is defined, the environment variable tftpsrcp | 1814 | If this is defined, the environment variable tftpsrcp |
1820 | is used to supply the TFTP UDP source port value. | 1815 | is used to supply the TFTP UDP source port value. |
1821 | If tftpsrcp isn't defined, the normal pseudo-random port | 1816 | If tftpsrcp isn't defined, the normal pseudo-random port |
1822 | number generator is used. | 1817 | number generator is used. |
1823 | 1818 | ||
1824 | Also, the environment variable tftpdstp is used to supply | 1819 | Also, the environment variable tftpdstp is used to supply |
1825 | the TFTP UDP destination port value. If tftpdstp isn't | 1820 | the TFTP UDP destination port value. If tftpdstp isn't |
1826 | defined, the normal port 69 is used. | 1821 | defined, the normal port 69 is used. |
1827 | 1822 | ||
1828 | The purpose for tftpsrcp is to allow a TFTP server to | 1823 | The purpose for tftpsrcp is to allow a TFTP server to |
1829 | blindly start the TFTP transfer using the pre-configured | 1824 | blindly start the TFTP transfer using the pre-configured |
1830 | target IP address and UDP port. This has the effect of | 1825 | target IP address and UDP port. This has the effect of |
1831 | "punching through" the (Windows XP) firewall, allowing | 1826 | "punching through" the (Windows XP) firewall, allowing |
1832 | the remainder of the TFTP transfer to proceed normally. | 1827 | the remainder of the TFTP transfer to proceed normally. |
1833 | A better solution is to properly configure the firewall, | 1828 | A better solution is to properly configure the firewall, |
1834 | but sometimes that is not allowed. | 1829 | but sometimes that is not allowed. |
1835 | 1830 | ||
1836 | - Show boot progress: | 1831 | - Show boot progress: |
1837 | CONFIG_SHOW_BOOT_PROGRESS | 1832 | CONFIG_SHOW_BOOT_PROGRESS |
1838 | 1833 | ||
1839 | Defining this option allows to add some board- | 1834 | Defining this option allows to add some board- |
1840 | specific code (calling a user-provided function | 1835 | specific code (calling a user-provided function |
1841 | "show_boot_progress(int)") that enables you to show | 1836 | "show_boot_progress(int)") that enables you to show |
1842 | the system's boot progress on some display (for | 1837 | the system's boot progress on some display (for |
1843 | example, some LED's) on your board. At the moment, | 1838 | example, some LED's) on your board. At the moment, |
1844 | the following checkpoints are implemented: | 1839 | the following checkpoints are implemented: |
1845 | 1840 | ||
1846 | - Automatic software updates via TFTP server | 1841 | - Automatic software updates via TFTP server |
1847 | CONFIG_UPDATE_TFTP | 1842 | CONFIG_UPDATE_TFTP |
1848 | CONFIG_UPDATE_TFTP_CNT_MAX | 1843 | CONFIG_UPDATE_TFTP_CNT_MAX |
1849 | CONFIG_UPDATE_TFTP_MSEC_MAX | 1844 | CONFIG_UPDATE_TFTP_MSEC_MAX |
1850 | 1845 | ||
1851 | These options enable and control the auto-update feature; | 1846 | These options enable and control the auto-update feature; |
1852 | for a more detailed description refer to doc/README.update. | 1847 | for a more detailed description refer to doc/README.update. |
1853 | 1848 | ||
1854 | Legacy uImage format: | 1849 | Legacy uImage format: |
1855 | 1850 | ||
1856 | Arg Where When | 1851 | Arg Where When |
1857 | 1 common/cmd_bootm.c before attempting to boot an image | 1852 | 1 common/cmd_bootm.c before attempting to boot an image |
1858 | -1 common/cmd_bootm.c Image header has bad magic number | 1853 | -1 common/cmd_bootm.c Image header has bad magic number |
1859 | 2 common/cmd_bootm.c Image header has correct magic number | 1854 | 2 common/cmd_bootm.c Image header has correct magic number |
1860 | -2 common/cmd_bootm.c Image header has bad checksum | 1855 | -2 common/cmd_bootm.c Image header has bad checksum |
1861 | 3 common/cmd_bootm.c Image header has correct checksum | 1856 | 3 common/cmd_bootm.c Image header has correct checksum |
1862 | -3 common/cmd_bootm.c Image data has bad checksum | 1857 | -3 common/cmd_bootm.c Image data has bad checksum |
1863 | 4 common/cmd_bootm.c Image data has correct checksum | 1858 | 4 common/cmd_bootm.c Image data has correct checksum |
1864 | -4 common/cmd_bootm.c Image is for unsupported architecture | 1859 | -4 common/cmd_bootm.c Image is for unsupported architecture |
1865 | 5 common/cmd_bootm.c Architecture check OK | 1860 | 5 common/cmd_bootm.c Architecture check OK |
1866 | -5 common/cmd_bootm.c Wrong Image Type (not kernel, multi) | 1861 | -5 common/cmd_bootm.c Wrong Image Type (not kernel, multi) |
1867 | 6 common/cmd_bootm.c Image Type check OK | 1862 | 6 common/cmd_bootm.c Image Type check OK |
1868 | -6 common/cmd_bootm.c gunzip uncompression error | 1863 | -6 common/cmd_bootm.c gunzip uncompression error |
1869 | -7 common/cmd_bootm.c Unimplemented compression type | 1864 | -7 common/cmd_bootm.c Unimplemented compression type |
1870 | 7 common/cmd_bootm.c Uncompression OK | 1865 | 7 common/cmd_bootm.c Uncompression OK |
1871 | 8 common/cmd_bootm.c No uncompress/copy overwrite error | 1866 | 8 common/cmd_bootm.c No uncompress/copy overwrite error |
1872 | -9 common/cmd_bootm.c Unsupported OS (not Linux, BSD, VxWorks, QNX) | 1867 | -9 common/cmd_bootm.c Unsupported OS (not Linux, BSD, VxWorks, QNX) |
1873 | 1868 | ||
1874 | 9 common/image.c Start initial ramdisk verification | 1869 | 9 common/image.c Start initial ramdisk verification |
1875 | -10 common/image.c Ramdisk header has bad magic number | 1870 | -10 common/image.c Ramdisk header has bad magic number |
1876 | -11 common/image.c Ramdisk header has bad checksum | 1871 | -11 common/image.c Ramdisk header has bad checksum |
1877 | 10 common/image.c Ramdisk header is OK | 1872 | 10 common/image.c Ramdisk header is OK |
1878 | -12 common/image.c Ramdisk data has bad checksum | 1873 | -12 common/image.c Ramdisk data has bad checksum |
1879 | 11 common/image.c Ramdisk data has correct checksum | 1874 | 11 common/image.c Ramdisk data has correct checksum |
1880 | 12 common/image.c Ramdisk verification complete, start loading | 1875 | 12 common/image.c Ramdisk verification complete, start loading |
1881 | -13 common/image.c Wrong Image Type (not PPC Linux ramdisk) | 1876 | -13 common/image.c Wrong Image Type (not PPC Linux ramdisk) |
1882 | 13 common/image.c Start multifile image verification | 1877 | 13 common/image.c Start multifile image verification |
1883 | 14 common/image.c No initial ramdisk, no multifile, continue. | 1878 | 14 common/image.c No initial ramdisk, no multifile, continue. |
1884 | 1879 | ||
1885 | 15 lib_<arch>/bootm.c All preparation done, transferring control to OS | 1880 | 15 lib_<arch>/bootm.c All preparation done, transferring control to OS |
1886 | 1881 | ||
1887 | -30 lib_ppc/board.c Fatal error, hang the system | 1882 | -30 lib_ppc/board.c Fatal error, hang the system |
1888 | -31 post/post.c POST test failed, detected by post_output_backlog() | 1883 | -31 post/post.c POST test failed, detected by post_output_backlog() |
1889 | -32 post/post.c POST test failed, detected by post_run_single() | 1884 | -32 post/post.c POST test failed, detected by post_run_single() |
1890 | 1885 | ||
1891 | 34 common/cmd_doc.c before loading a Image from a DOC device | 1886 | 34 common/cmd_doc.c before loading a Image from a DOC device |
1892 | -35 common/cmd_doc.c Bad usage of "doc" command | 1887 | -35 common/cmd_doc.c Bad usage of "doc" command |
1893 | 35 common/cmd_doc.c correct usage of "doc" command | 1888 | 35 common/cmd_doc.c correct usage of "doc" command |
1894 | -36 common/cmd_doc.c No boot device | 1889 | -36 common/cmd_doc.c No boot device |
1895 | 36 common/cmd_doc.c correct boot device | 1890 | 36 common/cmd_doc.c correct boot device |
1896 | -37 common/cmd_doc.c Unknown Chip ID on boot device | 1891 | -37 common/cmd_doc.c Unknown Chip ID on boot device |
1897 | 37 common/cmd_doc.c correct chip ID found, device available | 1892 | 37 common/cmd_doc.c correct chip ID found, device available |
1898 | -38 common/cmd_doc.c Read Error on boot device | 1893 | -38 common/cmd_doc.c Read Error on boot device |
1899 | 38 common/cmd_doc.c reading Image header from DOC device OK | 1894 | 38 common/cmd_doc.c reading Image header from DOC device OK |
1900 | -39 common/cmd_doc.c Image header has bad magic number | 1895 | -39 common/cmd_doc.c Image header has bad magic number |
1901 | 39 common/cmd_doc.c Image header has correct magic number | 1896 | 39 common/cmd_doc.c Image header has correct magic number |
1902 | -40 common/cmd_doc.c Error reading Image from DOC device | 1897 | -40 common/cmd_doc.c Error reading Image from DOC device |
1903 | 40 common/cmd_doc.c Image header has correct magic number | 1898 | 40 common/cmd_doc.c Image header has correct magic number |
1904 | 41 common/cmd_ide.c before loading a Image from a IDE device | 1899 | 41 common/cmd_ide.c before loading a Image from a IDE device |
1905 | -42 common/cmd_ide.c Bad usage of "ide" command | 1900 | -42 common/cmd_ide.c Bad usage of "ide" command |
1906 | 42 common/cmd_ide.c correct usage of "ide" command | 1901 | 42 common/cmd_ide.c correct usage of "ide" command |
1907 | -43 common/cmd_ide.c No boot device | 1902 | -43 common/cmd_ide.c No boot device |
1908 | 43 common/cmd_ide.c boot device found | 1903 | 43 common/cmd_ide.c boot device found |
1909 | -44 common/cmd_ide.c Device not available | 1904 | -44 common/cmd_ide.c Device not available |
1910 | 44 common/cmd_ide.c Device available | 1905 | 44 common/cmd_ide.c Device available |
1911 | -45 common/cmd_ide.c wrong partition selected | 1906 | -45 common/cmd_ide.c wrong partition selected |
1912 | 45 common/cmd_ide.c partition selected | 1907 | 45 common/cmd_ide.c partition selected |
1913 | -46 common/cmd_ide.c Unknown partition table | 1908 | -46 common/cmd_ide.c Unknown partition table |
1914 | 46 common/cmd_ide.c valid partition table found | 1909 | 46 common/cmd_ide.c valid partition table found |
1915 | -47 common/cmd_ide.c Invalid partition type | 1910 | -47 common/cmd_ide.c Invalid partition type |
1916 | 47 common/cmd_ide.c correct partition type | 1911 | 47 common/cmd_ide.c correct partition type |
1917 | -48 common/cmd_ide.c Error reading Image Header on boot device | 1912 | -48 common/cmd_ide.c Error reading Image Header on boot device |
1918 | 48 common/cmd_ide.c reading Image Header from IDE device OK | 1913 | 48 common/cmd_ide.c reading Image Header from IDE device OK |
1919 | -49 common/cmd_ide.c Image header has bad magic number | 1914 | -49 common/cmd_ide.c Image header has bad magic number |
1920 | 49 common/cmd_ide.c Image header has correct magic number | 1915 | 49 common/cmd_ide.c Image header has correct magic number |
1921 | -50 common/cmd_ide.c Image header has bad checksum | 1916 | -50 common/cmd_ide.c Image header has bad checksum |
1922 | 50 common/cmd_ide.c Image header has correct checksum | 1917 | 50 common/cmd_ide.c Image header has correct checksum |
1923 | -51 common/cmd_ide.c Error reading Image from IDE device | 1918 | -51 common/cmd_ide.c Error reading Image from IDE device |
1924 | 51 common/cmd_ide.c reading Image from IDE device OK | 1919 | 51 common/cmd_ide.c reading Image from IDE device OK |
1925 | 52 common/cmd_nand.c before loading a Image from a NAND device | 1920 | 52 common/cmd_nand.c before loading a Image from a NAND device |
1926 | -53 common/cmd_nand.c Bad usage of "nand" command | 1921 | -53 common/cmd_nand.c Bad usage of "nand" command |
1927 | 53 common/cmd_nand.c correct usage of "nand" command | 1922 | 53 common/cmd_nand.c correct usage of "nand" command |
1928 | -54 common/cmd_nand.c No boot device | 1923 | -54 common/cmd_nand.c No boot device |
1929 | 54 common/cmd_nand.c boot device found | 1924 | 54 common/cmd_nand.c boot device found |
1930 | -55 common/cmd_nand.c Unknown Chip ID on boot device | 1925 | -55 common/cmd_nand.c Unknown Chip ID on boot device |
1931 | 55 common/cmd_nand.c correct chip ID found, device available | 1926 | 55 common/cmd_nand.c correct chip ID found, device available |
1932 | -56 common/cmd_nand.c Error reading Image Header on boot device | 1927 | -56 common/cmd_nand.c Error reading Image Header on boot device |
1933 | 56 common/cmd_nand.c reading Image Header from NAND device OK | 1928 | 56 common/cmd_nand.c reading Image Header from NAND device OK |
1934 | -57 common/cmd_nand.c Image header has bad magic number | 1929 | -57 common/cmd_nand.c Image header has bad magic number |
1935 | 57 common/cmd_nand.c Image header has correct magic number | 1930 | 57 common/cmd_nand.c Image header has correct magic number |
1936 | -58 common/cmd_nand.c Error reading Image from NAND device | 1931 | -58 common/cmd_nand.c Error reading Image from NAND device |
1937 | 58 common/cmd_nand.c reading Image from NAND device OK | 1932 | 58 common/cmd_nand.c reading Image from NAND device OK |
1938 | 1933 | ||
1939 | -60 common/env_common.c Environment has a bad CRC, using default | 1934 | -60 common/env_common.c Environment has a bad CRC, using default |
1940 | 1935 | ||
1941 | 64 net/eth.c starting with Ethernet configuration. | 1936 | 64 net/eth.c starting with Ethernet configuration. |
1942 | -64 net/eth.c no Ethernet found. | 1937 | -64 net/eth.c no Ethernet found. |
1943 | 65 net/eth.c Ethernet found. | 1938 | 65 net/eth.c Ethernet found. |
1944 | 1939 | ||
1945 | -80 common/cmd_net.c usage wrong | 1940 | -80 common/cmd_net.c usage wrong |
1946 | 80 common/cmd_net.c before calling NetLoop() | 1941 | 80 common/cmd_net.c before calling NetLoop() |
1947 | -81 common/cmd_net.c some error in NetLoop() occurred | 1942 | -81 common/cmd_net.c some error in NetLoop() occurred |
1948 | 81 common/cmd_net.c NetLoop() back without error | 1943 | 81 common/cmd_net.c NetLoop() back without error |
1949 | -82 common/cmd_net.c size == 0 (File with size 0 loaded) | 1944 | -82 common/cmd_net.c size == 0 (File with size 0 loaded) |
1950 | 82 common/cmd_net.c trying automatic boot | 1945 | 82 common/cmd_net.c trying automatic boot |
1951 | 83 common/cmd_net.c running "source" command | 1946 | 83 common/cmd_net.c running "source" command |
1952 | -83 common/cmd_net.c some error in automatic boot or "source" command | 1947 | -83 common/cmd_net.c some error in automatic boot or "source" command |
1953 | 84 common/cmd_net.c end without errors | 1948 | 84 common/cmd_net.c end without errors |
1954 | 1949 | ||
1955 | FIT uImage format: | 1950 | FIT uImage format: |
1956 | 1951 | ||
1957 | Arg Where When | 1952 | Arg Where When |
1958 | 100 common/cmd_bootm.c Kernel FIT Image has correct format | 1953 | 100 common/cmd_bootm.c Kernel FIT Image has correct format |
1959 | -100 common/cmd_bootm.c Kernel FIT Image has incorrect format | 1954 | -100 common/cmd_bootm.c Kernel FIT Image has incorrect format |
1960 | 101 common/cmd_bootm.c No Kernel subimage unit name, using configuration | 1955 | 101 common/cmd_bootm.c No Kernel subimage unit name, using configuration |
1961 | -101 common/cmd_bootm.c Can't get configuration for kernel subimage | 1956 | -101 common/cmd_bootm.c Can't get configuration for kernel subimage |
1962 | 102 common/cmd_bootm.c Kernel unit name specified | 1957 | 102 common/cmd_bootm.c Kernel unit name specified |
1963 | -103 common/cmd_bootm.c Can't get kernel subimage node offset | 1958 | -103 common/cmd_bootm.c Can't get kernel subimage node offset |
1964 | 103 common/cmd_bootm.c Found configuration node | 1959 | 103 common/cmd_bootm.c Found configuration node |
1965 | 104 common/cmd_bootm.c Got kernel subimage node offset | 1960 | 104 common/cmd_bootm.c Got kernel subimage node offset |
1966 | -104 common/cmd_bootm.c Kernel subimage hash verification failed | 1961 | -104 common/cmd_bootm.c Kernel subimage hash verification failed |
1967 | 105 common/cmd_bootm.c Kernel subimage hash verification OK | 1962 | 105 common/cmd_bootm.c Kernel subimage hash verification OK |
1968 | -105 common/cmd_bootm.c Kernel subimage is for unsupported architecture | 1963 | -105 common/cmd_bootm.c Kernel subimage is for unsupported architecture |
1969 | 106 common/cmd_bootm.c Architecture check OK | 1964 | 106 common/cmd_bootm.c Architecture check OK |
1970 | -106 common/cmd_bootm.c Kernel subimage has wrong type | 1965 | -106 common/cmd_bootm.c Kernel subimage has wrong type |
1971 | 107 common/cmd_bootm.c Kernel subimage type OK | 1966 | 107 common/cmd_bootm.c Kernel subimage type OK |
1972 | -107 common/cmd_bootm.c Can't get kernel subimage data/size | 1967 | -107 common/cmd_bootm.c Can't get kernel subimage data/size |
1973 | 108 common/cmd_bootm.c Got kernel subimage data/size | 1968 | 108 common/cmd_bootm.c Got kernel subimage data/size |
1974 | -108 common/cmd_bootm.c Wrong image type (not legacy, FIT) | 1969 | -108 common/cmd_bootm.c Wrong image type (not legacy, FIT) |
1975 | -109 common/cmd_bootm.c Can't get kernel subimage type | 1970 | -109 common/cmd_bootm.c Can't get kernel subimage type |
1976 | -110 common/cmd_bootm.c Can't get kernel subimage comp | 1971 | -110 common/cmd_bootm.c Can't get kernel subimage comp |
1977 | -111 common/cmd_bootm.c Can't get kernel subimage os | 1972 | -111 common/cmd_bootm.c Can't get kernel subimage os |
1978 | -112 common/cmd_bootm.c Can't get kernel subimage load address | 1973 | -112 common/cmd_bootm.c Can't get kernel subimage load address |
1979 | -113 common/cmd_bootm.c Image uncompress/copy overwrite error | 1974 | -113 common/cmd_bootm.c Image uncompress/copy overwrite error |
1980 | 1975 | ||
1981 | 120 common/image.c Start initial ramdisk verification | 1976 | 120 common/image.c Start initial ramdisk verification |
1982 | -120 common/image.c Ramdisk FIT image has incorrect format | 1977 | -120 common/image.c Ramdisk FIT image has incorrect format |
1983 | 121 common/image.c Ramdisk FIT image has correct format | 1978 | 121 common/image.c Ramdisk FIT image has correct format |
1984 | 122 common/image.c No ramdisk subimage unit name, using configuration | 1979 | 122 common/image.c No ramdisk subimage unit name, using configuration |
1985 | -122 common/image.c Can't get configuration for ramdisk subimage | 1980 | -122 common/image.c Can't get configuration for ramdisk subimage |
1986 | 123 common/image.c Ramdisk unit name specified | 1981 | 123 common/image.c Ramdisk unit name specified |
1987 | -124 common/image.c Can't get ramdisk subimage node offset | 1982 | -124 common/image.c Can't get ramdisk subimage node offset |
1988 | 125 common/image.c Got ramdisk subimage node offset | 1983 | 125 common/image.c Got ramdisk subimage node offset |
1989 | -125 common/image.c Ramdisk subimage hash verification failed | 1984 | -125 common/image.c Ramdisk subimage hash verification failed |
1990 | 126 common/image.c Ramdisk subimage hash verification OK | 1985 | 126 common/image.c Ramdisk subimage hash verification OK |
1991 | -126 common/image.c Ramdisk subimage for unsupported architecture | 1986 | -126 common/image.c Ramdisk subimage for unsupported architecture |
1992 | 127 common/image.c Architecture check OK | 1987 | 127 common/image.c Architecture check OK |
1993 | -127 common/image.c Can't get ramdisk subimage data/size | 1988 | -127 common/image.c Can't get ramdisk subimage data/size |
1994 | 128 common/image.c Got ramdisk subimage data/size | 1989 | 128 common/image.c Got ramdisk subimage data/size |
1995 | 129 common/image.c Can't get ramdisk load address | 1990 | 129 common/image.c Can't get ramdisk load address |
1996 | -129 common/image.c Got ramdisk load address | 1991 | -129 common/image.c Got ramdisk load address |
1997 | 1992 | ||
1998 | -130 common/cmd_doc.c Incorrect FIT image format | 1993 | -130 common/cmd_doc.c Incorrect FIT image format |
1999 | 131 common/cmd_doc.c FIT image format OK | 1994 | 131 common/cmd_doc.c FIT image format OK |
2000 | 1995 | ||
2001 | -140 common/cmd_ide.c Incorrect FIT image format | 1996 | -140 common/cmd_ide.c Incorrect FIT image format |
2002 | 141 common/cmd_ide.c FIT image format OK | 1997 | 141 common/cmd_ide.c FIT image format OK |
2003 | 1998 | ||
2004 | -150 common/cmd_nand.c Incorrect FIT image format | 1999 | -150 common/cmd_nand.c Incorrect FIT image format |
2005 | 151 common/cmd_nand.c FIT image format OK | 2000 | 151 common/cmd_nand.c FIT image format OK |
2006 | 2001 | ||
2007 | 2002 | ||
2008 | Modem Support: | 2003 | Modem Support: |
2009 | -------------- | 2004 | -------------- |
2010 | 2005 | ||
2011 | [so far only for SMDK2400 and TRAB boards] | 2006 | [so far only for SMDK2400 and TRAB boards] |
2012 | 2007 | ||
2013 | - Modem support enable: | 2008 | - Modem support enable: |
2014 | CONFIG_MODEM_SUPPORT | 2009 | CONFIG_MODEM_SUPPORT |
2015 | 2010 | ||
2016 | - RTS/CTS Flow control enable: | 2011 | - RTS/CTS Flow control enable: |
2017 | CONFIG_HWFLOW | 2012 | CONFIG_HWFLOW |
2018 | 2013 | ||
2019 | - Modem debug support: | 2014 | - Modem debug support: |
2020 | CONFIG_MODEM_SUPPORT_DEBUG | 2015 | CONFIG_MODEM_SUPPORT_DEBUG |
2021 | 2016 | ||
2022 | Enables debugging stuff (char screen[1024], dbg()) | 2017 | Enables debugging stuff (char screen[1024], dbg()) |
2023 | for modem support. Useful only with BDI2000. | 2018 | for modem support. Useful only with BDI2000. |
2024 | 2019 | ||
2025 | - Interrupt support (PPC): | 2020 | - Interrupt support (PPC): |
2026 | 2021 | ||
2027 | There are common interrupt_init() and timer_interrupt() | 2022 | There are common interrupt_init() and timer_interrupt() |
2028 | for all PPC archs. interrupt_init() calls interrupt_init_cpu() | 2023 | for all PPC archs. interrupt_init() calls interrupt_init_cpu() |
2029 | for CPU specific initialization. interrupt_init_cpu() | 2024 | for CPU specific initialization. interrupt_init_cpu() |
2030 | should set decrementer_count to appropriate value. If | 2025 | should set decrementer_count to appropriate value. If |
2031 | CPU resets decrementer automatically after interrupt | 2026 | CPU resets decrementer automatically after interrupt |
2032 | (ppc4xx) it should set decrementer_count to zero. | 2027 | (ppc4xx) it should set decrementer_count to zero. |
2033 | timer_interrupt() calls timer_interrupt_cpu() for CPU | 2028 | timer_interrupt() calls timer_interrupt_cpu() for CPU |
2034 | specific handling. If board has watchdog / status_led | 2029 | specific handling. If board has watchdog / status_led |
2035 | / other_activity_monitor it works automatically from | 2030 | / other_activity_monitor it works automatically from |
2036 | general timer_interrupt(). | 2031 | general timer_interrupt(). |
2037 | 2032 | ||
2038 | - General: | 2033 | - General: |
2039 | 2034 | ||
2040 | In the target system modem support is enabled when a | 2035 | In the target system modem support is enabled when a |
2041 | specific key (key combination) is pressed during | 2036 | specific key (key combination) is pressed during |
2042 | power-on. Otherwise U-Boot will boot normally | 2037 | power-on. Otherwise U-Boot will boot normally |
2043 | (autoboot). The key_pressed() function is called from | 2038 | (autoboot). The key_pressed() function is called from |
2044 | board_init(). Currently key_pressed() is a dummy | 2039 | board_init(). Currently key_pressed() is a dummy |
2045 | function, returning 1 and thus enabling modem | 2040 | function, returning 1 and thus enabling modem |
2046 | initialization. | 2041 | initialization. |
2047 | 2042 | ||
2048 | If there are no modem init strings in the | 2043 | If there are no modem init strings in the |
2049 | environment, U-Boot proceed to autoboot; the | 2044 | environment, U-Boot proceed to autoboot; the |
2050 | previous output (banner, info printfs) will be | 2045 | previous output (banner, info printfs) will be |
2051 | suppressed, though. | 2046 | suppressed, though. |
2052 | 2047 | ||
2053 | See also: doc/README.Modem | 2048 | See also: doc/README.Modem |
2054 | 2049 | ||
2055 | 2050 | ||
2056 | Configuration Settings: | 2051 | Configuration Settings: |
2057 | ----------------------- | 2052 | ----------------------- |
2058 | 2053 | ||
2059 | - CONFIG_SYS_LONGHELP: Defined when you want long help messages included; | 2054 | - CONFIG_SYS_LONGHELP: Defined when you want long help messages included; |
2060 | undefine this when you're short of memory. | 2055 | undefine this when you're short of memory. |
2061 | 2056 | ||
2062 | - CONFIG_SYS_HELP_CMD_WIDTH: Defined when you want to override the default | 2057 | - CONFIG_SYS_HELP_CMD_WIDTH: Defined when you want to override the default |
2063 | width of the commands listed in the 'help' command output. | 2058 | width of the commands listed in the 'help' command output. |
2064 | 2059 | ||
2065 | - CONFIG_SYS_PROMPT: This is what U-Boot prints on the console to | 2060 | - CONFIG_SYS_PROMPT: This is what U-Boot prints on the console to |
2066 | prompt for user input. | 2061 | prompt for user input. |
2067 | 2062 | ||
2068 | - CONFIG_SYS_CBSIZE: Buffer size for input from the Console | 2063 | - CONFIG_SYS_CBSIZE: Buffer size for input from the Console |
2069 | 2064 | ||
2070 | - CONFIG_SYS_PBSIZE: Buffer size for Console output | 2065 | - CONFIG_SYS_PBSIZE: Buffer size for Console output |
2071 | 2066 | ||
2072 | - CONFIG_SYS_MAXARGS: max. Number of arguments accepted for monitor commands | 2067 | - CONFIG_SYS_MAXARGS: max. Number of arguments accepted for monitor commands |
2073 | 2068 | ||
2074 | - CONFIG_SYS_BARGSIZE: Buffer size for Boot Arguments which are passed to | 2069 | - CONFIG_SYS_BARGSIZE: Buffer size for Boot Arguments which are passed to |
2075 | the application (usually a Linux kernel) when it is | 2070 | the application (usually a Linux kernel) when it is |
2076 | booted | 2071 | booted |
2077 | 2072 | ||
2078 | - CONFIG_SYS_BAUDRATE_TABLE: | 2073 | - CONFIG_SYS_BAUDRATE_TABLE: |
2079 | List of legal baudrate settings for this board. | 2074 | List of legal baudrate settings for this board. |
2080 | 2075 | ||
2081 | - CONFIG_SYS_CONSOLE_INFO_QUIET | 2076 | - CONFIG_SYS_CONSOLE_INFO_QUIET |
2082 | Suppress display of console information at boot. | 2077 | Suppress display of console information at boot. |
2083 | 2078 | ||
2084 | - CONFIG_SYS_CONSOLE_IS_IN_ENV | 2079 | - CONFIG_SYS_CONSOLE_IS_IN_ENV |
2085 | If the board specific function | 2080 | If the board specific function |
2086 | extern int overwrite_console (void); | 2081 | extern int overwrite_console (void); |
2087 | returns 1, the stdin, stderr and stdout are switched to the | 2082 | returns 1, the stdin, stderr and stdout are switched to the |
2088 | serial port, else the settings in the environment are used. | 2083 | serial port, else the settings in the environment are used. |
2089 | 2084 | ||
2090 | - CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE | 2085 | - CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE |
2091 | Enable the call to overwrite_console(). | 2086 | Enable the call to overwrite_console(). |
2092 | 2087 | ||
2093 | - CONFIG_SYS_CONSOLE_ENV_OVERWRITE | 2088 | - CONFIG_SYS_CONSOLE_ENV_OVERWRITE |
2094 | Enable overwrite of previous console environment settings. | 2089 | Enable overwrite of previous console environment settings. |
2095 | 2090 | ||
2096 | - CONFIG_SYS_MEMTEST_START, CONFIG_SYS_MEMTEST_END: | 2091 | - CONFIG_SYS_MEMTEST_START, CONFIG_SYS_MEMTEST_END: |
2097 | Begin and End addresses of the area used by the | 2092 | Begin and End addresses of the area used by the |
2098 | simple memory test. | 2093 | simple memory test. |
2099 | 2094 | ||
2100 | - CONFIG_SYS_ALT_MEMTEST: | 2095 | - CONFIG_SYS_ALT_MEMTEST: |
2101 | Enable an alternate, more extensive memory test. | 2096 | Enable an alternate, more extensive memory test. |
2102 | 2097 | ||
2103 | - CONFIG_SYS_MEMTEST_SCRATCH: | 2098 | - CONFIG_SYS_MEMTEST_SCRATCH: |
2104 | Scratch address used by the alternate memory test | 2099 | Scratch address used by the alternate memory test |
2105 | You only need to set this if address zero isn't writeable | 2100 | You only need to set this if address zero isn't writeable |
2106 | 2101 | ||
2107 | - CONFIG_SYS_MEM_TOP_HIDE (PPC only): | 2102 | - CONFIG_SYS_MEM_TOP_HIDE (PPC only): |
2108 | If CONFIG_SYS_MEM_TOP_HIDE is defined in the board config header, | 2103 | If CONFIG_SYS_MEM_TOP_HIDE is defined in the board config header, |
2109 | this specified memory area will get subtracted from the top | 2104 | this specified memory area will get subtracted from the top |
2110 | (end) of RAM and won't get "touched" at all by U-Boot. By | 2105 | (end) of RAM and won't get "touched" at all by U-Boot. By |
2111 | fixing up gd->ram_size the Linux kernel should gets passed | 2106 | fixing up gd->ram_size the Linux kernel should gets passed |
2112 | the now "corrected" memory size and won't touch it either. | 2107 | the now "corrected" memory size and won't touch it either. |
2113 | This should work for arch/ppc and arch/powerpc. Only Linux | 2108 | This should work for arch/ppc and arch/powerpc. Only Linux |
2114 | board ports in arch/powerpc with bootwrapper support that | 2109 | board ports in arch/powerpc with bootwrapper support that |
2115 | recalculate the memory size from the SDRAM controller setup | 2110 | recalculate the memory size from the SDRAM controller setup |
2116 | will have to get fixed in Linux additionally. | 2111 | will have to get fixed in Linux additionally. |
2117 | 2112 | ||
2118 | This option can be used as a workaround for the 440EPx/GRx | 2113 | This option can be used as a workaround for the 440EPx/GRx |
2119 | CHIP 11 errata where the last 256 bytes in SDRAM shouldn't | 2114 | CHIP 11 errata where the last 256 bytes in SDRAM shouldn't |
2120 | be touched. | 2115 | be touched. |
2121 | 2116 | ||
2122 | WARNING: Please make sure that this value is a multiple of | 2117 | WARNING: Please make sure that this value is a multiple of |
2123 | the Linux page size (normally 4k). If this is not the case, | 2118 | the Linux page size (normally 4k). If this is not the case, |
2124 | then the end address of the Linux memory will be located at a | 2119 | then the end address of the Linux memory will be located at a |
2125 | non page size aligned address and this could cause major | 2120 | non page size aligned address and this could cause major |
2126 | problems. | 2121 | problems. |
2127 | 2122 | ||
2128 | - CONFIG_SYS_TFTP_LOADADDR: | 2123 | - CONFIG_SYS_TFTP_LOADADDR: |
2129 | Default load address for network file downloads | 2124 | Default load address for network file downloads |
2130 | 2125 | ||
2131 | - CONFIG_SYS_LOADS_BAUD_CHANGE: | 2126 | - CONFIG_SYS_LOADS_BAUD_CHANGE: |
2132 | Enable temporary baudrate change while serial download | 2127 | Enable temporary baudrate change while serial download |
2133 | 2128 | ||
2134 | - CONFIG_SYS_SDRAM_BASE: | 2129 | - CONFIG_SYS_SDRAM_BASE: |
2135 | Physical start address of SDRAM. _Must_ be 0 here. | 2130 | Physical start address of SDRAM. _Must_ be 0 here. |
2136 | 2131 | ||
2137 | - CONFIG_SYS_MBIO_BASE: | 2132 | - CONFIG_SYS_MBIO_BASE: |
2138 | Physical start address of Motherboard I/O (if using a | 2133 | Physical start address of Motherboard I/O (if using a |
2139 | Cogent motherboard) | 2134 | Cogent motherboard) |
2140 | 2135 | ||
2141 | - CONFIG_SYS_FLASH_BASE: | 2136 | - CONFIG_SYS_FLASH_BASE: |
2142 | Physical start address of Flash memory. | 2137 | Physical start address of Flash memory. |
2143 | 2138 | ||
2144 | - CONFIG_SYS_MONITOR_BASE: | 2139 | - CONFIG_SYS_MONITOR_BASE: |
2145 | Physical start address of boot monitor code (set by | 2140 | Physical start address of boot monitor code (set by |
2146 | make config files to be same as the text base address | 2141 | make config files to be same as the text base address |
2147 | (TEXT_BASE) used when linking) - same as | 2142 | (TEXT_BASE) used when linking) - same as |
2148 | CONFIG_SYS_FLASH_BASE when booting from flash. | 2143 | CONFIG_SYS_FLASH_BASE when booting from flash. |
2149 | 2144 | ||
2150 | - CONFIG_SYS_MONITOR_LEN: | 2145 | - CONFIG_SYS_MONITOR_LEN: |
2151 | Size of memory reserved for monitor code, used to | 2146 | Size of memory reserved for monitor code, used to |
2152 | determine _at_compile_time_ (!) if the environment is | 2147 | determine _at_compile_time_ (!) if the environment is |
2153 | embedded within the U-Boot image, or in a separate | 2148 | embedded within the U-Boot image, or in a separate |
2154 | flash sector. | 2149 | flash sector. |
2155 | 2150 | ||
2156 | - CONFIG_SYS_MALLOC_LEN: | 2151 | - CONFIG_SYS_MALLOC_LEN: |
2157 | Size of DRAM reserved for malloc() use. | 2152 | Size of DRAM reserved for malloc() use. |
2158 | 2153 | ||
2159 | - CONFIG_SYS_BOOTM_LEN: | 2154 | - CONFIG_SYS_BOOTM_LEN: |
2160 | Normally compressed uImages are limited to an | 2155 | Normally compressed uImages are limited to an |
2161 | uncompressed size of 8 MBytes. If this is not enough, | 2156 | uncompressed size of 8 MBytes. If this is not enough, |
2162 | you can define CONFIG_SYS_BOOTM_LEN in your board config file | 2157 | you can define CONFIG_SYS_BOOTM_LEN in your board config file |
2163 | to adjust this setting to your needs. | 2158 | to adjust this setting to your needs. |
2164 | 2159 | ||
2165 | - CONFIG_SYS_BOOTMAPSZ: | 2160 | - CONFIG_SYS_BOOTMAPSZ: |
2166 | Maximum size of memory mapped by the startup code of | 2161 | Maximum size of memory mapped by the startup code of |
2167 | the Linux kernel; all data that must be processed by | 2162 | the Linux kernel; all data that must be processed by |
2168 | the Linux kernel (bd_info, boot arguments, FDT blob if | 2163 | the Linux kernel (bd_info, boot arguments, FDT blob if |
2169 | used) must be put below this limit, unless "bootm_low" | 2164 | used) must be put below this limit, unless "bootm_low" |
2170 | enviroment variable is defined and non-zero. In such case | 2165 | enviroment variable is defined and non-zero. In such case |
2171 | all data for the Linux kernel must be between "bootm_low" | 2166 | all data for the Linux kernel must be between "bootm_low" |
2172 | and "bootm_low" + CONFIG_SYS_BOOTMAPSZ. | 2167 | and "bootm_low" + CONFIG_SYS_BOOTMAPSZ. |
2173 | 2168 | ||
2174 | - CONFIG_SYS_MAX_FLASH_BANKS: | 2169 | - CONFIG_SYS_MAX_FLASH_BANKS: |
2175 | Max number of Flash memory banks | 2170 | Max number of Flash memory banks |
2176 | 2171 | ||
2177 | - CONFIG_SYS_MAX_FLASH_SECT: | 2172 | - CONFIG_SYS_MAX_FLASH_SECT: |
2178 | Max number of sectors on a Flash chip | 2173 | Max number of sectors on a Flash chip |
2179 | 2174 | ||
2180 | - CONFIG_SYS_FLASH_ERASE_TOUT: | 2175 | - CONFIG_SYS_FLASH_ERASE_TOUT: |
2181 | Timeout for Flash erase operations (in ms) | 2176 | Timeout for Flash erase operations (in ms) |
2182 | 2177 | ||
2183 | - CONFIG_SYS_FLASH_WRITE_TOUT: | 2178 | - CONFIG_SYS_FLASH_WRITE_TOUT: |
2184 | Timeout for Flash write operations (in ms) | 2179 | Timeout for Flash write operations (in ms) |
2185 | 2180 | ||
2186 | - CONFIG_SYS_FLASH_LOCK_TOUT | 2181 | - CONFIG_SYS_FLASH_LOCK_TOUT |
2187 | Timeout for Flash set sector lock bit operation (in ms) | 2182 | Timeout for Flash set sector lock bit operation (in ms) |
2188 | 2183 | ||
2189 | - CONFIG_SYS_FLASH_UNLOCK_TOUT | 2184 | - CONFIG_SYS_FLASH_UNLOCK_TOUT |
2190 | Timeout for Flash clear lock bits operation (in ms) | 2185 | Timeout for Flash clear lock bits operation (in ms) |
2191 | 2186 | ||
2192 | - CONFIG_SYS_FLASH_PROTECTION | 2187 | - CONFIG_SYS_FLASH_PROTECTION |
2193 | If defined, hardware flash sectors protection is used | 2188 | If defined, hardware flash sectors protection is used |
2194 | instead of U-Boot software protection. | 2189 | instead of U-Boot software protection. |
2195 | 2190 | ||
2196 | - CONFIG_SYS_DIRECT_FLASH_TFTP: | 2191 | - CONFIG_SYS_DIRECT_FLASH_TFTP: |
2197 | 2192 | ||
2198 | Enable TFTP transfers directly to flash memory; | 2193 | Enable TFTP transfers directly to flash memory; |
2199 | without this option such a download has to be | 2194 | without this option such a download has to be |
2200 | performed in two steps: (1) download to RAM, and (2) | 2195 | performed in two steps: (1) download to RAM, and (2) |
2201 | copy from RAM to flash. | 2196 | copy from RAM to flash. |
2202 | 2197 | ||
2203 | The two-step approach is usually more reliable, since | 2198 | The two-step approach is usually more reliable, since |
2204 | you can check if the download worked before you erase | 2199 | you can check if the download worked before you erase |
2205 | the flash, but in some situations (when system RAM is | 2200 | the flash, but in some situations (when system RAM is |
2206 | too limited to allow for a temporary copy of the | 2201 | too limited to allow for a temporary copy of the |
2207 | downloaded image) this option may be very useful. | 2202 | downloaded image) this option may be very useful. |
2208 | 2203 | ||
2209 | - CONFIG_SYS_FLASH_CFI: | 2204 | - CONFIG_SYS_FLASH_CFI: |
2210 | Define if the flash driver uses extra elements in the | 2205 | Define if the flash driver uses extra elements in the |
2211 | common flash structure for storing flash geometry. | 2206 | common flash structure for storing flash geometry. |
2212 | 2207 | ||
2213 | - CONFIG_FLASH_CFI_DRIVER | 2208 | - CONFIG_FLASH_CFI_DRIVER |
2214 | This option also enables the building of the cfi_flash driver | 2209 | This option also enables the building of the cfi_flash driver |
2215 | in the drivers directory | 2210 | in the drivers directory |
2216 | 2211 | ||
2217 | - CONFIG_FLASH_CFI_MTD | 2212 | - CONFIG_FLASH_CFI_MTD |
2218 | This option enables the building of the cfi_mtd driver | 2213 | This option enables the building of the cfi_mtd driver |
2219 | in the drivers directory. The driver exports CFI flash | 2214 | in the drivers directory. The driver exports CFI flash |
2220 | to the MTD layer. | 2215 | to the MTD layer. |
2221 | 2216 | ||
2222 | - CONFIG_SYS_FLASH_USE_BUFFER_WRITE | 2217 | - CONFIG_SYS_FLASH_USE_BUFFER_WRITE |
2223 | Use buffered writes to flash. | 2218 | Use buffered writes to flash. |
2224 | 2219 | ||
2225 | - CONFIG_FLASH_SPANSION_S29WS_N | 2220 | - CONFIG_FLASH_SPANSION_S29WS_N |
2226 | s29ws-n MirrorBit flash has non-standard addresses for buffered | 2221 | s29ws-n MirrorBit flash has non-standard addresses for buffered |
2227 | write commands. | 2222 | write commands. |
2228 | 2223 | ||
2229 | - CONFIG_SYS_FLASH_QUIET_TEST | 2224 | - CONFIG_SYS_FLASH_QUIET_TEST |
2230 | If this option is defined, the common CFI flash doesn't | 2225 | If this option is defined, the common CFI flash doesn't |
2231 | print it's warning upon not recognized FLASH banks. This | 2226 | print it's warning upon not recognized FLASH banks. This |
2232 | is useful, if some of the configured banks are only | 2227 | is useful, if some of the configured banks are only |
2233 | optionally available. | 2228 | optionally available. |
2234 | 2229 | ||
2235 | - CONFIG_FLASH_SHOW_PROGRESS | 2230 | - CONFIG_FLASH_SHOW_PROGRESS |
2236 | If defined (must be an integer), print out countdown | 2231 | If defined (must be an integer), print out countdown |
2237 | digits and dots. Recommended value: 45 (9..1) for 80 | 2232 | digits and dots. Recommended value: 45 (9..1) for 80 |
2238 | column displays, 15 (3..1) for 40 column displays. | 2233 | column displays, 15 (3..1) for 40 column displays. |
2239 | 2234 | ||
2240 | - CONFIG_SYS_RX_ETH_BUFFER: | 2235 | - CONFIG_SYS_RX_ETH_BUFFER: |
2241 | Defines the number of Ethernet receive buffers. On some | 2236 | Defines the number of Ethernet receive buffers. On some |
2242 | Ethernet controllers it is recommended to set this value | 2237 | Ethernet controllers it is recommended to set this value |
2243 | to 8 or even higher (EEPRO100 or 405 EMAC), since all | 2238 | to 8 or even higher (EEPRO100 or 405 EMAC), since all |
2244 | buffers can be full shortly after enabling the interface | 2239 | buffers can be full shortly after enabling the interface |
2245 | on high Ethernet traffic. | 2240 | on high Ethernet traffic. |
2246 | Defaults to 4 if not defined. | 2241 | Defaults to 4 if not defined. |
2247 | 2242 | ||
2248 | The following definitions that deal with the placement and management | 2243 | The following definitions that deal with the placement and management |
2249 | of environment data (variable area); in general, we support the | 2244 | of environment data (variable area); in general, we support the |
2250 | following configurations: | 2245 | following configurations: |
2251 | 2246 | ||
2252 | - CONFIG_ENV_IS_IN_FLASH: | 2247 | - CONFIG_ENV_IS_IN_FLASH: |
2253 | 2248 | ||
2254 | Define this if the environment is in flash memory. | 2249 | Define this if the environment is in flash memory. |
2255 | 2250 | ||
2256 | a) The environment occupies one whole flash sector, which is | 2251 | a) The environment occupies one whole flash sector, which is |
2257 | "embedded" in the text segment with the U-Boot code. This | 2252 | "embedded" in the text segment with the U-Boot code. This |
2258 | happens usually with "bottom boot sector" or "top boot | 2253 | happens usually with "bottom boot sector" or "top boot |
2259 | sector" type flash chips, which have several smaller | 2254 | sector" type flash chips, which have several smaller |
2260 | sectors at the start or the end. For instance, such a | 2255 | sectors at the start or the end. For instance, such a |
2261 | layout can have sector sizes of 8, 2x4, 16, Nx32 kB. In | 2256 | layout can have sector sizes of 8, 2x4, 16, Nx32 kB. In |
2262 | such a case you would place the environment in one of the | 2257 | such a case you would place the environment in one of the |
2263 | 4 kB sectors - with U-Boot code before and after it. With | 2258 | 4 kB sectors - with U-Boot code before and after it. With |
2264 | "top boot sector" type flash chips, you would put the | 2259 | "top boot sector" type flash chips, you would put the |
2265 | environment in one of the last sectors, leaving a gap | 2260 | environment in one of the last sectors, leaving a gap |
2266 | between U-Boot and the environment. | 2261 | between U-Boot and the environment. |
2267 | 2262 | ||
2268 | - CONFIG_ENV_OFFSET: | 2263 | - CONFIG_ENV_OFFSET: |
2269 | 2264 | ||
2270 | Offset of environment data (variable area) to the | 2265 | Offset of environment data (variable area) to the |
2271 | beginning of flash memory; for instance, with bottom boot | 2266 | beginning of flash memory; for instance, with bottom boot |
2272 | type flash chips the second sector can be used: the offset | 2267 | type flash chips the second sector can be used: the offset |
2273 | for this sector is given here. | 2268 | for this sector is given here. |
2274 | 2269 | ||
2275 | CONFIG_ENV_OFFSET is used relative to CONFIG_SYS_FLASH_BASE. | 2270 | CONFIG_ENV_OFFSET is used relative to CONFIG_SYS_FLASH_BASE. |
2276 | 2271 | ||
2277 | - CONFIG_ENV_ADDR: | 2272 | - CONFIG_ENV_ADDR: |
2278 | 2273 | ||
2279 | This is just another way to specify the start address of | 2274 | This is just another way to specify the start address of |
2280 | the flash sector containing the environment (instead of | 2275 | the flash sector containing the environment (instead of |
2281 | CONFIG_ENV_OFFSET). | 2276 | CONFIG_ENV_OFFSET). |
2282 | 2277 | ||
2283 | - CONFIG_ENV_SECT_SIZE: | 2278 | - CONFIG_ENV_SECT_SIZE: |
2284 | 2279 | ||
2285 | Size of the sector containing the environment. | 2280 | Size of the sector containing the environment. |
2286 | 2281 | ||
2287 | 2282 | ||
2288 | b) Sometimes flash chips have few, equal sized, BIG sectors. | 2283 | b) Sometimes flash chips have few, equal sized, BIG sectors. |
2289 | In such a case you don't want to spend a whole sector for | 2284 | In such a case you don't want to spend a whole sector for |
2290 | the environment. | 2285 | the environment. |
2291 | 2286 | ||
2292 | - CONFIG_ENV_SIZE: | 2287 | - CONFIG_ENV_SIZE: |
2293 | 2288 | ||
2294 | If you use this in combination with CONFIG_ENV_IS_IN_FLASH | 2289 | If you use this in combination with CONFIG_ENV_IS_IN_FLASH |
2295 | and CONFIG_ENV_SECT_SIZE, you can specify to use only a part | 2290 | and CONFIG_ENV_SECT_SIZE, you can specify to use only a part |
2296 | of this flash sector for the environment. This saves | 2291 | of this flash sector for the environment. This saves |
2297 | memory for the RAM copy of the environment. | 2292 | memory for the RAM copy of the environment. |
2298 | 2293 | ||
2299 | It may also save flash memory if you decide to use this | 2294 | It may also save flash memory if you decide to use this |
2300 | when your environment is "embedded" within U-Boot code, | 2295 | when your environment is "embedded" within U-Boot code, |
2301 | since then the remainder of the flash sector could be used | 2296 | since then the remainder of the flash sector could be used |
2302 | for U-Boot code. It should be pointed out that this is | 2297 | for U-Boot code. It should be pointed out that this is |
2303 | STRONGLY DISCOURAGED from a robustness point of view: | 2298 | STRONGLY DISCOURAGED from a robustness point of view: |
2304 | updating the environment in flash makes it always | 2299 | updating the environment in flash makes it always |
2305 | necessary to erase the WHOLE sector. If something goes | 2300 | necessary to erase the WHOLE sector. If something goes |
2306 | wrong before the contents has been restored from a copy in | 2301 | wrong before the contents has been restored from a copy in |
2307 | RAM, your target system will be dead. | 2302 | RAM, your target system will be dead. |
2308 | 2303 | ||
2309 | - CONFIG_ENV_ADDR_REDUND | 2304 | - CONFIG_ENV_ADDR_REDUND |
2310 | CONFIG_ENV_SIZE_REDUND | 2305 | CONFIG_ENV_SIZE_REDUND |
2311 | 2306 | ||
2312 | These settings describe a second storage area used to hold | 2307 | These settings describe a second storage area used to hold |
2313 | a redundant copy of the environment data, so that there is | 2308 | a redundant copy of the environment data, so that there is |
2314 | a valid backup copy in case there is a power failure during | 2309 | a valid backup copy in case there is a power failure during |
2315 | a "saveenv" operation. | 2310 | a "saveenv" operation. |
2316 | 2311 | ||
2317 | BE CAREFUL! Any changes to the flash layout, and some changes to the | 2312 | BE CAREFUL! Any changes to the flash layout, and some changes to the |
2318 | source code will make it necessary to adapt <board>/u-boot.lds* | 2313 | source code will make it necessary to adapt <board>/u-boot.lds* |
2319 | accordingly! | 2314 | accordingly! |
2320 | 2315 | ||
2321 | 2316 | ||
2322 | - CONFIG_ENV_IS_IN_NVRAM: | 2317 | - CONFIG_ENV_IS_IN_NVRAM: |
2323 | 2318 | ||
2324 | Define this if you have some non-volatile memory device | 2319 | Define this if you have some non-volatile memory device |
2325 | (NVRAM, battery buffered SRAM) which you want to use for the | 2320 | (NVRAM, battery buffered SRAM) which you want to use for the |
2326 | environment. | 2321 | environment. |
2327 | 2322 | ||
2328 | - CONFIG_ENV_ADDR: | 2323 | - CONFIG_ENV_ADDR: |
2329 | - CONFIG_ENV_SIZE: | 2324 | - CONFIG_ENV_SIZE: |
2330 | 2325 | ||
2331 | These two #defines are used to determine the memory area you | 2326 | These two #defines are used to determine the memory area you |
2332 | want to use for environment. It is assumed that this memory | 2327 | want to use for environment. It is assumed that this memory |
2333 | can just be read and written to, without any special | 2328 | can just be read and written to, without any special |
2334 | provision. | 2329 | provision. |
2335 | 2330 | ||
2336 | BE CAREFUL! The first access to the environment happens quite early | 2331 | BE CAREFUL! The first access to the environment happens quite early |
2337 | in U-Boot initalization (when we try to get the setting of for the | 2332 | in U-Boot initalization (when we try to get the setting of for the |
2338 | console baudrate). You *MUST* have mapped your NVRAM area then, or | 2333 | console baudrate). You *MUST* have mapped your NVRAM area then, or |
2339 | U-Boot will hang. | 2334 | U-Boot will hang. |
2340 | 2335 | ||
2341 | Please note that even with NVRAM we still use a copy of the | 2336 | Please note that even with NVRAM we still use a copy of the |
2342 | environment in RAM: we could work on NVRAM directly, but we want to | 2337 | environment in RAM: we could work on NVRAM directly, but we want to |
2343 | keep settings there always unmodified except somebody uses "saveenv" | 2338 | keep settings there always unmodified except somebody uses "saveenv" |
2344 | to save the current settings. | 2339 | to save the current settings. |
2345 | 2340 | ||
2346 | 2341 | ||
2347 | - CONFIG_ENV_IS_IN_EEPROM: | 2342 | - CONFIG_ENV_IS_IN_EEPROM: |
2348 | 2343 | ||
2349 | Use this if you have an EEPROM or similar serial access | 2344 | Use this if you have an EEPROM or similar serial access |
2350 | device and a driver for it. | 2345 | device and a driver for it. |
2351 | 2346 | ||
2352 | - CONFIG_ENV_OFFSET: | 2347 | - CONFIG_ENV_OFFSET: |
2353 | - CONFIG_ENV_SIZE: | 2348 | - CONFIG_ENV_SIZE: |
2354 | 2349 | ||
2355 | These two #defines specify the offset and size of the | 2350 | These two #defines specify the offset and size of the |
2356 | environment area within the total memory of your EEPROM. | 2351 | environment area within the total memory of your EEPROM. |
2357 | 2352 | ||
2358 | - CONFIG_SYS_I2C_EEPROM_ADDR: | 2353 | - CONFIG_SYS_I2C_EEPROM_ADDR: |
2359 | If defined, specified the chip address of the EEPROM device. | 2354 | If defined, specified the chip address of the EEPROM device. |
2360 | The default address is zero. | 2355 | The default address is zero. |
2361 | 2356 | ||
2362 | - CONFIG_SYS_EEPROM_PAGE_WRITE_BITS: | 2357 | - CONFIG_SYS_EEPROM_PAGE_WRITE_BITS: |
2363 | If defined, the number of bits used to address bytes in a | 2358 | If defined, the number of bits used to address bytes in a |
2364 | single page in the EEPROM device. A 64 byte page, for example | 2359 | single page in the EEPROM device. A 64 byte page, for example |
2365 | would require six bits. | 2360 | would require six bits. |
2366 | 2361 | ||
2367 | - CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS: | 2362 | - CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS: |
2368 | If defined, the number of milliseconds to delay between | 2363 | If defined, the number of milliseconds to delay between |
2369 | page writes. The default is zero milliseconds. | 2364 | page writes. The default is zero milliseconds. |
2370 | 2365 | ||
2371 | - CONFIG_SYS_I2C_EEPROM_ADDR_LEN: | 2366 | - CONFIG_SYS_I2C_EEPROM_ADDR_LEN: |
2372 | The length in bytes of the EEPROM memory array address. Note | 2367 | The length in bytes of the EEPROM memory array address. Note |
2373 | that this is NOT the chip address length! | 2368 | that this is NOT the chip address length! |
2374 | 2369 | ||
2375 | - CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW: | 2370 | - CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW: |
2376 | EEPROM chips that implement "address overflow" are ones | 2371 | EEPROM chips that implement "address overflow" are ones |
2377 | like Catalyst 24WC04/08/16 which has 9/10/11 bits of | 2372 | like Catalyst 24WC04/08/16 which has 9/10/11 bits of |
2378 | address and the extra bits end up in the "chip address" bit | 2373 | address and the extra bits end up in the "chip address" bit |
2379 | slots. This makes a 24WC08 (1Kbyte) chip look like four 256 | 2374 | slots. This makes a 24WC08 (1Kbyte) chip look like four 256 |
2380 | byte chips. | 2375 | byte chips. |
2381 | 2376 | ||
2382 | Note that we consider the length of the address field to | 2377 | Note that we consider the length of the address field to |
2383 | still be one byte because the extra address bits are hidden | 2378 | still be one byte because the extra address bits are hidden |
2384 | in the chip address. | 2379 | in the chip address. |
2385 | 2380 | ||
2386 | - CONFIG_SYS_EEPROM_SIZE: | 2381 | - CONFIG_SYS_EEPROM_SIZE: |
2387 | The size in bytes of the EEPROM device. | 2382 | The size in bytes of the EEPROM device. |
2388 | 2383 | ||
2389 | 2384 | ||
2390 | - CONFIG_ENV_IS_IN_DATAFLASH: | 2385 | - CONFIG_ENV_IS_IN_DATAFLASH: |
2391 | 2386 | ||
2392 | Define this if you have a DataFlash memory device which you | 2387 | Define this if you have a DataFlash memory device which you |
2393 | want to use for the environment. | 2388 | want to use for the environment. |
2394 | 2389 | ||
2395 | - CONFIG_ENV_OFFSET: | 2390 | - CONFIG_ENV_OFFSET: |
2396 | - CONFIG_ENV_ADDR: | 2391 | - CONFIG_ENV_ADDR: |
2397 | - CONFIG_ENV_SIZE: | 2392 | - CONFIG_ENV_SIZE: |
2398 | 2393 | ||
2399 | These three #defines specify the offset and size of the | 2394 | These three #defines specify the offset and size of the |
2400 | environment area within the total memory of your DataFlash placed | 2395 | environment area within the total memory of your DataFlash placed |
2401 | at the specified address. | 2396 | at the specified address. |
2402 | 2397 | ||
2403 | - CONFIG_ENV_IS_IN_NAND: | 2398 | - CONFIG_ENV_IS_IN_NAND: |
2404 | 2399 | ||
2405 | Define this if you have a NAND device which you want to use | 2400 | Define this if you have a NAND device which you want to use |
2406 | for the environment. | 2401 | for the environment. |
2407 | 2402 | ||
2408 | - CONFIG_ENV_OFFSET: | 2403 | - CONFIG_ENV_OFFSET: |
2409 | - CONFIG_ENV_SIZE: | 2404 | - CONFIG_ENV_SIZE: |
2410 | 2405 | ||
2411 | These two #defines specify the offset and size of the environment | 2406 | These two #defines specify the offset and size of the environment |
2412 | area within the first NAND device. | 2407 | area within the first NAND device. |
2413 | 2408 | ||
2414 | - CONFIG_ENV_OFFSET_REDUND | 2409 | - CONFIG_ENV_OFFSET_REDUND |
2415 | 2410 | ||
2416 | This setting describes a second storage area of CONFIG_ENV_SIZE | 2411 | This setting describes a second storage area of CONFIG_ENV_SIZE |
2417 | size used to hold a redundant copy of the environment data, | 2412 | size used to hold a redundant copy of the environment data, |
2418 | so that there is a valid backup copy in case there is a | 2413 | so that there is a valid backup copy in case there is a |
2419 | power failure during a "saveenv" operation. | 2414 | power failure during a "saveenv" operation. |
2420 | 2415 | ||
2421 | Note: CONFIG_ENV_OFFSET and CONFIG_ENV_OFFSET_REDUND must be aligned | 2416 | Note: CONFIG_ENV_OFFSET and CONFIG_ENV_OFFSET_REDUND must be aligned |
2422 | to a block boundary, and CONFIG_ENV_SIZE must be a multiple of | 2417 | to a block boundary, and CONFIG_ENV_SIZE must be a multiple of |
2423 | the NAND devices block size. | 2418 | the NAND devices block size. |
2424 | 2419 | ||
2425 | - CONFIG_SYS_SPI_INIT_OFFSET | 2420 | - CONFIG_SYS_SPI_INIT_OFFSET |
2426 | 2421 | ||
2427 | Defines offset to the initial SPI buffer area in DPRAM. The | 2422 | Defines offset to the initial SPI buffer area in DPRAM. The |
2428 | area is used at an early stage (ROM part) if the environment | 2423 | area is used at an early stage (ROM part) if the environment |
2429 | is configured to reside in the SPI EEPROM: We need a 520 byte | 2424 | is configured to reside in the SPI EEPROM: We need a 520 byte |
2430 | scratch DPRAM area. It is used between the two initialization | 2425 | scratch DPRAM area. It is used between the two initialization |
2431 | calls (spi_init_f() and spi_init_r()). A value of 0xB00 seems | 2426 | calls (spi_init_f() and spi_init_r()). A value of 0xB00 seems |
2432 | to be a good choice since it makes it far enough from the | 2427 | to be a good choice since it makes it far enough from the |
2433 | start of the data area as well as from the stack pointer. | 2428 | start of the data area as well as from the stack pointer. |
2434 | 2429 | ||
2435 | Please note that the environment is read-only until the monitor | 2430 | Please note that the environment is read-only until the monitor |
2436 | has been relocated to RAM and a RAM copy of the environment has been | 2431 | has been relocated to RAM and a RAM copy of the environment has been |
2437 | created; also, when using EEPROM you will have to use getenv_r() | 2432 | created; also, when using EEPROM you will have to use getenv_r() |
2438 | until then to read environment variables. | 2433 | until then to read environment variables. |
2439 | 2434 | ||
2440 | The environment is protected by a CRC32 checksum. Before the monitor | 2435 | The environment is protected by a CRC32 checksum. Before the monitor |
2441 | is relocated into RAM, as a result of a bad CRC you will be working | 2436 | is relocated into RAM, as a result of a bad CRC you will be working |
2442 | with the compiled-in default environment - *silently*!!! [This is | 2437 | with the compiled-in default environment - *silently*!!! [This is |
2443 | necessary, because the first environment variable we need is the | 2438 | necessary, because the first environment variable we need is the |
2444 | "baudrate" setting for the console - if we have a bad CRC, we don't | 2439 | "baudrate" setting for the console - if we have a bad CRC, we don't |
2445 | have any device yet where we could complain.] | 2440 | have any device yet where we could complain.] |
2446 | 2441 | ||
2447 | Note: once the monitor has been relocated, then it will complain if | 2442 | Note: once the monitor has been relocated, then it will complain if |
2448 | the default environment is used; a new CRC is computed as soon as you | 2443 | the default environment is used; a new CRC is computed as soon as you |
2449 | use the "saveenv" command to store a valid environment. | 2444 | use the "saveenv" command to store a valid environment. |
2450 | 2445 | ||
2451 | - CONFIG_SYS_FAULT_ECHO_LINK_DOWN: | 2446 | - CONFIG_SYS_FAULT_ECHO_LINK_DOWN: |
2452 | Echo the inverted Ethernet link state to the fault LED. | 2447 | Echo the inverted Ethernet link state to the fault LED. |
2453 | 2448 | ||
2454 | Note: If this option is active, then CONFIG_SYS_FAULT_MII_ADDR | 2449 | Note: If this option is active, then CONFIG_SYS_FAULT_MII_ADDR |
2455 | also needs to be defined. | 2450 | also needs to be defined. |
2456 | 2451 | ||
2457 | - CONFIG_SYS_FAULT_MII_ADDR: | 2452 | - CONFIG_SYS_FAULT_MII_ADDR: |
2458 | MII address of the PHY to check for the Ethernet link state. | 2453 | MII address of the PHY to check for the Ethernet link state. |
2459 | 2454 | ||
2460 | - CONFIG_SYS_64BIT_VSPRINTF: | 2455 | - CONFIG_SYS_64BIT_VSPRINTF: |
2461 | Makes vsprintf (and all *printf functions) support printing | 2456 | Makes vsprintf (and all *printf functions) support printing |
2462 | of 64bit values by using the L quantifier | 2457 | of 64bit values by using the L quantifier |
2463 | 2458 | ||
2464 | - CONFIG_SYS_64BIT_STRTOUL: | 2459 | - CONFIG_SYS_64BIT_STRTOUL: |
2465 | Adds simple_strtoull that returns a 64bit value | 2460 | Adds simple_strtoull that returns a 64bit value |
2466 | 2461 | ||
2467 | - CONFIG_NS16550_MIN_FUNCTIONS: | 2462 | - CONFIG_NS16550_MIN_FUNCTIONS: |
2468 | Define this if you desire to only have use of the NS16550_init | 2463 | Define this if you desire to only have use of the NS16550_init |
2469 | and NS16550_putc functions for the serial driver located at | 2464 | and NS16550_putc functions for the serial driver located at |
2470 | drivers/serial/ns16550.c. This option is useful for saving | 2465 | drivers/serial/ns16550.c. This option is useful for saving |
2471 | space for already greatly restricted images, including but not | 2466 | space for already greatly restricted images, including but not |
2472 | limited to NAND_SPL configurations. | 2467 | limited to NAND_SPL configurations. |
2473 | 2468 | ||
2474 | Low Level (hardware related) configuration options: | 2469 | Low Level (hardware related) configuration options: |
2475 | --------------------------------------------------- | 2470 | --------------------------------------------------- |
2476 | 2471 | ||
2477 | - CONFIG_SYS_CACHELINE_SIZE: | 2472 | - CONFIG_SYS_CACHELINE_SIZE: |
2478 | Cache Line Size of the CPU. | 2473 | Cache Line Size of the CPU. |
2479 | 2474 | ||
2480 | - CONFIG_SYS_DEFAULT_IMMR: | 2475 | - CONFIG_SYS_DEFAULT_IMMR: |
2481 | Default address of the IMMR after system reset. | 2476 | Default address of the IMMR after system reset. |
2482 | 2477 | ||
2483 | Needed on some 8260 systems (MPC8260ADS, PQ2FADS-ZU, | 2478 | Needed on some 8260 systems (MPC8260ADS, PQ2FADS-ZU, |
2484 | and RPXsuper) to be able to adjust the position of | 2479 | and RPXsuper) to be able to adjust the position of |
2485 | the IMMR register after a reset. | 2480 | the IMMR register after a reset. |
2486 | 2481 | ||
2487 | - Floppy Disk Support: | 2482 | - Floppy Disk Support: |
2488 | CONFIG_SYS_FDC_DRIVE_NUMBER | 2483 | CONFIG_SYS_FDC_DRIVE_NUMBER |
2489 | 2484 | ||
2490 | the default drive number (default value 0) | 2485 | the default drive number (default value 0) |
2491 | 2486 | ||
2492 | CONFIG_SYS_ISA_IO_STRIDE | 2487 | CONFIG_SYS_ISA_IO_STRIDE |
2493 | 2488 | ||
2494 | defines the spacing between FDC chipset registers | 2489 | defines the spacing between FDC chipset registers |
2495 | (default value 1) | 2490 | (default value 1) |
2496 | 2491 | ||
2497 | CONFIG_SYS_ISA_IO_OFFSET | 2492 | CONFIG_SYS_ISA_IO_OFFSET |
2498 | 2493 | ||
2499 | defines the offset of register from address. It | 2494 | defines the offset of register from address. It |
2500 | depends on which part of the data bus is connected to | 2495 | depends on which part of the data bus is connected to |
2501 | the FDC chipset. (default value 0) | 2496 | the FDC chipset. (default value 0) |
2502 | 2497 | ||
2503 | If CONFIG_SYS_ISA_IO_STRIDE CONFIG_SYS_ISA_IO_OFFSET and | 2498 | If CONFIG_SYS_ISA_IO_STRIDE CONFIG_SYS_ISA_IO_OFFSET and |
2504 | CONFIG_SYS_FDC_DRIVE_NUMBER are undefined, they take their | 2499 | CONFIG_SYS_FDC_DRIVE_NUMBER are undefined, they take their |
2505 | default value. | 2500 | default value. |
2506 | 2501 | ||
2507 | if CONFIG_SYS_FDC_HW_INIT is defined, then the function | 2502 | if CONFIG_SYS_FDC_HW_INIT is defined, then the function |
2508 | fdc_hw_init() is called at the beginning of the FDC | 2503 | fdc_hw_init() is called at the beginning of the FDC |
2509 | setup. fdc_hw_init() must be provided by the board | 2504 | setup. fdc_hw_init() must be provided by the board |
2510 | source code. It is used to make hardware dependant | 2505 | source code. It is used to make hardware dependant |
2511 | initializations. | 2506 | initializations. |
2512 | 2507 | ||
2513 | - CONFIG_SYS_IMMR: Physical address of the Internal Memory. | 2508 | - CONFIG_SYS_IMMR: Physical address of the Internal Memory. |
2514 | DO NOT CHANGE unless you know exactly what you're | 2509 | DO NOT CHANGE unless you know exactly what you're |
2515 | doing! (11-4) [MPC8xx/82xx systems only] | 2510 | doing! (11-4) [MPC8xx/82xx systems only] |
2516 | 2511 | ||
2517 | - CONFIG_SYS_INIT_RAM_ADDR: | 2512 | - CONFIG_SYS_INIT_RAM_ADDR: |
2518 | 2513 | ||
2519 | Start address of memory area that can be used for | 2514 | Start address of memory area that can be used for |
2520 | initial data and stack; please note that this must be | 2515 | initial data and stack; please note that this must be |
2521 | writable memory that is working WITHOUT special | 2516 | writable memory that is working WITHOUT special |
2522 | initialization, i. e. you CANNOT use normal RAM which | 2517 | initialization, i. e. you CANNOT use normal RAM which |
2523 | will become available only after programming the | 2518 | will become available only after programming the |
2524 | memory controller and running certain initialization | 2519 | memory controller and running certain initialization |
2525 | sequences. | 2520 | sequences. |
2526 | 2521 | ||
2527 | U-Boot uses the following memory types: | 2522 | U-Boot uses the following memory types: |
2528 | - MPC8xx and MPC8260: IMMR (internal memory of the CPU) | 2523 | - MPC8xx and MPC8260: IMMR (internal memory of the CPU) |
2529 | - MPC824X: data cache | 2524 | - MPC824X: data cache |
2530 | - PPC4xx: data cache | 2525 | - PPC4xx: data cache |
2531 | 2526 | ||
2532 | - CONFIG_SYS_GBL_DATA_OFFSET: | 2527 | - CONFIG_SYS_GBL_DATA_OFFSET: |
2533 | 2528 | ||
2534 | Offset of the initial data structure in the memory | 2529 | Offset of the initial data structure in the memory |
2535 | area defined by CONFIG_SYS_INIT_RAM_ADDR. Usually | 2530 | area defined by CONFIG_SYS_INIT_RAM_ADDR. Usually |
2536 | CONFIG_SYS_GBL_DATA_OFFSET is chosen such that the initial | 2531 | CONFIG_SYS_GBL_DATA_OFFSET is chosen such that the initial |
2537 | data is located at the end of the available space | 2532 | data is located at the end of the available space |
2538 | (sometimes written as (CONFIG_SYS_INIT_RAM_END - | 2533 | (sometimes written as (CONFIG_SYS_INIT_RAM_END - |
2539 | CONFIG_SYS_INIT_DATA_SIZE), and the initial stack is just | 2534 | CONFIG_SYS_INIT_DATA_SIZE), and the initial stack is just |
2540 | below that area (growing from (CONFIG_SYS_INIT_RAM_ADDR + | 2535 | below that area (growing from (CONFIG_SYS_INIT_RAM_ADDR + |
2541 | CONFIG_SYS_GBL_DATA_OFFSET) downward. | 2536 | CONFIG_SYS_GBL_DATA_OFFSET) downward. |
2542 | 2537 | ||
2543 | Note: | 2538 | Note: |
2544 | On the MPC824X (or other systems that use the data | 2539 | On the MPC824X (or other systems that use the data |
2545 | cache for initial memory) the address chosen for | 2540 | cache for initial memory) the address chosen for |
2546 | CONFIG_SYS_INIT_RAM_ADDR is basically arbitrary - it must | 2541 | CONFIG_SYS_INIT_RAM_ADDR is basically arbitrary - it must |
2547 | point to an otherwise UNUSED address space between | 2542 | point to an otherwise UNUSED address space between |
2548 | the top of RAM and the start of the PCI space. | 2543 | the top of RAM and the start of the PCI space. |
2549 | 2544 | ||
2550 | - CONFIG_SYS_SIUMCR: SIU Module Configuration (11-6) | 2545 | - CONFIG_SYS_SIUMCR: SIU Module Configuration (11-6) |
2551 | 2546 | ||
2552 | - CONFIG_SYS_SYPCR: System Protection Control (11-9) | 2547 | - CONFIG_SYS_SYPCR: System Protection Control (11-9) |
2553 | 2548 | ||
2554 | - CONFIG_SYS_TBSCR: Time Base Status and Control (11-26) | 2549 | - CONFIG_SYS_TBSCR: Time Base Status and Control (11-26) |
2555 | 2550 | ||
2556 | - CONFIG_SYS_PISCR: Periodic Interrupt Status and Control (11-31) | 2551 | - CONFIG_SYS_PISCR: Periodic Interrupt Status and Control (11-31) |
2557 | 2552 | ||
2558 | - CONFIG_SYS_PLPRCR: PLL, Low-Power, and Reset Control Register (15-30) | 2553 | - CONFIG_SYS_PLPRCR: PLL, Low-Power, and Reset Control Register (15-30) |
2559 | 2554 | ||
2560 | - CONFIG_SYS_SCCR: System Clock and reset Control Register (15-27) | 2555 | - CONFIG_SYS_SCCR: System Clock and reset Control Register (15-27) |
2561 | 2556 | ||
2562 | - CONFIG_SYS_OR_TIMING_SDRAM: | 2557 | - CONFIG_SYS_OR_TIMING_SDRAM: |
2563 | SDRAM timing | 2558 | SDRAM timing |
2564 | 2559 | ||
2565 | - CONFIG_SYS_MAMR_PTA: | 2560 | - CONFIG_SYS_MAMR_PTA: |
2566 | periodic timer for refresh | 2561 | periodic timer for refresh |
2567 | 2562 | ||
2568 | - CONFIG_SYS_DER: Debug Event Register (37-47) | 2563 | - CONFIG_SYS_DER: Debug Event Register (37-47) |
2569 | 2564 | ||
2570 | - FLASH_BASE0_PRELIM, FLASH_BASE1_PRELIM, CONFIG_SYS_REMAP_OR_AM, | 2565 | - FLASH_BASE0_PRELIM, FLASH_BASE1_PRELIM, CONFIG_SYS_REMAP_OR_AM, |
2571 | CONFIG_SYS_PRELIM_OR_AM, CONFIG_SYS_OR_TIMING_FLASH, CONFIG_SYS_OR0_REMAP, | 2566 | CONFIG_SYS_PRELIM_OR_AM, CONFIG_SYS_OR_TIMING_FLASH, CONFIG_SYS_OR0_REMAP, |
2572 | CONFIG_SYS_OR0_PRELIM, CONFIG_SYS_BR0_PRELIM, CONFIG_SYS_OR1_REMAP, CONFIG_SYS_OR1_PRELIM, | 2567 | CONFIG_SYS_OR0_PRELIM, CONFIG_SYS_BR0_PRELIM, CONFIG_SYS_OR1_REMAP, CONFIG_SYS_OR1_PRELIM, |
2573 | CONFIG_SYS_BR1_PRELIM: | 2568 | CONFIG_SYS_BR1_PRELIM: |
2574 | Memory Controller Definitions: BR0/1 and OR0/1 (FLASH) | 2569 | Memory Controller Definitions: BR0/1 and OR0/1 (FLASH) |
2575 | 2570 | ||
2576 | - SDRAM_BASE2_PRELIM, SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE, | 2571 | - SDRAM_BASE2_PRELIM, SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE, |
2577 | CONFIG_SYS_OR_TIMING_SDRAM, CONFIG_SYS_OR2_PRELIM, CONFIG_SYS_BR2_PRELIM, | 2572 | CONFIG_SYS_OR_TIMING_SDRAM, CONFIG_SYS_OR2_PRELIM, CONFIG_SYS_BR2_PRELIM, |
2578 | CONFIG_SYS_OR3_PRELIM, CONFIG_SYS_BR3_PRELIM: | 2573 | CONFIG_SYS_OR3_PRELIM, CONFIG_SYS_BR3_PRELIM: |
2579 | Memory Controller Definitions: BR2/3 and OR2/3 (SDRAM) | 2574 | Memory Controller Definitions: BR2/3 and OR2/3 (SDRAM) |
2580 | 2575 | ||
2581 | - CONFIG_SYS_MAMR_PTA, CONFIG_SYS_MPTPR_2BK_4K, CONFIG_SYS_MPTPR_1BK_4K, CONFIG_SYS_MPTPR_2BK_8K, | 2576 | - CONFIG_SYS_MAMR_PTA, CONFIG_SYS_MPTPR_2BK_4K, CONFIG_SYS_MPTPR_1BK_4K, CONFIG_SYS_MPTPR_2BK_8K, |
2582 | CONFIG_SYS_MPTPR_1BK_8K, CONFIG_SYS_MAMR_8COL, CONFIG_SYS_MAMR_9COL: | 2577 | CONFIG_SYS_MPTPR_1BK_8K, CONFIG_SYS_MAMR_8COL, CONFIG_SYS_MAMR_9COL: |
2583 | Machine Mode Register and Memory Periodic Timer | 2578 | Machine Mode Register and Memory Periodic Timer |
2584 | Prescaler definitions (SDRAM timing) | 2579 | Prescaler definitions (SDRAM timing) |
2585 | 2580 | ||
2586 | - CONFIG_SYS_I2C_UCODE_PATCH, CONFIG_SYS_I2C_DPMEM_OFFSET [0x1FC0]: | 2581 | - CONFIG_SYS_I2C_UCODE_PATCH, CONFIG_SYS_I2C_DPMEM_OFFSET [0x1FC0]: |
2587 | enable I2C microcode relocation patch (MPC8xx); | 2582 | enable I2C microcode relocation patch (MPC8xx); |
2588 | define relocation offset in DPRAM [DSP2] | 2583 | define relocation offset in DPRAM [DSP2] |
2589 | 2584 | ||
2590 | - CONFIG_SYS_SMC_UCODE_PATCH, CONFIG_SYS_SMC_DPMEM_OFFSET [0x1FC0]: | 2585 | - CONFIG_SYS_SMC_UCODE_PATCH, CONFIG_SYS_SMC_DPMEM_OFFSET [0x1FC0]: |
2591 | enable SMC microcode relocation patch (MPC8xx); | 2586 | enable SMC microcode relocation patch (MPC8xx); |
2592 | define relocation offset in DPRAM [SMC1] | 2587 | define relocation offset in DPRAM [SMC1] |
2593 | 2588 | ||
2594 | - CONFIG_SYS_SPI_UCODE_PATCH, CONFIG_SYS_SPI_DPMEM_OFFSET [0x1FC0]: | 2589 | - CONFIG_SYS_SPI_UCODE_PATCH, CONFIG_SYS_SPI_DPMEM_OFFSET [0x1FC0]: |
2595 | enable SPI microcode relocation patch (MPC8xx); | 2590 | enable SPI microcode relocation patch (MPC8xx); |
2596 | define relocation offset in DPRAM [SCC4] | 2591 | define relocation offset in DPRAM [SCC4] |
2597 | 2592 | ||
2598 | - CONFIG_SYS_USE_OSCCLK: | 2593 | - CONFIG_SYS_USE_OSCCLK: |
2599 | Use OSCM clock mode on MBX8xx board. Be careful, | 2594 | Use OSCM clock mode on MBX8xx board. Be careful, |
2600 | wrong setting might damage your board. Read | 2595 | wrong setting might damage your board. Read |
2601 | doc/README.MBX before setting this variable! | 2596 | doc/README.MBX before setting this variable! |
2602 | 2597 | ||
2603 | - CONFIG_SYS_CPM_POST_WORD_ADDR: (MPC8xx, MPC8260 only) | 2598 | - CONFIG_SYS_CPM_POST_WORD_ADDR: (MPC8xx, MPC8260 only) |
2604 | Offset of the bootmode word in DPRAM used by post | 2599 | Offset of the bootmode word in DPRAM used by post |
2605 | (Power On Self Tests). This definition overrides | 2600 | (Power On Self Tests). This definition overrides |
2606 | #define'd default value in commproc.h resp. | 2601 | #define'd default value in commproc.h resp. |
2607 | cpm_8260.h. | 2602 | cpm_8260.h. |
2608 | 2603 | ||
2609 | - CONFIG_SYS_PCI_SLV_MEM_LOCAL, CONFIG_SYS_PCI_SLV_MEM_BUS, CONFIG_SYS_PICMR0_MASK_ATTRIB, | 2604 | - CONFIG_SYS_PCI_SLV_MEM_LOCAL, CONFIG_SYS_PCI_SLV_MEM_BUS, CONFIG_SYS_PICMR0_MASK_ATTRIB, |
2610 | CONFIG_SYS_PCI_MSTR0_LOCAL, CONFIG_SYS_PCIMSK0_MASK, CONFIG_SYS_PCI_MSTR1_LOCAL, | 2605 | CONFIG_SYS_PCI_MSTR0_LOCAL, CONFIG_SYS_PCIMSK0_MASK, CONFIG_SYS_PCI_MSTR1_LOCAL, |
2611 | CONFIG_SYS_PCIMSK1_MASK, CONFIG_SYS_PCI_MSTR_MEM_LOCAL, CONFIG_SYS_PCI_MSTR_MEM_BUS, | 2606 | CONFIG_SYS_PCIMSK1_MASK, CONFIG_SYS_PCI_MSTR_MEM_LOCAL, CONFIG_SYS_PCI_MSTR_MEM_BUS, |
2612 | CONFIG_SYS_CPU_PCI_MEM_START, CONFIG_SYS_PCI_MSTR_MEM_SIZE, CONFIG_SYS_POCMR0_MASK_ATTRIB, | 2607 | CONFIG_SYS_CPU_PCI_MEM_START, CONFIG_SYS_PCI_MSTR_MEM_SIZE, CONFIG_SYS_POCMR0_MASK_ATTRIB, |
2613 | CONFIG_SYS_PCI_MSTR_MEMIO_LOCAL, CONFIG_SYS_PCI_MSTR_MEMIO_BUS, CPU_PCI_MEMIO_START, | 2608 | CONFIG_SYS_PCI_MSTR_MEMIO_LOCAL, CONFIG_SYS_PCI_MSTR_MEMIO_BUS, CPU_PCI_MEMIO_START, |
2614 | CONFIG_SYS_PCI_MSTR_MEMIO_SIZE, CONFIG_SYS_POCMR1_MASK_ATTRIB, CONFIG_SYS_PCI_MSTR_IO_LOCAL, | 2609 | CONFIG_SYS_PCI_MSTR_MEMIO_SIZE, CONFIG_SYS_POCMR1_MASK_ATTRIB, CONFIG_SYS_PCI_MSTR_IO_LOCAL, |
2615 | CONFIG_SYS_PCI_MSTR_IO_BUS, CONFIG_SYS_CPU_PCI_IO_START, CONFIG_SYS_PCI_MSTR_IO_SIZE, | 2610 | CONFIG_SYS_PCI_MSTR_IO_BUS, CONFIG_SYS_CPU_PCI_IO_START, CONFIG_SYS_PCI_MSTR_IO_SIZE, |
2616 | CONFIG_SYS_POCMR2_MASK_ATTRIB: (MPC826x only) | 2611 | CONFIG_SYS_POCMR2_MASK_ATTRIB: (MPC826x only) |
2617 | Overrides the default PCI memory map in cpu/mpc8260/pci.c if set. | 2612 | Overrides the default PCI memory map in cpu/mpc8260/pci.c if set. |
2618 | 2613 | ||
2619 | - CONFIG_PCI_DISABLE_PCIE: | 2614 | - CONFIG_PCI_DISABLE_PCIE: |
2620 | Disable PCI-Express on systems where it is supported but not | 2615 | Disable PCI-Express on systems where it is supported but not |
2621 | required. | 2616 | required. |
2622 | 2617 | ||
2623 | - CONFIG_SPD_EEPROM | 2618 | - CONFIG_SPD_EEPROM |
2624 | Get DDR timing information from an I2C EEPROM. Common | 2619 | Get DDR timing information from an I2C EEPROM. Common |
2625 | with pluggable memory modules such as SODIMMs | 2620 | with pluggable memory modules such as SODIMMs |
2626 | 2621 | ||
2627 | SPD_EEPROM_ADDRESS | 2622 | SPD_EEPROM_ADDRESS |
2628 | I2C address of the SPD EEPROM | 2623 | I2C address of the SPD EEPROM |
2629 | 2624 | ||
2630 | - CONFIG_SYS_SPD_BUS_NUM | 2625 | - CONFIG_SYS_SPD_BUS_NUM |
2631 | If SPD EEPROM is on an I2C bus other than the first | 2626 | If SPD EEPROM is on an I2C bus other than the first |
2632 | one, specify here. Note that the value must resolve | 2627 | one, specify here. Note that the value must resolve |
2633 | to something your driver can deal with. | 2628 | to something your driver can deal with. |
2634 | 2629 | ||
2635 | - CONFIG_SYS_83XX_DDR_USES_CS0 | 2630 | - CONFIG_SYS_83XX_DDR_USES_CS0 |
2636 | Only for 83xx systems. If specified, then DDR should | 2631 | Only for 83xx systems. If specified, then DDR should |
2637 | be configured using CS0 and CS1 instead of CS2 and CS3. | 2632 | be configured using CS0 and CS1 instead of CS2 and CS3. |
2638 | 2633 | ||
2639 | - CONFIG_ETHER_ON_FEC[12] | 2634 | - CONFIG_ETHER_ON_FEC[12] |
2640 | Define to enable FEC[12] on a 8xx series processor. | 2635 | Define to enable FEC[12] on a 8xx series processor. |
2641 | 2636 | ||
2642 | - CONFIG_FEC[12]_PHY | 2637 | - CONFIG_FEC[12]_PHY |
2643 | Define to the hardcoded PHY address which corresponds | 2638 | Define to the hardcoded PHY address which corresponds |
2644 | to the given FEC; i. e. | 2639 | to the given FEC; i. e. |
2645 | #define CONFIG_FEC1_PHY 4 | 2640 | #define CONFIG_FEC1_PHY 4 |
2646 | means that the PHY with address 4 is connected to FEC1 | 2641 | means that the PHY with address 4 is connected to FEC1 |
2647 | 2642 | ||
2648 | When set to -1, means to probe for first available. | 2643 | When set to -1, means to probe for first available. |
2649 | 2644 | ||
2650 | - CONFIG_FEC[12]_PHY_NORXERR | 2645 | - CONFIG_FEC[12]_PHY_NORXERR |
2651 | The PHY does not have a RXERR line (RMII only). | 2646 | The PHY does not have a RXERR line (RMII only). |
2652 | (so program the FEC to ignore it). | 2647 | (so program the FEC to ignore it). |
2653 | 2648 | ||
2654 | - CONFIG_RMII | 2649 | - CONFIG_RMII |
2655 | Enable RMII mode for all FECs. | 2650 | Enable RMII mode for all FECs. |
2656 | Note that this is a global option, we can't | 2651 | Note that this is a global option, we can't |
2657 | have one FEC in standard MII mode and another in RMII mode. | 2652 | have one FEC in standard MII mode and another in RMII mode. |
2658 | 2653 | ||
2659 | - CONFIG_CRC32_VERIFY | 2654 | - CONFIG_CRC32_VERIFY |
2660 | Add a verify option to the crc32 command. | 2655 | Add a verify option to the crc32 command. |
2661 | The syntax is: | 2656 | The syntax is: |
2662 | 2657 | ||
2663 | => crc32 -v <address> <count> <crc32> | 2658 | => crc32 -v <address> <count> <crc32> |
2664 | 2659 | ||
2665 | Where address/count indicate a memory area | 2660 | Where address/count indicate a memory area |
2666 | and crc32 is the correct crc32 which the | 2661 | and crc32 is the correct crc32 which the |
2667 | area should have. | 2662 | area should have. |
2668 | 2663 | ||
2669 | - CONFIG_LOOPW | 2664 | - CONFIG_LOOPW |
2670 | Add the "loopw" memory command. This only takes effect if | 2665 | Add the "loopw" memory command. This only takes effect if |
2671 | the memory commands are activated globally (CONFIG_CMD_MEM). | 2666 | the memory commands are activated globally (CONFIG_CMD_MEM). |
2672 | 2667 | ||
2673 | - CONFIG_MX_CYCLIC | 2668 | - CONFIG_MX_CYCLIC |
2674 | Add the "mdc" and "mwc" memory commands. These are cyclic | 2669 | Add the "mdc" and "mwc" memory commands. These are cyclic |
2675 | "md/mw" commands. | 2670 | "md/mw" commands. |
2676 | Examples: | 2671 | Examples: |
2677 | 2672 | ||
2678 | => mdc.b 10 4 500 | 2673 | => mdc.b 10 4 500 |
2679 | This command will print 4 bytes (10,11,12,13) each 500 ms. | 2674 | This command will print 4 bytes (10,11,12,13) each 500 ms. |
2680 | 2675 | ||
2681 | => mwc.l 100 12345678 10 | 2676 | => mwc.l 100 12345678 10 |
2682 | This command will write 12345678 to address 100 all 10 ms. | 2677 | This command will write 12345678 to address 100 all 10 ms. |
2683 | 2678 | ||
2684 | This only takes effect if the memory commands are activated | 2679 | This only takes effect if the memory commands are activated |
2685 | globally (CONFIG_CMD_MEM). | 2680 | globally (CONFIG_CMD_MEM). |
2686 | 2681 | ||
2687 | - CONFIG_SKIP_LOWLEVEL_INIT | 2682 | - CONFIG_SKIP_LOWLEVEL_INIT |
2688 | - CONFIG_SKIP_RELOCATE_UBOOT | 2683 | - CONFIG_SKIP_RELOCATE_UBOOT |
2689 | 2684 | ||
2690 | [ARM only] If these variables are defined, then | 2685 | [ARM only] If these variables are defined, then |
2691 | certain low level initializations (like setting up | 2686 | certain low level initializations (like setting up |
2692 | the memory controller) are omitted and/or U-Boot does | 2687 | the memory controller) are omitted and/or U-Boot does |
2693 | not relocate itself into RAM. | 2688 | not relocate itself into RAM. |
2694 | Normally these variables MUST NOT be defined. The | 2689 | Normally these variables MUST NOT be defined. The |
2695 | only exception is when U-Boot is loaded (to RAM) by | 2690 | only exception is when U-Boot is loaded (to RAM) by |
2696 | some other boot loader or by a debugger which | 2691 | some other boot loader or by a debugger which |
2697 | performs these initializations itself. | 2692 | performs these initializations itself. |
2698 | 2693 | ||
2699 | 2694 | ||
2700 | Building the Software: | 2695 | Building the Software: |
2701 | ====================== | 2696 | ====================== |
2702 | 2697 | ||
2703 | Building U-Boot has been tested in several native build environments | 2698 | Building U-Boot has been tested in several native build environments |
2704 | and in many different cross environments. Of course we cannot support | 2699 | and in many different cross environments. Of course we cannot support |
2705 | all possibly existing versions of cross development tools in all | 2700 | all possibly existing versions of cross development tools in all |
2706 | (potentially obsolete) versions. In case of tool chain problems we | 2701 | (potentially obsolete) versions. In case of tool chain problems we |
2707 | recommend to use the ELDK (see http://www.denx.de/wiki/DULG/ELDK) | 2702 | recommend to use the ELDK (see http://www.denx.de/wiki/DULG/ELDK) |
2708 | which is extensively used to build and test U-Boot. | 2703 | which is extensively used to build and test U-Boot. |
2709 | 2704 | ||
2710 | If you are not using a native environment, it is assumed that you | 2705 | If you are not using a native environment, it is assumed that you |
2711 | have GNU cross compiling tools available in your path. In this case, | 2706 | have GNU cross compiling tools available in your path. In this case, |
2712 | you must set the environment variable CROSS_COMPILE in your shell. | 2707 | you must set the environment variable CROSS_COMPILE in your shell. |
2713 | Note that no changes to the Makefile or any other source files are | 2708 | Note that no changes to the Makefile or any other source files are |
2714 | necessary. For example using the ELDK on a 4xx CPU, please enter: | 2709 | necessary. For example using the ELDK on a 4xx CPU, please enter: |
2715 | 2710 | ||
2716 | $ CROSS_COMPILE=ppc_4xx- | 2711 | $ CROSS_COMPILE=ppc_4xx- |
2717 | $ export CROSS_COMPILE | 2712 | $ export CROSS_COMPILE |
2718 | 2713 | ||
2719 | Note: If you wish to generate Windows versions of the utilities in | 2714 | Note: If you wish to generate Windows versions of the utilities in |
2720 | the tools directory you can use the MinGW toolchain | 2715 | the tools directory you can use the MinGW toolchain |
2721 | (http://www.mingw.org). Set your HOST tools to the MinGW | 2716 | (http://www.mingw.org). Set your HOST tools to the MinGW |
2722 | toolchain and execute 'make tools'. For example: | 2717 | toolchain and execute 'make tools'. For example: |
2723 | 2718 | ||
2724 | $ make HOSTCC=i586-mingw32msvc-gcc HOSTSTRIP=i586-mingw32msvc-strip tools | 2719 | $ make HOSTCC=i586-mingw32msvc-gcc HOSTSTRIP=i586-mingw32msvc-strip tools |
2725 | 2720 | ||
2726 | Binaries such as tools/mkimage.exe will be created which can | 2721 | Binaries such as tools/mkimage.exe will be created which can |
2727 | be executed on computers running Windows. | 2722 | be executed on computers running Windows. |
2728 | 2723 | ||
2729 | U-Boot is intended to be simple to build. After installing the | 2724 | U-Boot is intended to be simple to build. After installing the |
2730 | sources you must configure U-Boot for one specific board type. This | 2725 | sources you must configure U-Boot for one specific board type. This |
2731 | is done by typing: | 2726 | is done by typing: |
2732 | 2727 | ||
2733 | make NAME_config | 2728 | make NAME_config |
2734 | 2729 | ||
2735 | where "NAME_config" is the name of one of the existing configu- | 2730 | where "NAME_config" is the name of one of the existing configu- |
2736 | rations; see the main Makefile for supported names. | 2731 | rations; see the main Makefile for supported names. |
2737 | 2732 | ||
2738 | Note: for some board special configuration names may exist; check if | 2733 | Note: for some board special configuration names may exist; check if |
2739 | additional information is available from the board vendor; for | 2734 | additional information is available from the board vendor; for |
2740 | instance, the TQM823L systems are available without (standard) | 2735 | instance, the TQM823L systems are available without (standard) |
2741 | or with LCD support. You can select such additional "features" | 2736 | or with LCD support. You can select such additional "features" |
2742 | when choosing the configuration, i. e. | 2737 | when choosing the configuration, i. e. |
2743 | 2738 | ||
2744 | make TQM823L_config | 2739 | make TQM823L_config |
2745 | - will configure for a plain TQM823L, i. e. no LCD support | 2740 | - will configure for a plain TQM823L, i. e. no LCD support |
2746 | 2741 | ||
2747 | make TQM823L_LCD_config | 2742 | make TQM823L_LCD_config |
2748 | - will configure for a TQM823L with U-Boot console on LCD | 2743 | - will configure for a TQM823L with U-Boot console on LCD |
2749 | 2744 | ||
2750 | etc. | 2745 | etc. |
2751 | 2746 | ||
2752 | 2747 | ||
2753 | Finally, type "make all", and you should get some working U-Boot | 2748 | Finally, type "make all", and you should get some working U-Boot |
2754 | images ready for download to / installation on your system: | 2749 | images ready for download to / installation on your system: |
2755 | 2750 | ||
2756 | - "u-boot.bin" is a raw binary image | 2751 | - "u-boot.bin" is a raw binary image |
2757 | - "u-boot" is an image in ELF binary format | 2752 | - "u-boot" is an image in ELF binary format |
2758 | - "u-boot.srec" is in Motorola S-Record format | 2753 | - "u-boot.srec" is in Motorola S-Record format |
2759 | 2754 | ||
2760 | By default the build is performed locally and the objects are saved | 2755 | By default the build is performed locally and the objects are saved |
2761 | in the source directory. One of the two methods can be used to change | 2756 | in the source directory. One of the two methods can be used to change |
2762 | this behavior and build U-Boot to some external directory: | 2757 | this behavior and build U-Boot to some external directory: |
2763 | 2758 | ||
2764 | 1. Add O= to the make command line invocations: | 2759 | 1. Add O= to the make command line invocations: |
2765 | 2760 | ||
2766 | make O=/tmp/build distclean | 2761 | make O=/tmp/build distclean |
2767 | make O=/tmp/build NAME_config | 2762 | make O=/tmp/build NAME_config |
2768 | make O=/tmp/build all | 2763 | make O=/tmp/build all |
2769 | 2764 | ||
2770 | 2. Set environment variable BUILD_DIR to point to the desired location: | 2765 | 2. Set environment variable BUILD_DIR to point to the desired location: |
2771 | 2766 | ||
2772 | export BUILD_DIR=/tmp/build | 2767 | export BUILD_DIR=/tmp/build |
2773 | make distclean | 2768 | make distclean |
2774 | make NAME_config | 2769 | make NAME_config |
2775 | make all | 2770 | make all |
2776 | 2771 | ||
2777 | Note that the command line "O=" setting overrides the BUILD_DIR environment | 2772 | Note that the command line "O=" setting overrides the BUILD_DIR environment |
2778 | variable. | 2773 | variable. |
2779 | 2774 | ||
2780 | 2775 | ||
2781 | Please be aware that the Makefiles assume you are using GNU make, so | 2776 | Please be aware that the Makefiles assume you are using GNU make, so |
2782 | for instance on NetBSD you might need to use "gmake" instead of | 2777 | for instance on NetBSD you might need to use "gmake" instead of |
2783 | native "make". | 2778 | native "make". |
2784 | 2779 | ||
2785 | 2780 | ||
2786 | If the system board that you have is not listed, then you will need | 2781 | If the system board that you have is not listed, then you will need |
2787 | to port U-Boot to your hardware platform. To do this, follow these | 2782 | to port U-Boot to your hardware platform. To do this, follow these |
2788 | steps: | 2783 | steps: |
2789 | 2784 | ||
2790 | 1. Add a new configuration option for your board to the toplevel | 2785 | 1. Add a new configuration option for your board to the toplevel |
2791 | "Makefile" and to the "MAKEALL" script, using the existing | 2786 | "Makefile" and to the "MAKEALL" script, using the existing |
2792 | entries as examples. Note that here and at many other places | 2787 | entries as examples. Note that here and at many other places |
2793 | boards and other names are listed in alphabetical sort order. Please | 2788 | boards and other names are listed in alphabetical sort order. Please |
2794 | keep this order. | 2789 | keep this order. |
2795 | 2. Create a new directory to hold your board specific code. Add any | 2790 | 2. Create a new directory to hold your board specific code. Add any |
2796 | files you need. In your board directory, you will need at least | 2791 | files you need. In your board directory, you will need at least |
2797 | the "Makefile", a "<board>.c", "flash.c" and "u-boot.lds". | 2792 | the "Makefile", a "<board>.c", "flash.c" and "u-boot.lds". |
2798 | 3. Create a new configuration file "include/configs/<board>.h" for | 2793 | 3. Create a new configuration file "include/configs/<board>.h" for |
2799 | your board | 2794 | your board |
2800 | 3. If you're porting U-Boot to a new CPU, then also create a new | 2795 | 3. If you're porting U-Boot to a new CPU, then also create a new |
2801 | directory to hold your CPU specific code. Add any files you need. | 2796 | directory to hold your CPU specific code. Add any files you need. |
2802 | 4. Run "make <board>_config" with your new name. | 2797 | 4. Run "make <board>_config" with your new name. |
2803 | 5. Type "make", and you should get a working "u-boot.srec" file | 2798 | 5. Type "make", and you should get a working "u-boot.srec" file |
2804 | to be installed on your target system. | 2799 | to be installed on your target system. |
2805 | 6. Debug and solve any problems that might arise. | 2800 | 6. Debug and solve any problems that might arise. |
2806 | [Of course, this last step is much harder than it sounds.] | 2801 | [Of course, this last step is much harder than it sounds.] |
2807 | 2802 | ||
2808 | 2803 | ||
2809 | Testing of U-Boot Modifications, Ports to New Hardware, etc.: | 2804 | Testing of U-Boot Modifications, Ports to New Hardware, etc.: |
2810 | ============================================================== | 2805 | ============================================================== |
2811 | 2806 | ||
2812 | If you have modified U-Boot sources (for instance added a new board | 2807 | If you have modified U-Boot sources (for instance added a new board |
2813 | or support for new devices, a new CPU, etc.) you are expected to | 2808 | or support for new devices, a new CPU, etc.) you are expected to |
2814 | provide feedback to the other developers. The feedback normally takes | 2809 | provide feedback to the other developers. The feedback normally takes |
2815 | the form of a "patch", i. e. a context diff against a certain (latest | 2810 | the form of a "patch", i. e. a context diff against a certain (latest |
2816 | official or latest in the git repository) version of U-Boot sources. | 2811 | official or latest in the git repository) version of U-Boot sources. |
2817 | 2812 | ||
2818 | But before you submit such a patch, please verify that your modifi- | 2813 | But before you submit such a patch, please verify that your modifi- |
2819 | cation did not break existing code. At least make sure that *ALL* of | 2814 | cation did not break existing code. At least make sure that *ALL* of |
2820 | the supported boards compile WITHOUT ANY compiler warnings. To do so, | 2815 | the supported boards compile WITHOUT ANY compiler warnings. To do so, |
2821 | just run the "MAKEALL" script, which will configure and build U-Boot | 2816 | just run the "MAKEALL" script, which will configure and build U-Boot |
2822 | for ALL supported system. Be warned, this will take a while. You can | 2817 | for ALL supported system. Be warned, this will take a while. You can |
2823 | select which (cross) compiler to use by passing a `CROSS_COMPILE' | 2818 | select which (cross) compiler to use by passing a `CROSS_COMPILE' |
2824 | environment variable to the script, i. e. to use the ELDK cross tools | 2819 | environment variable to the script, i. e. to use the ELDK cross tools |
2825 | you can type | 2820 | you can type |
2826 | 2821 | ||
2827 | CROSS_COMPILE=ppc_8xx- MAKEALL | 2822 | CROSS_COMPILE=ppc_8xx- MAKEALL |
2828 | 2823 | ||
2829 | or to build on a native PowerPC system you can type | 2824 | or to build on a native PowerPC system you can type |
2830 | 2825 | ||
2831 | CROSS_COMPILE=' ' MAKEALL | 2826 | CROSS_COMPILE=' ' MAKEALL |
2832 | 2827 | ||
2833 | When using the MAKEALL script, the default behaviour is to build | 2828 | When using the MAKEALL script, the default behaviour is to build |
2834 | U-Boot in the source directory. This location can be changed by | 2829 | U-Boot in the source directory. This location can be changed by |
2835 | setting the BUILD_DIR environment variable. Also, for each target | 2830 | setting the BUILD_DIR environment variable. Also, for each target |
2836 | built, the MAKEALL script saves two log files (<target>.ERR and | 2831 | built, the MAKEALL script saves two log files (<target>.ERR and |
2837 | <target>.MAKEALL) in the <source dir>/LOG directory. This default | 2832 | <target>.MAKEALL) in the <source dir>/LOG directory. This default |
2838 | location can be changed by setting the MAKEALL_LOGDIR environment | 2833 | location can be changed by setting the MAKEALL_LOGDIR environment |
2839 | variable. For example: | 2834 | variable. For example: |
2840 | 2835 | ||
2841 | export BUILD_DIR=/tmp/build | 2836 | export BUILD_DIR=/tmp/build |
2842 | export MAKEALL_LOGDIR=/tmp/log | 2837 | export MAKEALL_LOGDIR=/tmp/log |
2843 | CROSS_COMPILE=ppc_8xx- MAKEALL | 2838 | CROSS_COMPILE=ppc_8xx- MAKEALL |
2844 | 2839 | ||
2845 | With the above settings build objects are saved in the /tmp/build, | 2840 | With the above settings build objects are saved in the /tmp/build, |
2846 | log files are saved in the /tmp/log and the source tree remains clean | 2841 | log files are saved in the /tmp/log and the source tree remains clean |
2847 | during the whole build process. | 2842 | during the whole build process. |
2848 | 2843 | ||
2849 | 2844 | ||
2850 | See also "U-Boot Porting Guide" below. | 2845 | See also "U-Boot Porting Guide" below. |
2851 | 2846 | ||
2852 | 2847 | ||
2853 | Monitor Commands - Overview: | 2848 | Monitor Commands - Overview: |
2854 | ============================ | 2849 | ============================ |
2855 | 2850 | ||
2856 | go - start application at address 'addr' | 2851 | go - start application at address 'addr' |
2857 | run - run commands in an environment variable | 2852 | run - run commands in an environment variable |
2858 | bootm - boot application image from memory | 2853 | bootm - boot application image from memory |
2859 | bootp - boot image via network using BootP/TFTP protocol | 2854 | bootp - boot image via network using BootP/TFTP protocol |
2860 | tftpboot- boot image via network using TFTP protocol | 2855 | tftpboot- boot image via network using TFTP protocol |
2861 | and env variables "ipaddr" and "serverip" | 2856 | and env variables "ipaddr" and "serverip" |
2862 | (and eventually "gatewayip") | 2857 | (and eventually "gatewayip") |
2863 | rarpboot- boot image via network using RARP/TFTP protocol | 2858 | rarpboot- boot image via network using RARP/TFTP protocol |
2864 | diskboot- boot from IDE devicebootd - boot default, i.e., run 'bootcmd' | 2859 | diskboot- boot from IDE devicebootd - boot default, i.e., run 'bootcmd' |
2865 | loads - load S-Record file over serial line | 2860 | loads - load S-Record file over serial line |
2866 | loadb - load binary file over serial line (kermit mode) | 2861 | loadb - load binary file over serial line (kermit mode) |
2867 | md - memory display | 2862 | md - memory display |
2868 | mm - memory modify (auto-incrementing) | 2863 | mm - memory modify (auto-incrementing) |
2869 | nm - memory modify (constant address) | 2864 | nm - memory modify (constant address) |
2870 | mw - memory write (fill) | 2865 | mw - memory write (fill) |
2871 | cp - memory copy | 2866 | cp - memory copy |
2872 | cmp - memory compare | 2867 | cmp - memory compare |
2873 | crc32 - checksum calculation | 2868 | crc32 - checksum calculation |
2874 | imd - i2c memory display | 2869 | imd - i2c memory display |
2875 | imm - i2c memory modify (auto-incrementing) | 2870 | imm - i2c memory modify (auto-incrementing) |
2876 | inm - i2c memory modify (constant address) | 2871 | inm - i2c memory modify (constant address) |
2877 | imw - i2c memory write (fill) | 2872 | imw - i2c memory write (fill) |
2878 | icrc32 - i2c checksum calculation | 2873 | icrc32 - i2c checksum calculation |
2879 | iprobe - probe to discover valid I2C chip addresses | 2874 | iprobe - probe to discover valid I2C chip addresses |
2880 | iloop - infinite loop on address range | 2875 | iloop - infinite loop on address range |
2881 | isdram - print SDRAM configuration information | 2876 | isdram - print SDRAM configuration information |
2882 | sspi - SPI utility commands | 2877 | sspi - SPI utility commands |
2883 | base - print or set address offset | 2878 | base - print or set address offset |
2884 | printenv- print environment variables | 2879 | printenv- print environment variables |
2885 | setenv - set environment variables | 2880 | setenv - set environment variables |
2886 | saveenv - save environment variables to persistent storage | 2881 | saveenv - save environment variables to persistent storage |
2887 | protect - enable or disable FLASH write protection | 2882 | protect - enable or disable FLASH write protection |
2888 | erase - erase FLASH memory | 2883 | erase - erase FLASH memory |
2889 | flinfo - print FLASH memory information | 2884 | flinfo - print FLASH memory information |
2890 | bdinfo - print Board Info structure | 2885 | bdinfo - print Board Info structure |
2891 | iminfo - print header information for application image | 2886 | iminfo - print header information for application image |
2892 | coninfo - print console devices and informations | 2887 | coninfo - print console devices and informations |
2893 | ide - IDE sub-system | 2888 | ide - IDE sub-system |
2894 | loop - infinite loop on address range | 2889 | loop - infinite loop on address range |
2895 | loopw - infinite write loop on address range | 2890 | loopw - infinite write loop on address range |
2896 | mtest - simple RAM test | 2891 | mtest - simple RAM test |
2897 | icache - enable or disable instruction cache | 2892 | icache - enable or disable instruction cache |
2898 | dcache - enable or disable data cache | 2893 | dcache - enable or disable data cache |
2899 | reset - Perform RESET of the CPU | 2894 | reset - Perform RESET of the CPU |
2900 | echo - echo args to console | 2895 | echo - echo args to console |
2901 | version - print monitor version | 2896 | version - print monitor version |
2902 | help - print online help | 2897 | help - print online help |
2903 | ? - alias for 'help' | 2898 | ? - alias for 'help' |
2904 | 2899 | ||
2905 | 2900 | ||
2906 | Monitor Commands - Detailed Description: | 2901 | Monitor Commands - Detailed Description: |
2907 | ======================================== | 2902 | ======================================== |
2908 | 2903 | ||
2909 | TODO. | 2904 | TODO. |
2910 | 2905 | ||
2911 | For now: just type "help <command>". | 2906 | For now: just type "help <command>". |
2912 | 2907 | ||
2913 | 2908 | ||
2914 | Environment Variables: | 2909 | Environment Variables: |
2915 | ====================== | 2910 | ====================== |
2916 | 2911 | ||
2917 | U-Boot supports user configuration using Environment Variables which | 2912 | U-Boot supports user configuration using Environment Variables which |
2918 | can be made persistent by saving to Flash memory. | 2913 | can be made persistent by saving to Flash memory. |
2919 | 2914 | ||
2920 | Environment Variables are set using "setenv", printed using | 2915 | Environment Variables are set using "setenv", printed using |
2921 | "printenv", and saved to Flash using "saveenv". Using "setenv" | 2916 | "printenv", and saved to Flash using "saveenv". Using "setenv" |
2922 | without a value can be used to delete a variable from the | 2917 | without a value can be used to delete a variable from the |
2923 | environment. As long as you don't save the environment you are | 2918 | environment. As long as you don't save the environment you are |
2924 | working with an in-memory copy. In case the Flash area containing the | 2919 | working with an in-memory copy. In case the Flash area containing the |
2925 | environment is erased by accident, a default environment is provided. | 2920 | environment is erased by accident, a default environment is provided. |
2926 | 2921 | ||
2927 | Some configuration options can be set using Environment Variables: | 2922 | Some configuration options can be set using Environment Variables: |
2928 | 2923 | ||
2929 | baudrate - see CONFIG_BAUDRATE | 2924 | baudrate - see CONFIG_BAUDRATE |
2930 | 2925 | ||
2931 | bootdelay - see CONFIG_BOOTDELAY | 2926 | bootdelay - see CONFIG_BOOTDELAY |
2932 | 2927 | ||
2933 | bootcmd - see CONFIG_BOOTCOMMAND | 2928 | bootcmd - see CONFIG_BOOTCOMMAND |
2934 | 2929 | ||
2935 | bootargs - Boot arguments when booting an RTOS image | 2930 | bootargs - Boot arguments when booting an RTOS image |
2936 | 2931 | ||
2937 | bootfile - Name of the image to load with TFTP | 2932 | bootfile - Name of the image to load with TFTP |
2938 | 2933 | ||
2939 | bootm_low - Memory range available for image processing in the bootm | 2934 | bootm_low - Memory range available for image processing in the bootm |
2940 | command can be restricted. This variable is given as | 2935 | command can be restricted. This variable is given as |
2941 | a hexadecimal number and defines lowest address allowed | 2936 | a hexadecimal number and defines lowest address allowed |
2942 | for use by the bootm command. See also "bootm_size" | 2937 | for use by the bootm command. See also "bootm_size" |
2943 | environment variable. Address defined by "bootm_low" is | 2938 | environment variable. Address defined by "bootm_low" is |
2944 | also the base of the initial memory mapping for the Linux | 2939 | also the base of the initial memory mapping for the Linux |
2945 | kernel -- see the description of CONFIG_SYS_BOOTMAPSZ. | 2940 | kernel -- see the description of CONFIG_SYS_BOOTMAPSZ. |
2946 | 2941 | ||
2947 | bootm_size - Memory range available for image processing in the bootm | 2942 | bootm_size - Memory range available for image processing in the bootm |
2948 | command can be restricted. This variable is given as | 2943 | command can be restricted. This variable is given as |
2949 | a hexadecimal number and defines the size of the region | 2944 | a hexadecimal number and defines the size of the region |
2950 | allowed for use by the bootm command. See also "bootm_low" | 2945 | allowed for use by the bootm command. See also "bootm_low" |
2951 | environment variable. | 2946 | environment variable. |
2952 | 2947 | ||
2953 | updatefile - Location of the software update file on a TFTP server, used | 2948 | updatefile - Location of the software update file on a TFTP server, used |
2954 | by the automatic software update feature. Please refer to | 2949 | by the automatic software update feature. Please refer to |
2955 | documentation in doc/README.update for more details. | 2950 | documentation in doc/README.update for more details. |
2956 | 2951 | ||
2957 | autoload - if set to "no" (any string beginning with 'n'), | 2952 | autoload - if set to "no" (any string beginning with 'n'), |
2958 | "bootp" will just load perform a lookup of the | 2953 | "bootp" will just load perform a lookup of the |
2959 | configuration from the BOOTP server, but not try to | 2954 | configuration from the BOOTP server, but not try to |
2960 | load any image using TFTP | 2955 | load any image using TFTP |
2961 | 2956 | ||
2962 | autoscript - if set to "yes" commands like "loadb", "loady", | 2957 | autoscript - if set to "yes" commands like "loadb", "loady", |
2963 | "bootp", "tftpb", "rarpboot" and "nfs" will attempt | 2958 | "bootp", "tftpb", "rarpboot" and "nfs" will attempt |
2964 | to automatically run script images (by internally | 2959 | to automatically run script images (by internally |
2965 | calling "source"). | 2960 | calling "source"). |
2966 | 2961 | ||
2967 | autoscript_uname - if script image is in a format (FIT) this | 2962 | autoscript_uname - if script image is in a format (FIT) this |
2968 | variable is used to get script subimage unit name. | 2963 | variable is used to get script subimage unit name. |
2969 | 2964 | ||
2970 | autostart - if set to "yes", an image loaded using the "bootp", | 2965 | autostart - if set to "yes", an image loaded using the "bootp", |
2971 | "rarpboot", "tftpboot" or "diskboot" commands will | 2966 | "rarpboot", "tftpboot" or "diskboot" commands will |
2972 | be automatically started (by internally calling | 2967 | be automatically started (by internally calling |
2973 | "bootm") | 2968 | "bootm") |
2974 | 2969 | ||
2975 | If set to "no", a standalone image passed to the | 2970 | If set to "no", a standalone image passed to the |
2976 | "bootm" command will be copied to the load address | 2971 | "bootm" command will be copied to the load address |
2977 | (and eventually uncompressed), but NOT be started. | 2972 | (and eventually uncompressed), but NOT be started. |
2978 | This can be used to load and uncompress arbitrary | 2973 | This can be used to load and uncompress arbitrary |
2979 | data. | 2974 | data. |
2980 | 2975 | ||
2981 | i2cfast - (PPC405GP|PPC405EP only) | 2976 | i2cfast - (PPC405GP|PPC405EP only) |
2982 | if set to 'y' configures Linux I2C driver for fast | 2977 | if set to 'y' configures Linux I2C driver for fast |
2983 | mode (400kHZ). This environment variable is used in | 2978 | mode (400kHZ). This environment variable is used in |
2984 | initialization code. So, for changes to be effective | 2979 | initialization code. So, for changes to be effective |
2985 | it must be saved and board must be reset. | 2980 | it must be saved and board must be reset. |
2986 | 2981 | ||
2987 | initrd_high - restrict positioning of initrd images: | 2982 | initrd_high - restrict positioning of initrd images: |
2988 | If this variable is not set, initrd images will be | 2983 | If this variable is not set, initrd images will be |
2989 | copied to the highest possible address in RAM; this | 2984 | copied to the highest possible address in RAM; this |
2990 | is usually what you want since it allows for | 2985 | is usually what you want since it allows for |
2991 | maximum initrd size. If for some reason you want to | 2986 | maximum initrd size. If for some reason you want to |
2992 | make sure that the initrd image is loaded below the | 2987 | make sure that the initrd image is loaded below the |
2993 | CONFIG_SYS_BOOTMAPSZ limit, you can set this environment | 2988 | CONFIG_SYS_BOOTMAPSZ limit, you can set this environment |
2994 | variable to a value of "no" or "off" or "0". | 2989 | variable to a value of "no" or "off" or "0". |
2995 | Alternatively, you can set it to a maximum upper | 2990 | Alternatively, you can set it to a maximum upper |
2996 | address to use (U-Boot will still check that it | 2991 | address to use (U-Boot will still check that it |
2997 | does not overwrite the U-Boot stack and data). | 2992 | does not overwrite the U-Boot stack and data). |
2998 | 2993 | ||
2999 | For instance, when you have a system with 16 MB | 2994 | For instance, when you have a system with 16 MB |
3000 | RAM, and want to reserve 4 MB from use by Linux, | 2995 | RAM, and want to reserve 4 MB from use by Linux, |
3001 | you can do this by adding "mem=12M" to the value of | 2996 | you can do this by adding "mem=12M" to the value of |
3002 | the "bootargs" variable. However, now you must make | 2997 | the "bootargs" variable. However, now you must make |
3003 | sure that the initrd image is placed in the first | 2998 | sure that the initrd image is placed in the first |
3004 | 12 MB as well - this can be done with | 2999 | 12 MB as well - this can be done with |
3005 | 3000 | ||
3006 | setenv initrd_high 00c00000 | 3001 | setenv initrd_high 00c00000 |
3007 | 3002 | ||
3008 | If you set initrd_high to 0xFFFFFFFF, this is an | 3003 | If you set initrd_high to 0xFFFFFFFF, this is an |
3009 | indication to U-Boot that all addresses are legal | 3004 | indication to U-Boot that all addresses are legal |
3010 | for the Linux kernel, including addresses in flash | 3005 | for the Linux kernel, including addresses in flash |
3011 | memory. In this case U-Boot will NOT COPY the | 3006 | memory. In this case U-Boot will NOT COPY the |
3012 | ramdisk at all. This may be useful to reduce the | 3007 | ramdisk at all. This may be useful to reduce the |
3013 | boot time on your system, but requires that this | 3008 | boot time on your system, but requires that this |
3014 | feature is supported by your Linux kernel. | 3009 | feature is supported by your Linux kernel. |
3015 | 3010 | ||
3016 | ipaddr - IP address; needed for tftpboot command | 3011 | ipaddr - IP address; needed for tftpboot command |
3017 | 3012 | ||
3018 | loadaddr - Default load address for commands like "bootp", | 3013 | loadaddr - Default load address for commands like "bootp", |
3019 | "rarpboot", "tftpboot", "loadb" or "diskboot" | 3014 | "rarpboot", "tftpboot", "loadb" or "diskboot" |
3020 | 3015 | ||
3021 | loads_echo - see CONFIG_LOADS_ECHO | 3016 | loads_echo - see CONFIG_LOADS_ECHO |
3022 | 3017 | ||
3023 | serverip - TFTP server IP address; needed for tftpboot command | 3018 | serverip - TFTP server IP address; needed for tftpboot command |
3024 | 3019 | ||
3025 | bootretry - see CONFIG_BOOT_RETRY_TIME | 3020 | bootretry - see CONFIG_BOOT_RETRY_TIME |
3026 | 3021 | ||
3027 | bootdelaykey - see CONFIG_AUTOBOOT_DELAY_STR | 3022 | bootdelaykey - see CONFIG_AUTOBOOT_DELAY_STR |
3028 | 3023 | ||
3029 | bootstopkey - see CONFIG_AUTOBOOT_STOP_STR | 3024 | bootstopkey - see CONFIG_AUTOBOOT_STOP_STR |
3030 | 3025 | ||
3031 | ethprime - When CONFIG_NET_MULTI is enabled controls which | 3026 | ethprime - When CONFIG_NET_MULTI is enabled controls which |
3032 | interface is used first. | 3027 | interface is used first. |
3033 | 3028 | ||
3034 | ethact - When CONFIG_NET_MULTI is enabled controls which | 3029 | ethact - When CONFIG_NET_MULTI is enabled controls which |
3035 | interface is currently active. For example you | 3030 | interface is currently active. For example you |
3036 | can do the following | 3031 | can do the following |
3037 | 3032 | ||
3038 | => setenv ethact FEC ETHERNET | 3033 | => setenv ethact FEC ETHERNET |
3039 | => ping 192.168.0.1 # traffic sent on FEC ETHERNET | 3034 | => ping 192.168.0.1 # traffic sent on FEC ETHERNET |
3040 | => setenv ethact SCC ETHERNET | 3035 | => setenv ethact SCC ETHERNET |
3041 | => ping 10.0.0.1 # traffic sent on SCC ETHERNET | 3036 | => ping 10.0.0.1 # traffic sent on SCC ETHERNET |
3042 | 3037 | ||
3043 | ethrotate - When set to "no" U-Boot does not go through all | 3038 | ethrotate - When set to "no" U-Boot does not go through all |
3044 | available network interfaces. | 3039 | available network interfaces. |
3045 | It just stays at the currently selected interface. | 3040 | It just stays at the currently selected interface. |
3046 | 3041 | ||
3047 | netretry - When set to "no" each network operation will | 3042 | netretry - When set to "no" each network operation will |
3048 | either succeed or fail without retrying. | 3043 | either succeed or fail without retrying. |
3049 | When set to "once" the network operation will | 3044 | When set to "once" the network operation will |
3050 | fail when all the available network interfaces | 3045 | fail when all the available network interfaces |
3051 | are tried once without success. | 3046 | are tried once without success. |
3052 | Useful on scripts which control the retry operation | 3047 | Useful on scripts which control the retry operation |
3053 | themselves. | 3048 | themselves. |
3054 | 3049 | ||
3055 | npe_ucode - set load address for the NPE microcode | 3050 | npe_ucode - set load address for the NPE microcode |
3056 | 3051 | ||
3057 | tftpsrcport - If this is set, the value is used for TFTP's | 3052 | tftpsrcport - If this is set, the value is used for TFTP's |
3058 | UDP source port. | 3053 | UDP source port. |
3059 | 3054 | ||
3060 | tftpdstport - If this is set, the value is used for TFTP's UDP | 3055 | tftpdstport - If this is set, the value is used for TFTP's UDP |
3061 | destination port instead of the Well Know Port 69. | 3056 | destination port instead of the Well Know Port 69. |
3062 | 3057 | ||
3063 | vlan - When set to a value < 4095 the traffic over | 3058 | vlan - When set to a value < 4095 the traffic over |
3064 | Ethernet is encapsulated/received over 802.1q | 3059 | Ethernet is encapsulated/received over 802.1q |
3065 | VLAN tagged frames. | 3060 | VLAN tagged frames. |
3066 | 3061 | ||
3067 | The following environment variables may be used and automatically | 3062 | The following environment variables may be used and automatically |
3068 | updated by the network boot commands ("bootp" and "rarpboot"), | 3063 | updated by the network boot commands ("bootp" and "rarpboot"), |
3069 | depending the information provided by your boot server: | 3064 | depending the information provided by your boot server: |
3070 | 3065 | ||
3071 | bootfile - see above | 3066 | bootfile - see above |
3072 | dnsip - IP address of your Domain Name Server | 3067 | dnsip - IP address of your Domain Name Server |
3073 | dnsip2 - IP address of your secondary Domain Name Server | 3068 | dnsip2 - IP address of your secondary Domain Name Server |
3074 | gatewayip - IP address of the Gateway (Router) to use | 3069 | gatewayip - IP address of the Gateway (Router) to use |
3075 | hostname - Target hostname | 3070 | hostname - Target hostname |
3076 | ipaddr - see above | 3071 | ipaddr - see above |
3077 | netmask - Subnet Mask | 3072 | netmask - Subnet Mask |
3078 | rootpath - Pathname of the root filesystem on the NFS server | 3073 | rootpath - Pathname of the root filesystem on the NFS server |
3079 | serverip - see above | 3074 | serverip - see above |
3080 | 3075 | ||
3081 | 3076 | ||
3082 | There are two special Environment Variables: | 3077 | There are two special Environment Variables: |
3083 | 3078 | ||
3084 | serial# - contains hardware identification information such | 3079 | serial# - contains hardware identification information such |
3085 | as type string and/or serial number | 3080 | as type string and/or serial number |
3086 | ethaddr - Ethernet address | 3081 | ethaddr - Ethernet address |
3087 | 3082 | ||
3088 | These variables can be set only once (usually during manufacturing of | 3083 | These variables can be set only once (usually during manufacturing of |
3089 | the board). U-Boot refuses to delete or overwrite these variables | 3084 | the board). U-Boot refuses to delete or overwrite these variables |
3090 | once they have been set once. | 3085 | once they have been set once. |
3091 | 3086 | ||
3092 | 3087 | ||
3093 | Further special Environment Variables: | 3088 | Further special Environment Variables: |
3094 | 3089 | ||
3095 | ver - Contains the U-Boot version string as printed | 3090 | ver - Contains the U-Boot version string as printed |
3096 | with the "version" command. This variable is | 3091 | with the "version" command. This variable is |
3097 | readonly (see CONFIG_VERSION_VARIABLE). | 3092 | readonly (see CONFIG_VERSION_VARIABLE). |
3098 | 3093 | ||
3099 | 3094 | ||
3100 | Please note that changes to some configuration parameters may take | 3095 | Please note that changes to some configuration parameters may take |
3101 | only effect after the next boot (yes, that's just like Windoze :-). | 3096 | only effect after the next boot (yes, that's just like Windoze :-). |
3102 | 3097 | ||
3103 | 3098 | ||
3104 | Command Line Parsing: | 3099 | Command Line Parsing: |
3105 | ===================== | 3100 | ===================== |
3106 | 3101 | ||
3107 | There are two different command line parsers available with U-Boot: | 3102 | There are two different command line parsers available with U-Boot: |
3108 | the old "simple" one, and the much more powerful "hush" shell: | 3103 | the old "simple" one, and the much more powerful "hush" shell: |
3109 | 3104 | ||
3110 | Old, simple command line parser: | 3105 | Old, simple command line parser: |
3111 | -------------------------------- | 3106 | -------------------------------- |
3112 | 3107 | ||
3113 | - supports environment variables (through setenv / saveenv commands) | 3108 | - supports environment variables (through setenv / saveenv commands) |
3114 | - several commands on one line, separated by ';' | 3109 | - several commands on one line, separated by ';' |
3115 | - variable substitution using "... ${name} ..." syntax | 3110 | - variable substitution using "... ${name} ..." syntax |
3116 | - special characters ('$', ';') can be escaped by prefixing with '\', | 3111 | - special characters ('$', ';') can be escaped by prefixing with '\', |
3117 | for example: | 3112 | for example: |
3118 | setenv bootcmd bootm \${address} | 3113 | setenv bootcmd bootm \${address} |
3119 | - You can also escape text by enclosing in single apostrophes, for example: | 3114 | - You can also escape text by enclosing in single apostrophes, for example: |
3120 | setenv addip 'setenv bootargs $bootargs ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname::off' | 3115 | setenv addip 'setenv bootargs $bootargs ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname::off' |
3121 | 3116 | ||
3122 | Hush shell: | 3117 | Hush shell: |
3123 | ----------- | 3118 | ----------- |
3124 | 3119 | ||
3125 | - similar to Bourne shell, with control structures like | 3120 | - similar to Bourne shell, with control structures like |
3126 | if...then...else...fi, for...do...done; while...do...done, | 3121 | if...then...else...fi, for...do...done; while...do...done, |
3127 | until...do...done, ... | 3122 | until...do...done, ... |
3128 | - supports environment ("global") variables (through setenv / saveenv | 3123 | - supports environment ("global") variables (through setenv / saveenv |
3129 | commands) and local shell variables (through standard shell syntax | 3124 | commands) and local shell variables (through standard shell syntax |
3130 | "name=value"); only environment variables can be used with "run" | 3125 | "name=value"); only environment variables can be used with "run" |
3131 | command | 3126 | command |
3132 | 3127 | ||
3133 | General rules: | 3128 | General rules: |
3134 | -------------- | 3129 | -------------- |
3135 | 3130 | ||
3136 | (1) If a command line (or an environment variable executed by a "run" | 3131 | (1) If a command line (or an environment variable executed by a "run" |
3137 | command) contains several commands separated by semicolon, and | 3132 | command) contains several commands separated by semicolon, and |
3138 | one of these commands fails, then the remaining commands will be | 3133 | one of these commands fails, then the remaining commands will be |
3139 | executed anyway. | 3134 | executed anyway. |
3140 | 3135 | ||
3141 | (2) If you execute several variables with one call to run (i. e. | 3136 | (2) If you execute several variables with one call to run (i. e. |
3142 | calling run with a list of variables as arguments), any failing | 3137 | calling run with a list of variables as arguments), any failing |
3143 | command will cause "run" to terminate, i. e. the remaining | 3138 | command will cause "run" to terminate, i. e. the remaining |
3144 | variables are not executed. | 3139 | variables are not executed. |
3145 | 3140 | ||
3146 | Note for Redundant Ethernet Interfaces: | 3141 | Note for Redundant Ethernet Interfaces: |
3147 | ======================================= | 3142 | ======================================= |
3148 | 3143 | ||
3149 | Some boards come with redundant Ethernet interfaces; U-Boot supports | 3144 | Some boards come with redundant Ethernet interfaces; U-Boot supports |
3150 | such configurations and is capable of automatic selection of a | 3145 | such configurations and is capable of automatic selection of a |
3151 | "working" interface when needed. MAC assignment works as follows: | 3146 | "working" interface when needed. MAC assignment works as follows: |
3152 | 3147 | ||
3153 | Network interfaces are numbered eth0, eth1, eth2, ... Corresponding | 3148 | Network interfaces are numbered eth0, eth1, eth2, ... Corresponding |
3154 | MAC addresses can be stored in the environment as "ethaddr" (=>eth0), | 3149 | MAC addresses can be stored in the environment as "ethaddr" (=>eth0), |
3155 | "eth1addr" (=>eth1), "eth2addr", ... | 3150 | "eth1addr" (=>eth1), "eth2addr", ... |
3156 | 3151 | ||
3157 | If the network interface stores some valid MAC address (for instance | 3152 | If the network interface stores some valid MAC address (for instance |
3158 | in SROM), this is used as default address if there is NO correspon- | 3153 | in SROM), this is used as default address if there is NO correspon- |
3159 | ding setting in the environment; if the corresponding environment | 3154 | ding setting in the environment; if the corresponding environment |
3160 | variable is set, this overrides the settings in the card; that means: | 3155 | variable is set, this overrides the settings in the card; that means: |
3161 | 3156 | ||
3162 | o If the SROM has a valid MAC address, and there is no address in the | 3157 | o If the SROM has a valid MAC address, and there is no address in the |
3163 | environment, the SROM's address is used. | 3158 | environment, the SROM's address is used. |
3164 | 3159 | ||
3165 | o If there is no valid address in the SROM, and a definition in the | 3160 | o If there is no valid address in the SROM, and a definition in the |
3166 | environment exists, then the value from the environment variable is | 3161 | environment exists, then the value from the environment variable is |
3167 | used. | 3162 | used. |
3168 | 3163 | ||
3169 | o If both the SROM and the environment contain a MAC address, and | 3164 | o If both the SROM and the environment contain a MAC address, and |
3170 | both addresses are the same, this MAC address is used. | 3165 | both addresses are the same, this MAC address is used. |
3171 | 3166 | ||
3172 | o If both the SROM and the environment contain a MAC address, and the | 3167 | o If both the SROM and the environment contain a MAC address, and the |
3173 | addresses differ, the value from the environment is used and a | 3168 | addresses differ, the value from the environment is used and a |
3174 | warning is printed. | 3169 | warning is printed. |
3175 | 3170 | ||
3176 | o If neither SROM nor the environment contain a MAC address, an error | 3171 | o If neither SROM nor the environment contain a MAC address, an error |
3177 | is raised. | 3172 | is raised. |
3178 | 3173 | ||
3179 | 3174 | ||
3180 | Image Formats: | 3175 | Image Formats: |
3181 | ============== | 3176 | ============== |
3182 | 3177 | ||
3183 | U-Boot is capable of booting (and performing other auxiliary operations on) | 3178 | U-Boot is capable of booting (and performing other auxiliary operations on) |
3184 | images in two formats: | 3179 | images in two formats: |
3185 | 3180 | ||
3186 | New uImage format (FIT) | 3181 | New uImage format (FIT) |
3187 | ----------------------- | 3182 | ----------------------- |
3188 | 3183 | ||
3189 | Flexible and powerful format based on Flattened Image Tree -- FIT (similar | 3184 | Flexible and powerful format based on Flattened Image Tree -- FIT (similar |
3190 | to Flattened Device Tree). It allows the use of images with multiple | 3185 | to Flattened Device Tree). It allows the use of images with multiple |
3191 | components (several kernels, ramdisks, etc.), with contents protected by | 3186 | components (several kernels, ramdisks, etc.), with contents protected by |
3192 | SHA1, MD5 or CRC32. More details are found in the doc/uImage.FIT directory. | 3187 | SHA1, MD5 or CRC32. More details are found in the doc/uImage.FIT directory. |
3193 | 3188 | ||
3194 | 3189 | ||
3195 | Old uImage format | 3190 | Old uImage format |
3196 | ----------------- | 3191 | ----------------- |
3197 | 3192 | ||
3198 | Old image format is based on binary files which can be basically anything, | 3193 | Old image format is based on binary files which can be basically anything, |
3199 | preceded by a special header; see the definitions in include/image.h for | 3194 | preceded by a special header; see the definitions in include/image.h for |
3200 | details; basically, the header defines the following image properties: | 3195 | details; basically, the header defines the following image properties: |
3201 | 3196 | ||
3202 | * Target Operating System (Provisions for OpenBSD, NetBSD, FreeBSD, | 3197 | * Target Operating System (Provisions for OpenBSD, NetBSD, FreeBSD, |
3203 | 4.4BSD, Linux, SVR4, Esix, Solaris, Irix, SCO, Dell, NCR, VxWorks, | 3198 | 4.4BSD, Linux, SVR4, Esix, Solaris, Irix, SCO, Dell, NCR, VxWorks, |
3204 | LynxOS, pSOS, QNX, RTEMS, INTEGRITY; | 3199 | LynxOS, pSOS, QNX, RTEMS, INTEGRITY; |
3205 | Currently supported: Linux, NetBSD, VxWorks, QNX, RTEMS, LynxOS, | 3200 | Currently supported: Linux, NetBSD, VxWorks, QNX, RTEMS, LynxOS, |
3206 | INTEGRITY). | 3201 | INTEGRITY). |
3207 | * Target CPU Architecture (Provisions for Alpha, ARM, AVR32, Intel x86, | 3202 | * Target CPU Architecture (Provisions for Alpha, ARM, AVR32, Intel x86, |
3208 | IA64, MIPS, NIOS, PowerPC, IBM S390, SuperH, Sparc, Sparc 64 Bit; | 3203 | IA64, MIPS, NIOS, PowerPC, IBM S390, SuperH, Sparc, Sparc 64 Bit; |
3209 | Currently supported: ARM, AVR32, Intel x86, MIPS, NIOS, PowerPC). | 3204 | Currently supported: ARM, AVR32, Intel x86, MIPS, NIOS, PowerPC). |
3210 | * Compression Type (uncompressed, gzip, bzip2) | 3205 | * Compression Type (uncompressed, gzip, bzip2) |
3211 | * Load Address | 3206 | * Load Address |
3212 | * Entry Point | 3207 | * Entry Point |
3213 | * Image Name | 3208 | * Image Name |
3214 | * Image Timestamp | 3209 | * Image Timestamp |
3215 | 3210 | ||
3216 | The header is marked by a special Magic Number, and both the header | 3211 | The header is marked by a special Magic Number, and both the header |
3217 | and the data portions of the image are secured against corruption by | 3212 | and the data portions of the image are secured against corruption by |
3218 | CRC32 checksums. | 3213 | CRC32 checksums. |
3219 | 3214 | ||
3220 | 3215 | ||
3221 | Linux Support: | 3216 | Linux Support: |
3222 | ============== | 3217 | ============== |
3223 | 3218 | ||
3224 | Although U-Boot should support any OS or standalone application | 3219 | Although U-Boot should support any OS or standalone application |
3225 | easily, the main focus has always been on Linux during the design of | 3220 | easily, the main focus has always been on Linux during the design of |
3226 | U-Boot. | 3221 | U-Boot. |
3227 | 3222 | ||
3228 | U-Boot includes many features that so far have been part of some | 3223 | U-Boot includes many features that so far have been part of some |
3229 | special "boot loader" code within the Linux kernel. Also, any | 3224 | special "boot loader" code within the Linux kernel. Also, any |
3230 | "initrd" images to be used are no longer part of one big Linux image; | 3225 | "initrd" images to be used are no longer part of one big Linux image; |
3231 | instead, kernel and "initrd" are separate images. This implementation | 3226 | instead, kernel and "initrd" are separate images. This implementation |
3232 | serves several purposes: | 3227 | serves several purposes: |
3233 | 3228 | ||
3234 | - the same features can be used for other OS or standalone | 3229 | - the same features can be used for other OS or standalone |
3235 | applications (for instance: using compressed images to reduce the | 3230 | applications (for instance: using compressed images to reduce the |
3236 | Flash memory footprint) | 3231 | Flash memory footprint) |
3237 | 3232 | ||
3238 | - it becomes much easier to port new Linux kernel versions because | 3233 | - it becomes much easier to port new Linux kernel versions because |
3239 | lots of low-level, hardware dependent stuff are done by U-Boot | 3234 | lots of low-level, hardware dependent stuff are done by U-Boot |
3240 | 3235 | ||
3241 | - the same Linux kernel image can now be used with different "initrd" | 3236 | - the same Linux kernel image can now be used with different "initrd" |
3242 | images; of course this also means that different kernel images can | 3237 | images; of course this also means that different kernel images can |
3243 | be run with the same "initrd". This makes testing easier (you don't | 3238 | be run with the same "initrd". This makes testing easier (you don't |
3244 | have to build a new "zImage.initrd" Linux image when you just | 3239 | have to build a new "zImage.initrd" Linux image when you just |
3245 | change a file in your "initrd"). Also, a field-upgrade of the | 3240 | change a file in your "initrd"). Also, a field-upgrade of the |
3246 | software is easier now. | 3241 | software is easier now. |
3247 | 3242 | ||
3248 | 3243 | ||
3249 | Linux HOWTO: | 3244 | Linux HOWTO: |
3250 | ============ | 3245 | ============ |
3251 | 3246 | ||
3252 | Porting Linux to U-Boot based systems: | 3247 | Porting Linux to U-Boot based systems: |
3253 | --------------------------------------- | 3248 | --------------------------------------- |
3254 | 3249 | ||
3255 | U-Boot cannot save you from doing all the necessary modifications to | 3250 | U-Boot cannot save you from doing all the necessary modifications to |
3256 | configure the Linux device drivers for use with your target hardware | 3251 | configure the Linux device drivers for use with your target hardware |
3257 | (no, we don't intend to provide a full virtual machine interface to | 3252 | (no, we don't intend to provide a full virtual machine interface to |
3258 | Linux :-). | 3253 | Linux :-). |
3259 | 3254 | ||
3260 | But now you can ignore ALL boot loader code (in arch/ppc/mbxboot). | 3255 | But now you can ignore ALL boot loader code (in arch/ppc/mbxboot). |
3261 | 3256 | ||
3262 | Just make sure your machine specific header file (for instance | 3257 | Just make sure your machine specific header file (for instance |
3263 | include/asm-ppc/tqm8xx.h) includes the same definition of the Board | 3258 | include/asm-ppc/tqm8xx.h) includes the same definition of the Board |
3264 | Information structure as we define in include/asm-<arch>/u-boot.h, | 3259 | Information structure as we define in include/asm-<arch>/u-boot.h, |
3265 | and make sure that your definition of IMAP_ADDR uses the same value | 3260 | and make sure that your definition of IMAP_ADDR uses the same value |
3266 | as your U-Boot configuration in CONFIG_SYS_IMMR. | 3261 | as your U-Boot configuration in CONFIG_SYS_IMMR. |
3267 | 3262 | ||
3268 | 3263 | ||
3269 | Configuring the Linux kernel: | 3264 | Configuring the Linux kernel: |
3270 | ----------------------------- | 3265 | ----------------------------- |
3271 | 3266 | ||
3272 | No specific requirements for U-Boot. Make sure you have some root | 3267 | No specific requirements for U-Boot. Make sure you have some root |
3273 | device (initial ramdisk, NFS) for your target system. | 3268 | device (initial ramdisk, NFS) for your target system. |
3274 | 3269 | ||
3275 | 3270 | ||
3276 | Building a Linux Image: | 3271 | Building a Linux Image: |
3277 | ----------------------- | 3272 | ----------------------- |
3278 | 3273 | ||
3279 | With U-Boot, "normal" build targets like "zImage" or "bzImage" are | 3274 | With U-Boot, "normal" build targets like "zImage" or "bzImage" are |
3280 | not used. If you use recent kernel source, a new build target | 3275 | not used. If you use recent kernel source, a new build target |
3281 | "uImage" will exist which automatically builds an image usable by | 3276 | "uImage" will exist which automatically builds an image usable by |
3282 | U-Boot. Most older kernels also have support for a "pImage" target, | 3277 | U-Boot. Most older kernels also have support for a "pImage" target, |
3283 | which was introduced for our predecessor project PPCBoot and uses a | 3278 | which was introduced for our predecessor project PPCBoot and uses a |
3284 | 100% compatible format. | 3279 | 100% compatible format. |
3285 | 3280 | ||
3286 | Example: | 3281 | Example: |
3287 | 3282 | ||
3288 | make TQM850L_config | 3283 | make TQM850L_config |
3289 | make oldconfig | 3284 | make oldconfig |
3290 | make dep | 3285 | make dep |
3291 | make uImage | 3286 | make uImage |
3292 | 3287 | ||
3293 | The "uImage" build target uses a special tool (in 'tools/mkimage') to | 3288 | The "uImage" build target uses a special tool (in 'tools/mkimage') to |
3294 | encapsulate a compressed Linux kernel image with header information, | 3289 | encapsulate a compressed Linux kernel image with header information, |
3295 | CRC32 checksum etc. for use with U-Boot. This is what we are doing: | 3290 | CRC32 checksum etc. for use with U-Boot. This is what we are doing: |
3296 | 3291 | ||
3297 | * build a standard "vmlinux" kernel image (in ELF binary format): | 3292 | * build a standard "vmlinux" kernel image (in ELF binary format): |
3298 | 3293 | ||
3299 | * convert the kernel into a raw binary image: | 3294 | * convert the kernel into a raw binary image: |
3300 | 3295 | ||
3301 | ${CROSS_COMPILE}-objcopy -O binary \ | 3296 | ${CROSS_COMPILE}-objcopy -O binary \ |
3302 | -R .note -R .comment \ | 3297 | -R .note -R .comment \ |
3303 | -S vmlinux linux.bin | 3298 | -S vmlinux linux.bin |
3304 | 3299 | ||
3305 | * compress the binary image: | 3300 | * compress the binary image: |
3306 | 3301 | ||
3307 | gzip -9 linux.bin | 3302 | gzip -9 linux.bin |
3308 | 3303 | ||
3309 | * package compressed binary image for U-Boot: | 3304 | * package compressed binary image for U-Boot: |
3310 | 3305 | ||
3311 | mkimage -A ppc -O linux -T kernel -C gzip \ | 3306 | mkimage -A ppc -O linux -T kernel -C gzip \ |
3312 | -a 0 -e 0 -n "Linux Kernel Image" \ | 3307 | -a 0 -e 0 -n "Linux Kernel Image" \ |
3313 | -d linux.bin.gz uImage | 3308 | -d linux.bin.gz uImage |
3314 | 3309 | ||
3315 | 3310 | ||
3316 | The "mkimage" tool can also be used to create ramdisk images for use | 3311 | The "mkimage" tool can also be used to create ramdisk images for use |
3317 | with U-Boot, either separated from the Linux kernel image, or | 3312 | with U-Boot, either separated from the Linux kernel image, or |
3318 | combined into one file. "mkimage" encapsulates the images with a 64 | 3313 | combined into one file. "mkimage" encapsulates the images with a 64 |
3319 | byte header containing information about target architecture, | 3314 | byte header containing information about target architecture, |
3320 | operating system, image type, compression method, entry points, time | 3315 | operating system, image type, compression method, entry points, time |
3321 | stamp, CRC32 checksums, etc. | 3316 | stamp, CRC32 checksums, etc. |
3322 | 3317 | ||
3323 | "mkimage" can be called in two ways: to verify existing images and | 3318 | "mkimage" can be called in two ways: to verify existing images and |
3324 | print the header information, or to build new images. | 3319 | print the header information, or to build new images. |
3325 | 3320 | ||
3326 | In the first form (with "-l" option) mkimage lists the information | 3321 | In the first form (with "-l" option) mkimage lists the information |
3327 | contained in the header of an existing U-Boot image; this includes | 3322 | contained in the header of an existing U-Boot image; this includes |
3328 | checksum verification: | 3323 | checksum verification: |
3329 | 3324 | ||
3330 | tools/mkimage -l image | 3325 | tools/mkimage -l image |
3331 | -l ==> list image header information | 3326 | -l ==> list image header information |
3332 | 3327 | ||
3333 | The second form (with "-d" option) is used to build a U-Boot image | 3328 | The second form (with "-d" option) is used to build a U-Boot image |
3334 | from a "data file" which is used as image payload: | 3329 | from a "data file" which is used as image payload: |
3335 | 3330 | ||
3336 | tools/mkimage -A arch -O os -T type -C comp -a addr -e ep \ | 3331 | tools/mkimage -A arch -O os -T type -C comp -a addr -e ep \ |
3337 | -n name -d data_file image | 3332 | -n name -d data_file image |
3338 | -A ==> set architecture to 'arch' | 3333 | -A ==> set architecture to 'arch' |
3339 | -O ==> set operating system to 'os' | 3334 | -O ==> set operating system to 'os' |
3340 | -T ==> set image type to 'type' | 3335 | -T ==> set image type to 'type' |
3341 | -C ==> set compression type 'comp' | 3336 | -C ==> set compression type 'comp' |
3342 | -a ==> set load address to 'addr' (hex) | 3337 | -a ==> set load address to 'addr' (hex) |
3343 | -e ==> set entry point to 'ep' (hex) | 3338 | -e ==> set entry point to 'ep' (hex) |
3344 | -n ==> set image name to 'name' | 3339 | -n ==> set image name to 'name' |
3345 | -d ==> use image data from 'datafile' | 3340 | -d ==> use image data from 'datafile' |
3346 | 3341 | ||
3347 | Right now, all Linux kernels for PowerPC systems use the same load | 3342 | Right now, all Linux kernels for PowerPC systems use the same load |
3348 | address (0x00000000), but the entry point address depends on the | 3343 | address (0x00000000), but the entry point address depends on the |
3349 | kernel version: | 3344 | kernel version: |
3350 | 3345 | ||
3351 | - 2.2.x kernels have the entry point at 0x0000000C, | 3346 | - 2.2.x kernels have the entry point at 0x0000000C, |
3352 | - 2.3.x and later kernels have the entry point at 0x00000000. | 3347 | - 2.3.x and later kernels have the entry point at 0x00000000. |
3353 | 3348 | ||
3354 | So a typical call to build a U-Boot image would read: | 3349 | So a typical call to build a U-Boot image would read: |
3355 | 3350 | ||
3356 | -> tools/mkimage -n '2.4.4 kernel for TQM850L' \ | 3351 | -> tools/mkimage -n '2.4.4 kernel for TQM850L' \ |
3357 | > -A ppc -O linux -T kernel -C gzip -a 0 -e 0 \ | 3352 | > -A ppc -O linux -T kernel -C gzip -a 0 -e 0 \ |
3358 | > -d /opt/elsk/ppc_8xx/usr/src/linux-2.4.4/arch/ppc/coffboot/vmlinux.gz \ | 3353 | > -d /opt/elsk/ppc_8xx/usr/src/linux-2.4.4/arch/ppc/coffboot/vmlinux.gz \ |
3359 | > examples/uImage.TQM850L | 3354 | > examples/uImage.TQM850L |
3360 | Image Name: 2.4.4 kernel for TQM850L | 3355 | Image Name: 2.4.4 kernel for TQM850L |
3361 | Created: Wed Jul 19 02:34:59 2000 | 3356 | Created: Wed Jul 19 02:34:59 2000 |
3362 | Image Type: PowerPC Linux Kernel Image (gzip compressed) | 3357 | Image Type: PowerPC Linux Kernel Image (gzip compressed) |
3363 | Data Size: 335725 Bytes = 327.86 kB = 0.32 MB | 3358 | Data Size: 335725 Bytes = 327.86 kB = 0.32 MB |
3364 | Load Address: 0x00000000 | 3359 | Load Address: 0x00000000 |
3365 | Entry Point: 0x00000000 | 3360 | Entry Point: 0x00000000 |
3366 | 3361 | ||
3367 | To verify the contents of the image (or check for corruption): | 3362 | To verify the contents of the image (or check for corruption): |
3368 | 3363 | ||
3369 | -> tools/mkimage -l examples/uImage.TQM850L | 3364 | -> tools/mkimage -l examples/uImage.TQM850L |
3370 | Image Name: 2.4.4 kernel for TQM850L | 3365 | Image Name: 2.4.4 kernel for TQM850L |
3371 | Created: Wed Jul 19 02:34:59 2000 | 3366 | Created: Wed Jul 19 02:34:59 2000 |
3372 | Image Type: PowerPC Linux Kernel Image (gzip compressed) | 3367 | Image Type: PowerPC Linux Kernel Image (gzip compressed) |
3373 | Data Size: 335725 Bytes = 327.86 kB = 0.32 MB | 3368 | Data Size: 335725 Bytes = 327.86 kB = 0.32 MB |
3374 | Load Address: 0x00000000 | 3369 | Load Address: 0x00000000 |
3375 | Entry Point: 0x00000000 | 3370 | Entry Point: 0x00000000 |
3376 | 3371 | ||
3377 | NOTE: for embedded systems where boot time is critical you can trade | 3372 | NOTE: for embedded systems where boot time is critical you can trade |
3378 | speed for memory and install an UNCOMPRESSED image instead: this | 3373 | speed for memory and install an UNCOMPRESSED image instead: this |
3379 | needs more space in Flash, but boots much faster since it does not | 3374 | needs more space in Flash, but boots much faster since it does not |
3380 | need to be uncompressed: | 3375 | need to be uncompressed: |
3381 | 3376 | ||
3382 | -> gunzip /opt/elsk/ppc_8xx/usr/src/linux-2.4.4/arch/ppc/coffboot/vmlinux.gz | 3377 | -> gunzip /opt/elsk/ppc_8xx/usr/src/linux-2.4.4/arch/ppc/coffboot/vmlinux.gz |
3383 | -> tools/mkimage -n '2.4.4 kernel for TQM850L' \ | 3378 | -> tools/mkimage -n '2.4.4 kernel for TQM850L' \ |
3384 | > -A ppc -O linux -T kernel -C none -a 0 -e 0 \ | 3379 | > -A ppc -O linux -T kernel -C none -a 0 -e 0 \ |
3385 | > -d /opt/elsk/ppc_8xx/usr/src/linux-2.4.4/arch/ppc/coffboot/vmlinux \ | 3380 | > -d /opt/elsk/ppc_8xx/usr/src/linux-2.4.4/arch/ppc/coffboot/vmlinux \ |
3386 | > examples/uImage.TQM850L-uncompressed | 3381 | > examples/uImage.TQM850L-uncompressed |
3387 | Image Name: 2.4.4 kernel for TQM850L | 3382 | Image Name: 2.4.4 kernel for TQM850L |
3388 | Created: Wed Jul 19 02:34:59 2000 | 3383 | Created: Wed Jul 19 02:34:59 2000 |
3389 | Image Type: PowerPC Linux Kernel Image (uncompressed) | 3384 | Image Type: PowerPC Linux Kernel Image (uncompressed) |
3390 | Data Size: 792160 Bytes = 773.59 kB = 0.76 MB | 3385 | Data Size: 792160 Bytes = 773.59 kB = 0.76 MB |
3391 | Load Address: 0x00000000 | 3386 | Load Address: 0x00000000 |
3392 | Entry Point: 0x00000000 | 3387 | Entry Point: 0x00000000 |
3393 | 3388 | ||
3394 | 3389 | ||
3395 | Similar you can build U-Boot images from a 'ramdisk.image.gz' file | 3390 | Similar you can build U-Boot images from a 'ramdisk.image.gz' file |
3396 | when your kernel is intended to use an initial ramdisk: | 3391 | when your kernel is intended to use an initial ramdisk: |
3397 | 3392 | ||
3398 | -> tools/mkimage -n 'Simple Ramdisk Image' \ | 3393 | -> tools/mkimage -n 'Simple Ramdisk Image' \ |
3399 | > -A ppc -O linux -T ramdisk -C gzip \ | 3394 | > -A ppc -O linux -T ramdisk -C gzip \ |
3400 | > -d /LinuxPPC/images/SIMPLE-ramdisk.image.gz examples/simple-initrd | 3395 | > -d /LinuxPPC/images/SIMPLE-ramdisk.image.gz examples/simple-initrd |
3401 | Image Name: Simple Ramdisk Image | 3396 | Image Name: Simple Ramdisk Image |
3402 | Created: Wed Jan 12 14:01:50 2000 | 3397 | Created: Wed Jan 12 14:01:50 2000 |
3403 | Image Type: PowerPC Linux RAMDisk Image (gzip compressed) | 3398 | Image Type: PowerPC Linux RAMDisk Image (gzip compressed) |
3404 | Data Size: 566530 Bytes = 553.25 kB = 0.54 MB | 3399 | Data Size: 566530 Bytes = 553.25 kB = 0.54 MB |
3405 | Load Address: 0x00000000 | 3400 | Load Address: 0x00000000 |
3406 | Entry Point: 0x00000000 | 3401 | Entry Point: 0x00000000 |
3407 | 3402 | ||
3408 | 3403 | ||
3409 | Installing a Linux Image: | 3404 | Installing a Linux Image: |
3410 | ------------------------- | 3405 | ------------------------- |
3411 | 3406 | ||
3412 | To downloading a U-Boot image over the serial (console) interface, | 3407 | To downloading a U-Boot image over the serial (console) interface, |
3413 | you must convert the image to S-Record format: | 3408 | you must convert the image to S-Record format: |
3414 | 3409 | ||
3415 | objcopy -I binary -O srec examples/image examples/image.srec | 3410 | objcopy -I binary -O srec examples/image examples/image.srec |
3416 | 3411 | ||
3417 | The 'objcopy' does not understand the information in the U-Boot | 3412 | The 'objcopy' does not understand the information in the U-Boot |
3418 | image header, so the resulting S-Record file will be relative to | 3413 | image header, so the resulting S-Record file will be relative to |
3419 | address 0x00000000. To load it to a given address, you need to | 3414 | address 0x00000000. To load it to a given address, you need to |
3420 | specify the target address as 'offset' parameter with the 'loads' | 3415 | specify the target address as 'offset' parameter with the 'loads' |
3421 | command. | 3416 | command. |
3422 | 3417 | ||
3423 | Example: install the image to address 0x40100000 (which on the | 3418 | Example: install the image to address 0x40100000 (which on the |
3424 | TQM8xxL is in the first Flash bank): | 3419 | TQM8xxL is in the first Flash bank): |
3425 | 3420 | ||
3426 | => erase 40100000 401FFFFF | 3421 | => erase 40100000 401FFFFF |
3427 | 3422 | ||
3428 | .......... done | 3423 | .......... done |
3429 | Erased 8 sectors | 3424 | Erased 8 sectors |
3430 | 3425 | ||
3431 | => loads 40100000 | 3426 | => loads 40100000 |
3432 | ## Ready for S-Record download ... | 3427 | ## Ready for S-Record download ... |
3433 | ~>examples/image.srec | 3428 | ~>examples/image.srec |
3434 | 1 2 3 4 5 6 7 8 9 10 11 12 13 ... | 3429 | 1 2 3 4 5 6 7 8 9 10 11 12 13 ... |
3435 | ... | 3430 | ... |
3436 | 15989 15990 15991 15992 | 3431 | 15989 15990 15991 15992 |
3437 | [file transfer complete] | 3432 | [file transfer complete] |
3438 | [connected] | 3433 | [connected] |
3439 | ## Start Addr = 0x00000000 | 3434 | ## Start Addr = 0x00000000 |
3440 | 3435 | ||
3441 | 3436 | ||
3442 | You can check the success of the download using the 'iminfo' command; | 3437 | You can check the success of the download using the 'iminfo' command; |
3443 | this includes a checksum verification so you can be sure no data | 3438 | this includes a checksum verification so you can be sure no data |
3444 | corruption happened: | 3439 | corruption happened: |
3445 | 3440 | ||
3446 | => imi 40100000 | 3441 | => imi 40100000 |
3447 | 3442 | ||
3448 | ## Checking Image at 40100000 ... | 3443 | ## Checking Image at 40100000 ... |
3449 | Image Name: 2.2.13 for initrd on TQM850L | 3444 | Image Name: 2.2.13 for initrd on TQM850L |
3450 | Image Type: PowerPC Linux Kernel Image (gzip compressed) | 3445 | Image Type: PowerPC Linux Kernel Image (gzip compressed) |
3451 | Data Size: 335725 Bytes = 327 kB = 0 MB | 3446 | Data Size: 335725 Bytes = 327 kB = 0 MB |
3452 | Load Address: 00000000 | 3447 | Load Address: 00000000 |
3453 | Entry Point: 0000000c | 3448 | Entry Point: 0000000c |
3454 | Verifying Checksum ... OK | 3449 | Verifying Checksum ... OK |
3455 | 3450 | ||
3456 | 3451 | ||
3457 | Boot Linux: | 3452 | Boot Linux: |
3458 | ----------- | 3453 | ----------- |
3459 | 3454 | ||
3460 | The "bootm" command is used to boot an application that is stored in | 3455 | The "bootm" command is used to boot an application that is stored in |
3461 | memory (RAM or Flash). In case of a Linux kernel image, the contents | 3456 | memory (RAM or Flash). In case of a Linux kernel image, the contents |
3462 | of the "bootargs" environment variable is passed to the kernel as | 3457 | of the "bootargs" environment variable is passed to the kernel as |
3463 | parameters. You can check and modify this variable using the | 3458 | parameters. You can check and modify this variable using the |
3464 | "printenv" and "setenv" commands: | 3459 | "printenv" and "setenv" commands: |
3465 | 3460 | ||
3466 | 3461 | ||
3467 | => printenv bootargs | 3462 | => printenv bootargs |
3468 | bootargs=root=/dev/ram | 3463 | bootargs=root=/dev/ram |
3469 | 3464 | ||
3470 | => setenv bootargs root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2 | 3465 | => setenv bootargs root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2 |
3471 | 3466 | ||
3472 | => printenv bootargs | 3467 | => printenv bootargs |
3473 | bootargs=root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2 | 3468 | bootargs=root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2 |
3474 | 3469 | ||
3475 | => bootm 40020000 | 3470 | => bootm 40020000 |
3476 | ## Booting Linux kernel at 40020000 ... | 3471 | ## Booting Linux kernel at 40020000 ... |
3477 | Image Name: 2.2.13 for NFS on TQM850L | 3472 | Image Name: 2.2.13 for NFS on TQM850L |
3478 | Image Type: PowerPC Linux Kernel Image (gzip compressed) | 3473 | Image Type: PowerPC Linux Kernel Image (gzip compressed) |
3479 | Data Size: 381681 Bytes = 372 kB = 0 MB | 3474 | Data Size: 381681 Bytes = 372 kB = 0 MB |
3480 | Load Address: 00000000 | 3475 | Load Address: 00000000 |
3481 | Entry Point: 0000000c | 3476 | Entry Point: 0000000c |
3482 | Verifying Checksum ... OK | 3477 | Verifying Checksum ... OK |
3483 | Uncompressing Kernel Image ... OK | 3478 | Uncompressing Kernel Image ... OK |
3484 | 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 | 3479 | 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 |
3485 | Boot arguments: root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2 | 3480 | Boot arguments: root=/dev/nfs rw nfsroot=10.0.0.2:/LinuxPPC nfsaddrs=10.0.0.99:10.0.0.2 |
3486 | time_init: decrementer frequency = 187500000/60 | 3481 | time_init: decrementer frequency = 187500000/60 |
3487 | Calibrating delay loop... 49.77 BogoMIPS | 3482 | Calibrating delay loop... 49.77 BogoMIPS |
3488 | Memory: 15208k available (700k kernel code, 444k data, 32k init) [c0000000,c1000000] | 3483 | Memory: 15208k available (700k kernel code, 444k data, 32k init) [c0000000,c1000000] |
3489 | ... | 3484 | ... |
3490 | 3485 | ||
3491 | If you want to boot a Linux kernel with initial RAM disk, you pass | 3486 | If you want to boot a Linux kernel with initial RAM disk, you pass |
3492 | the memory addresses of both the kernel and the initrd image (PPBCOOT | 3487 | the memory addresses of both the kernel and the initrd image (PPBCOOT |
3493 | format!) to the "bootm" command: | 3488 | format!) to the "bootm" command: |
3494 | 3489 | ||
3495 | => imi 40100000 40200000 | 3490 | => imi 40100000 40200000 |
3496 | 3491 | ||
3497 | ## Checking Image at 40100000 ... | 3492 | ## Checking Image at 40100000 ... |
3498 | Image Name: 2.2.13 for initrd on TQM850L | 3493 | Image Name: 2.2.13 for initrd on TQM850L |
3499 | Image Type: PowerPC Linux Kernel Image (gzip compressed) | 3494 | Image Type: PowerPC Linux Kernel Image (gzip compressed) |
3500 | Data Size: 335725 Bytes = 327 kB = 0 MB | 3495 | Data Size: 335725 Bytes = 327 kB = 0 MB |
3501 | Load Address: 00000000 | 3496 | Load Address: 00000000 |
3502 | Entry Point: 0000000c | 3497 | Entry Point: 0000000c |
3503 | Verifying Checksum ... OK | 3498 | Verifying Checksum ... OK |
3504 | 3499 | ||
3505 | ## Checking Image at 40200000 ... | 3500 | ## Checking Image at 40200000 ... |
3506 | Image Name: Simple Ramdisk Image | 3501 | Image Name: Simple Ramdisk Image |
3507 | Image Type: PowerPC Linux RAMDisk Image (gzip compressed) | 3502 | Image Type: PowerPC Linux RAMDisk Image (gzip compressed) |
3508 | Data Size: 566530 Bytes = 553 kB = 0 MB | 3503 | Data Size: 566530 Bytes = 553 kB = 0 MB |
3509 | Load Address: 00000000 | 3504 | Load Address: 00000000 |
3510 | Entry Point: 00000000 | 3505 | Entry Point: 00000000 |
3511 | Verifying Checksum ... OK | 3506 | Verifying Checksum ... OK |
3512 | 3507 | ||
3513 | => bootm 40100000 40200000 | 3508 | => bootm 40100000 40200000 |
3514 | ## Booting Linux kernel at 40100000 ... | 3509 | ## Booting Linux kernel at 40100000 ... |
3515 | Image Name: 2.2.13 for initrd on TQM850L | 3510 | Image Name: 2.2.13 for initrd on TQM850L |
3516 | Image Type: PowerPC Linux Kernel Image (gzip compressed) | 3511 | Image Type: PowerPC Linux Kernel Image (gzip compressed) |
3517 | Data Size: 335725 Bytes = 327 kB = 0 MB | 3512 | Data Size: 335725 Bytes = 327 kB = 0 MB |
3518 | Load Address: 00000000 | 3513 | Load Address: 00000000 |
3519 | Entry Point: 0000000c | 3514 | Entry Point: 0000000c |
3520 | Verifying Checksum ... OK | 3515 | Verifying Checksum ... OK |
3521 | Uncompressing Kernel Image ... OK | 3516 | Uncompressing Kernel Image ... OK |
3522 | ## Loading RAMDisk Image at 40200000 ... | 3517 | ## Loading RAMDisk Image at 40200000 ... |
3523 | Image Name: Simple Ramdisk Image | 3518 | Image Name: Simple Ramdisk Image |
3524 | Image Type: PowerPC Linux RAMDisk Image (gzip compressed) | 3519 | Image Type: PowerPC Linux RAMDisk Image (gzip compressed) |
3525 | Data Size: 566530 Bytes = 553 kB = 0 MB | 3520 | Data Size: 566530 Bytes = 553 kB = 0 MB |
3526 | Load Address: 00000000 | 3521 | Load Address: 00000000 |
3527 | Entry Point: 00000000 | 3522 | Entry Point: 00000000 |
3528 | Verifying Checksum ... OK | 3523 | Verifying Checksum ... OK |
3529 | Loading Ramdisk ... OK | 3524 | Loading Ramdisk ... OK |
3530 | 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 | 3525 | 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 |
3531 | Boot arguments: root=/dev/ram | 3526 | Boot arguments: root=/dev/ram |
3532 | time_init: decrementer frequency = 187500000/60 | 3527 | time_init: decrementer frequency = 187500000/60 |
3533 | Calibrating delay loop... 49.77 BogoMIPS | 3528 | Calibrating delay loop... 49.77 BogoMIPS |
3534 | ... | 3529 | ... |
3535 | RAMDISK: Compressed image found at block 0 | 3530 | RAMDISK: Compressed image found at block 0 |
3536 | VFS: Mounted root (ext2 filesystem). | 3531 | VFS: Mounted root (ext2 filesystem). |
3537 | 3532 | ||
3538 | bash# | 3533 | bash# |
3539 | 3534 | ||
3540 | Boot Linux and pass a flat device tree: | 3535 | Boot Linux and pass a flat device tree: |
3541 | ----------- | 3536 | ----------- |
3542 | 3537 | ||
3543 | First, U-Boot must be compiled with the appropriate defines. See the section | 3538 | First, U-Boot must be compiled with the appropriate defines. See the section |
3544 | titled "Linux Kernel Interface" above for a more in depth explanation. The | 3539 | titled "Linux Kernel Interface" above for a more in depth explanation. The |
3545 | following is an example of how to start a kernel and pass an updated | 3540 | following is an example of how to start a kernel and pass an updated |
3546 | flat device tree: | 3541 | flat device tree: |
3547 | 3542 | ||
3548 | => print oftaddr | 3543 | => print oftaddr |
3549 | oftaddr=0x300000 | 3544 | oftaddr=0x300000 |
3550 | => print oft | 3545 | => print oft |
3551 | oft=oftrees/mpc8540ads.dtb | 3546 | oft=oftrees/mpc8540ads.dtb |
3552 | => tftp $oftaddr $oft | 3547 | => tftp $oftaddr $oft |
3553 | Speed: 1000, full duplex | 3548 | Speed: 1000, full duplex |
3554 | Using TSEC0 device | 3549 | Using TSEC0 device |
3555 | TFTP from server 192.168.1.1; our IP address is 192.168.1.101 | 3550 | TFTP from server 192.168.1.1; our IP address is 192.168.1.101 |
3556 | Filename 'oftrees/mpc8540ads.dtb'. | 3551 | Filename 'oftrees/mpc8540ads.dtb'. |
3557 | Load address: 0x300000 | 3552 | Load address: 0x300000 |
3558 | Loading: # | 3553 | Loading: # |
3559 | done | 3554 | done |
3560 | Bytes transferred = 4106 (100a hex) | 3555 | Bytes transferred = 4106 (100a hex) |
3561 | => tftp $loadaddr $bootfile | 3556 | => tftp $loadaddr $bootfile |
3562 | Speed: 1000, full duplex | 3557 | Speed: 1000, full duplex |
3563 | Using TSEC0 device | 3558 | Using TSEC0 device |
3564 | TFTP from server 192.168.1.1; our IP address is 192.168.1.2 | 3559 | TFTP from server 192.168.1.1; our IP address is 192.168.1.2 |
3565 | Filename 'uImage'. | 3560 | Filename 'uImage'. |
3566 | Load address: 0x200000 | 3561 | Load address: 0x200000 |
3567 | Loading:############ | 3562 | Loading:############ |
3568 | done | 3563 | done |
3569 | Bytes transferred = 1029407 (fb51f hex) | 3564 | Bytes transferred = 1029407 (fb51f hex) |
3570 | => print loadaddr | 3565 | => print loadaddr |
3571 | loadaddr=200000 | 3566 | loadaddr=200000 |
3572 | => print oftaddr | 3567 | => print oftaddr |
3573 | oftaddr=0x300000 | 3568 | oftaddr=0x300000 |
3574 | => bootm $loadaddr - $oftaddr | 3569 | => bootm $loadaddr - $oftaddr |
3575 | ## Booting image at 00200000 ... | 3570 | ## Booting image at 00200000 ... |
3576 | Image Name: Linux-2.6.17-dirty | 3571 | Image Name: Linux-2.6.17-dirty |
3577 | Image Type: PowerPC Linux Kernel Image (gzip compressed) | 3572 | Image Type: PowerPC Linux Kernel Image (gzip compressed) |
3578 | Data Size: 1029343 Bytes = 1005.2 kB | 3573 | Data Size: 1029343 Bytes = 1005.2 kB |
3579 | Load Address: 00000000 | 3574 | Load Address: 00000000 |
3580 | Entry Point: 00000000 | 3575 | Entry Point: 00000000 |
3581 | Verifying Checksum ... OK | 3576 | Verifying Checksum ... OK |
3582 | Uncompressing Kernel Image ... OK | 3577 | Uncompressing Kernel Image ... OK |
3583 | Booting using flat device tree at 0x300000 | 3578 | Booting using flat device tree at 0x300000 |
3584 | Using MPC85xx ADS machine description | 3579 | Using MPC85xx ADS machine description |
3585 | Memory CAM mapping: CAM0=256Mb, CAM1=256Mb, CAM2=0Mb residual: 0Mb | 3580 | Memory CAM mapping: CAM0=256Mb, CAM1=256Mb, CAM2=0Mb residual: 0Mb |
3586 | [snip] | 3581 | [snip] |
3587 | 3582 | ||
3588 | 3583 | ||
3589 | More About U-Boot Image Types: | 3584 | More About U-Boot Image Types: |
3590 | ------------------------------ | 3585 | ------------------------------ |
3591 | 3586 | ||
3592 | U-Boot supports the following image types: | 3587 | U-Boot supports the following image types: |
3593 | 3588 | ||
3594 | "Standalone Programs" are directly runnable in the environment | 3589 | "Standalone Programs" are directly runnable in the environment |
3595 | provided by U-Boot; it is expected that (if they behave | 3590 | provided by U-Boot; it is expected that (if they behave |
3596 | well) you can continue to work in U-Boot after return from | 3591 | well) you can continue to work in U-Boot after return from |
3597 | the Standalone Program. | 3592 | the Standalone Program. |
3598 | "OS Kernel Images" are usually images of some Embedded OS which | 3593 | "OS Kernel Images" are usually images of some Embedded OS which |
3599 | will take over control completely. Usually these programs | 3594 | will take over control completely. Usually these programs |
3600 | will install their own set of exception handlers, device | 3595 | will install their own set of exception handlers, device |
3601 | drivers, set up the MMU, etc. - this means, that you cannot | 3596 | drivers, set up the MMU, etc. - this means, that you cannot |
3602 | expect to re-enter U-Boot except by resetting the CPU. | 3597 | expect to re-enter U-Boot except by resetting the CPU. |
3603 | "RAMDisk Images" are more or less just data blocks, and their | 3598 | "RAMDisk Images" are more or less just data blocks, and their |
3604 | parameters (address, size) are passed to an OS kernel that is | 3599 | parameters (address, size) are passed to an OS kernel that is |
3605 | being started. | 3600 | being started. |
3606 | "Multi-File Images" contain several images, typically an OS | 3601 | "Multi-File Images" contain several images, typically an OS |
3607 | (Linux) kernel image and one or more data images like | 3602 | (Linux) kernel image and one or more data images like |
3608 | RAMDisks. This construct is useful for instance when you want | 3603 | RAMDisks. This construct is useful for instance when you want |
3609 | to boot over the network using BOOTP etc., where the boot | 3604 | to boot over the network using BOOTP etc., where the boot |
3610 | server provides just a single image file, but you want to get | 3605 | server provides just a single image file, but you want to get |
3611 | for instance an OS kernel and a RAMDisk image. | 3606 | for instance an OS kernel and a RAMDisk image. |
3612 | 3607 | ||
3613 | "Multi-File Images" start with a list of image sizes, each | 3608 | "Multi-File Images" start with a list of image sizes, each |
3614 | image size (in bytes) specified by an "uint32_t" in network | 3609 | image size (in bytes) specified by an "uint32_t" in network |
3615 | byte order. This list is terminated by an "(uint32_t)0". | 3610 | byte order. This list is terminated by an "(uint32_t)0". |
3616 | Immediately after the terminating 0 follow the images, one by | 3611 | Immediately after the terminating 0 follow the images, one by |
3617 | one, all aligned on "uint32_t" boundaries (size rounded up to | 3612 | one, all aligned on "uint32_t" boundaries (size rounded up to |
3618 | a multiple of 4 bytes). | 3613 | a multiple of 4 bytes). |
3619 | 3614 | ||
3620 | "Firmware Images" are binary images containing firmware (like | 3615 | "Firmware Images" are binary images containing firmware (like |
3621 | U-Boot or FPGA images) which usually will be programmed to | 3616 | U-Boot or FPGA images) which usually will be programmed to |
3622 | flash memory. | 3617 | flash memory. |
3623 | 3618 | ||
3624 | "Script files" are command sequences that will be executed by | 3619 | "Script files" are command sequences that will be executed by |
3625 | U-Boot's command interpreter; this feature is especially | 3620 | U-Boot's command interpreter; this feature is especially |
3626 | useful when you configure U-Boot to use a real shell (hush) | 3621 | useful when you configure U-Boot to use a real shell (hush) |
3627 | as command interpreter. | 3622 | as command interpreter. |
3628 | 3623 | ||
3629 | 3624 | ||
3630 | Standalone HOWTO: | 3625 | Standalone HOWTO: |
3631 | ================= | 3626 | ================= |
3632 | 3627 | ||
3633 | One of the features of U-Boot is that you can dynamically load and | 3628 | One of the features of U-Boot is that you can dynamically load and |
3634 | run "standalone" applications, which can use some resources of | 3629 | run "standalone" applications, which can use some resources of |
3635 | U-Boot like console I/O functions or interrupt services. | 3630 | U-Boot like console I/O functions or interrupt services. |
3636 | 3631 | ||
3637 | Two simple examples are included with the sources: | 3632 | Two simple examples are included with the sources: |
3638 | 3633 | ||
3639 | "Hello World" Demo: | 3634 | "Hello World" Demo: |
3640 | ------------------- | 3635 | ------------------- |
3641 | 3636 | ||
3642 | 'examples/hello_world.c' contains a small "Hello World" Demo | 3637 | 'examples/hello_world.c' contains a small "Hello World" Demo |
3643 | application; it is automatically compiled when you build U-Boot. | 3638 | application; it is automatically compiled when you build U-Boot. |
3644 | It's configured to run at address 0x00040004, so you can play with it | 3639 | It's configured to run at address 0x00040004, so you can play with it |
3645 | like that: | 3640 | like that: |
3646 | 3641 | ||
3647 | => loads | 3642 | => loads |
3648 | ## Ready for S-Record download ... | 3643 | ## Ready for S-Record download ... |
3649 | ~>examples/hello_world.srec | 3644 | ~>examples/hello_world.srec |
3650 | 1 2 3 4 5 6 7 8 9 10 11 ... | 3645 | 1 2 3 4 5 6 7 8 9 10 11 ... |
3651 | [file transfer complete] | 3646 | [file transfer complete] |
3652 | [connected] | 3647 | [connected] |
3653 | ## Start Addr = 0x00040004 | 3648 | ## Start Addr = 0x00040004 |
3654 | 3649 | ||
3655 | => go 40004 Hello World! This is a test. | 3650 | => go 40004 Hello World! This is a test. |
3656 | ## Starting application at 0x00040004 ... | 3651 | ## Starting application at 0x00040004 ... |
3657 | Hello World | 3652 | Hello World |
3658 | argc = 7 | 3653 | argc = 7 |
3659 | argv[0] = "40004" | 3654 | argv[0] = "40004" |
3660 | argv[1] = "Hello" | 3655 | argv[1] = "Hello" |
3661 | argv[2] = "World!" | 3656 | argv[2] = "World!" |
3662 | argv[3] = "This" | 3657 | argv[3] = "This" |
3663 | argv[4] = "is" | 3658 | argv[4] = "is" |
3664 | argv[5] = "a" | 3659 | argv[5] = "a" |
3665 | argv[6] = "test." | 3660 | argv[6] = "test." |
3666 | argv[7] = "<NULL>" | 3661 | argv[7] = "<NULL>" |
3667 | Hit any key to exit ... | 3662 | Hit any key to exit ... |
3668 | 3663 | ||
3669 | ## Application terminated, rc = 0x0 | 3664 | ## Application terminated, rc = 0x0 |
3670 | 3665 | ||
3671 | Another example, which demonstrates how to register a CPM interrupt | 3666 | Another example, which demonstrates how to register a CPM interrupt |
3672 | handler with the U-Boot code, can be found in 'examples/timer.c'. | 3667 | handler with the U-Boot code, can be found in 'examples/timer.c'. |
3673 | Here, a CPM timer is set up to generate an interrupt every second. | 3668 | Here, a CPM timer is set up to generate an interrupt every second. |
3674 | The interrupt service routine is trivial, just printing a '.' | 3669 | The interrupt service routine is trivial, just printing a '.' |
3675 | character, but this is just a demo program. The application can be | 3670 | character, but this is just a demo program. The application can be |
3676 | controlled by the following keys: | 3671 | controlled by the following keys: |
3677 | 3672 | ||
3678 | ? - print current values og the CPM Timer registers | 3673 | ? - print current values og the CPM Timer registers |
3679 | b - enable interrupts and start timer | 3674 | b - enable interrupts and start timer |
3680 | e - stop timer and disable interrupts | 3675 | e - stop timer and disable interrupts |
3681 | q - quit application | 3676 | q - quit application |
3682 | 3677 | ||
3683 | => loads | 3678 | => loads |
3684 | ## Ready for S-Record download ... | 3679 | ## Ready for S-Record download ... |
3685 | ~>examples/timer.srec | 3680 | ~>examples/timer.srec |
3686 | 1 2 3 4 5 6 7 8 9 10 11 ... | 3681 | 1 2 3 4 5 6 7 8 9 10 11 ... |
3687 | [file transfer complete] | 3682 | [file transfer complete] |
3688 | [connected] | 3683 | [connected] |
3689 | ## Start Addr = 0x00040004 | 3684 | ## Start Addr = 0x00040004 |
3690 | 3685 | ||
3691 | => go 40004 | 3686 | => go 40004 |
3692 | ## Starting application at 0x00040004 ... | 3687 | ## Starting application at 0x00040004 ... |
3693 | TIMERS=0xfff00980 | 3688 | TIMERS=0xfff00980 |
3694 | Using timer 1 | 3689 | Using timer 1 |
3695 | tgcr @ 0xfff00980, tmr @ 0xfff00990, trr @ 0xfff00994, tcr @ 0xfff00998, tcn @ 0xfff0099c, ter @ 0xfff009b0 | 3690 | tgcr @ 0xfff00980, tmr @ 0xfff00990, trr @ 0xfff00994, tcr @ 0xfff00998, tcn @ 0xfff0099c, ter @ 0xfff009b0 |
3696 | 3691 | ||
3697 | Hit 'b': | 3692 | Hit 'b': |
3698 | [q, b, e, ?] Set interval 1000000 us | 3693 | [q, b, e, ?] Set interval 1000000 us |
3699 | Enabling timer | 3694 | Enabling timer |
3700 | Hit '?': | 3695 | Hit '?': |
3701 | [q, b, e, ?] ........ | 3696 | [q, b, e, ?] ........ |
3702 | tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0xef6, ter=0x0 | 3697 | tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0xef6, ter=0x0 |
3703 | Hit '?': | 3698 | Hit '?': |
3704 | [q, b, e, ?] . | 3699 | [q, b, e, ?] . |
3705 | tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0x2ad4, ter=0x0 | 3700 | tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0x2ad4, ter=0x0 |
3706 | Hit '?': | 3701 | Hit '?': |
3707 | [q, b, e, ?] . | 3702 | [q, b, e, ?] . |
3708 | tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0x1efc, ter=0x0 | 3703 | tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0x1efc, ter=0x0 |
3709 | Hit '?': | 3704 | Hit '?': |
3710 | [q, b, e, ?] . | 3705 | [q, b, e, ?] . |
3711 | tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0x169d, ter=0x0 | 3706 | tgcr=0x1, tmr=0xff1c, trr=0x3d09, tcr=0x0, tcn=0x169d, ter=0x0 |
3712 | Hit 'e': | 3707 | Hit 'e': |
3713 | [q, b, e, ?] ...Stopping timer | 3708 | [q, b, e, ?] ...Stopping timer |
3714 | Hit 'q': | 3709 | Hit 'q': |
3715 | [q, b, e, ?] ## Application terminated, rc = 0x0 | 3710 | [q, b, e, ?] ## Application terminated, rc = 0x0 |
3716 | 3711 | ||
3717 | 3712 | ||
3718 | Minicom warning: | 3713 | Minicom warning: |
3719 | ================ | 3714 | ================ |
3720 | 3715 | ||
3721 | Over time, many people have reported problems when trying to use the | 3716 | Over time, many people have reported problems when trying to use the |
3722 | "minicom" terminal emulation program for serial download. I (wd) | 3717 | "minicom" terminal emulation program for serial download. I (wd) |
3723 | consider minicom to be broken, and recommend not to use it. Under | 3718 | consider minicom to be broken, and recommend not to use it. Under |
3724 | Unix, I recommend to use C-Kermit for general purpose use (and | 3719 | Unix, I recommend to use C-Kermit for general purpose use (and |
3725 | especially for kermit binary protocol download ("loadb" command), and | 3720 | especially for kermit binary protocol download ("loadb" command), and |
3726 | use "cu" for S-Record download ("loads" command). | 3721 | use "cu" for S-Record download ("loads" command). |
3727 | 3722 | ||
3728 | Nevertheless, if you absolutely want to use it try adding this | 3723 | Nevertheless, if you absolutely want to use it try adding this |
3729 | configuration to your "File transfer protocols" section: | 3724 | configuration to your "File transfer protocols" section: |
3730 | 3725 | ||
3731 | Name Program Name U/D FullScr IO-Red. Multi | 3726 | Name Program Name U/D FullScr IO-Red. Multi |
3732 | X kermit /usr/bin/kermit -i -l %l -s Y U Y N N | 3727 | X kermit /usr/bin/kermit -i -l %l -s Y U Y N N |
3733 | Y kermit /usr/bin/kermit -i -l %l -r N D Y N N | 3728 | Y kermit /usr/bin/kermit -i -l %l -r N D Y N N |
3734 | 3729 | ||
3735 | 3730 | ||
3736 | NetBSD Notes: | 3731 | NetBSD Notes: |
3737 | ============= | 3732 | ============= |
3738 | 3733 | ||
3739 | Starting at version 0.9.2, U-Boot supports NetBSD both as host | 3734 | Starting at version 0.9.2, U-Boot supports NetBSD both as host |
3740 | (build U-Boot) and target system (boots NetBSD/mpc8xx). | 3735 | (build U-Boot) and target system (boots NetBSD/mpc8xx). |
3741 | 3736 | ||
3742 | Building requires a cross environment; it is known to work on | 3737 | Building requires a cross environment; it is known to work on |
3743 | NetBSD/i386 with the cross-powerpc-netbsd-1.3 package (you will also | 3738 | NetBSD/i386 with the cross-powerpc-netbsd-1.3 package (you will also |
3744 | need gmake since the Makefiles are not compatible with BSD make). | 3739 | need gmake since the Makefiles are not compatible with BSD make). |
3745 | Note that the cross-powerpc package does not install include files; | 3740 | Note that the cross-powerpc package does not install include files; |
3746 | attempting to build U-Boot will fail because <machine/ansi.h> is | 3741 | attempting to build U-Boot will fail because <machine/ansi.h> is |
3747 | missing. This file has to be installed and patched manually: | 3742 | missing. This file has to be installed and patched manually: |
3748 | 3743 | ||
3749 | # cd /usr/pkg/cross/powerpc-netbsd/include | 3744 | # cd /usr/pkg/cross/powerpc-netbsd/include |
3750 | # mkdir powerpc | 3745 | # mkdir powerpc |
3751 | # ln -s powerpc machine | 3746 | # ln -s powerpc machine |
3752 | # cp /usr/src/sys/arch/powerpc/include/ansi.h powerpc/ansi.h | 3747 | # cp /usr/src/sys/arch/powerpc/include/ansi.h powerpc/ansi.h |
3753 | # ${EDIT} powerpc/ansi.h ## must remove __va_list, _BSD_VA_LIST | 3748 | # ${EDIT} powerpc/ansi.h ## must remove __va_list, _BSD_VA_LIST |
3754 | 3749 | ||
3755 | Native builds *don't* work due to incompatibilities between native | 3750 | Native builds *don't* work due to incompatibilities between native |
3756 | and U-Boot include files. | 3751 | and U-Boot include files. |
3757 | 3752 | ||
3758 | Booting assumes that (the first part of) the image booted is a | 3753 | Booting assumes that (the first part of) the image booted is a |
3759 | stage-2 loader which in turn loads and then invokes the kernel | 3754 | stage-2 loader which in turn loads and then invokes the kernel |
3760 | proper. Loader sources will eventually appear in the NetBSD source | 3755 | proper. Loader sources will eventually appear in the NetBSD source |
3761 | tree (probably in sys/arc/mpc8xx/stand/u-boot_stage2/); in the | 3756 | tree (probably in sys/arc/mpc8xx/stand/u-boot_stage2/); in the |
3762 | meantime, see ftp://ftp.denx.de/pub/u-boot/ppcboot_stage2.tar.gz | 3757 | meantime, see ftp://ftp.denx.de/pub/u-boot/ppcboot_stage2.tar.gz |
3763 | 3758 | ||
3764 | 3759 | ||
3765 | Implementation Internals: | 3760 | Implementation Internals: |
3766 | ========================= | 3761 | ========================= |
3767 | 3762 | ||
3768 | The following is not intended to be a complete description of every | 3763 | The following is not intended to be a complete description of every |
3769 | implementation detail. However, it should help to understand the | 3764 | implementation detail. However, it should help to understand the |
3770 | inner workings of U-Boot and make it easier to port it to custom | 3765 | inner workings of U-Boot and make it easier to port it to custom |
3771 | hardware. | 3766 | hardware. |
3772 | 3767 | ||
3773 | 3768 | ||
3774 | Initial Stack, Global Data: | 3769 | Initial Stack, Global Data: |
3775 | --------------------------- | 3770 | --------------------------- |
3776 | 3771 | ||
3777 | The implementation of U-Boot is complicated by the fact that U-Boot | 3772 | The implementation of U-Boot is complicated by the fact that U-Boot |
3778 | starts running out of ROM (flash memory), usually without access to | 3773 | starts running out of ROM (flash memory), usually without access to |
3779 | system RAM (because the memory controller is not initialized yet). | 3774 | system RAM (because the memory controller is not initialized yet). |
3780 | This means that we don't have writable Data or BSS segments, and BSS | 3775 | This means that we don't have writable Data or BSS segments, and BSS |
3781 | is not initialized as zero. To be able to get a C environment working | 3776 | is not initialized as zero. To be able to get a C environment working |
3782 | at all, we have to allocate at least a minimal stack. Implementation | 3777 | at all, we have to allocate at least a minimal stack. Implementation |
3783 | options for this are defined and restricted by the CPU used: Some CPU | 3778 | options for this are defined and restricted by the CPU used: Some CPU |
3784 | models provide on-chip memory (like the IMMR area on MPC8xx and | 3779 | models provide on-chip memory (like the IMMR area on MPC8xx and |
3785 | MPC826x processors), on others (parts of) the data cache can be | 3780 | MPC826x processors), on others (parts of) the data cache can be |
3786 | locked as (mis-) used as memory, etc. | 3781 | locked as (mis-) used as memory, etc. |
3787 | 3782 | ||
3788 | Chris Hallinan posted a good summary of these issues to the | 3783 | Chris Hallinan posted a good summary of these issues to the |
3789 | U-Boot mailing list: | 3784 | U-Boot mailing list: |
3790 | 3785 | ||
3791 | Subject: RE: [U-Boot-Users] RE: More On Memory Bank x (nothingness)? | 3786 | Subject: RE: [U-Boot-Users] RE: More On Memory Bank x (nothingness)? |
3792 | From: "Chris Hallinan" <clh@net1plus.com> | 3787 | From: "Chris Hallinan" <clh@net1plus.com> |
3793 | Date: Mon, 10 Feb 2003 16:43:46 -0500 (22:43 MET) | 3788 | Date: Mon, 10 Feb 2003 16:43:46 -0500 (22:43 MET) |
3794 | ... | 3789 | ... |
3795 | 3790 | ||
3796 | Correct me if I'm wrong, folks, but the way I understand it | 3791 | Correct me if I'm wrong, folks, but the way I understand it |
3797 | is this: Using DCACHE as initial RAM for Stack, etc, does not | 3792 | is this: Using DCACHE as initial RAM for Stack, etc, does not |
3798 | require any physical RAM backing up the cache. The cleverness | 3793 | require any physical RAM backing up the cache. The cleverness |
3799 | is that the cache is being used as a temporary supply of | 3794 | is that the cache is being used as a temporary supply of |
3800 | necessary storage before the SDRAM controller is setup. It's | 3795 | necessary storage before the SDRAM controller is setup. It's |
3801 | beyond the scope of this list to explain the details, but you | 3796 | beyond the scope of this list to explain the details, but you |
3802 | can see how this works by studying the cache architecture and | 3797 | can see how this works by studying the cache architecture and |
3803 | operation in the architecture and processor-specific manuals. | 3798 | operation in the architecture and processor-specific manuals. |
3804 | 3799 | ||
3805 | OCM is On Chip Memory, which I believe the 405GP has 4K. It | 3800 | OCM is On Chip Memory, which I believe the 405GP has 4K. It |
3806 | is another option for the system designer to use as an | 3801 | is another option for the system designer to use as an |
3807 | initial stack/RAM area prior to SDRAM being available. Either | 3802 | initial stack/RAM area prior to SDRAM being available. Either |
3808 | option should work for you. Using CS 4 should be fine if your | 3803 | option should work for you. Using CS 4 should be fine if your |
3809 | board designers haven't used it for something that would | 3804 | board designers haven't used it for something that would |
3810 | cause you grief during the initial boot! It is frequently not | 3805 | cause you grief during the initial boot! It is frequently not |
3811 | used. | 3806 | used. |
3812 | 3807 | ||
3813 | CONFIG_SYS_INIT_RAM_ADDR should be somewhere that won't interfere | 3808 | CONFIG_SYS_INIT_RAM_ADDR should be somewhere that won't interfere |
3814 | with your processor/board/system design. The default value | 3809 | with your processor/board/system design. The default value |
3815 | you will find in any recent u-boot distribution in | 3810 | you will find in any recent u-boot distribution in |
3816 | walnut.h should work for you. I'd set it to a value larger | 3811 | walnut.h should work for you. I'd set it to a value larger |
3817 | than your SDRAM module. If you have a 64MB SDRAM module, set | 3812 | than your SDRAM module. If you have a 64MB SDRAM module, set |
3818 | it above 400_0000. Just make sure your board has no resources | 3813 | it above 400_0000. Just make sure your board has no resources |
3819 | that are supposed to respond to that address! That code in | 3814 | that are supposed to respond to that address! That code in |
3820 | start.S has been around a while and should work as is when | 3815 | start.S has been around a while and should work as is when |
3821 | you get the config right. | 3816 | you get the config right. |
3822 | 3817 | ||
3823 | -Chris Hallinan | 3818 | -Chris Hallinan |
3824 | DS4.COM, Inc. | 3819 | DS4.COM, Inc. |
3825 | 3820 | ||
3826 | It is essential to remember this, since it has some impact on the C | 3821 | It is essential to remember this, since it has some impact on the C |
3827 | code for the initialization procedures: | 3822 | code for the initialization procedures: |
3828 | 3823 | ||
3829 | * Initialized global data (data segment) is read-only. Do not attempt | 3824 | * Initialized global data (data segment) is read-only. Do not attempt |
3830 | to write it. | 3825 | to write it. |
3831 | 3826 | ||
3832 | * Do not use any uninitialized global data (or implicitely initialized | 3827 | * Do not use any uninitialized global data (or implicitely initialized |
3833 | as zero data - BSS segment) at all - this is undefined, initiali- | 3828 | as zero data - BSS segment) at all - this is undefined, initiali- |
3834 | zation is performed later (when relocating to RAM). | 3829 | zation is performed later (when relocating to RAM). |
3835 | 3830 | ||
3836 | * Stack space is very limited. Avoid big data buffers or things like | 3831 | * Stack space is very limited. Avoid big data buffers or things like |
3837 | that. | 3832 | that. |
3838 | 3833 | ||
3839 | Having only the stack as writable memory limits means we cannot use | 3834 | Having only the stack as writable memory limits means we cannot use |
3840 | normal global data to share information beween the code. But it | 3835 | normal global data to share information beween the code. But it |
3841 | turned out that the implementation of U-Boot can be greatly | 3836 | turned out that the implementation of U-Boot can be greatly |
3842 | simplified by making a global data structure (gd_t) available to all | 3837 | simplified by making a global data structure (gd_t) available to all |
3843 | functions. We could pass a pointer to this data as argument to _all_ | 3838 | functions. We could pass a pointer to this data as argument to _all_ |
3844 | functions, but this would bloat the code. Instead we use a feature of | 3839 | functions, but this would bloat the code. Instead we use a feature of |
3845 | the GCC compiler (Global Register Variables) to share the data: we | 3840 | the GCC compiler (Global Register Variables) to share the data: we |
3846 | place a pointer (gd) to the global data into a register which we | 3841 | place a pointer (gd) to the global data into a register which we |
3847 | reserve for this purpose. | 3842 | reserve for this purpose. |
3848 | 3843 | ||
3849 | When choosing a register for such a purpose we are restricted by the | 3844 | When choosing a register for such a purpose we are restricted by the |
3850 | relevant (E)ABI specifications for the current architecture, and by | 3845 | relevant (E)ABI specifications for the current architecture, and by |
3851 | GCC's implementation. | 3846 | GCC's implementation. |
3852 | 3847 | ||
3853 | For PowerPC, the following registers have specific use: | 3848 | For PowerPC, the following registers have specific use: |
3854 | R1: stack pointer | 3849 | R1: stack pointer |
3855 | R2: reserved for system use | 3850 | R2: reserved for system use |
3856 | R3-R4: parameter passing and return values | 3851 | R3-R4: parameter passing and return values |
3857 | R5-R10: parameter passing | 3852 | R5-R10: parameter passing |
3858 | R13: small data area pointer | 3853 | R13: small data area pointer |
3859 | R30: GOT pointer | 3854 | R30: GOT pointer |
3860 | R31: frame pointer | 3855 | R31: frame pointer |
3861 | 3856 | ||
3862 | (U-Boot also uses R14 as internal GOT pointer.) | 3857 | (U-Boot also uses R14 as internal GOT pointer.) |
3863 | 3858 | ||
3864 | ==> U-Boot will use R2 to hold a pointer to the global data | 3859 | ==> U-Boot will use R2 to hold a pointer to the global data |
3865 | 3860 | ||
3866 | Note: on PPC, we could use a static initializer (since the | 3861 | Note: on PPC, we could use a static initializer (since the |
3867 | address of the global data structure is known at compile time), | 3862 | address of the global data structure is known at compile time), |
3868 | but it turned out that reserving a register results in somewhat | 3863 | but it turned out that reserving a register results in somewhat |
3869 | smaller code - although the code savings are not that big (on | 3864 | smaller code - although the code savings are not that big (on |
3870 | average for all boards 752 bytes for the whole U-Boot image, | 3865 | average for all boards 752 bytes for the whole U-Boot image, |
3871 | 624 text + 127 data). | 3866 | 624 text + 127 data). |
3872 | 3867 | ||
3873 | On Blackfin, the normal C ABI (except for P5) is followed as documented here: | 3868 | On Blackfin, the normal C ABI (except for P5) is followed as documented here: |
3874 | http://docs.blackfin.uclinux.org/doku.php?id=application_binary_interface | 3869 | http://docs.blackfin.uclinux.org/doku.php?id=application_binary_interface |
3875 | 3870 | ||
3876 | ==> U-Boot will use P5 to hold a pointer to the global data | 3871 | ==> U-Boot will use P5 to hold a pointer to the global data |
3877 | 3872 | ||
3878 | On ARM, the following registers are used: | 3873 | On ARM, the following registers are used: |
3879 | 3874 | ||
3880 | R0: function argument word/integer result | 3875 | R0: function argument word/integer result |
3881 | R1-R3: function argument word | 3876 | R1-R3: function argument word |
3882 | R9: GOT pointer | 3877 | R9: GOT pointer |
3883 | R10: stack limit (used only if stack checking if enabled) | 3878 | R10: stack limit (used only if stack checking if enabled) |
3884 | R11: argument (frame) pointer | 3879 | R11: argument (frame) pointer |
3885 | R12: temporary workspace | 3880 | R12: temporary workspace |
3886 | R13: stack pointer | 3881 | R13: stack pointer |
3887 | R14: link register | 3882 | R14: link register |
3888 | R15: program counter | 3883 | R15: program counter |
3889 | 3884 | ||
3890 | ==> U-Boot will use R8 to hold a pointer to the global data | 3885 | ==> U-Boot will use R8 to hold a pointer to the global data |
3891 | 3886 | ||
3892 | NOTE: DECLARE_GLOBAL_DATA_PTR must be used with file-global scope, | 3887 | NOTE: DECLARE_GLOBAL_DATA_PTR must be used with file-global scope, |
3893 | or current versions of GCC may "optimize" the code too much. | 3888 | or current versions of GCC may "optimize" the code too much. |
3894 | 3889 | ||
3895 | Memory Management: | 3890 | Memory Management: |
3896 | ------------------ | 3891 | ------------------ |
3897 | 3892 | ||
3898 | U-Boot runs in system state and uses physical addresses, i.e. the | 3893 | U-Boot runs in system state and uses physical addresses, i.e. the |
3899 | MMU is not used either for address mapping nor for memory protection. | 3894 | MMU is not used either for address mapping nor for memory protection. |
3900 | 3895 | ||
3901 | The available memory is mapped to fixed addresses using the memory | 3896 | The available memory is mapped to fixed addresses using the memory |
3902 | controller. In this process, a contiguous block is formed for each | 3897 | controller. In this process, a contiguous block is formed for each |
3903 | memory type (Flash, SDRAM, SRAM), even when it consists of several | 3898 | memory type (Flash, SDRAM, SRAM), even when it consists of several |
3904 | physical memory banks. | 3899 | physical memory banks. |
3905 | 3900 | ||
3906 | U-Boot is installed in the first 128 kB of the first Flash bank (on | 3901 | U-Boot is installed in the first 128 kB of the first Flash bank (on |
3907 | TQM8xxL modules this is the range 0x40000000 ... 0x4001FFFF). After | 3902 | TQM8xxL modules this is the range 0x40000000 ... 0x4001FFFF). After |
3908 | booting and sizing and initializing DRAM, the code relocates itself | 3903 | booting and sizing and initializing DRAM, the code relocates itself |
3909 | to the upper end of DRAM. Immediately below the U-Boot code some | 3904 | to the upper end of DRAM. Immediately below the U-Boot code some |
3910 | memory is reserved for use by malloc() [see CONFIG_SYS_MALLOC_LEN | 3905 | memory is reserved for use by malloc() [see CONFIG_SYS_MALLOC_LEN |
3911 | configuration setting]. Below that, a structure with global Board | 3906 | configuration setting]. Below that, a structure with global Board |
3912 | Info data is placed, followed by the stack (growing downward). | 3907 | Info data is placed, followed by the stack (growing downward). |
3913 | 3908 | ||
3914 | Additionally, some exception handler code is copied to the low 8 kB | 3909 | Additionally, some exception handler code is copied to the low 8 kB |
3915 | of DRAM (0x00000000 ... 0x00001FFF). | 3910 | of DRAM (0x00000000 ... 0x00001FFF). |
3916 | 3911 | ||
3917 | So a typical memory configuration with 16 MB of DRAM could look like | 3912 | So a typical memory configuration with 16 MB of DRAM could look like |
3918 | this: | 3913 | this: |
3919 | 3914 | ||
3920 | 0x0000 0000 Exception Vector code | 3915 | 0x0000 0000 Exception Vector code |
3921 | : | 3916 | : |
3922 | 0x0000 1FFF | 3917 | 0x0000 1FFF |
3923 | 0x0000 2000 Free for Application Use | 3918 | 0x0000 2000 Free for Application Use |
3924 | : | 3919 | : |
3925 | : | 3920 | : |
3926 | 3921 | ||
3927 | : | 3922 | : |
3928 | : | 3923 | : |
3929 | 0x00FB FF20 Monitor Stack (Growing downward) | 3924 | 0x00FB FF20 Monitor Stack (Growing downward) |
3930 | 0x00FB FFAC Board Info Data and permanent copy of global data | 3925 | 0x00FB FFAC Board Info Data and permanent copy of global data |
3931 | 0x00FC 0000 Malloc Arena | 3926 | 0x00FC 0000 Malloc Arena |
3932 | : | 3927 | : |
3933 | 0x00FD FFFF | 3928 | 0x00FD FFFF |
3934 | 0x00FE 0000 RAM Copy of Monitor Code | 3929 | 0x00FE 0000 RAM Copy of Monitor Code |
3935 | ... eventually: LCD or video framebuffer | 3930 | ... eventually: LCD or video framebuffer |
3936 | ... eventually: pRAM (Protected RAM - unchanged by reset) | 3931 | ... eventually: pRAM (Protected RAM - unchanged by reset) |
3937 | 0x00FF FFFF [End of RAM] | 3932 | 0x00FF FFFF [End of RAM] |
3938 | 3933 | ||
3939 | 3934 | ||
3940 | System Initialization: | 3935 | System Initialization: |
3941 | ---------------------- | 3936 | ---------------------- |
3942 | 3937 | ||
3943 | In the reset configuration, U-Boot starts at the reset entry point | 3938 | In the reset configuration, U-Boot starts at the reset entry point |
3944 | (on most PowerPC systems at address 0x00000100). Because of the reset | 3939 | (on most PowerPC systems at address 0x00000100). Because of the reset |
3945 | configuration for CS0# this is a mirror of the onboard Flash memory. | 3940 | configuration for CS0# this is a mirror of the onboard Flash memory. |
3946 | To be able to re-map memory U-Boot then jumps to its link address. | 3941 | To be able to re-map memory U-Boot then jumps to its link address. |
3947 | To be able to implement the initialization code in C, a (small!) | 3942 | To be able to implement the initialization code in C, a (small!) |
3948 | initial stack is set up in the internal Dual Ported RAM (in case CPUs | 3943 | initial stack is set up in the internal Dual Ported RAM (in case CPUs |
3949 | which provide such a feature like MPC8xx or MPC8260), or in a locked | 3944 | which provide such a feature like MPC8xx or MPC8260), or in a locked |
3950 | part of the data cache. After that, U-Boot initializes the CPU core, | 3945 | part of the data cache. After that, U-Boot initializes the CPU core, |
3951 | the caches and the SIU. | 3946 | the caches and the SIU. |
3952 | 3947 | ||
3953 | Next, all (potentially) available memory banks are mapped using a | 3948 | Next, all (potentially) available memory banks are mapped using a |
3954 | preliminary mapping. For example, we put them on 512 MB boundaries | 3949 | preliminary mapping. For example, we put them on 512 MB boundaries |
3955 | (multiples of 0x20000000: SDRAM on 0x00000000 and 0x20000000, Flash | 3950 | (multiples of 0x20000000: SDRAM on 0x00000000 and 0x20000000, Flash |
3956 | on 0x40000000 and 0x60000000, SRAM on 0x80000000). Then UPM A is | 3951 | on 0x40000000 and 0x60000000, SRAM on 0x80000000). Then UPM A is |
3957 | programmed for SDRAM access. Using the temporary configuration, a | 3952 | programmed for SDRAM access. Using the temporary configuration, a |
3958 | simple memory test is run that determines the size of the SDRAM | 3953 | simple memory test is run that determines the size of the SDRAM |
3959 | banks. | 3954 | banks. |
3960 | 3955 | ||
3961 | When there is more than one SDRAM bank, and the banks are of | 3956 | When there is more than one SDRAM bank, and the banks are of |
3962 | different size, the largest is mapped first. For equal size, the first | 3957 | different size, the largest is mapped first. For equal size, the first |
3963 | bank (CS2#) is mapped first. The first mapping is always for address | 3958 | bank (CS2#) is mapped first. The first mapping is always for address |
3964 | 0x00000000, with any additional banks following immediately to create | 3959 | 0x00000000, with any additional banks following immediately to create |
3965 | contiguous memory starting from 0. | 3960 | contiguous memory starting from 0. |
3966 | 3961 | ||
3967 | Then, the monitor installs itself at the upper end of the SDRAM area | 3962 | Then, the monitor installs itself at the upper end of the SDRAM area |
3968 | and allocates memory for use by malloc() and for the global Board | 3963 | and allocates memory for use by malloc() and for the global Board |
3969 | Info data; also, the exception vector code is copied to the low RAM | 3964 | Info data; also, the exception vector code is copied to the low RAM |
3970 | pages, and the final stack is set up. | 3965 | pages, and the final stack is set up. |
3971 | 3966 | ||
3972 | Only after this relocation will you have a "normal" C environment; | 3967 | Only after this relocation will you have a "normal" C environment; |
3973 | until that you are restricted in several ways, mostly because you are | 3968 | until that you are restricted in several ways, mostly because you are |
3974 | running from ROM, and because the code will have to be relocated to a | 3969 | running from ROM, and because the code will have to be relocated to a |
3975 | new address in RAM. | 3970 | new address in RAM. |
3976 | 3971 | ||
3977 | 3972 | ||
3978 | U-Boot Porting Guide: | 3973 | U-Boot Porting Guide: |
3979 | ---------------------- | 3974 | ---------------------- |
3980 | 3975 | ||
3981 | [Based on messages by Jerry Van Baren in the U-Boot-Users mailing | 3976 | [Based on messages by Jerry Van Baren in the U-Boot-Users mailing |
3982 | list, October 2002] | 3977 | list, October 2002] |
3983 | 3978 | ||
3984 | 3979 | ||
3985 | int main (int argc, char *argv[]) | 3980 | int main (int argc, char *argv[]) |
3986 | { | 3981 | { |
3987 | sighandler_t no_more_time; | 3982 | sighandler_t no_more_time; |
3988 | 3983 | ||
3989 | signal (SIGALRM, no_more_time); | 3984 | signal (SIGALRM, no_more_time); |
3990 | alarm (PROJECT_DEADLINE - toSec (3 * WEEK)); | 3985 | alarm (PROJECT_DEADLINE - toSec (3 * WEEK)); |
3991 | 3986 | ||
3992 | if (available_money > available_manpower) { | 3987 | if (available_money > available_manpower) { |
3993 | pay consultant to port U-Boot; | 3988 | pay consultant to port U-Boot; |
3994 | return 0; | 3989 | return 0; |
3995 | } | 3990 | } |
3996 | 3991 | ||
3997 | Download latest U-Boot source; | 3992 | Download latest U-Boot source; |
3998 | 3993 | ||
3999 | Subscribe to u-boot mailing list; | 3994 | Subscribe to u-boot mailing list; |
4000 | 3995 | ||
4001 | if (clueless) { | 3996 | if (clueless) { |
4002 | email ("Hi, I am new to U-Boot, how do I get started?"); | 3997 | email ("Hi, I am new to U-Boot, how do I get started?"); |
4003 | } | 3998 | } |
4004 | 3999 | ||
4005 | while (learning) { | 4000 | while (learning) { |
4006 | Read the README file in the top level directory; | 4001 | Read the README file in the top level directory; |
4007 | Read http://www.denx.de/twiki/bin/view/DULG/Manual ; | 4002 | Read http://www.denx.de/twiki/bin/view/DULG/Manual ; |
4008 | Read the source, Luke; | 4003 | Read the source, Luke; |
4009 | } | 4004 | } |
4010 | 4005 | ||
4011 | if (available_money > toLocalCurrency ($2500)) { | 4006 | if (available_money > toLocalCurrency ($2500)) { |
4012 | Buy a BDI2000; | 4007 | Buy a BDI2000; |
4013 | } else { | 4008 | } else { |
4014 | Add a lot of aggravation and time; | 4009 | Add a lot of aggravation and time; |
4015 | } | 4010 | } |
4016 | 4011 | ||
4017 | Create your own board support subdirectory; | 4012 | Create your own board support subdirectory; |
4018 | 4013 | ||
4019 | Create your own board config file; | 4014 | Create your own board config file; |
4020 | 4015 | ||
4021 | while (!running) { | 4016 | while (!running) { |
4022 | do { | 4017 | do { |
4023 | Add / modify source code; | 4018 | Add / modify source code; |
4024 | } until (compiles); | 4019 | } until (compiles); |
4025 | Debug; | 4020 | Debug; |
4026 | if (clueless) | 4021 | if (clueless) |
4027 | email ("Hi, I am having problems..."); | 4022 | email ("Hi, I am having problems..."); |
4028 | } | 4023 | } |
4029 | Send patch file to Wolfgang; | 4024 | Send patch file to Wolfgang; |
4030 | 4025 | ||
4031 | return 0; | 4026 | return 0; |
4032 | } | 4027 | } |
4033 | 4028 | ||
4034 | void no_more_time (int sig) | 4029 | void no_more_time (int sig) |
4035 | { | 4030 | { |
4036 | hire_a_guru(); | 4031 | hire_a_guru(); |
4037 | } | 4032 | } |
4038 | 4033 | ||
4039 | 4034 | ||
4040 | Coding Standards: | 4035 | Coding Standards: |
4041 | ----------------- | 4036 | ----------------- |
4042 | 4037 | ||
4043 | All contributions to U-Boot should conform to the Linux kernel | 4038 | All contributions to U-Boot should conform to the Linux kernel |
4044 | coding style; see the file "Documentation/CodingStyle" and the script | 4039 | coding style; see the file "Documentation/CodingStyle" and the script |
4045 | "scripts/Lindent" in your Linux kernel source directory. In sources | 4040 | "scripts/Lindent" in your Linux kernel source directory. In sources |
4046 | originating from U-Boot a style corresponding to "Lindent -pcs" (adding | 4041 | originating from U-Boot a style corresponding to "Lindent -pcs" (adding |
4047 | spaces before parameters to function calls) is actually used. | 4042 | spaces before parameters to function calls) is actually used. |
4048 | 4043 | ||
4049 | Source files originating from a different project (for example the | 4044 | Source files originating from a different project (for example the |
4050 | MTD subsystem) are generally exempt from these guidelines and are not | 4045 | MTD subsystem) are generally exempt from these guidelines and are not |
4051 | reformated to ease subsequent migration to newer versions of those | 4046 | reformated to ease subsequent migration to newer versions of those |
4052 | sources. | 4047 | sources. |
4053 | 4048 | ||
4054 | Please note that U-Boot is implemented in C (and to some small parts in | 4049 | Please note that U-Boot is implemented in C (and to some small parts in |
4055 | Assembler); no C++ is used, so please do not use C++ style comments (//) | 4050 | Assembler); no C++ is used, so please do not use C++ style comments (//) |
4056 | in your code. | 4051 | in your code. |
4057 | 4052 | ||
4058 | Please also stick to the following formatting rules: | 4053 | Please also stick to the following formatting rules: |
4059 | - remove any trailing white space | 4054 | - remove any trailing white space |
4060 | - use TAB characters for indentation, not spaces | 4055 | - use TAB characters for indentation, not spaces |
4061 | - make sure NOT to use DOS '\r\n' line feeds | 4056 | - make sure NOT to use DOS '\r\n' line feeds |
4062 | - do not add more than 2 empty lines to source files | 4057 | - do not add more than 2 empty lines to source files |
4063 | - do not add trailing empty lines to source files | 4058 | - do not add trailing empty lines to source files |
4064 | 4059 | ||
4065 | Submissions which do not conform to the standards may be returned | 4060 | Submissions which do not conform to the standards may be returned |
4066 | with a request to reformat the changes. | 4061 | with a request to reformat the changes. |
4067 | 4062 | ||
4068 | 4063 | ||
4069 | Submitting Patches: | 4064 | Submitting Patches: |
4070 | ------------------- | 4065 | ------------------- |
4071 | 4066 | ||
4072 | Since the number of patches for U-Boot is growing, we need to | 4067 | Since the number of patches for U-Boot is growing, we need to |
4073 | establish some rules. Submissions which do not conform to these rules | 4068 | establish some rules. Submissions which do not conform to these rules |
4074 | may be rejected, even when they contain important and valuable stuff. | 4069 | may be rejected, even when they contain important and valuable stuff. |
4075 | 4070 | ||
4076 | Please see http://www.denx.de/wiki/U-Boot/Patches for details. | 4071 | Please see http://www.denx.de/wiki/U-Boot/Patches for details. |
4077 | 4072 | ||
4078 | Patches shall be sent to the u-boot mailing list <u-boot@lists.denx.de>; | 4073 | Patches shall be sent to the u-boot mailing list <u-boot@lists.denx.de>; |
4079 | see http://lists.denx.de/mailman/listinfo/u-boot | 4074 | see http://lists.denx.de/mailman/listinfo/u-boot |
4080 | 4075 | ||
4081 | When you send a patch, please include the following information with | 4076 | When you send a patch, please include the following information with |
4082 | it: | 4077 | it: |
4083 | 4078 | ||
4084 | * For bug fixes: a description of the bug and how your patch fixes | 4079 | * For bug fixes: a description of the bug and how your patch fixes |
4085 | this bug. Please try to include a way of demonstrating that the | 4080 | this bug. Please try to include a way of demonstrating that the |
4086 | patch actually fixes something. | 4081 | patch actually fixes something. |
4087 | 4082 | ||
4088 | * For new features: a description of the feature and your | 4083 | * For new features: a description of the feature and your |
4089 | implementation. | 4084 | implementation. |
4090 | 4085 | ||
4091 | * A CHANGELOG entry as plaintext (separate from the patch) | 4086 | * A CHANGELOG entry as plaintext (separate from the patch) |
4092 | 4087 | ||
4093 | * For major contributions, your entry to the CREDITS file | 4088 | * For major contributions, your entry to the CREDITS file |
4094 | 4089 | ||
4095 | * When you add support for a new board, don't forget to add this | 4090 | * When you add support for a new board, don't forget to add this |
4096 | board to the MAKEALL script, too. | 4091 | board to the MAKEALL script, too. |
4097 | 4092 | ||
4098 | * If your patch adds new configuration options, don't forget to | 4093 | * If your patch adds new configuration options, don't forget to |
4099 | document these in the README file. | 4094 | document these in the README file. |
4100 | 4095 | ||
4101 | * The patch itself. If you are using git (which is *strongly* | 4096 | * The patch itself. If you are using git (which is *strongly* |
4102 | recommended) you can easily generate the patch using the | 4097 | recommended) you can easily generate the patch using the |
4103 | "git-format-patch". If you then use "git-send-email" to send it to | 4098 | "git-format-patch". If you then use "git-send-email" to send it to |
4104 | the U-Boot mailing list, you will avoid most of the common problems | 4099 | the U-Boot mailing list, you will avoid most of the common problems |
4105 | with some other mail clients. | 4100 | with some other mail clients. |
4106 | 4101 | ||
4107 | If you cannot use git, use "diff -purN OLD NEW". If your version of | 4102 | If you cannot use git, use "diff -purN OLD NEW". If your version of |
4108 | diff does not support these options, then get the latest version of | 4103 | diff does not support these options, then get the latest version of |
4109 | GNU diff. | 4104 | GNU diff. |
4110 | 4105 | ||
4111 | The current directory when running this command shall be the parent | 4106 | The current directory when running this command shall be the parent |
4112 | directory of the U-Boot source tree (i. e. please make sure that | 4107 | directory of the U-Boot source tree (i. e. please make sure that |
4113 | your patch includes sufficient directory information for the | 4108 | your patch includes sufficient directory information for the |
4114 | affected files). | 4109 | affected files). |
4115 | 4110 | ||
4116 | We prefer patches as plain text. MIME attachments are discouraged, | 4111 | We prefer patches as plain text. MIME attachments are discouraged, |
4117 | and compressed attachments must not be used. | 4112 | and compressed attachments must not be used. |
4118 | 4113 | ||
4119 | * If one logical set of modifications affects or creates several | 4114 | * If one logical set of modifications affects or creates several |
4120 | files, all these changes shall be submitted in a SINGLE patch file. | 4115 | files, all these changes shall be submitted in a SINGLE patch file. |
4121 | 4116 | ||
4122 | * Changesets that contain different, unrelated modifications shall be | 4117 | * Changesets that contain different, unrelated modifications shall be |
4123 | submitted as SEPARATE patches, one patch per changeset. | 4118 | submitted as SEPARATE patches, one patch per changeset. |
4124 | 4119 | ||
4125 | 4120 | ||
4126 | Notes: | 4121 | Notes: |
4127 | 4122 | ||
4128 | * Before sending the patch, run the MAKEALL script on your patched | 4123 | * Before sending the patch, run the MAKEALL script on your patched |
4129 | source tree and make sure that no errors or warnings are reported | 4124 | source tree and make sure that no errors or warnings are reported |
4130 | for any of the boards. | 4125 | for any of the boards. |
4131 | 4126 | ||
4132 | * Keep your modifications to the necessary minimum: A patch | 4127 | * Keep your modifications to the necessary minimum: A patch |
4133 | containing several unrelated changes or arbitrary reformats will be | 4128 | containing several unrelated changes or arbitrary reformats will be |
4134 | returned with a request to re-formatting / split it. | 4129 | returned with a request to re-formatting / split it. |
4135 | 4130 | ||
4136 | * If you modify existing code, make sure that your new code does not | 4131 | * If you modify existing code, make sure that your new code does not |
4137 | add to the memory footprint of the code ;-) Small is beautiful! | 4132 | add to the memory footprint of the code ;-) Small is beautiful! |
4138 | When adding new features, these should compile conditionally only | 4133 | When adding new features, these should compile conditionally only |
4139 | (using #ifdef), and the resulting code with the new feature | 4134 | (using #ifdef), and the resulting code with the new feature |
4140 | disabled must not need more memory than the old code without your | 4135 | disabled must not need more memory than the old code without your |
4141 | modification. | 4136 | modification. |
4142 | 4137 | ||
4143 | * Remember that there is a size limit of 100 kB per message on the | 4138 | * Remember that there is a size limit of 100 kB per message on the |
4144 | u-boot mailing list. Bigger patches will be moderated. If they are | 4139 | u-boot mailing list. Bigger patches will be moderated. If they are |
4145 | reasonable and not too big, they will be acknowledged. But patches | 4140 | reasonable and not too big, they will be acknowledged. But patches |
4146 | bigger than the size limit should be avoided. | 4141 | bigger than the size limit should be avoided. |
4147 | 4142 |
common/cmd_i2c.c
1 | /* | 1 | /* |
2 | * (C) Copyright 2001 | 2 | * (C) Copyright 2001 |
3 | * Gerald Van Baren, Custom IDEAS, vanbaren@cideas.com. | 3 | * Gerald Van Baren, Custom IDEAS, vanbaren@cideas.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 | * I2C Functions similar to the standard memory functions. | 25 | * I2C Functions similar to the standard memory functions. |
26 | * | 26 | * |
27 | * There are several parameters in many of the commands that bear further | 27 | * There are several parameters in many of the commands that bear further |
28 | * explanations: | 28 | * explanations: |
29 | * | 29 | * |
30 | * Two of the commands (imm and imw) take a byte/word/long modifier | 30 | * Two of the commands (imm and imw) take a byte/word/long modifier |
31 | * (e.g. imm.w specifies the word-length modifier). This was done to | 31 | * (e.g. imm.w specifies the word-length modifier). This was done to |
32 | * allow manipulating word-length registers. It was not done on any other | 32 | * allow manipulating word-length registers. It was not done on any other |
33 | * commands because it was not deemed useful. | 33 | * commands because it was not deemed useful. |
34 | * | 34 | * |
35 | * {i2c_chip} is the I2C chip address (the first byte sent on the bus). | 35 | * {i2c_chip} is the I2C chip address (the first byte sent on the bus). |
36 | * Each I2C chip on the bus has a unique address. On the I2C data bus, | 36 | * Each I2C chip on the bus has a unique address. On the I2C data bus, |
37 | * the address is the upper seven bits and the LSB is the "read/write" | 37 | * the address is the upper seven bits and the LSB is the "read/write" |
38 | * bit. Note that the {i2c_chip} address specified on the command | 38 | * bit. Note that the {i2c_chip} address specified on the command |
39 | * line is not shifted up: e.g. a typical EEPROM memory chip may have | 39 | * line is not shifted up: e.g. a typical EEPROM memory chip may have |
40 | * an I2C address of 0x50, but the data put on the bus will be 0xA0 | 40 | * an I2C address of 0x50, but the data put on the bus will be 0xA0 |
41 | * for write and 0xA1 for read. This "non shifted" address notation | 41 | * for write and 0xA1 for read. This "non shifted" address notation |
42 | * matches at least half of the data sheets :-/. | 42 | * matches at least half of the data sheets :-/. |
43 | * | 43 | * |
44 | * {addr} is the address (or offset) within the chip. Small memory | 44 | * {addr} is the address (or offset) within the chip. Small memory |
45 | * chips have 8 bit addresses. Large memory chips have 16 bit | 45 | * chips have 8 bit addresses. Large memory chips have 16 bit |
46 | * addresses. Other memory chips have 9, 10, or 11 bit addresses. | 46 | * addresses. Other memory chips have 9, 10, or 11 bit addresses. |
47 | * Many non-memory chips have multiple registers and {addr} is used | 47 | * Many non-memory chips have multiple registers and {addr} is used |
48 | * as the register index. Some non-memory chips have only one register | 48 | * as the register index. Some non-memory chips have only one register |
49 | * and therefore don't need any {addr} parameter. | 49 | * and therefore don't need any {addr} parameter. |
50 | * | 50 | * |
51 | * The default {addr} parameter is one byte (.1) which works well for | 51 | * The default {addr} parameter is one byte (.1) which works well for |
52 | * memories and registers with 8 bits of address space. | 52 | * memories and registers with 8 bits of address space. |
53 | * | 53 | * |
54 | * You can specify the length of the {addr} field with the optional .0, | 54 | * You can specify the length of the {addr} field with the optional .0, |
55 | * .1, or .2 modifier (similar to the .b, .w, .l modifier). If you are | 55 | * .1, or .2 modifier (similar to the .b, .w, .l modifier). If you are |
56 | * manipulating a single register device which doesn't use an address | 56 | * manipulating a single register device which doesn't use an address |
57 | * field, use "0.0" for the address and the ".0" length field will | 57 | * field, use "0.0" for the address and the ".0" length field will |
58 | * suppress the address in the I2C data stream. This also works for | 58 | * suppress the address in the I2C data stream. This also works for |
59 | * successive reads using the I2C auto-incrementing memory pointer. | 59 | * successive reads using the I2C auto-incrementing memory pointer. |
60 | * | 60 | * |
61 | * If you are manipulating a large memory with 2-byte addresses, use | 61 | * If you are manipulating a large memory with 2-byte addresses, use |
62 | * the .2 address modifier, e.g. 210.2 addresses location 528 (decimal). | 62 | * the .2 address modifier, e.g. 210.2 addresses location 528 (decimal). |
63 | * | 63 | * |
64 | * Then there are the unfortunate memory chips that spill the most | 64 | * Then there are the unfortunate memory chips that spill the most |
65 | * significant 1, 2, or 3 bits of address into the chip address byte. | 65 | * significant 1, 2, or 3 bits of address into the chip address byte. |
66 | * This effectively makes one chip (logically) look like 2, 4, or | 66 | * This effectively makes one chip (logically) look like 2, 4, or |
67 | * 8 chips. This is handled (awkwardly) by #defining | 67 | * 8 chips. This is handled (awkwardly) by #defining |
68 | * CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW and using the .1 modifier on the | 68 | * CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW and using the .1 modifier on the |
69 | * {addr} field (since .1 is the default, it doesn't actually have to | 69 | * {addr} field (since .1 is the default, it doesn't actually have to |
70 | * be specified). Examples: given a memory chip at I2C chip address | 70 | * be specified). Examples: given a memory chip at I2C chip address |
71 | * 0x50, the following would happen... | 71 | * 0x50, the following would happen... |
72 | * imd 50 0 10 display 16 bytes starting at 0x000 | 72 | * imd 50 0 10 display 16 bytes starting at 0x000 |
73 | * On the bus: <S> A0 00 <E> <S> A1 <rd> ... <rd> | 73 | * On the bus: <S> A0 00 <E> <S> A1 <rd> ... <rd> |
74 | * imd 50 100 10 display 16 bytes starting at 0x100 | 74 | * imd 50 100 10 display 16 bytes starting at 0x100 |
75 | * On the bus: <S> A2 00 <E> <S> A3 <rd> ... <rd> | 75 | * On the bus: <S> A2 00 <E> <S> A3 <rd> ... <rd> |
76 | * imd 50 210 10 display 16 bytes starting at 0x210 | 76 | * imd 50 210 10 display 16 bytes starting at 0x210 |
77 | * On the bus: <S> A4 10 <E> <S> A5 <rd> ... <rd> | 77 | * On the bus: <S> A4 10 <E> <S> A5 <rd> ... <rd> |
78 | * This is awfully ugly. It would be nice if someone would think up | 78 | * This is awfully ugly. It would be nice if someone would think up |
79 | * a better way of handling this. | 79 | * a better way of handling this. |
80 | * | 80 | * |
81 | * Adapted from cmd_mem.c which is copyright Wolfgang Denk (wd@denx.de). | 81 | * Adapted from cmd_mem.c which is copyright Wolfgang Denk (wd@denx.de). |
82 | */ | 82 | */ |
83 | 83 | ||
84 | #include <common.h> | 84 | #include <common.h> |
85 | #include <command.h> | 85 | #include <command.h> |
86 | #include <environment.h> | 86 | #include <environment.h> |
87 | #include <i2c.h> | 87 | #include <i2c.h> |
88 | #include <malloc.h> | 88 | #include <malloc.h> |
89 | #include <asm/byteorder.h> | 89 | #include <asm/byteorder.h> |
90 | 90 | ||
91 | /* Display values from last command. | 91 | /* Display values from last command. |
92 | * Memory modify remembered values are different from display memory. | 92 | * Memory modify remembered values are different from display memory. |
93 | */ | 93 | */ |
94 | static uchar i2c_dp_last_chip; | 94 | static uchar i2c_dp_last_chip; |
95 | static uint i2c_dp_last_addr; | 95 | static uint i2c_dp_last_addr; |
96 | static uint i2c_dp_last_alen; | 96 | static uint i2c_dp_last_alen; |
97 | static uint i2c_dp_last_length = 0x10; | 97 | static uint i2c_dp_last_length = 0x10; |
98 | 98 | ||
99 | static uchar i2c_mm_last_chip; | 99 | static uchar i2c_mm_last_chip; |
100 | static uint i2c_mm_last_addr; | 100 | static uint i2c_mm_last_addr; |
101 | static uint i2c_mm_last_alen; | 101 | static uint i2c_mm_last_alen; |
102 | 102 | ||
103 | /* If only one I2C bus is present, the list of devices to ignore when | 103 | /* If only one I2C bus is present, the list of devices to ignore when |
104 | * the probe command is issued is represented by a 1D array of addresses. | 104 | * the probe command is issued is represented by a 1D array of addresses. |
105 | * When multiple buses are present, the list is an array of bus-address | 105 | * When multiple buses are present, the list is an array of bus-address |
106 | * pairs. The following macros take care of this */ | 106 | * pairs. The following macros take care of this */ |
107 | 107 | ||
108 | #if defined(CONFIG_SYS_I2C_NOPROBES) | 108 | #if defined(CONFIG_SYS_I2C_NOPROBES) |
109 | #if defined(CONFIG_I2C_MULTI_BUS) | 109 | #if defined(CONFIG_I2C_MULTI_BUS) |
110 | static struct | 110 | static struct |
111 | { | 111 | { |
112 | uchar bus; | 112 | uchar bus; |
113 | uchar addr; | 113 | uchar addr; |
114 | } i2c_no_probes[] = CONFIG_SYS_I2C_NOPROBES; | 114 | } i2c_no_probes[] = CONFIG_SYS_I2C_NOPROBES; |
115 | #define GET_BUS_NUM i2c_get_bus_num() | 115 | #define GET_BUS_NUM i2c_get_bus_num() |
116 | #define COMPARE_BUS(b,i) (i2c_no_probes[(i)].bus == (b)) | 116 | #define COMPARE_BUS(b,i) (i2c_no_probes[(i)].bus == (b)) |
117 | #define COMPARE_ADDR(a,i) (i2c_no_probes[(i)].addr == (a)) | 117 | #define COMPARE_ADDR(a,i) (i2c_no_probes[(i)].addr == (a)) |
118 | #define NO_PROBE_ADDR(i) i2c_no_probes[(i)].addr | 118 | #define NO_PROBE_ADDR(i) i2c_no_probes[(i)].addr |
119 | #else /* single bus */ | 119 | #else /* single bus */ |
120 | static uchar i2c_no_probes[] = CONFIG_SYS_I2C_NOPROBES; | 120 | static uchar i2c_no_probes[] = CONFIG_SYS_I2C_NOPROBES; |
121 | #define GET_BUS_NUM 0 | 121 | #define GET_BUS_NUM 0 |
122 | #define COMPARE_BUS(b,i) ((b) == 0) /* Make compiler happy */ | 122 | #define COMPARE_BUS(b,i) ((b) == 0) /* Make compiler happy */ |
123 | #define COMPARE_ADDR(a,i) (i2c_no_probes[(i)] == (a)) | 123 | #define COMPARE_ADDR(a,i) (i2c_no_probes[(i)] == (a)) |
124 | #define NO_PROBE_ADDR(i) i2c_no_probes[(i)] | 124 | #define NO_PROBE_ADDR(i) i2c_no_probes[(i)] |
125 | #endif /* CONFIG_MULTI_BUS */ | 125 | #endif /* CONFIG_MULTI_BUS */ |
126 | 126 | ||
127 | #define NUM_ELEMENTS_NOPROBE (sizeof(i2c_no_probes)/sizeof(i2c_no_probes[0])) | 127 | #define NUM_ELEMENTS_NOPROBE (sizeof(i2c_no_probes)/sizeof(i2c_no_probes[0])) |
128 | #endif | 128 | #endif |
129 | 129 | ||
130 | #if defined(CONFIG_I2C_MUX) | 130 | #if defined(CONFIG_I2C_MUX) |
131 | static I2C_MUX_DEVICE *i2c_mux_devices = NULL; | 131 | static I2C_MUX_DEVICE *i2c_mux_devices = NULL; |
132 | static int i2c_mux_busid = CONFIG_SYS_MAX_I2C_BUS; | 132 | static int i2c_mux_busid = CONFIG_SYS_MAX_I2C_BUS; |
133 | 133 | ||
134 | DECLARE_GLOBAL_DATA_PTR; | 134 | DECLARE_GLOBAL_DATA_PTR; |
135 | 135 | ||
136 | #endif | 136 | #endif |
137 | 137 | ||
138 | static int | 138 | static int |
139 | mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[]); | 139 | mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[]); |
140 | 140 | ||
141 | /* TODO: Implement architecture-specific get/set functions */ | 141 | /* TODO: Implement architecture-specific get/set functions */ |
142 | unsigned int __def_i2c_get_bus_speed(void) | 142 | unsigned int __def_i2c_get_bus_speed(void) |
143 | { | 143 | { |
144 | return CONFIG_SYS_I2C_SPEED; | 144 | return CONFIG_SYS_I2C_SPEED; |
145 | } | 145 | } |
146 | unsigned int i2c_get_bus_speed(void) | 146 | unsigned int i2c_get_bus_speed(void) |
147 | __attribute__((weak, alias("__def_i2c_get_bus_speed"))); | 147 | __attribute__((weak, alias("__def_i2c_get_bus_speed"))); |
148 | 148 | ||
149 | int __def_i2c_set_bus_speed(unsigned int speed) | 149 | int __def_i2c_set_bus_speed(unsigned int speed) |
150 | { | 150 | { |
151 | if (speed != CONFIG_SYS_I2C_SPEED) | 151 | if (speed != CONFIG_SYS_I2C_SPEED) |
152 | return -1; | 152 | return -1; |
153 | 153 | ||
154 | return 0; | 154 | return 0; |
155 | } | 155 | } |
156 | int i2c_set_bus_speed(unsigned int) | 156 | int i2c_set_bus_speed(unsigned int) |
157 | __attribute__((weak, alias("__def_i2c_set_bus_speed"))); | 157 | __attribute__((weak, alias("__def_i2c_set_bus_speed"))); |
158 | 158 | ||
159 | /* | 159 | /* |
160 | * Syntax: | 160 | * Syntax: |
161 | * imd {i2c_chip} {addr}{.0, .1, .2} {len} | 161 | * imd {i2c_chip} {addr}{.0, .1, .2} {len} |
162 | */ | 162 | */ |
163 | #define DISP_LINE_LEN 16 | 163 | #define DISP_LINE_LEN 16 |
164 | 164 | ||
165 | int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) | 165 | int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) |
166 | { | 166 | { |
167 | u_char chip; | 167 | u_char chip; |
168 | uint addr, alen, length; | 168 | uint addr, alen, length; |
169 | int j, nbytes, linebytes; | 169 | int j, nbytes, linebytes; |
170 | 170 | ||
171 | /* We use the last specified parameters, unless new ones are | 171 | /* We use the last specified parameters, unless new ones are |
172 | * entered. | 172 | * entered. |
173 | */ | 173 | */ |
174 | chip = i2c_dp_last_chip; | 174 | chip = i2c_dp_last_chip; |
175 | addr = i2c_dp_last_addr; | 175 | addr = i2c_dp_last_addr; |
176 | alen = i2c_dp_last_alen; | 176 | alen = i2c_dp_last_alen; |
177 | length = i2c_dp_last_length; | 177 | length = i2c_dp_last_length; |
178 | 178 | ||
179 | if (argc < 3) { | 179 | if (argc < 3) { |
180 | cmd_usage(cmdtp); | 180 | cmd_usage(cmdtp); |
181 | return 1; | 181 | return 1; |
182 | } | 182 | } |
183 | 183 | ||
184 | if ((flag & CMD_FLAG_REPEAT) == 0) { | 184 | if ((flag & CMD_FLAG_REPEAT) == 0) { |
185 | /* | 185 | /* |
186 | * New command specified. | 186 | * New command specified. |
187 | */ | 187 | */ |
188 | alen = 1; | 188 | alen = 1; |
189 | 189 | ||
190 | /* | 190 | /* |
191 | * I2C chip address | 191 | * I2C chip address |
192 | */ | 192 | */ |
193 | chip = simple_strtoul(argv[1], NULL, 16); | 193 | chip = simple_strtoul(argv[1], NULL, 16); |
194 | 194 | ||
195 | /* | 195 | /* |
196 | * I2C data address within the chip. This can be 1 or | 196 | * I2C data address within the chip. This can be 1 or |
197 | * 2 bytes long. Some day it might be 3 bytes long :-). | 197 | * 2 bytes long. Some day it might be 3 bytes long :-). |
198 | */ | 198 | */ |
199 | addr = simple_strtoul(argv[2], NULL, 16); | 199 | addr = simple_strtoul(argv[2], NULL, 16); |
200 | alen = 1; | 200 | alen = 1; |
201 | for (j = 0; j < 8; j++) { | 201 | for (j = 0; j < 8; j++) { |
202 | if (argv[2][j] == '.') { | 202 | if (argv[2][j] == '.') { |
203 | alen = argv[2][j+1] - '0'; | 203 | alen = argv[2][j+1] - '0'; |
204 | if (alen > 4) { | 204 | if (alen > 4) { |
205 | cmd_usage(cmdtp); | 205 | cmd_usage(cmdtp); |
206 | return 1; | 206 | return 1; |
207 | } | 207 | } |
208 | break; | 208 | break; |
209 | } else if (argv[2][j] == '\0') | 209 | } else if (argv[2][j] == '\0') |
210 | break; | 210 | break; |
211 | } | 211 | } |
212 | 212 | ||
213 | /* | 213 | /* |
214 | * If another parameter, it is the length to display. | 214 | * If another parameter, it is the length to display. |
215 | * Length is the number of objects, not number of bytes. | 215 | * Length is the number of objects, not number of bytes. |
216 | */ | 216 | */ |
217 | if (argc > 3) | 217 | if (argc > 3) |
218 | length = simple_strtoul(argv[3], NULL, 16); | 218 | length = simple_strtoul(argv[3], NULL, 16); |
219 | } | 219 | } |
220 | 220 | ||
221 | /* | 221 | /* |
222 | * Print the lines. | 222 | * Print the lines. |
223 | * | 223 | * |
224 | * We buffer all read data, so we can make sure data is read only | 224 | * We buffer all read data, so we can make sure data is read only |
225 | * once. | 225 | * once. |
226 | */ | 226 | */ |
227 | nbytes = length; | 227 | nbytes = length; |
228 | do { | 228 | do { |
229 | unsigned char linebuf[DISP_LINE_LEN]; | 229 | unsigned char linebuf[DISP_LINE_LEN]; |
230 | unsigned char *cp; | 230 | unsigned char *cp; |
231 | 231 | ||
232 | linebytes = (nbytes > DISP_LINE_LEN) ? DISP_LINE_LEN : nbytes; | 232 | linebytes = (nbytes > DISP_LINE_LEN) ? DISP_LINE_LEN : nbytes; |
233 | 233 | ||
234 | if (i2c_read(chip, addr, alen, linebuf, linebytes) != 0) | 234 | if (i2c_read(chip, addr, alen, linebuf, linebytes) != 0) |
235 | puts ("Error reading the chip.\n"); | 235 | puts ("Error reading the chip.\n"); |
236 | else { | 236 | else { |
237 | printf("%04x:", addr); | 237 | printf("%04x:", addr); |
238 | cp = linebuf; | 238 | cp = linebuf; |
239 | for (j=0; j<linebytes; j++) { | 239 | for (j=0; j<linebytes; j++) { |
240 | printf(" %02x", *cp++); | 240 | printf(" %02x", *cp++); |
241 | addr++; | 241 | addr++; |
242 | } | 242 | } |
243 | puts (" "); | 243 | puts (" "); |
244 | cp = linebuf; | 244 | cp = linebuf; |
245 | for (j=0; j<linebytes; j++) { | 245 | for (j=0; j<linebytes; j++) { |
246 | if ((*cp < 0x20) || (*cp > 0x7e)) | 246 | if ((*cp < 0x20) || (*cp > 0x7e)) |
247 | puts ("."); | 247 | puts ("."); |
248 | else | 248 | else |
249 | printf("%c", *cp); | 249 | printf("%c", *cp); |
250 | cp++; | 250 | cp++; |
251 | } | 251 | } |
252 | putc ('\n'); | 252 | putc ('\n'); |
253 | } | 253 | } |
254 | nbytes -= linebytes; | 254 | nbytes -= linebytes; |
255 | } while (nbytes > 0); | 255 | } while (nbytes > 0); |
256 | 256 | ||
257 | i2c_dp_last_chip = chip; | 257 | i2c_dp_last_chip = chip; |
258 | i2c_dp_last_addr = addr; | 258 | i2c_dp_last_addr = addr; |
259 | i2c_dp_last_alen = alen; | 259 | i2c_dp_last_alen = alen; |
260 | i2c_dp_last_length = length; | 260 | i2c_dp_last_length = length; |
261 | 261 | ||
262 | return 0; | 262 | return 0; |
263 | } | 263 | } |
264 | 264 | ||
265 | int do_i2c_mm ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) | 265 | int do_i2c_mm ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) |
266 | { | 266 | { |
267 | return mod_i2c_mem (cmdtp, 1, flag, argc, argv); | 267 | return mod_i2c_mem (cmdtp, 1, flag, argc, argv); |
268 | } | 268 | } |
269 | 269 | ||
270 | int do_i2c_nm ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) | 270 | int do_i2c_nm ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) |
271 | { | 271 | { |
272 | return mod_i2c_mem (cmdtp, 0, flag, argc, argv); | 272 | return mod_i2c_mem (cmdtp, 0, flag, argc, argv); |
273 | } | 273 | } |
274 | 274 | ||
275 | /* Write (fill) memory | 275 | /* Write (fill) memory |
276 | * | 276 | * |
277 | * Syntax: | 277 | * Syntax: |
278 | * imw {i2c_chip} {addr}{.0, .1, .2} {data} [{count}] | 278 | * imw {i2c_chip} {addr}{.0, .1, .2} {data} [{count}] |
279 | */ | 279 | */ |
280 | int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) | 280 | int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) |
281 | { | 281 | { |
282 | uchar chip; | 282 | uchar chip; |
283 | ulong addr; | 283 | ulong addr; |
284 | uint alen; | 284 | uint alen; |
285 | uchar byte; | 285 | uchar byte; |
286 | int count; | 286 | int count; |
287 | int j; | 287 | int j; |
288 | 288 | ||
289 | if ((argc < 4) || (argc > 5)) { | 289 | if ((argc < 4) || (argc > 5)) { |
290 | cmd_usage(cmdtp); | 290 | cmd_usage(cmdtp); |
291 | return 1; | 291 | return 1; |
292 | } | 292 | } |
293 | 293 | ||
294 | /* | 294 | /* |
295 | * Chip is always specified. | 295 | * Chip is always specified. |
296 | */ | 296 | */ |
297 | chip = simple_strtoul(argv[1], NULL, 16); | 297 | chip = simple_strtoul(argv[1], NULL, 16); |
298 | 298 | ||
299 | /* | 299 | /* |
300 | * Address is always specified. | 300 | * Address is always specified. |
301 | */ | 301 | */ |
302 | addr = simple_strtoul(argv[2], NULL, 16); | 302 | addr = simple_strtoul(argv[2], NULL, 16); |
303 | alen = 1; | 303 | alen = 1; |
304 | for (j = 0; j < 8; j++) { | 304 | for (j = 0; j < 8; j++) { |
305 | if (argv[2][j] == '.') { | 305 | if (argv[2][j] == '.') { |
306 | alen = argv[2][j+1] - '0'; | 306 | alen = argv[2][j+1] - '0'; |
307 | if (alen > 4) { | 307 | if (alen > 4) { |
308 | cmd_usage(cmdtp); | 308 | cmd_usage(cmdtp); |
309 | return 1; | 309 | return 1; |
310 | } | 310 | } |
311 | break; | 311 | break; |
312 | } else if (argv[2][j] == '\0') | 312 | } else if (argv[2][j] == '\0') |
313 | break; | 313 | break; |
314 | } | 314 | } |
315 | 315 | ||
316 | /* | 316 | /* |
317 | * Value to write is always specified. | 317 | * Value to write is always specified. |
318 | */ | 318 | */ |
319 | byte = simple_strtoul(argv[3], NULL, 16); | 319 | byte = simple_strtoul(argv[3], NULL, 16); |
320 | 320 | ||
321 | /* | 321 | /* |
322 | * Optional count | 322 | * Optional count |
323 | */ | 323 | */ |
324 | if (argc == 5) | 324 | if (argc == 5) |
325 | count = simple_strtoul(argv[4], NULL, 16); | 325 | count = simple_strtoul(argv[4], NULL, 16); |
326 | else | 326 | else |
327 | count = 1; | 327 | count = 1; |
328 | 328 | ||
329 | while (count-- > 0) { | 329 | while (count-- > 0) { |
330 | if (i2c_write(chip, addr++, alen, &byte, 1) != 0) | 330 | if (i2c_write(chip, addr++, alen, &byte, 1) != 0) |
331 | puts ("Error writing the chip.\n"); | 331 | puts ("Error writing the chip.\n"); |
332 | /* | 332 | /* |
333 | * Wait for the write to complete. The write can take | 333 | * Wait for the write to complete. The write can take |
334 | * up to 10mSec (we allow a little more time). | 334 | * up to 10mSec (we allow a little more time). |
335 | * | 335 | * |
336 | * On some chips, while the write is in progress, the | 336 | * On some chips, while the write is in progress, the |
337 | * chip doesn't respond. This apparently isn't a | 337 | * chip doesn't respond. This apparently isn't a |
338 | * universal feature so we don't take advantage of it. | 338 | * universal feature so we don't take advantage of it. |
339 | */ | 339 | */ |
340 | /* | 340 | /* |
341 | * No write delay with FRAM devices. | 341 | * No write delay with FRAM devices. |
342 | */ | 342 | */ |
343 | #if !defined(CONFIG_SYS_I2C_FRAM) | 343 | #if !defined(CONFIG_SYS_I2C_FRAM) |
344 | udelay(11000); | 344 | udelay(11000); |
345 | #endif | 345 | #endif |
346 | 346 | ||
347 | #if 0 | 347 | #if 0 |
348 | for (timeout = 0; timeout < 10; timeout++) { | 348 | for (timeout = 0; timeout < 10; timeout++) { |
349 | udelay(2000); | 349 | udelay(2000); |
350 | if (i2c_probe(chip) == 0) | 350 | if (i2c_probe(chip) == 0) |
351 | break; | 351 | break; |
352 | } | 352 | } |
353 | #endif | 353 | #endif |
354 | } | 354 | } |
355 | 355 | ||
356 | return (0); | 356 | return (0); |
357 | } | 357 | } |
358 | 358 | ||
359 | /* Calculate a CRC on memory | 359 | /* Calculate a CRC on memory |
360 | * | 360 | * |
361 | * Syntax: | 361 | * Syntax: |
362 | * icrc32 {i2c_chip} {addr}{.0, .1, .2} {count} | 362 | * icrc32 {i2c_chip} {addr}{.0, .1, .2} {count} |
363 | */ | 363 | */ |
364 | int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) | 364 | int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) |
365 | { | 365 | { |
366 | uchar chip; | 366 | uchar chip; |
367 | ulong addr; | 367 | ulong addr; |
368 | uint alen; | 368 | uint alen; |
369 | int count; | 369 | int count; |
370 | uchar byte; | 370 | uchar byte; |
371 | ulong crc; | 371 | ulong crc; |
372 | ulong err; | 372 | ulong err; |
373 | int j; | 373 | int j; |
374 | 374 | ||
375 | if (argc < 4) { | 375 | if (argc < 4) { |
376 | cmd_usage(cmdtp); | 376 | cmd_usage(cmdtp); |
377 | return 1; | 377 | return 1; |
378 | } | 378 | } |
379 | 379 | ||
380 | /* | 380 | /* |
381 | * Chip is always specified. | 381 | * Chip is always specified. |
382 | */ | 382 | */ |
383 | chip = simple_strtoul(argv[1], NULL, 16); | 383 | chip = simple_strtoul(argv[1], NULL, 16); |
384 | 384 | ||
385 | /* | 385 | /* |
386 | * Address is always specified. | 386 | * Address is always specified. |
387 | */ | 387 | */ |
388 | addr = simple_strtoul(argv[2], NULL, 16); | 388 | addr = simple_strtoul(argv[2], NULL, 16); |
389 | alen = 1; | 389 | alen = 1; |
390 | for (j = 0; j < 8; j++) { | 390 | for (j = 0; j < 8; j++) { |
391 | if (argv[2][j] == '.') { | 391 | if (argv[2][j] == '.') { |
392 | alen = argv[2][j+1] - '0'; | 392 | alen = argv[2][j+1] - '0'; |
393 | if (alen > 4) { | 393 | if (alen > 4) { |
394 | cmd_usage(cmdtp); | 394 | cmd_usage(cmdtp); |
395 | return 1; | 395 | return 1; |
396 | } | 396 | } |
397 | break; | 397 | break; |
398 | } else if (argv[2][j] == '\0') | 398 | } else if (argv[2][j] == '\0') |
399 | break; | 399 | break; |
400 | } | 400 | } |
401 | 401 | ||
402 | /* | 402 | /* |
403 | * Count is always specified | 403 | * Count is always specified |
404 | */ | 404 | */ |
405 | count = simple_strtoul(argv[3], NULL, 16); | 405 | count = simple_strtoul(argv[3], NULL, 16); |
406 | 406 | ||
407 | printf ("CRC32 for %08lx ... %08lx ==> ", addr, addr + count - 1); | 407 | printf ("CRC32 for %08lx ... %08lx ==> ", addr, addr + count - 1); |
408 | /* | 408 | /* |
409 | * CRC a byte at a time. This is going to be slooow, but hey, the | 409 | * CRC a byte at a time. This is going to be slooow, but hey, the |
410 | * memories are small and slow too so hopefully nobody notices. | 410 | * memories are small and slow too so hopefully nobody notices. |
411 | */ | 411 | */ |
412 | crc = 0; | 412 | crc = 0; |
413 | err = 0; | 413 | err = 0; |
414 | while (count-- > 0) { | 414 | while (count-- > 0) { |
415 | if (i2c_read(chip, addr, alen, &byte, 1) != 0) | 415 | if (i2c_read(chip, addr, alen, &byte, 1) != 0) |
416 | err++; | 416 | err++; |
417 | crc = crc32 (crc, &byte, 1); | 417 | crc = crc32 (crc, &byte, 1); |
418 | addr++; | 418 | addr++; |
419 | } | 419 | } |
420 | if (err > 0) | 420 | if (err > 0) |
421 | puts ("Error reading the chip,\n"); | 421 | puts ("Error reading the chip,\n"); |
422 | else | 422 | else |
423 | printf ("%08lx\n", crc); | 423 | printf ("%08lx\n", crc); |
424 | 424 | ||
425 | return 0; | 425 | return 0; |
426 | } | 426 | } |
427 | 427 | ||
428 | /* Modify memory. | 428 | /* Modify memory. |
429 | * | 429 | * |
430 | * Syntax: | 430 | * Syntax: |
431 | * imm{.b, .w, .l} {i2c_chip} {addr}{.0, .1, .2} | 431 | * imm{.b, .w, .l} {i2c_chip} {addr}{.0, .1, .2} |
432 | * inm{.b, .w, .l} {i2c_chip} {addr}{.0, .1, .2} | 432 | * inm{.b, .w, .l} {i2c_chip} {addr}{.0, .1, .2} |
433 | */ | 433 | */ |
434 | 434 | ||
435 | static int | 435 | static int |
436 | mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[]) | 436 | mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[]) |
437 | { | 437 | { |
438 | uchar chip; | 438 | uchar chip; |
439 | ulong addr; | 439 | ulong addr; |
440 | uint alen; | 440 | uint alen; |
441 | ulong data; | 441 | ulong data; |
442 | int size = 1; | 442 | int size = 1; |
443 | int nbytes; | 443 | int nbytes; |
444 | int j; | 444 | int j; |
445 | extern char console_buffer[]; | 445 | extern char console_buffer[]; |
446 | 446 | ||
447 | if (argc != 3) { | 447 | if (argc != 3) { |
448 | cmd_usage(cmdtp); | 448 | cmd_usage(cmdtp); |
449 | return 1; | 449 | return 1; |
450 | } | 450 | } |
451 | 451 | ||
452 | #ifdef CONFIG_BOOT_RETRY_TIME | 452 | #ifdef CONFIG_BOOT_RETRY_TIME |
453 | reset_cmd_timeout(); /* got a good command to get here */ | 453 | reset_cmd_timeout(); /* got a good command to get here */ |
454 | #endif | 454 | #endif |
455 | /* | 455 | /* |
456 | * We use the last specified parameters, unless new ones are | 456 | * We use the last specified parameters, unless new ones are |
457 | * entered. | 457 | * entered. |
458 | */ | 458 | */ |
459 | chip = i2c_mm_last_chip; | 459 | chip = i2c_mm_last_chip; |
460 | addr = i2c_mm_last_addr; | 460 | addr = i2c_mm_last_addr; |
461 | alen = i2c_mm_last_alen; | 461 | alen = i2c_mm_last_alen; |
462 | 462 | ||
463 | if ((flag & CMD_FLAG_REPEAT) == 0) { | 463 | if ((flag & CMD_FLAG_REPEAT) == 0) { |
464 | /* | 464 | /* |
465 | * New command specified. Check for a size specification. | 465 | * New command specified. Check for a size specification. |
466 | * Defaults to byte if no or incorrect specification. | 466 | * Defaults to byte if no or incorrect specification. |
467 | */ | 467 | */ |
468 | size = cmd_get_data_size(argv[0], 1); | 468 | size = cmd_get_data_size(argv[0], 1); |
469 | 469 | ||
470 | /* | 470 | /* |
471 | * Chip is always specified. | 471 | * Chip is always specified. |
472 | */ | 472 | */ |
473 | chip = simple_strtoul(argv[1], NULL, 16); | 473 | chip = simple_strtoul(argv[1], NULL, 16); |
474 | 474 | ||
475 | /* | 475 | /* |
476 | * Address is always specified. | 476 | * Address is always specified. |
477 | */ | 477 | */ |
478 | addr = simple_strtoul(argv[2], NULL, 16); | 478 | addr = simple_strtoul(argv[2], NULL, 16); |
479 | alen = 1; | 479 | alen = 1; |
480 | for (j = 0; j < 8; j++) { | 480 | for (j = 0; j < 8; j++) { |
481 | if (argv[2][j] == '.') { | 481 | if (argv[2][j] == '.') { |
482 | alen = argv[2][j+1] - '0'; | 482 | alen = argv[2][j+1] - '0'; |
483 | if (alen > 4) { | 483 | if (alen > 4) { |
484 | cmd_usage(cmdtp); | 484 | cmd_usage(cmdtp); |
485 | return 1; | 485 | return 1; |
486 | } | 486 | } |
487 | break; | 487 | break; |
488 | } else if (argv[2][j] == '\0') | 488 | } else if (argv[2][j] == '\0') |
489 | break; | 489 | break; |
490 | } | 490 | } |
491 | } | 491 | } |
492 | 492 | ||
493 | /* | 493 | /* |
494 | * Print the address, followed by value. Then accept input for | 494 | * Print the address, followed by value. Then accept input for |
495 | * the next value. A non-converted value exits. | 495 | * the next value. A non-converted value exits. |
496 | */ | 496 | */ |
497 | do { | 497 | do { |
498 | printf("%08lx:", addr); | 498 | printf("%08lx:", addr); |
499 | if (i2c_read(chip, addr, alen, (uchar *)&data, size) != 0) | 499 | if (i2c_read(chip, addr, alen, (uchar *)&data, size) != 0) |
500 | puts ("\nError reading the chip,\n"); | 500 | puts ("\nError reading the chip,\n"); |
501 | else { | 501 | else { |
502 | data = cpu_to_be32(data); | 502 | data = cpu_to_be32(data); |
503 | if (size == 1) | 503 | if (size == 1) |
504 | printf(" %02lx", (data >> 24) & 0x000000FF); | 504 | printf(" %02lx", (data >> 24) & 0x000000FF); |
505 | else if (size == 2) | 505 | else if (size == 2) |
506 | printf(" %04lx", (data >> 16) & 0x0000FFFF); | 506 | printf(" %04lx", (data >> 16) & 0x0000FFFF); |
507 | else | 507 | else |
508 | printf(" %08lx", data); | 508 | printf(" %08lx", data); |
509 | } | 509 | } |
510 | 510 | ||
511 | nbytes = readline (" ? "); | 511 | nbytes = readline (" ? "); |
512 | if (nbytes == 0) { | 512 | if (nbytes == 0) { |
513 | /* | 513 | /* |
514 | * <CR> pressed as only input, don't modify current | 514 | * <CR> pressed as only input, don't modify current |
515 | * location and move to next. | 515 | * location and move to next. |
516 | */ | 516 | */ |
517 | if (incrflag) | 517 | if (incrflag) |
518 | addr += size; | 518 | addr += size; |
519 | nbytes = size; | 519 | nbytes = size; |
520 | #ifdef CONFIG_BOOT_RETRY_TIME | 520 | #ifdef CONFIG_BOOT_RETRY_TIME |
521 | reset_cmd_timeout(); /* good enough to not time out */ | 521 | reset_cmd_timeout(); /* good enough to not time out */ |
522 | #endif | 522 | #endif |
523 | } | 523 | } |
524 | #ifdef CONFIG_BOOT_RETRY_TIME | 524 | #ifdef CONFIG_BOOT_RETRY_TIME |
525 | else if (nbytes == -2) | 525 | else if (nbytes == -2) |
526 | break; /* timed out, exit the command */ | 526 | break; /* timed out, exit the command */ |
527 | #endif | 527 | #endif |
528 | else { | 528 | else { |
529 | char *endp; | 529 | char *endp; |
530 | 530 | ||
531 | data = simple_strtoul(console_buffer, &endp, 16); | 531 | data = simple_strtoul(console_buffer, &endp, 16); |
532 | if (size == 1) | 532 | if (size == 1) |
533 | data = data << 24; | 533 | data = data << 24; |
534 | else if (size == 2) | 534 | else if (size == 2) |
535 | data = data << 16; | 535 | data = data << 16; |
536 | data = be32_to_cpu(data); | 536 | data = be32_to_cpu(data); |
537 | nbytes = endp - console_buffer; | 537 | nbytes = endp - console_buffer; |
538 | if (nbytes) { | 538 | if (nbytes) { |
539 | #ifdef CONFIG_BOOT_RETRY_TIME | 539 | #ifdef CONFIG_BOOT_RETRY_TIME |
540 | /* | 540 | /* |
541 | * good enough to not time out | 541 | * good enough to not time out |
542 | */ | 542 | */ |
543 | reset_cmd_timeout(); | 543 | reset_cmd_timeout(); |
544 | #endif | 544 | #endif |
545 | if (i2c_write(chip, addr, alen, (uchar *)&data, size) != 0) | 545 | if (i2c_write(chip, addr, alen, (uchar *)&data, size) != 0) |
546 | puts ("Error writing the chip.\n"); | 546 | puts ("Error writing the chip.\n"); |
547 | #ifdef CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS | 547 | #ifdef CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS |
548 | udelay(CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS * 1000); | 548 | udelay(CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS * 1000); |
549 | #endif | 549 | #endif |
550 | if (incrflag) | 550 | if (incrflag) |
551 | addr += size; | 551 | addr += size; |
552 | } | 552 | } |
553 | } | 553 | } |
554 | } while (nbytes); | 554 | } while (nbytes); |
555 | 555 | ||
556 | i2c_mm_last_chip = chip; | 556 | i2c_mm_last_chip = chip; |
557 | i2c_mm_last_addr = addr; | 557 | i2c_mm_last_addr = addr; |
558 | i2c_mm_last_alen = alen; | 558 | i2c_mm_last_alen = alen; |
559 | 559 | ||
560 | return 0; | 560 | return 0; |
561 | } | 561 | } |
562 | 562 | ||
563 | /* | 563 | /* |
564 | * Syntax: | 564 | * Syntax: |
565 | * iprobe {addr}{.0, .1, .2} | 565 | * iprobe {addr}{.0, .1, .2} |
566 | */ | 566 | */ |
567 | int do_i2c_probe (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) | 567 | int do_i2c_probe (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) |
568 | { | 568 | { |
569 | int j; | 569 | int j; |
570 | #if defined(CONFIG_SYS_I2C_NOPROBES) | 570 | #if defined(CONFIG_SYS_I2C_NOPROBES) |
571 | int k, skip; | 571 | int k, skip; |
572 | uchar bus = GET_BUS_NUM; | 572 | uchar bus = GET_BUS_NUM; |
573 | #endif /* NOPROBES */ | 573 | #endif /* NOPROBES */ |
574 | 574 | ||
575 | puts ("Valid chip addresses:"); | 575 | puts ("Valid chip addresses:"); |
576 | for (j = 0; j < 128; j++) { | 576 | for (j = 0; j < 128; j++) { |
577 | #if defined(CONFIG_SYS_I2C_NOPROBES) | 577 | #if defined(CONFIG_SYS_I2C_NOPROBES) |
578 | skip = 0; | 578 | skip = 0; |
579 | for (k=0; k < NUM_ELEMENTS_NOPROBE; k++) { | 579 | for (k=0; k < NUM_ELEMENTS_NOPROBE; k++) { |
580 | if (COMPARE_BUS(bus, k) && COMPARE_ADDR(j, k)) { | 580 | if (COMPARE_BUS(bus, k) && COMPARE_ADDR(j, k)) { |
581 | skip = 1; | 581 | skip = 1; |
582 | break; | 582 | break; |
583 | } | 583 | } |
584 | } | 584 | } |
585 | if (skip) | 585 | if (skip) |
586 | continue; | 586 | continue; |
587 | #endif | 587 | #endif |
588 | if (i2c_probe(j) == 0) | 588 | if (i2c_probe(j) == 0) |
589 | printf(" %02X", j); | 589 | printf(" %02X", j); |
590 | } | 590 | } |
591 | putc ('\n'); | 591 | putc ('\n'); |
592 | 592 | ||
593 | #if defined(CONFIG_SYS_I2C_NOPROBES) | 593 | #if defined(CONFIG_SYS_I2C_NOPROBES) |
594 | puts ("Excluded chip addresses:"); | 594 | puts ("Excluded chip addresses:"); |
595 | for (k=0; k < NUM_ELEMENTS_NOPROBE; k++) { | 595 | for (k=0; k < NUM_ELEMENTS_NOPROBE; k++) { |
596 | if (COMPARE_BUS(bus,k)) | 596 | if (COMPARE_BUS(bus,k)) |
597 | printf(" %02X", NO_PROBE_ADDR(k)); | 597 | printf(" %02X", NO_PROBE_ADDR(k)); |
598 | } | 598 | } |
599 | putc ('\n'); | 599 | putc ('\n'); |
600 | #endif | 600 | #endif |
601 | 601 | ||
602 | return 0; | 602 | return 0; |
603 | } | 603 | } |
604 | 604 | ||
605 | /* | 605 | /* |
606 | * Syntax: | 606 | * Syntax: |
607 | * iloop {i2c_chip} {addr}{.0, .1, .2} [{length}] [{delay}] | 607 | * iloop {i2c_chip} {addr}{.0, .1, .2} [{length}] [{delay}] |
608 | * {length} - Number of bytes to read | 608 | * {length} - Number of bytes to read |
609 | * {delay} - A DECIMAL number and defaults to 1000 uSec | 609 | * {delay} - A DECIMAL number and defaults to 1000 uSec |
610 | */ | 610 | */ |
611 | int do_i2c_loop(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) | 611 | int do_i2c_loop(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) |
612 | { | 612 | { |
613 | u_char chip; | 613 | u_char chip; |
614 | ulong alen; | 614 | ulong alen; |
615 | uint addr; | 615 | uint addr; |
616 | uint length; | 616 | uint length; |
617 | u_char bytes[16]; | 617 | u_char bytes[16]; |
618 | int delay; | 618 | int delay; |
619 | int j; | 619 | int j; |
620 | 620 | ||
621 | if (argc < 3) { | 621 | if (argc < 3) { |
622 | cmd_usage(cmdtp); | 622 | cmd_usage(cmdtp); |
623 | return 1; | 623 | return 1; |
624 | } | 624 | } |
625 | 625 | ||
626 | /* | 626 | /* |
627 | * Chip is always specified. | 627 | * Chip is always specified. |
628 | */ | 628 | */ |
629 | chip = simple_strtoul(argv[1], NULL, 16); | 629 | chip = simple_strtoul(argv[1], NULL, 16); |
630 | 630 | ||
631 | /* | 631 | /* |
632 | * Address is always specified. | 632 | * Address is always specified. |
633 | */ | 633 | */ |
634 | addr = simple_strtoul(argv[2], NULL, 16); | 634 | addr = simple_strtoul(argv[2], NULL, 16); |
635 | alen = 1; | 635 | alen = 1; |
636 | for (j = 0; j < 8; j++) { | 636 | for (j = 0; j < 8; j++) { |
637 | if (argv[2][j] == '.') { | 637 | if (argv[2][j] == '.') { |
638 | alen = argv[2][j+1] - '0'; | 638 | alen = argv[2][j+1] - '0'; |
639 | if (alen > 4) { | 639 | if (alen > 4) { |
640 | cmd_usage(cmdtp); | 640 | cmd_usage(cmdtp); |
641 | return 1; | 641 | return 1; |
642 | } | 642 | } |
643 | break; | 643 | break; |
644 | } else if (argv[2][j] == '\0') | 644 | } else if (argv[2][j] == '\0') |
645 | break; | 645 | break; |
646 | } | 646 | } |
647 | 647 | ||
648 | /* | 648 | /* |
649 | * Length is the number of objects, not number of bytes. | 649 | * Length is the number of objects, not number of bytes. |
650 | */ | 650 | */ |
651 | length = 1; | 651 | length = 1; |
652 | length = simple_strtoul(argv[3], NULL, 16); | 652 | length = simple_strtoul(argv[3], NULL, 16); |
653 | if (length > sizeof(bytes)) | 653 | if (length > sizeof(bytes)) |
654 | length = sizeof(bytes); | 654 | length = sizeof(bytes); |
655 | 655 | ||
656 | /* | 656 | /* |
657 | * The delay time (uSec) is optional. | 657 | * The delay time (uSec) is optional. |
658 | */ | 658 | */ |
659 | delay = 1000; | 659 | delay = 1000; |
660 | if (argc > 3) | 660 | if (argc > 3) |
661 | delay = simple_strtoul(argv[4], NULL, 10); | 661 | delay = simple_strtoul(argv[4], NULL, 10); |
662 | /* | 662 | /* |
663 | * Run the loop... | 663 | * Run the loop... |
664 | */ | 664 | */ |
665 | while (1) { | 665 | while (1) { |
666 | if (i2c_read(chip, addr, alen, bytes, length) != 0) | 666 | if (i2c_read(chip, addr, alen, bytes, length) != 0) |
667 | puts ("Error reading the chip.\n"); | 667 | puts ("Error reading the chip.\n"); |
668 | udelay(delay); | 668 | udelay(delay); |
669 | } | 669 | } |
670 | 670 | ||
671 | /* NOTREACHED */ | 671 | /* NOTREACHED */ |
672 | return 0; | 672 | return 0; |
673 | } | 673 | } |
674 | 674 | ||
675 | /* | 675 | /* |
676 | * The SDRAM command is separately configured because many | 676 | * The SDRAM command is separately configured because many |
677 | * (most?) embedded boards don't use SDRAM DIMMs. | 677 | * (most?) embedded boards don't use SDRAM DIMMs. |
678 | */ | 678 | */ |
679 | #if defined(CONFIG_CMD_SDRAM) | 679 | #if defined(CONFIG_CMD_SDRAM) |
680 | static void print_ddr2_tcyc (u_char const b) | 680 | static void print_ddr2_tcyc (u_char const b) |
681 | { | 681 | { |
682 | printf ("%d.", (b >> 4) & 0x0F); | 682 | printf ("%d.", (b >> 4) & 0x0F); |
683 | switch (b & 0x0F) { | 683 | switch (b & 0x0F) { |
684 | case 0x0: | 684 | case 0x0: |
685 | case 0x1: | 685 | case 0x1: |
686 | case 0x2: | 686 | case 0x2: |
687 | case 0x3: | 687 | case 0x3: |
688 | case 0x4: | 688 | case 0x4: |
689 | case 0x5: | 689 | case 0x5: |
690 | case 0x6: | 690 | case 0x6: |
691 | case 0x7: | 691 | case 0x7: |
692 | case 0x8: | 692 | case 0x8: |
693 | case 0x9: | 693 | case 0x9: |
694 | printf ("%d ns\n", b & 0x0F); | 694 | printf ("%d ns\n", b & 0x0F); |
695 | break; | 695 | break; |
696 | case 0xA: | 696 | case 0xA: |
697 | puts ("25 ns\n"); | 697 | puts ("25 ns\n"); |
698 | break; | 698 | break; |
699 | case 0xB: | 699 | case 0xB: |
700 | puts ("33 ns\n"); | 700 | puts ("33 ns\n"); |
701 | break; | 701 | break; |
702 | case 0xC: | 702 | case 0xC: |
703 | puts ("66 ns\n"); | 703 | puts ("66 ns\n"); |
704 | break; | 704 | break; |
705 | case 0xD: | 705 | case 0xD: |
706 | puts ("75 ns\n"); | 706 | puts ("75 ns\n"); |
707 | break; | 707 | break; |
708 | default: | 708 | default: |
709 | puts ("?? ns\n"); | 709 | puts ("?? ns\n"); |
710 | break; | 710 | break; |
711 | } | 711 | } |
712 | } | 712 | } |
713 | 713 | ||
714 | static void decode_bits (u_char const b, char const *str[], int const do_once) | 714 | static void decode_bits (u_char const b, char const *str[], int const do_once) |
715 | { | 715 | { |
716 | u_char mask; | 716 | u_char mask; |
717 | 717 | ||
718 | for (mask = 0x80; mask != 0x00; mask >>= 1, ++str) { | 718 | for (mask = 0x80; mask != 0x00; mask >>= 1, ++str) { |
719 | if (b & mask) { | 719 | if (b & mask) { |
720 | puts (*str); | 720 | puts (*str); |
721 | if (do_once) | 721 | if (do_once) |
722 | return; | 722 | return; |
723 | } | 723 | } |
724 | } | 724 | } |
725 | } | 725 | } |
726 | 726 | ||
727 | /* | 727 | /* |
728 | * Syntax: | 728 | * Syntax: |
729 | * sdram {i2c_chip} | 729 | * sdram {i2c_chip} |
730 | */ | 730 | */ |
731 | int do_sdram (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) | 731 | int do_sdram (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) |
732 | { | 732 | { |
733 | enum { unknown, EDO, SDRAM, DDR2 } type; | 733 | enum { unknown, EDO, SDRAM, DDR2 } type; |
734 | 734 | ||
735 | u_char chip; | 735 | u_char chip; |
736 | u_char data[128]; | 736 | u_char data[128]; |
737 | u_char cksum; | 737 | u_char cksum; |
738 | int j; | 738 | int j; |
739 | 739 | ||
740 | static const char *decode_CAS_DDR2[] = { | 740 | static const char *decode_CAS_DDR2[] = { |
741 | " TBD", " 6", " 5", " 4", " 3", " 2", " TBD", " TBD" | 741 | " TBD", " 6", " 5", " 4", " 3", " 2", " TBD", " TBD" |
742 | }; | 742 | }; |
743 | 743 | ||
744 | static const char *decode_CAS_default[] = { | 744 | static const char *decode_CAS_default[] = { |
745 | " TBD", " 7", " 6", " 5", " 4", " 3", " 2", " 1" | 745 | " TBD", " 7", " 6", " 5", " 4", " 3", " 2", " 1" |
746 | }; | 746 | }; |
747 | 747 | ||
748 | static const char *decode_CS_WE_default[] = { | 748 | static const char *decode_CS_WE_default[] = { |
749 | " TBD", " 6", " 5", " 4", " 3", " 2", " 1", " 0" | 749 | " TBD", " 6", " 5", " 4", " 3", " 2", " 1", " 0" |
750 | }; | 750 | }; |
751 | 751 | ||
752 | static const char *decode_byte21_default[] = { | 752 | static const char *decode_byte21_default[] = { |
753 | " TBD (bit 7)\n", | 753 | " TBD (bit 7)\n", |
754 | " Redundant row address\n", | 754 | " Redundant row address\n", |
755 | " Differential clock input\n", | 755 | " Differential clock input\n", |
756 | " Registerd DQMB inputs\n", | 756 | " Registerd DQMB inputs\n", |
757 | " Buffered DQMB inputs\n", | 757 | " Buffered DQMB inputs\n", |
758 | " On-card PLL\n", | 758 | " On-card PLL\n", |
759 | " Registered address/control lines\n", | 759 | " Registered address/control lines\n", |
760 | " Buffered address/control lines\n" | 760 | " Buffered address/control lines\n" |
761 | }; | 761 | }; |
762 | 762 | ||
763 | static const char *decode_byte22_DDR2[] = { | 763 | static const char *decode_byte22_DDR2[] = { |
764 | " TBD (bit 7)\n", | 764 | " TBD (bit 7)\n", |
765 | " TBD (bit 6)\n", | 765 | " TBD (bit 6)\n", |
766 | " TBD (bit 5)\n", | 766 | " TBD (bit 5)\n", |
767 | " TBD (bit 4)\n", | 767 | " TBD (bit 4)\n", |
768 | " TBD (bit 3)\n", | 768 | " TBD (bit 3)\n", |
769 | " Supports partial array self refresh\n", | 769 | " Supports partial array self refresh\n", |
770 | " Supports 50 ohm ODT\n", | 770 | " Supports 50 ohm ODT\n", |
771 | " Supports weak driver\n" | 771 | " Supports weak driver\n" |
772 | }; | 772 | }; |
773 | 773 | ||
774 | static const char *decode_row_density_DDR2[] = { | 774 | static const char *decode_row_density_DDR2[] = { |
775 | "512 MiB", "256 MiB", "128 MiB", "16 GiB", | 775 | "512 MiB", "256 MiB", "128 MiB", "16 GiB", |
776 | "8 GiB", "4 GiB", "2 GiB", "1 GiB" | 776 | "8 GiB", "4 GiB", "2 GiB", "1 GiB" |
777 | }; | 777 | }; |
778 | 778 | ||
779 | static const char *decode_row_density_default[] = { | 779 | static const char *decode_row_density_default[] = { |
780 | "512 MiB", "256 MiB", "128 MiB", "64 MiB", | 780 | "512 MiB", "256 MiB", "128 MiB", "64 MiB", |
781 | "32 MiB", "16 MiB", "8 MiB", "4 MiB" | 781 | "32 MiB", "16 MiB", "8 MiB", "4 MiB" |
782 | }; | 782 | }; |
783 | 783 | ||
784 | if (argc < 2) { | 784 | if (argc < 2) { |
785 | cmd_usage(cmdtp); | 785 | cmd_usage(cmdtp); |
786 | return 1; | 786 | return 1; |
787 | } | 787 | } |
788 | /* | 788 | /* |
789 | * Chip is always specified. | 789 | * Chip is always specified. |
790 | */ | 790 | */ |
791 | chip = simple_strtoul (argv[1], NULL, 16); | 791 | chip = simple_strtoul (argv[1], NULL, 16); |
792 | 792 | ||
793 | if (i2c_read (chip, 0, 1, data, sizeof (data)) != 0) { | 793 | if (i2c_read (chip, 0, 1, data, sizeof (data)) != 0) { |
794 | puts ("No SDRAM Serial Presence Detect found.\n"); | 794 | puts ("No SDRAM Serial Presence Detect found.\n"); |
795 | return 1; | 795 | return 1; |
796 | } | 796 | } |
797 | 797 | ||
798 | cksum = 0; | 798 | cksum = 0; |
799 | for (j = 0; j < 63; j++) { | 799 | for (j = 0; j < 63; j++) { |
800 | cksum += data[j]; | 800 | cksum += data[j]; |
801 | } | 801 | } |
802 | if (cksum != data[63]) { | 802 | if (cksum != data[63]) { |
803 | printf ("WARNING: Configuration data checksum failure:\n" | 803 | printf ("WARNING: Configuration data checksum failure:\n" |
804 | " is 0x%02x, calculated 0x%02x\n", data[63], cksum); | 804 | " is 0x%02x, calculated 0x%02x\n", data[63], cksum); |
805 | } | 805 | } |
806 | printf ("SPD data revision %d.%d\n", | 806 | printf ("SPD data revision %d.%d\n", |
807 | (data[62] >> 4) & 0x0F, data[62] & 0x0F); | 807 | (data[62] >> 4) & 0x0F, data[62] & 0x0F); |
808 | printf ("Bytes used 0x%02X\n", data[0]); | 808 | printf ("Bytes used 0x%02X\n", data[0]); |
809 | printf ("Serial memory size 0x%02X\n", 1 << data[1]); | 809 | printf ("Serial memory size 0x%02X\n", 1 << data[1]); |
810 | 810 | ||
811 | puts ("Memory type "); | 811 | puts ("Memory type "); |
812 | switch (data[2]) { | 812 | switch (data[2]) { |
813 | case 2: | 813 | case 2: |
814 | type = EDO; | 814 | type = EDO; |
815 | puts ("EDO\n"); | 815 | puts ("EDO\n"); |
816 | break; | 816 | break; |
817 | case 4: | 817 | case 4: |
818 | type = SDRAM; | 818 | type = SDRAM; |
819 | puts ("SDRAM\n"); | 819 | puts ("SDRAM\n"); |
820 | break; | 820 | break; |
821 | case 8: | 821 | case 8: |
822 | type = DDR2; | 822 | type = DDR2; |
823 | puts ("DDR2\n"); | 823 | puts ("DDR2\n"); |
824 | break; | 824 | break; |
825 | default: | 825 | default: |
826 | type = unknown; | 826 | type = unknown; |
827 | puts ("unknown\n"); | 827 | puts ("unknown\n"); |
828 | break; | 828 | break; |
829 | } | 829 | } |
830 | 830 | ||
831 | puts ("Row address bits "); | 831 | puts ("Row address bits "); |
832 | if ((data[3] & 0x00F0) == 0) | 832 | if ((data[3] & 0x00F0) == 0) |
833 | printf ("%d\n", data[3] & 0x0F); | 833 | printf ("%d\n", data[3] & 0x0F); |
834 | else | 834 | else |
835 | printf ("%d/%d\n", data[3] & 0x0F, (data[3] >> 4) & 0x0F); | 835 | printf ("%d/%d\n", data[3] & 0x0F, (data[3] >> 4) & 0x0F); |
836 | 836 | ||
837 | puts ("Column address bits "); | 837 | puts ("Column address bits "); |
838 | if ((data[4] & 0x00F0) == 0) | 838 | if ((data[4] & 0x00F0) == 0) |
839 | printf ("%d\n", data[4] & 0x0F); | 839 | printf ("%d\n", data[4] & 0x0F); |
840 | else | 840 | else |
841 | printf ("%d/%d\n", data[4] & 0x0F, (data[4] >> 4) & 0x0F); | 841 | printf ("%d/%d\n", data[4] & 0x0F, (data[4] >> 4) & 0x0F); |
842 | 842 | ||
843 | switch (type) { | 843 | switch (type) { |
844 | case DDR2: | 844 | case DDR2: |
845 | printf ("Number of ranks %d\n", | 845 | printf ("Number of ranks %d\n", |
846 | (data[5] & 0x07) + 1); | 846 | (data[5] & 0x07) + 1); |
847 | break; | 847 | break; |
848 | default: | 848 | default: |
849 | printf ("Module rows %d\n", data[5]); | 849 | printf ("Module rows %d\n", data[5]); |
850 | break; | 850 | break; |
851 | } | 851 | } |
852 | 852 | ||
853 | switch (type) { | 853 | switch (type) { |
854 | case DDR2: | 854 | case DDR2: |
855 | printf ("Module data width %d bits\n", data[6]); | 855 | printf ("Module data width %d bits\n", data[6]); |
856 | break; | 856 | break; |
857 | default: | 857 | default: |
858 | printf ("Module data width %d bits\n", | 858 | printf ("Module data width %d bits\n", |
859 | (data[7] << 8) | data[6]); | 859 | (data[7] << 8) | data[6]); |
860 | break; | 860 | break; |
861 | } | 861 | } |
862 | 862 | ||
863 | puts ("Interface signal levels "); | 863 | puts ("Interface signal levels "); |
864 | switch(data[8]) { | 864 | switch(data[8]) { |
865 | case 0: puts ("TTL 5.0 V\n"); break; | 865 | case 0: puts ("TTL 5.0 V\n"); break; |
866 | case 1: puts ("LVTTL\n"); break; | 866 | case 1: puts ("LVTTL\n"); break; |
867 | case 2: puts ("HSTL 1.5 V\n"); break; | 867 | case 2: puts ("HSTL 1.5 V\n"); break; |
868 | case 3: puts ("SSTL 3.3 V\n"); break; | 868 | case 3: puts ("SSTL 3.3 V\n"); break; |
869 | case 4: puts ("SSTL 2.5 V\n"); break; | 869 | case 4: puts ("SSTL 2.5 V\n"); break; |
870 | case 5: puts ("SSTL 1.8 V\n"); break; | 870 | case 5: puts ("SSTL 1.8 V\n"); break; |
871 | default: puts ("unknown\n"); break; | 871 | default: puts ("unknown\n"); break; |
872 | } | 872 | } |
873 | 873 | ||
874 | switch (type) { | 874 | switch (type) { |
875 | case DDR2: | 875 | case DDR2: |
876 | printf ("SDRAM cycle time "); | 876 | printf ("SDRAM cycle time "); |
877 | print_ddr2_tcyc (data[9]); | 877 | print_ddr2_tcyc (data[9]); |
878 | break; | 878 | break; |
879 | default: | 879 | default: |
880 | printf ("SDRAM cycle time %d.%d ns\n", | 880 | printf ("SDRAM cycle time %d.%d ns\n", |
881 | (data[9] >> 4) & 0x0F, data[9] & 0x0F); | 881 | (data[9] >> 4) & 0x0F, data[9] & 0x0F); |
882 | break; | 882 | break; |
883 | } | 883 | } |
884 | 884 | ||
885 | switch (type) { | 885 | switch (type) { |
886 | case DDR2: | 886 | case DDR2: |
887 | printf ("SDRAM access time 0.%d%d ns\n", | 887 | printf ("SDRAM access time 0.%d%d ns\n", |
888 | (data[10] >> 4) & 0x0F, data[10] & 0x0F); | 888 | (data[10] >> 4) & 0x0F, data[10] & 0x0F); |
889 | break; | 889 | break; |
890 | default: | 890 | default: |
891 | printf ("SDRAM access time %d.%d ns\n", | 891 | printf ("SDRAM access time %d.%d ns\n", |
892 | (data[10] >> 4) & 0x0F, data[10] & 0x0F); | 892 | (data[10] >> 4) & 0x0F, data[10] & 0x0F); |
893 | break; | 893 | break; |
894 | } | 894 | } |
895 | 895 | ||
896 | puts ("EDC configuration "); | 896 | puts ("EDC configuration "); |
897 | switch (data[11]) { | 897 | switch (data[11]) { |
898 | case 0: puts ("None\n"); break; | 898 | case 0: puts ("None\n"); break; |
899 | case 1: puts ("Parity\n"); break; | 899 | case 1: puts ("Parity\n"); break; |
900 | case 2: puts ("ECC\n"); break; | 900 | case 2: puts ("ECC\n"); break; |
901 | default: puts ("unknown\n"); break; | 901 | default: puts ("unknown\n"); break; |
902 | } | 902 | } |
903 | 903 | ||
904 | if ((data[12] & 0x80) == 0) | 904 | if ((data[12] & 0x80) == 0) |
905 | puts ("No self refresh, rate "); | 905 | puts ("No self refresh, rate "); |
906 | else | 906 | else |
907 | puts ("Self refresh, rate "); | 907 | puts ("Self refresh, rate "); |
908 | 908 | ||
909 | switch(data[12] & 0x7F) { | 909 | switch(data[12] & 0x7F) { |
910 | case 0: puts ("15.625 us\n"); break; | 910 | case 0: puts ("15.625 us\n"); break; |
911 | case 1: puts ("3.9 us\n"); break; | 911 | case 1: puts ("3.9 us\n"); break; |
912 | case 2: puts ("7.8 us\n"); break; | 912 | case 2: puts ("7.8 us\n"); break; |
913 | case 3: puts ("31.3 us\n"); break; | 913 | case 3: puts ("31.3 us\n"); break; |
914 | case 4: puts ("62.5 us\n"); break; | 914 | case 4: puts ("62.5 us\n"); break; |
915 | case 5: puts ("125 us\n"); break; | 915 | case 5: puts ("125 us\n"); break; |
916 | default: puts ("unknown\n"); break; | 916 | default: puts ("unknown\n"); break; |
917 | } | 917 | } |
918 | 918 | ||
919 | switch (type) { | 919 | switch (type) { |
920 | case DDR2: | 920 | case DDR2: |
921 | printf ("SDRAM width (primary) %d\n", data[13]); | 921 | printf ("SDRAM width (primary) %d\n", data[13]); |
922 | break; | 922 | break; |
923 | default: | 923 | default: |
924 | printf ("SDRAM width (primary) %d\n", data[13] & 0x7F); | 924 | printf ("SDRAM width (primary) %d\n", data[13] & 0x7F); |
925 | if ((data[13] & 0x80) != 0) { | 925 | if ((data[13] & 0x80) != 0) { |
926 | printf (" (second bank) %d\n", | 926 | printf (" (second bank) %d\n", |
927 | 2 * (data[13] & 0x7F)); | 927 | 2 * (data[13] & 0x7F)); |
928 | } | 928 | } |
929 | break; | 929 | break; |
930 | } | 930 | } |
931 | 931 | ||
932 | switch (type) { | 932 | switch (type) { |
933 | case DDR2: | 933 | case DDR2: |
934 | if (data[14] != 0) | 934 | if (data[14] != 0) |
935 | printf ("EDC width %d\n", data[14]); | 935 | printf ("EDC width %d\n", data[14]); |
936 | break; | 936 | break; |
937 | default: | 937 | default: |
938 | if (data[14] != 0) { | 938 | if (data[14] != 0) { |
939 | printf ("EDC width %d\n", | 939 | printf ("EDC width %d\n", |
940 | data[14] & 0x7F); | 940 | data[14] & 0x7F); |
941 | 941 | ||
942 | if ((data[14] & 0x80) != 0) { | 942 | if ((data[14] & 0x80) != 0) { |
943 | printf (" (second bank) %d\n", | 943 | printf (" (second bank) %d\n", |
944 | 2 * (data[14] & 0x7F)); | 944 | 2 * (data[14] & 0x7F)); |
945 | } | 945 | } |
946 | } | 946 | } |
947 | break; | 947 | break; |
948 | } | 948 | } |
949 | 949 | ||
950 | if (DDR2 != type) { | 950 | if (DDR2 != type) { |
951 | printf ("Min clock delay, back-to-back random column addresses " | 951 | printf ("Min clock delay, back-to-back random column addresses " |
952 | "%d\n", data[15]); | 952 | "%d\n", data[15]); |
953 | } | 953 | } |
954 | 954 | ||
955 | puts ("Burst length(s) "); | 955 | puts ("Burst length(s) "); |
956 | if (data[16] & 0x80) puts (" Page"); | 956 | if (data[16] & 0x80) puts (" Page"); |
957 | if (data[16] & 0x08) puts (" 8"); | 957 | if (data[16] & 0x08) puts (" 8"); |
958 | if (data[16] & 0x04) puts (" 4"); | 958 | if (data[16] & 0x04) puts (" 4"); |
959 | if (data[16] & 0x02) puts (" 2"); | 959 | if (data[16] & 0x02) puts (" 2"); |
960 | if (data[16] & 0x01) puts (" 1"); | 960 | if (data[16] & 0x01) puts (" 1"); |
961 | putc ('\n'); | 961 | putc ('\n'); |
962 | printf ("Number of banks %d\n", data[17]); | 962 | printf ("Number of banks %d\n", data[17]); |
963 | 963 | ||
964 | switch (type) { | 964 | switch (type) { |
965 | case DDR2: | 965 | case DDR2: |
966 | puts ("CAS latency(s) "); | 966 | puts ("CAS latency(s) "); |
967 | decode_bits (data[18], decode_CAS_DDR2, 0); | 967 | decode_bits (data[18], decode_CAS_DDR2, 0); |
968 | putc ('\n'); | 968 | putc ('\n'); |
969 | break; | 969 | break; |
970 | default: | 970 | default: |
971 | puts ("CAS latency(s) "); | 971 | puts ("CAS latency(s) "); |
972 | decode_bits (data[18], decode_CAS_default, 0); | 972 | decode_bits (data[18], decode_CAS_default, 0); |
973 | putc ('\n'); | 973 | putc ('\n'); |
974 | break; | 974 | break; |
975 | } | 975 | } |
976 | 976 | ||
977 | if (DDR2 != type) { | 977 | if (DDR2 != type) { |
978 | puts ("CS latency(s) "); | 978 | puts ("CS latency(s) "); |
979 | decode_bits (data[19], decode_CS_WE_default, 0); | 979 | decode_bits (data[19], decode_CS_WE_default, 0); |
980 | putc ('\n'); | 980 | putc ('\n'); |
981 | } | 981 | } |
982 | 982 | ||
983 | if (DDR2 != type) { | 983 | if (DDR2 != type) { |
984 | puts ("WE latency(s) "); | 984 | puts ("WE latency(s) "); |
985 | decode_bits (data[20], decode_CS_WE_default, 0); | 985 | decode_bits (data[20], decode_CS_WE_default, 0); |
986 | putc ('\n'); | 986 | putc ('\n'); |
987 | } | 987 | } |
988 | 988 | ||
989 | switch (type) { | 989 | switch (type) { |
990 | case DDR2: | 990 | case DDR2: |
991 | puts ("Module attributes:\n"); | 991 | puts ("Module attributes:\n"); |
992 | if (data[21] & 0x80) | 992 | if (data[21] & 0x80) |
993 | puts (" TBD (bit 7)\n"); | 993 | puts (" TBD (bit 7)\n"); |
994 | if (data[21] & 0x40) | 994 | if (data[21] & 0x40) |
995 | puts (" Analysis probe installed\n"); | 995 | puts (" Analysis probe installed\n"); |
996 | if (data[21] & 0x20) | 996 | if (data[21] & 0x20) |
997 | puts (" TBD (bit 5)\n"); | 997 | puts (" TBD (bit 5)\n"); |
998 | if (data[21] & 0x10) | 998 | if (data[21] & 0x10) |
999 | puts (" FET switch external enable\n"); | 999 | puts (" FET switch external enable\n"); |
1000 | printf (" %d PLLs on DIMM\n", (data[21] >> 2) & 0x03); | 1000 | printf (" %d PLLs on DIMM\n", (data[21] >> 2) & 0x03); |
1001 | if (data[20] & 0x11) { | 1001 | if (data[20] & 0x11) { |
1002 | printf (" %d active registers on DIMM\n", | 1002 | printf (" %d active registers on DIMM\n", |
1003 | (data[21] & 0x03) + 1); | 1003 | (data[21] & 0x03) + 1); |
1004 | } | 1004 | } |
1005 | break; | 1005 | break; |
1006 | default: | 1006 | default: |
1007 | puts ("Module attributes:\n"); | 1007 | puts ("Module attributes:\n"); |
1008 | if (!data[21]) | 1008 | if (!data[21]) |
1009 | puts (" (none)\n"); | 1009 | puts (" (none)\n"); |
1010 | else | 1010 | else |
1011 | decode_bits (data[21], decode_byte21_default, 0); | 1011 | decode_bits (data[21], decode_byte21_default, 0); |
1012 | break; | 1012 | break; |
1013 | } | 1013 | } |
1014 | 1014 | ||
1015 | switch (type) { | 1015 | switch (type) { |
1016 | case DDR2: | 1016 | case DDR2: |
1017 | decode_bits (data[22], decode_byte22_DDR2, 0); | 1017 | decode_bits (data[22], decode_byte22_DDR2, 0); |
1018 | break; | 1018 | break; |
1019 | default: | 1019 | default: |
1020 | puts ("Device attributes:\n"); | 1020 | puts ("Device attributes:\n"); |
1021 | if (data[22] & 0x80) puts (" TBD (bit 7)\n"); | 1021 | if (data[22] & 0x80) puts (" TBD (bit 7)\n"); |
1022 | if (data[22] & 0x40) puts (" TBD (bit 6)\n"); | 1022 | if (data[22] & 0x40) puts (" TBD (bit 6)\n"); |
1023 | if (data[22] & 0x20) puts (" Upper Vcc tolerance 5%\n"); | 1023 | if (data[22] & 0x20) puts (" Upper Vcc tolerance 5%\n"); |
1024 | else puts (" Upper Vcc tolerance 10%\n"); | 1024 | else puts (" Upper Vcc tolerance 10%\n"); |
1025 | if (data[22] & 0x10) puts (" Lower Vcc tolerance 5%\n"); | 1025 | if (data[22] & 0x10) puts (" Lower Vcc tolerance 5%\n"); |
1026 | else puts (" Lower Vcc tolerance 10%\n"); | 1026 | else puts (" Lower Vcc tolerance 10%\n"); |
1027 | if (data[22] & 0x08) puts (" Supports write1/read burst\n"); | 1027 | if (data[22] & 0x08) puts (" Supports write1/read burst\n"); |
1028 | if (data[22] & 0x04) puts (" Supports precharge all\n"); | 1028 | if (data[22] & 0x04) puts (" Supports precharge all\n"); |
1029 | if (data[22] & 0x02) puts (" Supports auto precharge\n"); | 1029 | if (data[22] & 0x02) puts (" Supports auto precharge\n"); |
1030 | if (data[22] & 0x01) puts (" Supports early RAS# precharge\n"); | 1030 | if (data[22] & 0x01) puts (" Supports early RAS# precharge\n"); |
1031 | break; | 1031 | break; |
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | switch (type) { | 1034 | switch (type) { |
1035 | case DDR2: | 1035 | case DDR2: |
1036 | printf ("SDRAM cycle time (2nd highest CAS latency) "); | 1036 | printf ("SDRAM cycle time (2nd highest CAS latency) "); |
1037 | print_ddr2_tcyc (data[23]); | 1037 | print_ddr2_tcyc (data[23]); |
1038 | break; | 1038 | break; |
1039 | default: | 1039 | default: |
1040 | printf ("SDRAM cycle time (2nd highest CAS latency) %d." | 1040 | printf ("SDRAM cycle time (2nd highest CAS latency) %d." |
1041 | "%d ns\n", (data[23] >> 4) & 0x0F, data[23] & 0x0F); | 1041 | "%d ns\n", (data[23] >> 4) & 0x0F, data[23] & 0x0F); |
1042 | break; | 1042 | break; |
1043 | } | 1043 | } |
1044 | 1044 | ||
1045 | switch (type) { | 1045 | switch (type) { |
1046 | case DDR2: | 1046 | case DDR2: |
1047 | printf ("SDRAM access from clock (2nd highest CAS latency) 0." | 1047 | printf ("SDRAM access from clock (2nd highest CAS latency) 0." |
1048 | "%d%d ns\n", (data[24] >> 4) & 0x0F, data[24] & 0x0F); | 1048 | "%d%d ns\n", (data[24] >> 4) & 0x0F, data[24] & 0x0F); |
1049 | break; | 1049 | break; |
1050 | default: | 1050 | default: |
1051 | printf ("SDRAM access from clock (2nd highest CAS latency) %d." | 1051 | printf ("SDRAM access from clock (2nd highest CAS latency) %d." |
1052 | "%d ns\n", (data[24] >> 4) & 0x0F, data[24] & 0x0F); | 1052 | "%d ns\n", (data[24] >> 4) & 0x0F, data[24] & 0x0F); |
1053 | break; | 1053 | break; |
1054 | } | 1054 | } |
1055 | 1055 | ||
1056 | switch (type) { | 1056 | switch (type) { |
1057 | case DDR2: | 1057 | case DDR2: |
1058 | printf ("SDRAM cycle time (3rd highest CAS latency) "); | 1058 | printf ("SDRAM cycle time (3rd highest CAS latency) "); |
1059 | print_ddr2_tcyc (data[25]); | 1059 | print_ddr2_tcyc (data[25]); |
1060 | break; | 1060 | break; |
1061 | default: | 1061 | default: |
1062 | printf ("SDRAM cycle time (3rd highest CAS latency) %d." | 1062 | printf ("SDRAM cycle time (3rd highest CAS latency) %d." |
1063 | "%d ns\n", (data[25] >> 4) & 0x0F, data[25] & 0x0F); | 1063 | "%d ns\n", (data[25] >> 4) & 0x0F, data[25] & 0x0F); |
1064 | break; | 1064 | break; |
1065 | } | 1065 | } |
1066 | 1066 | ||
1067 | switch (type) { | 1067 | switch (type) { |
1068 | case DDR2: | 1068 | case DDR2: |
1069 | printf ("SDRAM access from clock (3rd highest CAS latency) 0." | 1069 | printf ("SDRAM access from clock (3rd highest CAS latency) 0." |
1070 | "%d%d ns\n", (data[26] >> 4) & 0x0F, data[26] & 0x0F); | 1070 | "%d%d ns\n", (data[26] >> 4) & 0x0F, data[26] & 0x0F); |
1071 | break; | 1071 | break; |
1072 | default: | 1072 | default: |
1073 | printf ("SDRAM access from clock (3rd highest CAS latency) %d." | 1073 | printf ("SDRAM access from clock (3rd highest CAS latency) %d." |
1074 | "%d ns\n", (data[26] >> 4) & 0x0F, data[26] & 0x0F); | 1074 | "%d ns\n", (data[26] >> 4) & 0x0F, data[26] & 0x0F); |
1075 | break; | 1075 | break; |
1076 | } | 1076 | } |
1077 | 1077 | ||
1078 | switch (type) { | 1078 | switch (type) { |
1079 | case DDR2: | 1079 | case DDR2: |
1080 | printf ("Minimum row precharge %d.%02d ns\n", | 1080 | printf ("Minimum row precharge %d.%02d ns\n", |
1081 | (data[27] >> 2) & 0x3F, 25 * (data[27] & 0x03)); | 1081 | (data[27] >> 2) & 0x3F, 25 * (data[27] & 0x03)); |
1082 | break; | 1082 | break; |
1083 | default: | 1083 | default: |
1084 | printf ("Minimum row precharge %d ns\n", data[27]); | 1084 | printf ("Minimum row precharge %d ns\n", data[27]); |
1085 | break; | 1085 | break; |
1086 | } | 1086 | } |
1087 | 1087 | ||
1088 | switch (type) { | 1088 | switch (type) { |
1089 | case DDR2: | 1089 | case DDR2: |
1090 | printf ("Row active to row active min %d.%02d ns\n", | 1090 | printf ("Row active to row active min %d.%02d ns\n", |
1091 | (data[28] >> 2) & 0x3F, 25 * (data[28] & 0x03)); | 1091 | (data[28] >> 2) & 0x3F, 25 * (data[28] & 0x03)); |
1092 | break; | 1092 | break; |
1093 | default: | 1093 | default: |
1094 | printf ("Row active to row active min %d ns\n", data[28]); | 1094 | printf ("Row active to row active min %d ns\n", data[28]); |
1095 | break; | 1095 | break; |
1096 | } | 1096 | } |
1097 | 1097 | ||
1098 | switch (type) { | 1098 | switch (type) { |
1099 | case DDR2: | 1099 | case DDR2: |
1100 | printf ("RAS to CAS delay min %d.%02d ns\n", | 1100 | printf ("RAS to CAS delay min %d.%02d ns\n", |
1101 | (data[29] >> 2) & 0x3F, 25 * (data[29] & 0x03)); | 1101 | (data[29] >> 2) & 0x3F, 25 * (data[29] & 0x03)); |
1102 | break; | 1102 | break; |
1103 | default: | 1103 | default: |
1104 | printf ("RAS to CAS delay min %d ns\n", data[29]); | 1104 | printf ("RAS to CAS delay min %d ns\n", data[29]); |
1105 | break; | 1105 | break; |
1106 | } | 1106 | } |
1107 | 1107 | ||
1108 | printf ("Minimum RAS pulse width %d ns\n", data[30]); | 1108 | printf ("Minimum RAS pulse width %d ns\n", data[30]); |
1109 | 1109 | ||
1110 | switch (type) { | 1110 | switch (type) { |
1111 | case DDR2: | 1111 | case DDR2: |
1112 | puts ("Density of each row "); | 1112 | puts ("Density of each row "); |
1113 | decode_bits (data[31], decode_row_density_DDR2, 1); | 1113 | decode_bits (data[31], decode_row_density_DDR2, 1); |
1114 | putc ('\n'); | 1114 | putc ('\n'); |
1115 | break; | 1115 | break; |
1116 | default: | 1116 | default: |
1117 | puts ("Density of each row "); | 1117 | puts ("Density of each row "); |
1118 | decode_bits (data[31], decode_row_density_default, 1); | 1118 | decode_bits (data[31], decode_row_density_default, 1); |
1119 | putc ('\n'); | 1119 | putc ('\n'); |
1120 | break; | 1120 | break; |
1121 | } | 1121 | } |
1122 | 1122 | ||
1123 | switch (type) { | 1123 | switch (type) { |
1124 | case DDR2: | 1124 | case DDR2: |
1125 | puts ("Command and Address setup "); | 1125 | puts ("Command and Address setup "); |
1126 | if (data[32] >= 0xA0) { | 1126 | if (data[32] >= 0xA0) { |
1127 | printf ("1.%d%d ns\n", | 1127 | printf ("1.%d%d ns\n", |
1128 | ((data[32] >> 4) & 0x0F) - 10, data[32] & 0x0F); | 1128 | ((data[32] >> 4) & 0x0F) - 10, data[32] & 0x0F); |
1129 | } else { | 1129 | } else { |
1130 | printf ("0.%d%d ns\n", | 1130 | printf ("0.%d%d ns\n", |
1131 | ((data[32] >> 4) & 0x0F), data[32] & 0x0F); | 1131 | ((data[32] >> 4) & 0x0F), data[32] & 0x0F); |
1132 | } | 1132 | } |
1133 | break; | 1133 | break; |
1134 | default: | 1134 | default: |
1135 | printf ("Command and Address setup %c%d.%d ns\n", | 1135 | printf ("Command and Address setup %c%d.%d ns\n", |
1136 | (data[32] & 0x80) ? '-' : '+', | 1136 | (data[32] & 0x80) ? '-' : '+', |
1137 | (data[32] >> 4) & 0x07, data[32] & 0x0F); | 1137 | (data[32] >> 4) & 0x07, data[32] & 0x0F); |
1138 | break; | 1138 | break; |
1139 | } | 1139 | } |
1140 | 1140 | ||
1141 | switch (type) { | 1141 | switch (type) { |
1142 | case DDR2: | 1142 | case DDR2: |
1143 | puts ("Command and Address hold "); | 1143 | puts ("Command and Address hold "); |
1144 | if (data[33] >= 0xA0) { | 1144 | if (data[33] >= 0xA0) { |
1145 | printf ("1.%d%d ns\n", | 1145 | printf ("1.%d%d ns\n", |
1146 | ((data[33] >> 4) & 0x0F) - 10, data[33] & 0x0F); | 1146 | ((data[33] >> 4) & 0x0F) - 10, data[33] & 0x0F); |
1147 | } else { | 1147 | } else { |
1148 | printf ("0.%d%d ns\n", | 1148 | printf ("0.%d%d ns\n", |
1149 | ((data[33] >> 4) & 0x0F), data[33] & 0x0F); | 1149 | ((data[33] >> 4) & 0x0F), data[33] & 0x0F); |
1150 | } | 1150 | } |
1151 | break; | 1151 | break; |
1152 | default: | 1152 | default: |
1153 | printf ("Command and Address hold %c%d.%d ns\n", | 1153 | printf ("Command and Address hold %c%d.%d ns\n", |
1154 | (data[33] & 0x80) ? '-' : '+', | 1154 | (data[33] & 0x80) ? '-' : '+', |
1155 | (data[33] >> 4) & 0x07, data[33] & 0x0F); | 1155 | (data[33] >> 4) & 0x07, data[33] & 0x0F); |
1156 | break; | 1156 | break; |
1157 | } | 1157 | } |
1158 | 1158 | ||
1159 | switch (type) { | 1159 | switch (type) { |
1160 | case DDR2: | 1160 | case DDR2: |
1161 | printf ("Data signal input setup 0.%d%d ns\n", | 1161 | printf ("Data signal input setup 0.%d%d ns\n", |
1162 | (data[34] >> 4) & 0x0F, data[34] & 0x0F); | 1162 | (data[34] >> 4) & 0x0F, data[34] & 0x0F); |
1163 | break; | 1163 | break; |
1164 | default: | 1164 | default: |
1165 | printf ("Data signal input setup %c%d.%d ns\n", | 1165 | printf ("Data signal input setup %c%d.%d ns\n", |
1166 | (data[34] & 0x80) ? '-' : '+', | 1166 | (data[34] & 0x80) ? '-' : '+', |
1167 | (data[34] >> 4) & 0x07, data[34] & 0x0F); | 1167 | (data[34] >> 4) & 0x07, data[34] & 0x0F); |
1168 | break; | 1168 | break; |
1169 | } | 1169 | } |
1170 | 1170 | ||
1171 | switch (type) { | 1171 | switch (type) { |
1172 | case DDR2: | 1172 | case DDR2: |
1173 | printf ("Data signal input hold 0.%d%d ns\n", | 1173 | printf ("Data signal input hold 0.%d%d ns\n", |
1174 | (data[35] >> 4) & 0x0F, data[35] & 0x0F); | 1174 | (data[35] >> 4) & 0x0F, data[35] & 0x0F); |
1175 | break; | 1175 | break; |
1176 | default: | 1176 | default: |
1177 | printf ("Data signal input hold %c%d.%d ns\n", | 1177 | printf ("Data signal input hold %c%d.%d ns\n", |
1178 | (data[35] & 0x80) ? '-' : '+', | 1178 | (data[35] & 0x80) ? '-' : '+', |
1179 | (data[35] >> 4) & 0x07, data[35] & 0x0F); | 1179 | (data[35] >> 4) & 0x07, data[35] & 0x0F); |
1180 | break; | 1180 | break; |
1181 | } | 1181 | } |
1182 | 1182 | ||
1183 | puts ("Manufacturer's JEDEC ID "); | 1183 | puts ("Manufacturer's JEDEC ID "); |
1184 | for (j = 64; j <= 71; j++) | 1184 | for (j = 64; j <= 71; j++) |
1185 | printf ("%02X ", data[j]); | 1185 | printf ("%02X ", data[j]); |
1186 | putc ('\n'); | 1186 | putc ('\n'); |
1187 | printf ("Manufacturing Location %02X\n", data[72]); | 1187 | printf ("Manufacturing Location %02X\n", data[72]); |
1188 | puts ("Manufacturer's Part Number "); | 1188 | puts ("Manufacturer's Part Number "); |
1189 | for (j = 73; j <= 90; j++) | 1189 | for (j = 73; j <= 90; j++) |
1190 | printf ("%02X ", data[j]); | 1190 | printf ("%02X ", data[j]); |
1191 | putc ('\n'); | 1191 | putc ('\n'); |
1192 | printf ("Revision Code %02X %02X\n", data[91], data[92]); | 1192 | printf ("Revision Code %02X %02X\n", data[91], data[92]); |
1193 | printf ("Manufacturing Date %02X %02X\n", data[93], data[94]); | 1193 | printf ("Manufacturing Date %02X %02X\n", data[93], data[94]); |
1194 | puts ("Assembly Serial Number "); | 1194 | puts ("Assembly Serial Number "); |
1195 | for (j = 95; j <= 98; j++) | 1195 | for (j = 95; j <= 98; j++) |
1196 | printf ("%02X ", data[j]); | 1196 | printf ("%02X ", data[j]); |
1197 | putc ('\n'); | 1197 | putc ('\n'); |
1198 | 1198 | ||
1199 | if (DDR2 != type) { | 1199 | if (DDR2 != type) { |
1200 | printf ("Speed rating PC%d\n", | 1200 | printf ("Speed rating PC%d\n", |
1201 | data[126] == 0x66 ? 66 : data[126]); | 1201 | data[126] == 0x66 ? 66 : data[126]); |
1202 | } | 1202 | } |
1203 | return 0; | 1203 | return 0; |
1204 | } | 1204 | } |
1205 | #endif | 1205 | #endif |
1206 | 1206 | ||
1207 | #if defined(CONFIG_I2C_CMD_TREE) | ||
1208 | int do_i2c_reset(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) | 1207 | int do_i2c_reset(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) |
1209 | { | 1208 | { |
1210 | i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); | 1209 | i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); |
1211 | return 0; | 1210 | return 0; |
1212 | } | 1211 | } |
1213 | 1212 | ||
1214 | #if defined(CONFIG_I2C_MUX) | 1213 | #if defined(CONFIG_I2C_MUX) |
1215 | int do_i2c_add_bus(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) | 1214 | int do_i2c_add_bus(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) |
1216 | { | 1215 | { |
1217 | int ret=0; | 1216 | int ret=0; |
1218 | 1217 | ||
1219 | if (argc == 1) { | 1218 | if (argc == 1) { |
1220 | /* show all busses */ | 1219 | /* show all busses */ |
1221 | I2C_MUX *mux; | 1220 | I2C_MUX *mux; |
1222 | I2C_MUX_DEVICE *device = i2c_mux_devices; | 1221 | I2C_MUX_DEVICE *device = i2c_mux_devices; |
1223 | 1222 | ||
1224 | printf ("Busses reached over muxes:\n"); | 1223 | printf ("Busses reached over muxes:\n"); |
1225 | while (device != NULL) { | 1224 | while (device != NULL) { |
1226 | printf ("Bus ID: %x\n", device->busid); | 1225 | printf ("Bus ID: %x\n", device->busid); |
1227 | printf (" reached over Mux(es):\n"); | 1226 | printf (" reached over Mux(es):\n"); |
1228 | mux = device->mux; | 1227 | mux = device->mux; |
1229 | while (mux != NULL) { | 1228 | while (mux != NULL) { |
1230 | printf (" %s@%x ch: %x\n", mux->name, mux->chip, mux->channel); | 1229 | printf (" %s@%x ch: %x\n", mux->name, mux->chip, mux->channel); |
1231 | mux = mux->next; | 1230 | mux = mux->next; |
1232 | } | 1231 | } |
1233 | device = device->next; | 1232 | device = device->next; |
1234 | } | 1233 | } |
1235 | } else { | 1234 | } else { |
1236 | I2C_MUX_DEVICE *dev; | 1235 | I2C_MUX_DEVICE *dev; |
1237 | 1236 | ||
1238 | dev = i2c_mux_ident_muxstring ((uchar *)argv[1]); | 1237 | dev = i2c_mux_ident_muxstring ((uchar *)argv[1]); |
1239 | ret = 0; | 1238 | ret = 0; |
1240 | } | 1239 | } |
1241 | return ret; | 1240 | return ret; |
1242 | } | 1241 | } |
1243 | #endif /* CONFIG_I2C_MUX */ | 1242 | #endif /* CONFIG_I2C_MUX */ |
1244 | 1243 | ||
1245 | #if defined(CONFIG_I2C_MULTI_BUS) | 1244 | #if defined(CONFIG_I2C_MULTI_BUS) |
1246 | int do_i2c_bus_num(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) | 1245 | int do_i2c_bus_num(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) |
1247 | { | 1246 | { |
1248 | int bus_idx, ret=0; | 1247 | int bus_idx, ret=0; |
1249 | 1248 | ||
1250 | if (argc == 1) | 1249 | if (argc == 1) |
1251 | /* querying current setting */ | 1250 | /* querying current setting */ |
1252 | printf("Current bus is %d\n", i2c_get_bus_num()); | 1251 | printf("Current bus is %d\n", i2c_get_bus_num()); |
1253 | else { | 1252 | else { |
1254 | bus_idx = simple_strtoul(argv[1], NULL, 10); | 1253 | bus_idx = simple_strtoul(argv[1], NULL, 10); |
1255 | printf("Setting bus to %d\n", bus_idx); | 1254 | printf("Setting bus to %d\n", bus_idx); |
1256 | ret = i2c_set_bus_num(bus_idx); | 1255 | ret = i2c_set_bus_num(bus_idx); |
1257 | if (ret) | 1256 | if (ret) |
1258 | printf("Failure changing bus number (%d)\n", ret); | 1257 | printf("Failure changing bus number (%d)\n", ret); |
1259 | } | 1258 | } |
1260 | return ret; | 1259 | return ret; |
1261 | } | 1260 | } |
1262 | #endif /* CONFIG_I2C_MULTI_BUS */ | 1261 | #endif /* CONFIG_I2C_MULTI_BUS */ |
1263 | 1262 | ||
1264 | int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) | 1263 | int do_i2c_bus_speed(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) |
1265 | { | 1264 | { |
1266 | int speed, ret=0; | 1265 | int speed, ret=0; |
1267 | 1266 | ||
1268 | if (argc == 1) | 1267 | if (argc == 1) |
1269 | /* querying current speed */ | 1268 | /* querying current speed */ |
1270 | printf("Current bus speed=%d\n", i2c_get_bus_speed()); | 1269 | printf("Current bus speed=%d\n", i2c_get_bus_speed()); |
1271 | else { | 1270 | else { |
1272 | speed = simple_strtoul(argv[1], NULL, 10); | 1271 | speed = simple_strtoul(argv[1], NULL, 10); |
1273 | printf("Setting bus speed to %d Hz\n", speed); | 1272 | printf("Setting bus speed to %d Hz\n", speed); |
1274 | ret = i2c_set_bus_speed(speed); | 1273 | ret = i2c_set_bus_speed(speed); |
1275 | if (ret) | 1274 | if (ret) |
1276 | printf("Failure changing bus speed (%d)\n", ret); | 1275 | printf("Failure changing bus speed (%d)\n", ret); |
1277 | } | 1276 | } |
1278 | return ret; | 1277 | return ret; |
1279 | } | 1278 | } |
1280 | 1279 | ||
1281 | int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) | 1280 | int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) |
1282 | { | 1281 | { |
1283 | #if defined(CONFIG_I2C_MUX) | 1282 | #if defined(CONFIG_I2C_MUX) |
1284 | if (!strncmp(argv[1], "bu", 2)) | 1283 | if (!strncmp(argv[1], "bu", 2)) |
1285 | return do_i2c_add_bus(cmdtp, flag, --argc, ++argv); | 1284 | return do_i2c_add_bus(cmdtp, flag, --argc, ++argv); |
1286 | #endif /* CONFIG_I2C_MUX */ | 1285 | #endif /* CONFIG_I2C_MUX */ |
1287 | if (!strncmp(argv[1], "sp", 2)) | 1286 | if (!strncmp(argv[1], "sp", 2)) |
1288 | return do_i2c_bus_speed(cmdtp, flag, --argc, ++argv); | 1287 | return do_i2c_bus_speed(cmdtp, flag, --argc, ++argv); |
1289 | #if defined(CONFIG_I2C_MULTI_BUS) | 1288 | #if defined(CONFIG_I2C_MULTI_BUS) |
1290 | if (!strncmp(argv[1], "de", 2)) | 1289 | if (!strncmp(argv[1], "de", 2)) |
1291 | return do_i2c_bus_num(cmdtp, flag, --argc, ++argv); | 1290 | return do_i2c_bus_num(cmdtp, flag, --argc, ++argv); |
1292 | #endif /* CONFIG_I2C_MULTI_BUS */ | 1291 | #endif /* CONFIG_I2C_MULTI_BUS */ |
1293 | if (!strncmp(argv[1], "md", 2)) | 1292 | if (!strncmp(argv[1], "md", 2)) |
1294 | return do_i2c_md(cmdtp, flag, --argc, ++argv); | 1293 | return do_i2c_md(cmdtp, flag, --argc, ++argv); |
1295 | if (!strncmp(argv[1], "mm", 2)) | 1294 | if (!strncmp(argv[1], "mm", 2)) |
1296 | return do_i2c_mm(cmdtp, flag, --argc, ++argv); | 1295 | return do_i2c_mm(cmdtp, flag, --argc, ++argv); |
1297 | if (!strncmp(argv[1], "mw", 2)) | 1296 | if (!strncmp(argv[1], "mw", 2)) |
1298 | return do_i2c_mw(cmdtp, flag, --argc, ++argv); | 1297 | return do_i2c_mw(cmdtp, flag, --argc, ++argv); |
1299 | if (!strncmp(argv[1], "nm", 2)) | 1298 | if (!strncmp(argv[1], "nm", 2)) |
1300 | return do_i2c_nm(cmdtp, flag, --argc, ++argv); | 1299 | return do_i2c_nm(cmdtp, flag, --argc, ++argv); |
1301 | if (!strncmp(argv[1], "cr", 2)) | 1300 | if (!strncmp(argv[1], "cr", 2)) |
1302 | return do_i2c_crc(cmdtp, flag, --argc, ++argv); | 1301 | return do_i2c_crc(cmdtp, flag, --argc, ++argv); |
1303 | if (!strncmp(argv[1], "pr", 2)) | 1302 | if (!strncmp(argv[1], "pr", 2)) |
1304 | return do_i2c_probe(cmdtp, flag, --argc, ++argv); | 1303 | return do_i2c_probe(cmdtp, flag, --argc, ++argv); |
1305 | if (!strncmp(argv[1], "re", 2)) | 1304 | if (!strncmp(argv[1], "re", 2)) |
1306 | return do_i2c_reset(cmdtp, flag, --argc, ++argv); | 1305 | return do_i2c_reset(cmdtp, flag, --argc, ++argv); |
1307 | if (!strncmp(argv[1], "lo", 2)) | 1306 | if (!strncmp(argv[1], "lo", 2)) |
1308 | return do_i2c_loop(cmdtp, flag, --argc, ++argv); | 1307 | return do_i2c_loop(cmdtp, flag, --argc, ++argv); |
1309 | #if defined(CONFIG_CMD_SDRAM) | 1308 | #if defined(CONFIG_CMD_SDRAM) |
1310 | if (!strncmp(argv[1], "sd", 2)) | 1309 | if (!strncmp(argv[1], "sd", 2)) |
1311 | return do_sdram(cmdtp, flag, --argc, ++argv); | 1310 | return do_sdram(cmdtp, flag, --argc, ++argv); |
1312 | #endif | 1311 | #endif |
1313 | else | 1312 | else |
1314 | cmd_usage(cmdtp); | 1313 | cmd_usage(cmdtp); |
1315 | return 0; | 1314 | return 0; |
1316 | } | 1315 | } |
1317 | #endif /* CONFIG_I2C_CMD_TREE */ | ||
1318 | 1316 | ||
1319 | /***************************************************/ | 1317 | /***************************************************/ |
1320 | 1318 | ||
1321 | #if defined(CONFIG_I2C_CMD_TREE) | ||
1322 | U_BOOT_CMD( | 1319 | U_BOOT_CMD( |
1323 | i2c, 6, 1, do_i2c, | 1320 | i2c, 6, 1, do_i2c, |
1324 | "I2C sub-system", | 1321 | "I2C sub-system", |
1325 | #if defined(CONFIG_I2C_MUX) | 1322 | #if defined(CONFIG_I2C_MUX) |
1326 | "bus [muxtype:muxaddr:muxchannel] - add a new bus reached over muxes.\n" | 1323 | "bus [muxtype:muxaddr:muxchannel] - add a new bus reached over muxes.\n" |
1327 | #endif /* CONFIG_I2C_MUX */ | 1324 | #endif /* CONFIG_I2C_MUX */ |
1328 | "speed [speed] - show or set I2C bus speed\n" | 1325 | "speed [speed] - show or set I2C bus speed\n" |
1329 | #if defined(CONFIG_I2C_MULTI_BUS) | 1326 | #if defined(CONFIG_I2C_MULTI_BUS) |
1330 | "i2c dev [dev] - show or set current I2C bus\n" | 1327 | "i2c dev [dev] - show or set current I2C bus\n" |
1331 | #endif /* CONFIG_I2C_MULTI_BUS */ | 1328 | #endif /* CONFIG_I2C_MULTI_BUS */ |
1332 | "i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device\n" | 1329 | "i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device\n" |
1333 | "i2c mm chip address[.0, .1, .2] - write to I2C device (auto-incrementing)\n" | 1330 | "i2c mm chip address[.0, .1, .2] - write to I2C device (auto-incrementing)\n" |
1334 | "i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)\n" | 1331 | "i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)\n" |
1335 | "i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)\n" | 1332 | "i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)\n" |
1336 | "i2c crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n" | 1333 | "i2c crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n" |
1337 | "i2c probe - show devices on the I2C bus\n" | 1334 | "i2c probe - show devices on the I2C bus\n" |
1338 | "i2c reset - re-init the I2C Controller\n" | 1335 | "i2c reset - re-init the I2C Controller\n" |
1339 | "i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device\n" | 1336 | "i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device\n" |
1340 | #if defined(CONFIG_CMD_SDRAM) | 1337 | #if defined(CONFIG_CMD_SDRAM) |
1341 | "i2c sdram chip - print SDRAM configuration information\n" | 1338 | "i2c sdram chip - print SDRAM configuration information\n" |
1342 | #endif | 1339 | #endif |
1343 | ); | 1340 | ); |
1344 | #endif /* CONFIG_I2C_CMD_TREE */ | ||
1345 | U_BOOT_CMD( | ||
1346 | imd, 4, 1, do_i2c_md, \ | ||
1347 | "i2c memory display", \ | ||
1348 | "chip address[.0, .1, .2] [# of objects]\n - i2c memory display\n" \ | ||
1349 | ); | ||
1350 | |||
1351 | U_BOOT_CMD( | ||
1352 | imm, 3, 1, do_i2c_mm, | ||
1353 | "i2c memory modify (auto-incrementing)", | ||
1354 | "chip address[.0, .1, .2]\n" | ||
1355 | " - memory modify, auto increment address\n" | ||
1356 | ); | ||
1357 | U_BOOT_CMD( | ||
1358 | inm, 3, 1, do_i2c_nm, | ||
1359 | "memory modify (constant address)", | ||
1360 | "chip address[.0, .1, .2]\n - memory modify, read and keep address\n" | ||
1361 | ); | ||
1362 | |||
1363 | U_BOOT_CMD( | ||
1364 | imw, 5, 1, do_i2c_mw, | ||
1365 | "memory write (fill)", | ||
1366 | "chip address[.0, .1, .2] value [count]\n - memory write (fill)\n" | ||
1367 | ); | ||
1368 | |||
1369 | U_BOOT_CMD( | ||
1370 | icrc32, 5, 1, do_i2c_crc, | ||
1371 | "checksum calculation", | ||
1372 | "chip address[.0, .1, .2] count\n - compute CRC32 checksum\n" | ||
1373 | ); | ||
1374 | |||
1375 | U_BOOT_CMD( | ||
1376 | iprobe, 1, 1, do_i2c_probe, | ||
1377 | "probe to discover valid I2C chip addresses", | ||
1378 | "\n -discover valid I2C chip addresses\n" | ||
1379 | ); | ||
1380 | |||
1381 | /* | ||
1382 | * Require full name for "iloop" because it is an infinite loop! | ||
1383 | */ | ||
1384 | U_BOOT_CMD( | ||
1385 | iloop, 5, 1, do_i2c_loop, | ||
1386 | "infinite loop on address range", | ||
1387 | "chip address[.0, .1, .2] [# of objects]\n" | ||
1388 | " - loop, reading a set of addresses\n" | ||
1389 | ); | ||
1390 | |||
1391 | #if defined(CONFIG_CMD_SDRAM) | ||
1392 | U_BOOT_CMD( | ||
1393 | isdram, 2, 1, do_sdram, | ||
1394 | "print SDRAM configuration information", | ||
1395 | "chip\n - print SDRAM configuration information\n" | ||
1396 | " (valid chip values 50..57)\n" | ||
1397 | ); | ||
1398 | #endif | ||
1399 | 1341 | ||
1400 | #if defined(CONFIG_I2C_MUX) | 1342 | #if defined(CONFIG_I2C_MUX) |
1401 | 1343 | ||
1402 | int i2c_mux_add_device(I2C_MUX_DEVICE *dev) | 1344 | int i2c_mux_add_device(I2C_MUX_DEVICE *dev) |
1403 | { | 1345 | { |
1404 | I2C_MUX_DEVICE *devtmp = i2c_mux_devices; | 1346 | I2C_MUX_DEVICE *devtmp = i2c_mux_devices; |
1405 | 1347 | ||
1406 | if (i2c_mux_devices == NULL) { | 1348 | if (i2c_mux_devices == NULL) { |
1407 | i2c_mux_devices = dev; | 1349 | i2c_mux_devices = dev; |
1408 | return 0; | 1350 | return 0; |
1409 | } | 1351 | } |
1410 | while (devtmp->next != NULL) | 1352 | while (devtmp->next != NULL) |
1411 | devtmp = devtmp->next; | 1353 | devtmp = devtmp->next; |
1412 | 1354 | ||
1413 | devtmp->next = dev; | 1355 | devtmp->next = dev; |
1414 | return 0; | 1356 | return 0; |
1415 | } | 1357 | } |
1416 | 1358 | ||
1417 | I2C_MUX_DEVICE *i2c_mux_search_device(int id) | 1359 | I2C_MUX_DEVICE *i2c_mux_search_device(int id) |
1418 | { | 1360 | { |
1419 | I2C_MUX_DEVICE *device = i2c_mux_devices; | 1361 | I2C_MUX_DEVICE *device = i2c_mux_devices; |
1420 | 1362 | ||
1421 | while (device != NULL) { | 1363 | while (device != NULL) { |
1422 | if (device->busid == id) | 1364 | if (device->busid == id) |
1423 | return device; | 1365 | return device; |
1424 | device = device->next; | 1366 | device = device->next; |
1425 | } | 1367 | } |
1426 | return NULL; | 1368 | return NULL; |
1427 | } | 1369 | } |
1428 | 1370 | ||
1429 | /* searches in the buf from *pos the next ':'. | 1371 | /* searches in the buf from *pos the next ':'. |
1430 | * returns: | 1372 | * returns: |
1431 | * 0 if found (with *pos = where) | 1373 | * 0 if found (with *pos = where) |
1432 | * < 0 if an error occured | 1374 | * < 0 if an error occured |
1433 | * > 0 if the end of buf is reached | 1375 | * > 0 if the end of buf is reached |
1434 | */ | 1376 | */ |
1435 | static int i2c_mux_search_next (int *pos, uchar *buf, int len) | 1377 | static int i2c_mux_search_next (int *pos, uchar *buf, int len) |
1436 | { | 1378 | { |
1437 | while ((buf[*pos] != ':') && (*pos < len)) { | 1379 | while ((buf[*pos] != ':') && (*pos < len)) { |
1438 | *pos += 1; | 1380 | *pos += 1; |
1439 | } | 1381 | } |
1440 | if (*pos >= len) | 1382 | if (*pos >= len) |
1441 | return 1; | 1383 | return 1; |
1442 | if (buf[*pos] != ':') | 1384 | if (buf[*pos] != ':') |
1443 | return -1; | 1385 | return -1; |
1444 | return 0; | 1386 | return 0; |
1445 | } | 1387 | } |
1446 | 1388 | ||
1447 | static int i2c_mux_get_busid (void) | 1389 | static int i2c_mux_get_busid (void) |
1448 | { | 1390 | { |
1449 | int tmp = i2c_mux_busid; | 1391 | int tmp = i2c_mux_busid; |
1450 | 1392 | ||
1451 | i2c_mux_busid ++; | 1393 | i2c_mux_busid ++; |
1452 | return tmp; | 1394 | return tmp; |
1453 | } | 1395 | } |
1454 | 1396 | ||
1455 | /* Analyses a Muxstring and sends immediately the | 1397 | /* Analyses a Muxstring and sends immediately the |
1456 | Commands to the Muxes. Runs from Flash. | 1398 | Commands to the Muxes. Runs from Flash. |
1457 | */ | 1399 | */ |
1458 | int i2c_mux_ident_muxstring_f (uchar *buf) | 1400 | int i2c_mux_ident_muxstring_f (uchar *buf) |
1459 | { | 1401 | { |
1460 | int pos = 0; | 1402 | int pos = 0; |
1461 | int oldpos; | 1403 | int oldpos; |
1462 | int ret = 0; | 1404 | int ret = 0; |
1463 | int len = strlen((char *)buf); | 1405 | int len = strlen((char *)buf); |
1464 | int chip; | 1406 | int chip; |
1465 | uchar channel; | 1407 | uchar channel; |
1466 | int was = 0; | 1408 | int was = 0; |
1467 | 1409 | ||
1468 | while (ret == 0) { | 1410 | while (ret == 0) { |
1469 | oldpos = pos; | 1411 | oldpos = pos; |
1470 | /* search name */ | 1412 | /* search name */ |
1471 | ret = i2c_mux_search_next(&pos, buf, len); | 1413 | ret = i2c_mux_search_next(&pos, buf, len); |
1472 | if (ret != 0) | 1414 | if (ret != 0) |
1473 | printf ("ERROR\n"); | 1415 | printf ("ERROR\n"); |
1474 | /* search address */ | 1416 | /* search address */ |
1475 | pos ++; | 1417 | pos ++; |
1476 | oldpos = pos; | 1418 | oldpos = pos; |
1477 | ret = i2c_mux_search_next(&pos, buf, len); | 1419 | ret = i2c_mux_search_next(&pos, buf, len); |
1478 | if (ret != 0) | 1420 | if (ret != 0) |
1479 | printf ("ERROR\n"); | 1421 | printf ("ERROR\n"); |
1480 | buf[pos] = 0; | 1422 | buf[pos] = 0; |
1481 | chip = simple_strtoul((char *)&buf[oldpos], NULL, 16); | 1423 | chip = simple_strtoul((char *)&buf[oldpos], NULL, 16); |
1482 | buf[pos] = ':'; | 1424 | buf[pos] = ':'; |
1483 | /* search channel */ | 1425 | /* search channel */ |
1484 | pos ++; | 1426 | pos ++; |
1485 | oldpos = pos; | 1427 | oldpos = pos; |
1486 | ret = i2c_mux_search_next(&pos, buf, len); | 1428 | ret = i2c_mux_search_next(&pos, buf, len); |
1487 | if (ret < 0) | 1429 | if (ret < 0) |
1488 | printf ("ERROR\n"); | 1430 | printf ("ERROR\n"); |
1489 | was = 0; | 1431 | was = 0; |
1490 | if (buf[pos] != 0) { | 1432 | if (buf[pos] != 0) { |
1491 | buf[pos] = 0; | 1433 | buf[pos] = 0; |
1492 | was = 1; | 1434 | was = 1; |
1493 | } | 1435 | } |
1494 | channel = simple_strtoul((char *)&buf[oldpos], NULL, 16); | 1436 | channel = simple_strtoul((char *)&buf[oldpos], NULL, 16); |
1495 | if (was) | 1437 | if (was) |
1496 | buf[pos] = ':'; | 1438 | buf[pos] = ':'; |
1497 | if (i2c_write(chip, 0, 0, &channel, 1) != 0) { | 1439 | if (i2c_write(chip, 0, 0, &channel, 1) != 0) { |
1498 | printf ("Error setting Mux: chip:%x channel: \ | 1440 | printf ("Error setting Mux: chip:%x channel: \ |
1499 | %x\n", chip, channel); | 1441 | %x\n", chip, channel); |
1500 | return -1; | 1442 | return -1; |
1501 | } | 1443 | } |
1502 | pos ++; | 1444 | pos ++; |
1503 | oldpos = pos; | 1445 | oldpos = pos; |
1504 | 1446 | ||
1505 | } | 1447 | } |
1506 | 1448 | ||
1507 | return 0; | 1449 | return 0; |
1508 | } | 1450 | } |
1509 | 1451 | ||
1510 | /* Analyses a Muxstring and if this String is correct | 1452 | /* Analyses a Muxstring and if this String is correct |
1511 | * adds a new I2C Bus. | 1453 | * adds a new I2C Bus. |
1512 | */ | 1454 | */ |
1513 | I2C_MUX_DEVICE *i2c_mux_ident_muxstring (uchar *buf) | 1455 | I2C_MUX_DEVICE *i2c_mux_ident_muxstring (uchar *buf) |
1514 | { | 1456 | { |
1515 | I2C_MUX_DEVICE *device; | 1457 | I2C_MUX_DEVICE *device; |
1516 | I2C_MUX *mux; | 1458 | I2C_MUX *mux; |
1517 | int pos = 0; | 1459 | int pos = 0; |
1518 | int oldpos; | 1460 | int oldpos; |
1519 | int ret = 0; | 1461 | int ret = 0; |
1520 | int len = strlen((char *)buf); | 1462 | int len = strlen((char *)buf); |
1521 | int was = 0; | 1463 | int was = 0; |
1522 | 1464 | ||
1523 | device = (I2C_MUX_DEVICE *)malloc (sizeof(I2C_MUX_DEVICE)); | 1465 | device = (I2C_MUX_DEVICE *)malloc (sizeof(I2C_MUX_DEVICE)); |
1524 | device->mux = NULL; | 1466 | device->mux = NULL; |
1525 | device->busid = i2c_mux_get_busid (); | 1467 | device->busid = i2c_mux_get_busid (); |
1526 | device->next = NULL; | 1468 | device->next = NULL; |
1527 | while (ret == 0) { | 1469 | while (ret == 0) { |
1528 | mux = (I2C_MUX *)malloc (sizeof(I2C_MUX)); | 1470 | mux = (I2C_MUX *)malloc (sizeof(I2C_MUX)); |
1529 | mux->next = NULL; | 1471 | mux->next = NULL; |
1530 | /* search name of mux */ | 1472 | /* search name of mux */ |
1531 | oldpos = pos; | 1473 | oldpos = pos; |
1532 | ret = i2c_mux_search_next(&pos, buf, len); | 1474 | ret = i2c_mux_search_next(&pos, buf, len); |
1533 | if (ret != 0) | 1475 | if (ret != 0) |
1534 | printf ("%s no name.\n", __FUNCTION__); | 1476 | printf ("%s no name.\n", __FUNCTION__); |
1535 | mux->name = (char *)malloc (pos - oldpos + 1); | 1477 | mux->name = (char *)malloc (pos - oldpos + 1); |
1536 | memcpy (mux->name, &buf[oldpos], pos - oldpos); | 1478 | memcpy (mux->name, &buf[oldpos], pos - oldpos); |
1537 | mux->name[pos - oldpos] = 0; | 1479 | mux->name[pos - oldpos] = 0; |
1538 | /* search address */ | 1480 | /* search address */ |
1539 | pos ++; | 1481 | pos ++; |
1540 | oldpos = pos; | 1482 | oldpos = pos; |
1541 | ret = i2c_mux_search_next(&pos, buf, len); | 1483 | ret = i2c_mux_search_next(&pos, buf, len); |
1542 | if (ret != 0) | 1484 | if (ret != 0) |
1543 | printf ("%s no mux address.\n", __FUNCTION__); | 1485 | printf ("%s no mux address.\n", __FUNCTION__); |
1544 | buf[pos] = 0; | 1486 | buf[pos] = 0; |
1545 | mux->chip = simple_strtoul((char *)&buf[oldpos], NULL, 16); | 1487 | mux->chip = simple_strtoul((char *)&buf[oldpos], NULL, 16); |
1546 | buf[pos] = ':'; | 1488 | buf[pos] = ':'; |
1547 | /* search channel */ | 1489 | /* search channel */ |
1548 | pos ++; | 1490 | pos ++; |
1549 | oldpos = pos; | 1491 | oldpos = pos; |
1550 | ret = i2c_mux_search_next(&pos, buf, len); | 1492 | ret = i2c_mux_search_next(&pos, buf, len); |
1551 | if (ret < 0) | 1493 | if (ret < 0) |
1552 | printf ("%s no mux channel.\n", __FUNCTION__); | 1494 | printf ("%s no mux channel.\n", __FUNCTION__); |
1553 | was = 0; | 1495 | was = 0; |
1554 | if (buf[pos] != 0) { | 1496 | if (buf[pos] != 0) { |
1555 | buf[pos] = 0; | 1497 | buf[pos] = 0; |
1556 | was = 1; | 1498 | was = 1; |
1557 | } | 1499 | } |
1558 | mux->channel = simple_strtoul((char *)&buf[oldpos], NULL, 16); | 1500 | mux->channel = simple_strtoul((char *)&buf[oldpos], NULL, 16); |
1559 | if (was) | 1501 | if (was) |
1560 | buf[pos] = ':'; | 1502 | buf[pos] = ':'; |
1561 | if (device->mux == NULL) | 1503 | if (device->mux == NULL) |
1562 | device->mux = mux; | 1504 | device->mux = mux; |
1563 | else { | 1505 | else { |
1564 | I2C_MUX *muxtmp = device->mux; | 1506 | I2C_MUX *muxtmp = device->mux; |
1565 | while (muxtmp->next != NULL) { | 1507 | while (muxtmp->next != NULL) { |
1566 | muxtmp = muxtmp->next; | 1508 | muxtmp = muxtmp->next; |
1567 | } | 1509 | } |
1568 | muxtmp->next = mux; | 1510 | muxtmp->next = mux; |
1569 | } | 1511 | } |
1570 | pos ++; | 1512 | pos ++; |
1571 | oldpos = pos; | 1513 | oldpos = pos; |
1572 | } | 1514 | } |
1573 | if (ret > 0) { | 1515 | if (ret > 0) { |
1574 | /* Add Device */ | 1516 | /* Add Device */ |
1575 | i2c_mux_add_device (device); | 1517 | i2c_mux_add_device (device); |
1576 | return device; | 1518 | return device; |
1577 | } | 1519 | } |
1578 | 1520 | ||
1579 | return NULL; | 1521 | return NULL; |
1580 | } | 1522 | } |
1581 | 1523 | ||
1582 | int i2x_mux_select_mux(int bus) | 1524 | int i2x_mux_select_mux(int bus) |
1583 | { | 1525 | { |
1584 | I2C_MUX_DEVICE *dev; | 1526 | I2C_MUX_DEVICE *dev; |
1585 | I2C_MUX *mux; | 1527 | I2C_MUX *mux; |
1586 | 1528 | ||
1587 | if ((gd->flags & GD_FLG_RELOC) != GD_FLG_RELOC) { | 1529 | if ((gd->flags & GD_FLG_RELOC) != GD_FLG_RELOC) { |
1588 | /* select Default Mux Bus */ | 1530 | /* select Default Mux Bus */ |
1589 | #if defined(CONFIG_SYS_I2C_IVM_BUS) | 1531 | #if defined(CONFIG_SYS_I2C_IVM_BUS) |
1590 | i2c_mux_ident_muxstring_f ((uchar *)CONFIG_SYS_I2C_IVM_BUS); | 1532 | i2c_mux_ident_muxstring_f ((uchar *)CONFIG_SYS_I2C_IVM_BUS); |
1591 | #else | 1533 | #else |
1592 | { | 1534 | { |
1593 | unsigned char *buf; | 1535 | unsigned char *buf; |
1594 | buf = (unsigned char *) getenv("EEprom_ivm"); | 1536 | buf = (unsigned char *) getenv("EEprom_ivm"); |
1595 | if (buf != NULL) | 1537 | if (buf != NULL) |
1596 | i2c_mux_ident_muxstring_f (buf); | 1538 | i2c_mux_ident_muxstring_f (buf); |
1597 | } | 1539 | } |
1598 | #endif | 1540 | #endif |
1599 | return 0; | 1541 | return 0; |
1600 | } | 1542 | } |
1601 | dev = i2c_mux_search_device(bus); | 1543 | dev = i2c_mux_search_device(bus); |
1602 | if (dev == NULL) | 1544 | if (dev == NULL) |
1603 | return -1; | 1545 | return -1; |
1604 | 1546 | ||
1605 | mux = dev->mux; | 1547 | mux = dev->mux; |
1606 | while (mux != NULL) { | 1548 | while (mux != NULL) { |
1607 | if (i2c_write(mux->chip, 0, 0, &mux->channel, 1) != 0) { | 1549 | if (i2c_write(mux->chip, 0, 0, &mux->channel, 1) != 0) { |
1608 | printf ("Error setting Mux: chip:%x channel: \ | 1550 | printf ("Error setting Mux: chip:%x channel: \ |
1609 | %x\n", mux->chip, mux->channel); | 1551 | %x\n", mux->chip, mux->channel); |
1610 | return -1; | 1552 | return -1; |
1611 | } | 1553 | } |
1612 | mux = mux->next; | 1554 | mux = mux->next; |
1613 | } | 1555 | } |
1614 | return 0; | 1556 | return 0; |
1615 | } | 1557 | } |
1616 | #endif /* CONFIG_I2C_MUX */ | 1558 | #endif /* CONFIG_I2C_MUX */ |
1617 | 1559 |
doc/feature-removal-schedule.txt
1 | The following is a list of files and features that are going to be | 1 | The following is a list of files and features that are going to be |
2 | removed from the U-Boot source tree. Every entry should contain what | 2 | removed from the U-Boot source tree. Every entry should contain what |
3 | exactly is going away, when it will be gone, why it is being removed, | 3 | exactly is going away, when it will be gone, why it is being removed, |
4 | and who is going to be doing the work. When the feature is removed | 4 | and who is going to be doing the work. When the feature is removed |
5 | from U-Boot, its corresponding entry should also be removed from this | 5 | from U-Boot, its corresponding entry should also be removed from this |
6 | file. | 6 | file. |
7 | 7 | ||
8 | --------------------------- | 8 | --------------------------- |
9 | 9 | ||
10 | What: CONFIG_NET_MULTI option | 10 | What: CONFIG_NET_MULTI option |
11 | When: Release 2009-11 | 11 | When: Release 2009-11 |
12 | 12 | ||
13 | Why: U-boot currently implements two network driver APIs. New drivers with | 13 | Why: U-boot currently implements two network driver APIs. New drivers with |
14 | the older-style implementation have not been accepted for a while, and | 14 | the older-style implementation have not been accepted for a while, and |
15 | this parallel system makes the code confusing and hard to augment. | 15 | this parallel system makes the code confusing and hard to augment. |
16 | 16 | ||
17 | All existing in-tree boards will be converted to use CONFIG_NET_MULTI | 17 | All existing in-tree boards will be converted to use CONFIG_NET_MULTI |
18 | over the span of two releases (2009-07 and 2009-09). | 18 | over the span of two releases (2009-07 and 2009-09). |
19 | In the 2009-11 release, all code that is compiled when CONFIG_NET_MULTI | 19 | In the 2009-11 release, all code that is compiled when CONFIG_NET_MULTI |
20 | is not set will be removed, and all references to CONFIG_NET_MULTI | 20 | is not set will be removed, and all references to CONFIG_NET_MULTI |
21 | will be removed, effectively making it the only API. This should | 21 | will be removed, effectively making it the only API. This should |
22 | provide ample time for out-of-tree users to adjust, and for tools on | 22 | provide ample time for out-of-tree users to adjust, and for tools on |
23 | all architectures to be made to work with weak functions. | 23 | all architectures to be made to work with weak functions. |
24 | 24 | ||
25 | Who: Ben Warren <biggerbadderben@gmail.com> | 25 | Who: Ben Warren <biggerbadderben@gmail.com> |
26 | 26 | ||
27 | --------------------------- | 27 | --------------------------- |
28 | 28 | ||
29 | What: "autoscr" command | 29 | What: "autoscr" command |
30 | When: Release 2009-09 | 30 | When: Release 2009-09 |
31 | 31 | ||
32 | Why: "autosrc" is an ugly and completely non-standard name. | 32 | Why: "autosrc" is an ugly and completely non-standard name. |
33 | The "autoscr" command is deprecated and will be replaced by | 33 | The "autoscr" command is deprecated and will be replaced by |
34 | 34 | ||
35 | the "source" command as used by other shells such as bash. | 35 | the "source" command as used by other shells such as bash. |
36 | 36 | ||
37 | Starting with March 2009, both commands will be supported for | 37 | Starting with March 2009, both commands will be supported for |
38 | a transition period of 6 months after which "autoscr" will be | 38 | a transition period of 6 months after which "autoscr" will be |
39 | removed. During the transition period existing scripts and | 39 | removed. During the transition period existing scripts and |
40 | environment variable names remain untouched for maximum | 40 | environment variable names remain untouched for maximum |
41 | compatibiltiy; thse will be changed when support for the | 41 | compatibiltiy; thse will be changed when support for the |
42 | "autoscr" command get's finally dropped. | 42 | "autoscr" command get's finally dropped. |
43 | 43 | ||
44 | Who: Peter Tyser <ptyser@xes-inc.com> | 44 | Who: Peter Tyser <ptyser@xes-inc.com> |
45 | 45 | ||
46 | --------------------------- | 46 | --------------------------- |
47 | 47 | ||
48 | What: GPL cleanup | 48 | What: GPL cleanup |
49 | When: August 2009 | 49 | When: August 2009 |
50 | Why: Over time, a couple of files have sneaked in into the U-Boot | 50 | Why: Over time, a couple of files have sneaked in into the U-Boot |
51 | source code that are either missing a valid GPL license | 51 | source code that are either missing a valid GPL license |
52 | header or that carry a license that is incompatible with the | 52 | header or that carry a license that is incompatible with the |
53 | GPL. | 53 | GPL. |
54 | Such files shall be removed from the U-Boot source tree. | 54 | Such files shall be removed from the U-Boot source tree. |
55 | See http://www.denx.de/wiki/pub/U-Boot/TaskGplCleanup/u-boot-1.1.2-files | 55 | See http://www.denx.de/wiki/pub/U-Boot/TaskGplCleanup/u-boot-1.1.2-files |
56 | for an old and probably incomplete list of such files. | 56 | for an old and probably incomplete list of such files. |
57 | 57 | ||
58 | Who: Wolfgang Denk <wd@denx.de> and board maintainers | 58 | Who: Wolfgang Denk <wd@denx.de> and board maintainers |
59 | 59 | ||
60 | --------------------------- | 60 | --------------------------- |
61 | 61 | ||
62 | What: Individual I2C commands | ||
63 | When: April 2009 | ||
64 | Why: Per the U-Boot README, individual I2C commands such as "imd", "imm", | ||
65 | "imw", etc are deprecated. The single "i2c" command which is | ||
66 | currently enabled via CONFIG_I2C_CMD_TREE contains the same | ||
67 | functionality as the individual I2C commands. The individual | ||
68 | I2C commands should be removed as well as any references to | ||
69 | CONFIG_I2C_CMD_TREE. | ||
70 | Who: Peter Tyser <ptyser@xes-inc.com> | ||
71 | |||
72 | --------------------------- | ||
73 | |||
74 | What: Legacy NAND code | 62 | What: Legacy NAND code |
75 | When: April 2009 | 63 | When: April 2009 |
76 | Why: Legacy NAND code is deprecated. Similar functionality exists in | 64 | Why: Legacy NAND code is deprecated. Similar functionality exists in |
77 | more recent NAND code ported from the Linux kernel. | 65 | more recent NAND code ported from the Linux kernel. |
78 | Who: Scott Wood <scottwood@freescale.com> | 66 | Who: Scott Wood <scottwood@freescale.com> |
79 | 67 |
include/configs/DU405.h
1 | /* | 1 | /* |
2 | * (C) Copyright 2001 | 2 | * (C) Copyright 2001 |
3 | * Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com | 3 | * Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.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 | * board/config.h - configuration options, board specific | 25 | * board/config.h - configuration options, board specific |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #ifndef __CONFIG_H | 28 | #ifndef __CONFIG_H |
29 | #define __CONFIG_H | 29 | #define __CONFIG_H |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * High Level Configuration Options | 32 | * High Level Configuration Options |
33 | * (easy to change) | 33 | * (easy to change) |
34 | */ | 34 | */ |
35 | #define CONFIG_405GP 1 /* This is a PPC405 CPU */ | 35 | #define CONFIG_405GP 1 /* This is a PPC405 CPU */ |
36 | #define CONFIG_4xx 1 /* ...member of PPC4xx family */ | 36 | #define CONFIG_4xx 1 /* ...member of PPC4xx family */ |
37 | #define CONFIG_DU405 1 /* ...on a DU405 board */ | 37 | #define CONFIG_DU405 1 /* ...on a DU405 board */ |
38 | 38 | ||
39 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* call board_early_init_f() */ | 39 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* call board_early_init_f() */ |
40 | #define CONFIG_MISC_INIT_R 1 /* call misc_init_r() */ | 40 | #define CONFIG_MISC_INIT_R 1 /* call misc_init_r() */ |
41 | 41 | ||
42 | #define CONFIG_SYS_CLK_FREQ 25000000 /* external frequency to pll */ | 42 | #define CONFIG_SYS_CLK_FREQ 25000000 /* external frequency to pll */ |
43 | 43 | ||
44 | #define CONFIG_BAUDRATE 9600 | 44 | #define CONFIG_BAUDRATE 9600 |
45 | #define CONFIG_BOOTDELAY 3 /* autoboot after 3 seconds */ | 45 | #define CONFIG_BOOTDELAY 3 /* autoboot after 3 seconds */ |
46 | 46 | ||
47 | #undef CONFIG_BOOTARGS | 47 | #undef CONFIG_BOOTARGS |
48 | #define CONFIG_BOOTCOMMAND "bootm fff00000" | 48 | #define CONFIG_BOOTCOMMAND "bootm fff00000" |
49 | 49 | ||
50 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ | 50 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
51 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ | 51 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
52 | 52 | ||
53 | #define CONFIG_PPC4xx_EMAC | 53 | #define CONFIG_PPC4xx_EMAC |
54 | #define CONFIG_MII 1 /* MII PHY management */ | 54 | #define CONFIG_MII 1 /* MII PHY management */ |
55 | #define CONFIG_PHY_ADDR 0 /* PHY address */ | 55 | #define CONFIG_PHY_ADDR 0 /* PHY address */ |
56 | #define CONFIG_LXT971_NO_SLEEP 1 /* disable sleep mode in LXT971 */ | 56 | #define CONFIG_LXT971_NO_SLEEP 1 /* disable sleep mode in LXT971 */ |
57 | #define CONFIG_RESET_PHY_R 1 /* use reset_phy() to disable phy sleep mode */ | 57 | #define CONFIG_RESET_PHY_R 1 /* use reset_phy() to disable phy sleep mode */ |
58 | #define CONFIG_NET_MULTI 1 | 58 | #define CONFIG_NET_MULTI 1 |
59 | #undef CONFIG_HAS_ETH1 | 59 | #undef CONFIG_HAS_ETH1 |
60 | 60 | ||
61 | /* | 61 | /* |
62 | * BOOTP options | 62 | * BOOTP options |
63 | */ | 63 | */ |
64 | #define CONFIG_BOOTP_BOOTFILESIZE | 64 | #define CONFIG_BOOTP_BOOTFILESIZE |
65 | #define CONFIG_BOOTP_BOOTPATH | 65 | #define CONFIG_BOOTP_BOOTPATH |
66 | #define CONFIG_BOOTP_GATEWAY | 66 | #define CONFIG_BOOTP_GATEWAY |
67 | #define CONFIG_BOOTP_HOSTNAME | 67 | #define CONFIG_BOOTP_HOSTNAME |
68 | 68 | ||
69 | 69 | ||
70 | /* | 70 | /* |
71 | * Command line configuration. | 71 | * Command line configuration. |
72 | */ | 72 | */ |
73 | #include <config_cmd_default.h> | 73 | #include <config_cmd_default.h> |
74 | 74 | ||
75 | #undef CONFIG_CMD_NFS | 75 | #undef CONFIG_CMD_NFS |
76 | #define CONFIG_CMD_IDE | 76 | #define CONFIG_CMD_IDE |
77 | #define CONFIG_CMD_ELF | 77 | #define CONFIG_CMD_ELF |
78 | #define CONFIG_CMD_MII | 78 | #define CONFIG_CMD_MII |
79 | #define CONFIG_CMD_DATE | 79 | #define CONFIG_CMD_DATE |
80 | #define CONFIG_CMD_EEPROM | 80 | #define CONFIG_CMD_EEPROM |
81 | #define CONFIG_CMD_I2C | 81 | #define CONFIG_CMD_I2C |
82 | 82 | ||
83 | #define CONFIG_MAC_PARTITION | 83 | #define CONFIG_MAC_PARTITION |
84 | #define CONFIG_DOS_PARTITION | 84 | #define CONFIG_DOS_PARTITION |
85 | 85 | ||
86 | #undef CONFIG_WATCHDOG /* watchdog disabled */ | 86 | #undef CONFIG_WATCHDOG /* watchdog disabled */ |
87 | 87 | ||
88 | #define CONFIG_RTC_MC146818 /* BQ3285 is MC146818 compatible*/ | 88 | #define CONFIG_RTC_MC146818 /* BQ3285 is MC146818 compatible*/ |
89 | #define CONFIG_SYS_RTC_REG_BASE_ADDR 0xF0000080 /* RTC Base Address */ | 89 | #define CONFIG_SYS_RTC_REG_BASE_ADDR 0xF0000080 /* RTC Base Address */ |
90 | 90 | ||
91 | #define CONFIG_SDRAM_BANK0 1 /* init onboard SDRAM bank 0 */ | 91 | #define CONFIG_SDRAM_BANK0 1 /* init onboard SDRAM bank 0 */ |
92 | 92 | ||
93 | /* | 93 | /* |
94 | * Miscellaneous configurable options | 94 | * Miscellaneous configurable options |
95 | */ | 95 | */ |
96 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 96 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
97 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | 97 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
98 | #if defined(CONFIG_CMD_KGDB) | 98 | #if defined(CONFIG_CMD_KGDB) |
99 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ | 99 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
100 | #else | 100 | #else |
101 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | 101 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
102 | #endif | 102 | #endif |
103 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ | 103 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
104 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 104 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
105 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | 105 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
106 | 106 | ||
107 | #define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/ | 107 | #define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/ |
108 | 108 | ||
109 | #define CONFIG_SYS_MEMTEST_START 0x0400000 /* memtest works on */ | 109 | #define CONFIG_SYS_MEMTEST_START 0x0400000 /* memtest works on */ |
110 | #define CONFIG_SYS_MEMTEST_END 0x0C00000 /* 4 ... 12 MB in DRAM */ | 110 | #define CONFIG_SYS_MEMTEST_END 0x0C00000 /* 4 ... 12 MB in DRAM */ |
111 | 111 | ||
112 | #define CONFIG_SYS_EXT_SERIAL_CLOCK 11059200 /* use external serial clock */ | 112 | #define CONFIG_SYS_EXT_SERIAL_CLOCK 11059200 /* use external serial clock */ |
113 | 113 | ||
114 | /* The following table includes the supported baudrates */ | 114 | /* The following table includes the supported baudrates */ |
115 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 115 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
116 | { 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, \ | 116 | { 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, \ |
117 | 57600, 115200, 230400, 460800, 921600 } | 117 | 57600, 115200, 230400, 460800, 921600 } |
118 | 118 | ||
119 | #define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */ | 119 | #define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */ |
120 | #define CONFIG_SYS_EXTBDINFO 1 /* To use extended board_into (bd_t) */ | 120 | #define CONFIG_SYS_EXTBDINFO 1 /* To use extended board_into (bd_t) */ |
121 | 121 | ||
122 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ | 122 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ |
123 | 123 | ||
124 | #define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */ | 124 | #define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */ |
125 | 125 | ||
126 | #define CONFIG_SYS_RX_ETH_BUFFER 16 /* use 16 rx buffer on 405 emac */ | 126 | #define CONFIG_SYS_RX_ETH_BUFFER 16 /* use 16 rx buffer on 405 emac */ |
127 | 127 | ||
128 | /*----------------------------------------------------------------------- | 128 | /*----------------------------------------------------------------------- |
129 | * PCI stuff | 129 | * PCI stuff |
130 | *----------------------------------------------------------------------- | 130 | *----------------------------------------------------------------------- |
131 | */ | 131 | */ |
132 | #define PCI_HOST_ADAPTER 0 /* configure ar pci adapter */ | 132 | #define PCI_HOST_ADAPTER 0 /* configure ar pci adapter */ |
133 | #define PCI_HOST_FORCE 1 /* configure as pci host */ | 133 | #define PCI_HOST_FORCE 1 /* configure as pci host */ |
134 | #define PCI_HOST_AUTO 2 /* detected via arbiter enable */ | 134 | #define PCI_HOST_AUTO 2 /* detected via arbiter enable */ |
135 | 135 | ||
136 | #define CONFIG_PCI /* include pci support */ | 136 | #define CONFIG_PCI /* include pci support */ |
137 | #define CONFIG_PCI_HOST PCI_HOST_AUTO /* select pci host function */ | 137 | #define CONFIG_PCI_HOST PCI_HOST_AUTO /* select pci host function */ |
138 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ | 138 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ |
139 | /* resource configuration */ | 139 | /* resource configuration */ |
140 | 140 | ||
141 | #define CONFIG_PCI_SCAN_SHOW /* print pci devices @ startup */ | 141 | #define CONFIG_PCI_SCAN_SHOW /* print pci devices @ startup */ |
142 | 142 | ||
143 | #define CONFIG_PCI_BOOTDELAY 0 /* enable pci bootdelay variable*/ | 143 | #define CONFIG_PCI_BOOTDELAY 0 /* enable pci bootdelay variable*/ |
144 | 144 | ||
145 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x12FE /* PCI Vendor ID: esd gmbh */ | 145 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x12FE /* PCI Vendor ID: esd gmbh */ |
146 | #define CONFIG_SYS_PCI_SUBSYS_DEVICEID 0x0404 /* PCI Device ID: CPCI-ISER4 */ | 146 | #define CONFIG_SYS_PCI_SUBSYS_DEVICEID 0x0404 /* PCI Device ID: CPCI-ISER4 */ |
147 | #define CONFIG_SYS_PCI_PTM1LA 0x00000000 /* point to sdram */ | 147 | #define CONFIG_SYS_PCI_PTM1LA 0x00000000 /* point to sdram */ |
148 | #define CONFIG_SYS_PCI_PTM1MS 0xff000001 /* 16MB, enable hard-wired to 1 */ | 148 | #define CONFIG_SYS_PCI_PTM1MS 0xff000001 /* 16MB, enable hard-wired to 1 */ |
149 | #define CONFIG_SYS_PCI_PTM1PCI 0x00000000 /* Host: use this pci address */ | 149 | #define CONFIG_SYS_PCI_PTM1PCI 0x00000000 /* Host: use this pci address */ |
150 | #define CONFIG_SYS_PCI_PTM2LA 0xffe00000 /* point to flash */ | 150 | #define CONFIG_SYS_PCI_PTM2LA 0xffe00000 /* point to flash */ |
151 | #define CONFIG_SYS_PCI_PTM2MS 0xffe00001 /* 2MB, enable */ | 151 | #define CONFIG_SYS_PCI_PTM2MS 0xffe00001 /* 2MB, enable */ |
152 | #define CONFIG_SYS_PCI_PTM2PCI 0x04000000 /* Host: use this pci address */ | 152 | #define CONFIG_SYS_PCI_PTM2PCI 0x04000000 /* Host: use this pci address */ |
153 | 153 | ||
154 | /*----------------------------------------------------------------------- | 154 | /*----------------------------------------------------------------------- |
155 | * IDE/ATA stuff | 155 | * IDE/ATA stuff |
156 | *----------------------------------------------------------------------- | 156 | *----------------------------------------------------------------------- |
157 | */ | 157 | */ |
158 | #undef CONFIG_IDE_8xx_DIRECT /* no pcmcia interface required */ | 158 | #undef CONFIG_IDE_8xx_DIRECT /* no pcmcia interface required */ |
159 | #undef CONFIG_IDE_LED /* no led for ide supported */ | 159 | #undef CONFIG_IDE_LED /* no led for ide supported */ |
160 | #undef CONFIG_IDE_RESET /* no reset for ide supported */ | 160 | #undef CONFIG_IDE_RESET /* no reset for ide supported */ |
161 | 161 | ||
162 | #define CONFIG_SYS_IDE_MAXBUS 1 /* max. 1 IDE busses */ | 162 | #define CONFIG_SYS_IDE_MAXBUS 1 /* max. 1 IDE busses */ |
163 | #define CONFIG_SYS_IDE_MAXDEVICE (CONFIG_SYS_IDE_MAXBUS*1) /* max. 1 drives per IDE bus */ | 163 | #define CONFIG_SYS_IDE_MAXDEVICE (CONFIG_SYS_IDE_MAXBUS*1) /* max. 1 drives per IDE bus */ |
164 | 164 | ||
165 | #define CONFIG_SYS_ATA_BASE_ADDR 0xF0100000 | 165 | #define CONFIG_SYS_ATA_BASE_ADDR 0xF0100000 |
166 | #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000 | 166 | #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000 |
167 | 167 | ||
168 | #define CONFIG_SYS_ATA_DATA_OFFSET 0x0000 /* Offset for data I/O */ | 168 | #define CONFIG_SYS_ATA_DATA_OFFSET 0x0000 /* Offset for data I/O */ |
169 | #define CONFIG_SYS_ATA_REG_OFFSET 0x0000 /* Offset for normal register accesses */ | 169 | #define CONFIG_SYS_ATA_REG_OFFSET 0x0000 /* Offset for normal register accesses */ |
170 | #define CONFIG_SYS_ATA_ALT_OFFSET 0x0000 /* Offset for alternate registers */ | 170 | #define CONFIG_SYS_ATA_ALT_OFFSET 0x0000 /* Offset for alternate registers */ |
171 | 171 | ||
172 | /*----------------------------------------------------------------------- | 172 | /*----------------------------------------------------------------------- |
173 | * Start addresses for the final memory configuration | 173 | * Start addresses for the final memory configuration |
174 | * (Set up by the startup code) | 174 | * (Set up by the startup code) |
175 | * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 | 175 | * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 |
176 | */ | 176 | */ |
177 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 | 177 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 |
178 | #define CONFIG_SYS_FLASH_BASE 0xFFFD0000 | 178 | #define CONFIG_SYS_FLASH_BASE 0xFFFD0000 |
179 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE | 179 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE |
180 | #define CONFIG_SYS_MONITOR_LEN (192 * 1024) /* Reserve 192 kB for Monitor */ | 180 | #define CONFIG_SYS_MONITOR_LEN (192 * 1024) /* Reserve 192 kB for Monitor */ |
181 | #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserve 128 kB for malloc() */ | 181 | #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserve 128 kB for malloc() */ |
182 | 182 | ||
183 | /* | 183 | /* |
184 | * For booting Linux, the board info and command line data | 184 | * For booting Linux, the board info and command line data |
185 | * have to be in the first 8 MB of memory, since this is | 185 | * have to be in the first 8 MB of memory, since this is |
186 | * the maximum mapped by the Linux kernel during initialization. | 186 | * the maximum mapped by the Linux kernel during initialization. |
187 | */ | 187 | */ |
188 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ | 188 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ |
189 | /*----------------------------------------------------------------------- | 189 | /*----------------------------------------------------------------------- |
190 | * FLASH organization | 190 | * FLASH organization |
191 | */ | 191 | */ |
192 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max number of memory banks */ | 192 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max number of memory banks */ |
193 | #define CONFIG_SYS_MAX_FLASH_SECT 256 /* max number of sectors on one chip */ | 193 | #define CONFIG_SYS_MAX_FLASH_SECT 256 /* max number of sectors on one chip */ |
194 | 194 | ||
195 | #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ | 195 | #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ |
196 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ | 196 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ |
197 | 197 | ||
198 | #define CONFIG_SYS_FLASH_WORD_SIZE unsigned short /* flash word size (width) */ | 198 | #define CONFIG_SYS_FLASH_WORD_SIZE unsigned short /* flash word size (width) */ |
199 | #define CONFIG_SYS_FLASH_ADDR0 0x5555 /* 1st address for flash config cycles */ | 199 | #define CONFIG_SYS_FLASH_ADDR0 0x5555 /* 1st address for flash config cycles */ |
200 | #define CONFIG_SYS_FLASH_ADDR1 0x2AAA /* 2nd address for flash config cycles */ | 200 | #define CONFIG_SYS_FLASH_ADDR1 0x2AAA /* 2nd address for flash config cycles */ |
201 | /* | 201 | /* |
202 | * The following defines are added for buggy IOP480 byte interface. | 202 | * The following defines are added for buggy IOP480 byte interface. |
203 | * All other boards should use the standard values (CPCI405 etc.) | 203 | * All other boards should use the standard values (CPCI405 etc.) |
204 | */ | 204 | */ |
205 | #define CONFIG_SYS_FLASH_READ0 0x0000 /* 0 is standard */ | 205 | #define CONFIG_SYS_FLASH_READ0 0x0000 /* 0 is standard */ |
206 | #define CONFIG_SYS_FLASH_READ1 0x0001 /* 1 is standard */ | 206 | #define CONFIG_SYS_FLASH_READ1 0x0001 /* 1 is standard */ |
207 | #define CONFIG_SYS_FLASH_READ2 0x0002 /* 2 is standard */ | 207 | #define CONFIG_SYS_FLASH_READ2 0x0002 /* 2 is standard */ |
208 | 208 | ||
209 | #define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */ | 209 | #define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */ |
210 | 210 | ||
211 | /*----------------------------------------------------------------------- | 211 | /*----------------------------------------------------------------------- |
212 | * I2C EEPROM (CAT24WC08) for environment | 212 | * I2C EEPROM (CAT24WC08) for environment |
213 | */ | 213 | */ |
214 | #define CONFIG_I2C_CMD_TREE 1 | ||
215 | #define CONFIG_HARD_I2C /* I2c with hardware support */ | 214 | #define CONFIG_HARD_I2C /* I2c with hardware support */ |
216 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ | 215 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ |
217 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 216 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
218 | 217 | ||
219 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ | 218 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */ |
220 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ | 219 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ |
221 | /* mask of address bits that overflow into the "EEPROM chip address" */ | 220 | /* mask of address bits that overflow into the "EEPROM chip address" */ |
222 | #define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW 0x07 | 221 | #define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW 0x07 |
223 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 /* The Catalyst CAT24WC08 has */ | 222 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 /* The Catalyst CAT24WC08 has */ |
224 | /* 16 byte page write mode using*/ | 223 | /* 16 byte page write mode using*/ |
225 | /* last 4 bits of the address */ | 224 | /* last 4 bits of the address */ |
226 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 /* and takes up to 10 msec */ | 225 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 /* and takes up to 10 msec */ |
227 | 226 | ||
228 | #define CONFIG_ENV_IS_IN_EEPROM 1 /* use EEPROM for environment vars */ | 227 | #define CONFIG_ENV_IS_IN_EEPROM 1 /* use EEPROM for environment vars */ |
229 | #define CONFIG_ENV_OFFSET 0x000 /* environment starts at the beginning of the EEPROM */ | 228 | #define CONFIG_ENV_OFFSET 0x000 /* environment starts at the beginning of the EEPROM */ |
230 | #define CONFIG_ENV_SIZE 0x400 /* 1024 bytes may be used for env vars */ | 229 | #define CONFIG_ENV_SIZE 0x400 /* 1024 bytes may be used for env vars */ |
231 | /* total size of a CAT24WC08 is 1024 bytes */ | 230 | /* total size of a CAT24WC08 is 1024 bytes */ |
232 | 231 | ||
233 | /* | 232 | /* |
234 | * Init Memory Controller: | 233 | * Init Memory Controller: |
235 | * | 234 | * |
236 | * BR0/1 and OR0/1 (FLASH) | 235 | * BR0/1 and OR0/1 (FLASH) |
237 | */ | 236 | */ |
238 | 237 | ||
239 | #define FLASH_BASE0_PRELIM 0xFF800000 /* FLASH bank #0 */ | 238 | #define FLASH_BASE0_PRELIM 0xFF800000 /* FLASH bank #0 */ |
240 | #define FLASH_BASE1_PRELIM 0xFFC00000 /* FLASH bank #1 */ | 239 | #define FLASH_BASE1_PRELIM 0xFFC00000 /* FLASH bank #1 */ |
241 | 240 | ||
242 | /*----------------------------------------------------------------------- | 241 | /*----------------------------------------------------------------------- |
243 | * External Bus Controller (EBC) Setup | 242 | * External Bus Controller (EBC) Setup |
244 | */ | 243 | */ |
245 | 244 | ||
246 | #define FLASH0_BA 0xFFC00000 /* FLASH 0 Base Address */ | 245 | #define FLASH0_BA 0xFFC00000 /* FLASH 0 Base Address */ |
247 | #define FLASH1_BA 0xFF800000 /* FLASH 1 Base Address */ | 246 | #define FLASH1_BA 0xFF800000 /* FLASH 1 Base Address */ |
248 | #define CAN_BA 0xF0000000 /* CAN Base Address */ | 247 | #define CAN_BA 0xF0000000 /* CAN Base Address */ |
249 | #define DUART_BA 0xF0300000 /* DUART Base Address */ | 248 | #define DUART_BA 0xF0300000 /* DUART Base Address */ |
250 | #define CF_BA 0xF0100000 /* CompactFlash Base Address */ | 249 | #define CF_BA 0xF0100000 /* CompactFlash Base Address */ |
251 | #define SRAM_BA 0xF0200000 /* SRAM Base Address */ | 250 | #define SRAM_BA 0xF0200000 /* SRAM Base Address */ |
252 | #define DURAG_IO_BA 0xF0400000 /* DURAG Bus IO Base Address */ | 251 | #define DURAG_IO_BA 0xF0400000 /* DURAG Bus IO Base Address */ |
253 | #define DURAG_MEM_BA 0xF0500000 /* DURAG Bus Mem Base Address */ | 252 | #define DURAG_MEM_BA 0xF0500000 /* DURAG Bus Mem Base Address */ |
254 | 253 | ||
255 | #define FPGA_MODE_REG (DUART_BA+0x80) /* FPGA Mode Register */ | 254 | #define FPGA_MODE_REG (DUART_BA+0x80) /* FPGA Mode Register */ |
256 | 255 | ||
257 | /* Memory Bank 0 (Flash Bank 0) initialization */ | 256 | /* Memory Bank 0 (Flash Bank 0) initialization */ |
258 | #define CONFIG_SYS_EBC_PB0AP 0x92015480 | 257 | #define CONFIG_SYS_EBC_PB0AP 0x92015480 |
259 | #define CONFIG_SYS_EBC_PB0CR FLASH0_BA | 0x5A000 /* BAS=0xFFC,BS=4MB,BU=R/W,BW=16bit */ | 258 | #define CONFIG_SYS_EBC_PB0CR FLASH0_BA | 0x5A000 /* BAS=0xFFC,BS=4MB,BU=R/W,BW=16bit */ |
260 | 259 | ||
261 | /* Memory Bank 1 (Flash Bank 1) initialization */ | 260 | /* Memory Bank 1 (Flash Bank 1) initialization */ |
262 | #define CONFIG_SYS_EBC_PB1AP 0x92015480 | 261 | #define CONFIG_SYS_EBC_PB1AP 0x92015480 |
263 | #define CONFIG_SYS_EBC_PB1CR FLASH1_BA | 0x5A000 /* BAS=0xFF8,BS=4MB,BU=R/W,BW=16bit */ | 262 | #define CONFIG_SYS_EBC_PB1CR FLASH1_BA | 0x5A000 /* BAS=0xFF8,BS=4MB,BU=R/W,BW=16bit */ |
264 | 263 | ||
265 | /* Memory Bank 2 (CAN0) initialization */ | 264 | /* Memory Bank 2 (CAN0) initialization */ |
266 | #define CONFIG_SYS_EBC_PB2AP 0x010053C0 /* BWT=2,WBN=1,WBF=1,TH=1,RE=1,SOR=1,BEM=1 */ | 265 | #define CONFIG_SYS_EBC_PB2AP 0x010053C0 /* BWT=2,WBN=1,WBF=1,TH=1,RE=1,SOR=1,BEM=1 */ |
267 | #define CONFIG_SYS_EBC_PB2CR CAN_BA | 0x18000 /* BAS=0xF00,BS=1MB,BU=R/W,BW=8bit */ | 266 | #define CONFIG_SYS_EBC_PB2CR CAN_BA | 0x18000 /* BAS=0xF00,BS=1MB,BU=R/W,BW=8bit */ |
268 | 267 | ||
269 | /* Memory Bank 3 (DUART) initialization */ | 268 | /* Memory Bank 3 (DUART) initialization */ |
270 | #define CONFIG_SYS_EBC_PB3AP 0x010053C0 /* BWT=2,WBN=1,WBF=1,TH=1,RE=1,SOR=1,BEM=1 */ | 269 | #define CONFIG_SYS_EBC_PB3AP 0x010053C0 /* BWT=2,WBN=1,WBF=1,TH=1,RE=1,SOR=1,BEM=1 */ |
271 | #define CONFIG_SYS_EBC_PB3CR DUART_BA | 0x18000 /* BAS=0xF03,BS=1MB,BU=R/W,BW=8bit */ | 270 | #define CONFIG_SYS_EBC_PB3CR DUART_BA | 0x18000 /* BAS=0xF03,BS=1MB,BU=R/W,BW=8bit */ |
272 | 271 | ||
273 | /* Memory Bank 4 (CompactFlash IDE) initialization */ | 272 | /* Memory Bank 4 (CompactFlash IDE) initialization */ |
274 | #define CONFIG_SYS_EBC_PB4AP 0x010053C0 /* BWT=2,WBN=1,WBF=1,TH=1,RE=1,SOR=1,BEM=1 */ | 273 | #define CONFIG_SYS_EBC_PB4AP 0x010053C0 /* BWT=2,WBN=1,WBF=1,TH=1,RE=1,SOR=1,BEM=1 */ |
275 | #define CONFIG_SYS_EBC_PB4CR CF_BA | 0x1A000 /* BAS=0xF01,BS=1MB,BU=R/W,BW=16bit */ | 274 | #define CONFIG_SYS_EBC_PB4CR CF_BA | 0x1A000 /* BAS=0xF01,BS=1MB,BU=R/W,BW=16bit */ |
276 | 275 | ||
277 | /* Memory Bank 5 (SRAM) initialization */ | 276 | /* Memory Bank 5 (SRAM) initialization */ |
278 | #define CONFIG_SYS_EBC_PB5AP 0x010053C0 /* BWT=2,WBN=1,WBF=1,TH=1,RE=1,SOR=1,BEM=1 */ | 277 | #define CONFIG_SYS_EBC_PB5AP 0x010053C0 /* BWT=2,WBN=1,WBF=1,TH=1,RE=1,SOR=1,BEM=1 */ |
279 | #define CONFIG_SYS_EBC_PB5CR SRAM_BA | 0x1A000 /* BAS=0xF02,BS=1MB,BU=R/W,BW=16bit */ | 278 | #define CONFIG_SYS_EBC_PB5CR SRAM_BA | 0x1A000 /* BAS=0xF02,BS=1MB,BU=R/W,BW=16bit */ |
280 | 279 | ||
281 | /* Memory Bank 6 (DURAG Bus IO Space) initialization */ | 280 | /* Memory Bank 6 (DURAG Bus IO Space) initialization */ |
282 | #define CONFIG_SYS_EBC_PB6AP 0x010053C0 /* BWT=2,WBN=1,WBF=1,TH=1,RE=1,SOR=1,BEM=1 */ | 281 | #define CONFIG_SYS_EBC_PB6AP 0x010053C0 /* BWT=2,WBN=1,WBF=1,TH=1,RE=1,SOR=1,BEM=1 */ |
283 | #define CONFIG_SYS_EBC_PB6CR DURAG_IO_BA | 0x18000 /* BAS=0xF04,BS=1MB,BU=R/W,BW=8bit*/ | 282 | #define CONFIG_SYS_EBC_PB6CR DURAG_IO_BA | 0x18000 /* BAS=0xF04,BS=1MB,BU=R/W,BW=8bit*/ |
284 | 283 | ||
285 | /* Memory Bank 7 (DURAG Bus Mem Space) initialization */ | 284 | /* Memory Bank 7 (DURAG Bus Mem Space) initialization */ |
286 | #define CONFIG_SYS_EBC_PB7AP 0x010053C0 /* BWT=2,WBN=1,WBF=1,TH=1,RE=1,SOR=1,BEM=1 */ | 285 | #define CONFIG_SYS_EBC_PB7AP 0x010053C0 /* BWT=2,WBN=1,WBF=1,TH=1,RE=1,SOR=1,BEM=1 */ |
287 | #define CONFIG_SYS_EBC_PB7CR DURAG_MEM_BA | 0x18000 /* BAS=0xF05,BS=1MB,BU=R/W,BW=8bit */ | 286 | #define CONFIG_SYS_EBC_PB7CR DURAG_MEM_BA | 0x18000 /* BAS=0xF05,BS=1MB,BU=R/W,BW=8bit */ |
288 | 287 | ||
289 | 288 | ||
290 | /*----------------------------------------------------------------------- | 289 | /*----------------------------------------------------------------------- |
291 | * Definitions for initial stack pointer and data area (in DPRAM) | 290 | * Definitions for initial stack pointer and data area (in DPRAM) |
292 | */ | 291 | */ |
293 | 292 | ||
294 | /* use on chip memory ( OCM ) for temperary stack until sdram is tested */ | 293 | /* use on chip memory ( OCM ) for temperary stack until sdram is tested */ |
295 | #define CONFIG_SYS_TEMP_STACK_OCM 1 | 294 | #define CONFIG_SYS_TEMP_STACK_OCM 1 |
296 | 295 | ||
297 | /* On Chip Memory location */ | 296 | /* On Chip Memory location */ |
298 | #define CONFIG_SYS_OCM_DATA_ADDR 0xF8000000 | 297 | #define CONFIG_SYS_OCM_DATA_ADDR 0xF8000000 |
299 | #define CONFIG_SYS_OCM_DATA_SIZE 0x1000 | 298 | #define CONFIG_SYS_OCM_DATA_SIZE 0x1000 |
300 | 299 | ||
301 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM */ | 300 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM */ |
302 | #define CONFIG_SYS_INIT_RAM_END CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM */ | 301 | #define CONFIG_SYS_INIT_RAM_END CONFIG_SYS_OCM_DATA_SIZE /* End of used area in RAM */ |
303 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ | 302 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ |
304 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 303 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
305 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET | 304 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
306 | 305 | ||
307 | 306 | ||
308 | /* | 307 | /* |
309 | * Internal Definitions | 308 | * Internal Definitions |
310 | * | 309 | * |
311 | * Boot Flags | 310 | * Boot Flags |
312 | */ | 311 | */ |
313 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 312 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
314 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 313 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
315 | 314 | ||
316 | #endif /* __CONFIG_H */ | 315 | #endif /* __CONFIG_H */ |
317 | 316 |
include/configs/DU440.h
1 | /* | 1 | /* |
2 | * (C) Copyright 2008 | 2 | * (C) Copyright 2008 |
3 | * Matthias Fuchs, esd gmbh, matthias.fuchs@esd-electronics.com | 3 | * Matthias Fuchs, esd gmbh, matthias.fuchs@esd-electronics.com |
4 | * | 4 | * |
5 | * based on the Sequoia board configuration by | 5 | * based on the Sequoia board configuration by |
6 | * Stefan Roese, Jacqueline Pira-Ferriol and Alain Saurel | 6 | * Stefan Roese, Jacqueline Pira-Ferriol and Alain Saurel |
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 | ********************************************************************** | 25 | ********************************************************************** |
26 | * DU440.h - configuration for esd's DU440 board (Power PC440EPx) | 26 | * DU440.h - configuration for esd's DU440 board (Power PC440EPx) |
27 | ********************************************************************** | 27 | ********************************************************************** |
28 | */ | 28 | */ |
29 | #ifndef __CONFIG_H | 29 | #ifndef __CONFIG_H |
30 | #define __CONFIG_H | 30 | #define __CONFIG_H |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * High Level Configuration Options | 33 | * High Level Configuration Options |
34 | */ | 34 | */ |
35 | #define CONFIG_DU440 1 /* Board is esd DU440 */ | 35 | #define CONFIG_DU440 1 /* Board is esd DU440 */ |
36 | #define CONFIG_440EPX 1 /* Specific PPC440EPx */ | 36 | #define CONFIG_440EPX 1 /* Specific PPC440EPx */ |
37 | #define CONFIG_4xx 1 /* ... PPC4xx family */ | 37 | #define CONFIG_4xx 1 /* ... PPC4xx family */ |
38 | #define CONFIG_SYS_CLK_FREQ 33333400 /* external freq to pll */ | 38 | #define CONFIG_SYS_CLK_FREQ 33333400 /* external freq to pll */ |
39 | 39 | ||
40 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */ | 40 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */ |
41 | #define CONFIG_MISC_INIT_R 1 /* Call misc_init_r */ | 41 | #define CONFIG_MISC_INIT_R 1 /* Call misc_init_r */ |
42 | #define CONFIG_LAST_STAGE_INIT 1 /* last_stage_init */ | 42 | #define CONFIG_LAST_STAGE_INIT 1 /* last_stage_init */ |
43 | 43 | ||
44 | /* | 44 | /* |
45 | * Base addresses -- Note these are effective addresses where the | 45 | * Base addresses -- Note these are effective addresses where the |
46 | * actual resources get mapped (not physical addresses) | 46 | * actual resources get mapped (not physical addresses) |
47 | */ | 47 | */ |
48 | #define CONFIG_SYS_MONITOR_LEN (384 * 1024) /* Reserve 384 kB for Monitor */ | 48 | #define CONFIG_SYS_MONITOR_LEN (384 * 1024) /* Reserve 384 kB for Monitor */ |
49 | #define CONFIG_SYS_MALLOC_LEN (8 << 20) /* Reserve 8 MB for malloc() */ | 49 | #define CONFIG_SYS_MALLOC_LEN (8 << 20) /* Reserve 8 MB for malloc() */ |
50 | 50 | ||
51 | #define CONFIG_SYS_BOOT_BASE_ADDR 0xf0000000 | 51 | #define CONFIG_SYS_BOOT_BASE_ADDR 0xf0000000 |
52 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 /* _must_ be 0 */ | 52 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 /* _must_ be 0 */ |
53 | #define CONFIG_SYS_FLASH_BASE 0xfc000000 /* start of FLASH */ | 53 | #define CONFIG_SYS_FLASH_BASE 0xfc000000 /* start of FLASH */ |
54 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE | 54 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE |
55 | #define CONFIG_SYS_NAND0_ADDR 0xd0000000 /* NAND Flash */ | 55 | #define CONFIG_SYS_NAND0_ADDR 0xd0000000 /* NAND Flash */ |
56 | #define CONFIG_SYS_NAND1_ADDR 0xd0100000 /* NAND Flash */ | 56 | #define CONFIG_SYS_NAND1_ADDR 0xd0100000 /* NAND Flash */ |
57 | #define CONFIG_SYS_OCM_BASE 0xe0010000 /* ocm */ | 57 | #define CONFIG_SYS_OCM_BASE 0xe0010000 /* ocm */ |
58 | #define CONFIG_SYS_PCI_BASE 0xe0000000 /* Internal PCI regs */ | 58 | #define CONFIG_SYS_PCI_BASE 0xe0000000 /* Internal PCI regs */ |
59 | #define CONFIG_SYS_PCI_MEMBASE 0x80000000 /* mapped pci memory */ | 59 | #define CONFIG_SYS_PCI_MEMBASE 0x80000000 /* mapped pci memory */ |
60 | #define CONFIG_SYS_PCI_MEMBASE1 CONFIG_SYS_PCI_MEMBASE + 0x10000000 | 60 | #define CONFIG_SYS_PCI_MEMBASE1 CONFIG_SYS_PCI_MEMBASE + 0x10000000 |
61 | #define CONFIG_SYS_PCI_MEMBASE2 CONFIG_SYS_PCI_MEMBASE1 + 0x10000000 | 61 | #define CONFIG_SYS_PCI_MEMBASE2 CONFIG_SYS_PCI_MEMBASE1 + 0x10000000 |
62 | #define CONFIG_SYS_PCI_MEMBASE3 CONFIG_SYS_PCI_MEMBASE2 + 0x10000000 | 62 | #define CONFIG_SYS_PCI_MEMBASE3 CONFIG_SYS_PCI_MEMBASE2 + 0x10000000 |
63 | #define CONFIG_SYS_PCI_IOBASE 0xe8000000 | 63 | #define CONFIG_SYS_PCI_IOBASE 0xe8000000 |
64 | 64 | ||
65 | 65 | ||
66 | /* Don't change either of these */ | 66 | /* Don't change either of these */ |
67 | #define CONFIG_SYS_PERIPHERAL_BASE 0xef600000 /* internal peripherals */ | 67 | #define CONFIG_SYS_PERIPHERAL_BASE 0xef600000 /* internal peripherals */ |
68 | 68 | ||
69 | #define CONFIG_SYS_USB2D0_BASE 0xe0000100 | 69 | #define CONFIG_SYS_USB2D0_BASE 0xe0000100 |
70 | #define CONFIG_SYS_USB_DEVICE 0xe0000000 | 70 | #define CONFIG_SYS_USB_DEVICE 0xe0000000 |
71 | #define CONFIG_SYS_USB_HOST 0xe0000400 | 71 | #define CONFIG_SYS_USB_HOST 0xe0000400 |
72 | 72 | ||
73 | /* | 73 | /* |
74 | * Initial RAM & stack pointer | 74 | * Initial RAM & stack pointer |
75 | */ | 75 | */ |
76 | /* 440EPx/440GRx have 16KB of internal SRAM, so no need for D-Cache */ | 76 | /* 440EPx/440GRx have 16KB of internal SRAM, so no need for D-Cache */ |
77 | #define CONFIG_SYS_INIT_RAM_OCM 1 /* OCM as init ram */ | 77 | #define CONFIG_SYS_INIT_RAM_OCM 1 /* OCM as init ram */ |
78 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_OCM_BASE /* OCM */ | 78 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_OCM_BASE /* OCM */ |
79 | 79 | ||
80 | #define CONFIG_SYS_INIT_RAM_END (4 << 10) | 80 | #define CONFIG_SYS_INIT_RAM_END (4 << 10) |
81 | #define CONFIG_SYS_GBL_DATA_SIZE 256 /* num bytes initial data */ | 81 | #define CONFIG_SYS_GBL_DATA_SIZE 256 /* num bytes initial data */ |
82 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 82 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
83 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET | 83 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
84 | 84 | ||
85 | /* | 85 | /* |
86 | * Serial Port | 86 | * Serial Port |
87 | */ | 87 | */ |
88 | #undef CONFIG_SYS_EXT_SERIAL_CLOCK | 88 | #undef CONFIG_SYS_EXT_SERIAL_CLOCK |
89 | #define CONFIG_BAUDRATE 115200 | 89 | #define CONFIG_BAUDRATE 115200 |
90 | #define CONFIG_SERIAL_MULTI 1 | 90 | #define CONFIG_SERIAL_MULTI 1 |
91 | #undef CONFIG_UART1_CONSOLE | 91 | #undef CONFIG_UART1_CONSOLE |
92 | 92 | ||
93 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 93 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
94 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200} | 94 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200} |
95 | 95 | ||
96 | /* | 96 | /* |
97 | * Video Port | 97 | * Video Port |
98 | */ | 98 | */ |
99 | #define CONFIG_VIDEO | 99 | #define CONFIG_VIDEO |
100 | #define CONFIG_VIDEO_SMI_LYNXEM | 100 | #define CONFIG_VIDEO_SMI_LYNXEM |
101 | #define CONFIG_CFB_CONSOLE | 101 | #define CONFIG_CFB_CONSOLE |
102 | #define CONFIG_VIDEO_LOGO | 102 | #define CONFIG_VIDEO_LOGO |
103 | #define CONFIG_VGA_AS_SINGLE_DEVICE | 103 | #define CONFIG_VGA_AS_SINGLE_DEVICE |
104 | #define CONFIG_SPLASH_SCREEN | 104 | #define CONFIG_SPLASH_SCREEN |
105 | #define CONFIG_SPLASH_SCREEN_ALIGN | 105 | #define CONFIG_SPLASH_SCREEN_ALIGN |
106 | #define CONFIG_VIDEO_BMP_GZIP /* gzip compressed bmp images */ | 106 | #define CONFIG_VIDEO_BMP_GZIP /* gzip compressed bmp images */ |
107 | #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (4 << 20) /* for decompressed img */ | 107 | #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (4 << 20) /* for decompressed img */ |
108 | #define CONFIG_SYS_DEFAULT_VIDEO_MODE 0x31a /* 1280x1024,16bpp */ | 108 | #define CONFIG_SYS_DEFAULT_VIDEO_MODE 0x31a /* 1280x1024,16bpp */ |
109 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV | 109 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV |
110 | #define CONFIG_SYS_ISA_IO CONFIG_SYS_PCI_IOBASE | 110 | #define CONFIG_SYS_ISA_IO CONFIG_SYS_PCI_IOBASE |
111 | 111 | ||
112 | /* | 112 | /* |
113 | * Environment | 113 | * Environment |
114 | */ | 114 | */ |
115 | #define CONFIG_ENV_IS_IN_EEPROM 1 /* use FLASH for environment vars */ | 115 | #define CONFIG_ENV_IS_IN_EEPROM 1 /* use FLASH for environment vars */ |
116 | 116 | ||
117 | /* | 117 | /* |
118 | * FLASH related | 118 | * FLASH related |
119 | */ | 119 | */ |
120 | #define CONFIG_SYS_FLASH_CFI /* The flash is CFI compatible */ | 120 | #define CONFIG_SYS_FLASH_CFI /* The flash is CFI compatible */ |
121 | #define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver */ | 121 | #define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver */ |
122 | 122 | ||
123 | #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE } | 123 | #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE } |
124 | 124 | ||
125 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ | 125 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ |
126 | #define CONFIG_SYS_MAX_FLASH_SECT 512 /* max number of sectors on one chip */ | 126 | #define CONFIG_SYS_MAX_FLASH_SECT 512 /* max number of sectors on one chip */ |
127 | 127 | ||
128 | #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ | 128 | #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ |
129 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ | 129 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ |
130 | 130 | ||
131 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */ | 131 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */ |
132 | /* CFI_FLASH_PROTECTION make flash_protect hang sometimes -> disabled */ | 132 | /* CFI_FLASH_PROTECTION make flash_protect hang sometimes -> disabled */ |
133 | #define CONFIG_SYS_FLASH_PROTECTION 1 /* use hardware flash protection */ | 133 | #define CONFIG_SYS_FLASH_PROTECTION 1 /* use hardware flash protection */ |
134 | 134 | ||
135 | #define CONFIG_SYS_FLASH_EMPTY_INFO | 135 | #define CONFIG_SYS_FLASH_EMPTY_INFO |
136 | #define CONFIG_SYS_FLASH_QUIET_TEST 1 /* don't warn upon unknown flash */ | 136 | #define CONFIG_SYS_FLASH_QUIET_TEST 1 /* don't warn upon unknown flash */ |
137 | 137 | ||
138 | #ifdef CONFIG_ENV_IS_IN_FLASH | 138 | #ifdef CONFIG_ENV_IS_IN_FLASH |
139 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* size of one complete sector */ | 139 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* size of one complete sector */ |
140 | #define CONFIG_ENV_ADDR ((-CONFIG_SYS_MONITOR_LEN)-CONFIG_ENV_SECT_SIZE) | 140 | #define CONFIG_ENV_ADDR ((-CONFIG_SYS_MONITOR_LEN)-CONFIG_ENV_SECT_SIZE) |
141 | #define CONFIG_ENV_SIZE 0x2000 /* Total Size of Environment Sector */ | 141 | #define CONFIG_ENV_SIZE 0x2000 /* Total Size of Environment Sector */ |
142 | 142 | ||
143 | /* Address and size of Redundant Environment Sector */ | 143 | /* Address and size of Redundant Environment Sector */ |
144 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR-CONFIG_ENV_SECT_SIZE) | 144 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR-CONFIG_ENV_SECT_SIZE) |
145 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) | 145 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) |
146 | #endif | 146 | #endif |
147 | 147 | ||
148 | #ifdef CONFIG_ENV_IS_IN_EEPROM | 148 | #ifdef CONFIG_ENV_IS_IN_EEPROM |
149 | #define CONFIG_ENV_OFFSET 0 /* environment starts at */ | 149 | #define CONFIG_ENV_OFFSET 0 /* environment starts at */ |
150 | /* the beginning of the EEPROM */ | 150 | /* the beginning of the EEPROM */ |
151 | #define CONFIG_ENV_SIZE 0x1000 /* 4096 bytes may be used for env vars */ | 151 | #define CONFIG_ENV_SIZE 0x1000 /* 4096 bytes may be used for env vars */ |
152 | #endif | 152 | #endif |
153 | 153 | ||
154 | /* | 154 | /* |
155 | * DDR SDRAM | 155 | * DDR SDRAM |
156 | */ | 156 | */ |
157 | #define CONFIG_SYS_MBYTES_SDRAM (1024) /* 512 MiB TODO: remove */ | 157 | #define CONFIG_SYS_MBYTES_SDRAM (1024) /* 512 MiB TODO: remove */ |
158 | #define CONFIG_DDR_DATA_EYE /* use DDR2 optimization */ | 158 | #define CONFIG_DDR_DATA_EYE /* use DDR2 optimization */ |
159 | #define CONFIG_SYS_MEM_TOP_HIDE (4 << 10) /* don't use last 4kbytes */ | 159 | #define CONFIG_SYS_MEM_TOP_HIDE (4 << 10) /* don't use last 4kbytes */ |
160 | /* 440EPx errata CHIP 11 */ | 160 | /* 440EPx errata CHIP 11 */ |
161 | #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for setup */ | 161 | #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for setup */ |
162 | #define CONFIG_DDR_ECC /* Use ECC when available */ | 162 | #define CONFIG_DDR_ECC /* Use ECC when available */ |
163 | #define SPD_EEPROM_ADDRESS {0x50} | 163 | #define SPD_EEPROM_ADDRESS {0x50} |
164 | #define CONFIG_PROG_SDRAM_TLB | 164 | #define CONFIG_PROG_SDRAM_TLB |
165 | 165 | ||
166 | /* | 166 | /* |
167 | * I2C | 167 | * I2C |
168 | */ | 168 | */ |
169 | #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ | 169 | #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ |
170 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ | 170 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ |
171 | #define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ | 171 | #define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ |
172 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 172 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
173 | #define CONFIG_I2C_CMD_TREE 1 | ||
174 | #define CONFIG_I2C_MULTI_BUS 1 | 173 | #define CONFIG_I2C_MULTI_BUS 1 |
175 | 174 | ||
176 | #define CONFIG_SYS_SPD_BUS_NUM 0 | 175 | #define CONFIG_SYS_SPD_BUS_NUM 0 |
177 | #define IIC1_MCP3021_ADDR 0x4d | 176 | #define IIC1_MCP3021_ADDR 0x4d |
178 | #define IIC1_USB2507_ADDR 0x2c | 177 | #define IIC1_USB2507_ADDR 0x2c |
179 | #ifdef CONFIG_I2C_MULTI_BUS | 178 | #ifdef CONFIG_I2C_MULTI_BUS |
180 | #define CONFIG_SYS_I2C_NOPROBES {{1, IIC1_USB2507_ADDR}} | 179 | #define CONFIG_SYS_I2C_NOPROBES {{1, IIC1_USB2507_ADDR}} |
181 | #endif | 180 | #endif |
182 | #define CONFIG_SYS_I2C_MULTI_EEPROMS | 181 | #define CONFIG_SYS_I2C_MULTI_EEPROMS |
183 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x54 | 182 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x54 |
184 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 | 183 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 |
185 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5 | 184 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5 |
186 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 | 185 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 |
187 | #define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW 0x01 | 186 | #define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW 0x01 |
188 | 187 | ||
189 | #define CONFIG_SYS_EEPROM_WREN 1 | 188 | #define CONFIG_SYS_EEPROM_WREN 1 |
190 | #define CONFIG_SYS_I2C_BOOT_EEPROM_ADDR 0x52 | 189 | #define CONFIG_SYS_I2C_BOOT_EEPROM_ADDR 0x52 |
191 | 190 | ||
192 | /* | 191 | /* |
193 | * standard dtt sensor configuration - bottom bit will determine local or | 192 | * standard dtt sensor configuration - bottom bit will determine local or |
194 | * remote sensor of the TMP401 | 193 | * remote sensor of the TMP401 |
195 | */ | 194 | */ |
196 | #define CONFIG_DTT_SENSORS { 0, 1 } | 195 | #define CONFIG_DTT_SENSORS { 0, 1 } |
197 | 196 | ||
198 | /* | 197 | /* |
199 | * The PMC440 uses a TI TMP401 temperature sensor. This part | 198 | * The PMC440 uses a TI TMP401 temperature sensor. This part |
200 | * is basically compatible to the ADM1021 that is supported | 199 | * is basically compatible to the ADM1021 that is supported |
201 | * by U-Boot. | 200 | * by U-Boot. |
202 | * | 201 | * |
203 | * - i2c addr 0x4c | 202 | * - i2c addr 0x4c |
204 | * - conversion rate 0x02 = 0.25 conversions/second | 203 | * - conversion rate 0x02 = 0.25 conversions/second |
205 | * - ALERT ouput disabled | 204 | * - ALERT ouput disabled |
206 | * - local temp sensor enabled, min set to 0 deg, max set to 70 deg | 205 | * - local temp sensor enabled, min set to 0 deg, max set to 70 deg |
207 | * - remote temp sensor enabled, min set to 0 deg, max set to 70 deg | 206 | * - remote temp sensor enabled, min set to 0 deg, max set to 70 deg |
208 | */ | 207 | */ |
209 | #define CONFIG_DTT_ADM1021 | 208 | #define CONFIG_DTT_ADM1021 |
210 | #define CONFIG_SYS_DTT_ADM1021 { { 0x4c, 0x02, 0, 1, 70, 0, 1, 70, 0} } | 209 | #define CONFIG_SYS_DTT_ADM1021 { { 0x4c, 0x02, 0, 1, 70, 0, 1, 70, 0} } |
211 | 210 | ||
212 | /* | 211 | /* |
213 | * RTC stuff | 212 | * RTC stuff |
214 | */ | 213 | */ |
215 | #define CONFIG_RTC_DS1338 | 214 | #define CONFIG_RTC_DS1338 |
216 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 | 215 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 |
217 | 216 | ||
218 | #undef CONFIG_BOOTARGS | 217 | #undef CONFIG_BOOTARGS |
219 | 218 | ||
220 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 219 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
221 | "netdev=eth0\0" \ | 220 | "netdev=eth0\0" \ |
222 | "ethrotate=no\0" \ | 221 | "ethrotate=no\0" \ |
223 | "hostname=du440\0" \ | 222 | "hostname=du440\0" \ |
224 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ | 223 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
225 | "nfsroot=${serverip}:${rootpath}\0" \ | 224 | "nfsroot=${serverip}:${rootpath}\0" \ |
226 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ | 225 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ |
227 | "addip=setenv bootargs ${bootargs} " \ | 226 | "addip=setenv bootargs ${bootargs} " \ |
228 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ | 227 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ |
229 | ":${hostname}:${netdev}:off panic=1\0" \ | 228 | ":${hostname}:${netdev}:off panic=1\0" \ |
230 | "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\ | 229 | "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\ |
231 | "flash_self=run ramargs addip addtty optargs;" \ | 230 | "flash_self=run ramargs addip addtty optargs;" \ |
232 | "bootm ${kernel_addr} ${ramdisk_addr}\0" \ | 231 | "bootm ${kernel_addr} ${ramdisk_addr}\0" \ |
233 | "net_nfs=tftp 200000 ${img};run nfsargs addip addtty optargs;" \ | 232 | "net_nfs=tftp 200000 ${img};run nfsargs addip addtty optargs;" \ |
234 | "bootm\0" \ | 233 | "bootm\0" \ |
235 | "rootpath=/tftpboot/du440/target_root_du440\0" \ | 234 | "rootpath=/tftpboot/du440/target_root_du440\0" \ |
236 | "img=/tftpboot/du440/uImage\0" \ | 235 | "img=/tftpboot/du440/uImage\0" \ |
237 | "kernel_addr=FFC00000\0" \ | 236 | "kernel_addr=FFC00000\0" \ |
238 | "ramdisk_addr=FFE00000\0" \ | 237 | "ramdisk_addr=FFE00000\0" \ |
239 | "initrd_high=30000000\0" \ | 238 | "initrd_high=30000000\0" \ |
240 | "load=tftp 100000 /tftpboot/du440/u-boot.bin\0" \ | 239 | "load=tftp 100000 /tftpboot/du440/u-boot.bin\0" \ |
241 | "update=protect off FFFA0000 FFFFFFFF;era FFFA0000 FFFFFFFF;" \ | 240 | "update=protect off FFFA0000 FFFFFFFF;era FFFA0000 FFFFFFFF;" \ |
242 | "cp.b 100000 FFFA0000 60000\0" \ | 241 | "cp.b 100000 FFFA0000 60000\0" \ |
243 | "" | 242 | "" |
244 | 243 | ||
245 | #define CONFIG_PREBOOT /* enable preboot variable */ | 244 | #define CONFIG_PREBOOT /* enable preboot variable */ |
246 | 245 | ||
247 | #define CONFIG_BOOTDELAY 3 /* autoboot after 5 seconds */ | 246 | #define CONFIG_BOOTDELAY 3 /* autoboot after 5 seconds */ |
248 | 247 | ||
249 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ | 248 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
250 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ | 249 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
251 | 250 | ||
252 | #ifndef __ASSEMBLY__ | 251 | #ifndef __ASSEMBLY__ |
253 | int du440_phy_addr(int devnum); | 252 | int du440_phy_addr(int devnum); |
254 | #endif | 253 | #endif |
255 | 254 | ||
256 | #define CONFIG_PPC4xx_EMAC | 255 | #define CONFIG_PPC4xx_EMAC |
257 | #define CONFIG_IBM_EMAC4_V4 1 | 256 | #define CONFIG_IBM_EMAC4_V4 1 |
258 | #define CONFIG_MII 1 /* MII PHY management */ | 257 | #define CONFIG_MII 1 /* MII PHY management */ |
259 | #define CONFIG_PHY_ADDR du440_phy_addr(0) /* PHY address */ | 258 | #define CONFIG_PHY_ADDR du440_phy_addr(0) /* PHY address */ |
260 | 259 | ||
261 | #define CONFIG_PHY_RESET 1 /* reset phy upon startup */ | 260 | #define CONFIG_PHY_RESET 1 /* reset phy upon startup */ |
262 | #undef CONFIG_PHY_GIGE /* no GbE detection */ | 261 | #undef CONFIG_PHY_GIGE /* no GbE detection */ |
263 | 262 | ||
264 | #define CONFIG_HAS_ETH0 | 263 | #define CONFIG_HAS_ETH0 |
265 | #define CONFIG_SYS_RX_ETH_BUFFER 128 | 264 | #define CONFIG_SYS_RX_ETH_BUFFER 128 |
266 | 265 | ||
267 | #define CONFIG_NET_MULTI 1 | 266 | #define CONFIG_NET_MULTI 1 |
268 | #define CONFIG_HAS_ETH1 1 /* add support for "eth1addr" */ | 267 | #define CONFIG_HAS_ETH1 1 /* add support for "eth1addr" */ |
269 | #define CONFIG_PHY1_ADDR du440_phy_addr(1) | 268 | #define CONFIG_PHY1_ADDR du440_phy_addr(1) |
270 | 269 | ||
271 | /* | 270 | /* |
272 | * USB | 271 | * USB |
273 | */ | 272 | */ |
274 | #define CONFIG_USB_OHCI_NEW | 273 | #define CONFIG_USB_OHCI_NEW |
275 | #define CONFIG_USB_STORAGE | 274 | #define CONFIG_USB_STORAGE |
276 | #define CONFIG_SYS_OHCI_BE_CONTROLLER | 275 | #define CONFIG_SYS_OHCI_BE_CONTROLLER |
277 | 276 | ||
278 | #define CONFIG_SYS_USB_OHCI_CPU_INIT 1 | 277 | #define CONFIG_SYS_USB_OHCI_CPU_INIT 1 |
279 | #define CONFIG_SYS_USB_OHCI_REGS_BASE CONFIG_SYS_USB_HOST | 278 | #define CONFIG_SYS_USB_OHCI_REGS_BASE CONFIG_SYS_USB_HOST |
280 | #define CONFIG_SYS_USB_OHCI_SLOT_NAME "du440" | 279 | #define CONFIG_SYS_USB_OHCI_SLOT_NAME "du440" |
281 | #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15 | 280 | #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15 |
282 | 281 | ||
283 | /* Comment this out to enable USB 1.1 device */ | 282 | /* Comment this out to enable USB 1.1 device */ |
284 | #define USB_2_0_DEVICE | 283 | #define USB_2_0_DEVICE |
285 | 284 | ||
286 | /* Partitions */ | 285 | /* Partitions */ |
287 | #define CONFIG_MAC_PARTITION | 286 | #define CONFIG_MAC_PARTITION |
288 | #define CONFIG_DOS_PARTITION | 287 | #define CONFIG_DOS_PARTITION |
289 | #define CONFIG_ISO_PARTITION | 288 | #define CONFIG_ISO_PARTITION |
290 | 289 | ||
291 | #include <config_cmd_default.h> | 290 | #include <config_cmd_default.h> |
292 | 291 | ||
293 | #define CONFIG_CMD_ASKENV | 292 | #define CONFIG_CMD_ASKENV |
294 | #define CONFIG_CMD_BMP | 293 | #define CONFIG_CMD_BMP |
295 | #define CONFIG_CMD_BSP | 294 | #define CONFIG_CMD_BSP |
296 | #define CONFIG_CMD_DATE | 295 | #define CONFIG_CMD_DATE |
297 | #define CONFIG_CMD_DHCP | 296 | #define CONFIG_CMD_DHCP |
298 | #define CONFIG_CMD_DIAG | 297 | #define CONFIG_CMD_DIAG |
299 | #define CONFIG_CMD_DTT | 298 | #define CONFIG_CMD_DTT |
300 | #define CONFIG_CMD_EEPROM | 299 | #define CONFIG_CMD_EEPROM |
301 | #define CONFIG_CMD_ELF | 300 | #define CONFIG_CMD_ELF |
302 | #define CONFIG_CMD_FAT | 301 | #define CONFIG_CMD_FAT |
303 | #define CONFIG_CMD_I2C | 302 | #define CONFIG_CMD_I2C |
304 | #define CONFIG_CMD_IRQ | 303 | #define CONFIG_CMD_IRQ |
305 | #define CONFIG_CMD_MII | 304 | #define CONFIG_CMD_MII |
306 | #define CONFIG_CMD_NAND | 305 | #define CONFIG_CMD_NAND |
307 | #define CONFIG_CMD_NET | 306 | #define CONFIG_CMD_NET |
308 | #define CONFIG_CMD_NFS | 307 | #define CONFIG_CMD_NFS |
309 | #define CONFIG_CMD_PCI | 308 | #define CONFIG_CMD_PCI |
310 | #define CONFIG_CMD_PING | 309 | #define CONFIG_CMD_PING |
311 | #define CONFIG_CMD_REGINFO | 310 | #define CONFIG_CMD_REGINFO |
312 | #define CONFIG_CMD_SDRAM | 311 | #define CONFIG_CMD_SDRAM |
313 | #define CONFIG_CMD_SOURCE | 312 | #define CONFIG_CMD_SOURCE |
314 | #define CONFIG_CMD_USB | 313 | #define CONFIG_CMD_USB |
315 | 314 | ||
316 | #define CONFIG_SUPPORT_VFAT | 315 | #define CONFIG_SUPPORT_VFAT |
317 | 316 | ||
318 | /* | 317 | /* |
319 | * Miscellaneous configurable options | 318 | * Miscellaneous configurable options |
320 | */ | 319 | */ |
321 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 320 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
322 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | 321 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
323 | #if defined(CONFIG_CMD_KGDB) | 322 | #if defined(CONFIG_CMD_KGDB) |
324 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ | 323 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
325 | #else | 324 | #else |
326 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | 325 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
327 | #endif | 326 | #endif |
328 | /* Print Buffer Size */ | 327 | /* Print Buffer Size */ |
329 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) | 328 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) |
330 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 329 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
331 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | 330 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
332 | 331 | ||
333 | #define CONFIG_SYS_MEMTEST_START 0x00400000 /* memtest works on */ | 332 | #define CONFIG_SYS_MEMTEST_START 0x00400000 /* memtest works on */ |
334 | #define CONFIG_SYS_MEMTEST_END 0x3f000000 /* 4 ... < 1GB DRAM */ | 333 | #define CONFIG_SYS_MEMTEST_END 0x3f000000 /* 4 ... < 1GB DRAM */ |
335 | 334 | ||
336 | #define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */ | 335 | #define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */ |
337 | #define CONFIG_SYS_EXTBDINFO 1 /* To use extended board_into (bd_t) */ | 336 | #define CONFIG_SYS_EXTBDINFO 1 /* To use extended board_into (bd_t) */ |
338 | 337 | ||
339 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ | 338 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ |
340 | 339 | ||
341 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ | 340 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ |
342 | #define CONFIG_LOOPW 1 /* enable loopw command */ | 341 | #define CONFIG_LOOPW 1 /* enable loopw command */ |
343 | #define CONFIG_MX_CYCLIC 1 /* enable mdc/mwc commands */ | 342 | #define CONFIG_MX_CYCLIC 1 /* enable mdc/mwc commands */ |
344 | #define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */ | 343 | #define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */ |
345 | #define CONFIG_VERSION_VARIABLE 1 /* include version env variable */ | 344 | #define CONFIG_VERSION_VARIABLE 1 /* include version env variable */ |
346 | 345 | ||
347 | #define CONFIG_AUTOBOOT_KEYED 1 | 346 | #define CONFIG_AUTOBOOT_KEYED 1 |
348 | #define CONFIG_AUTOBOOT_PROMPT \ | 347 | #define CONFIG_AUTOBOOT_PROMPT \ |
349 | "Press SPACE to abort autoboot in %d seconds\n", bootdelay | 348 | "Press SPACE to abort autoboot in %d seconds\n", bootdelay |
350 | #define CONFIG_AUTOBOOT_DELAY_STR "d" | 349 | #define CONFIG_AUTOBOOT_DELAY_STR "d" |
351 | #define CONFIG_AUTOBOOT_STOP_STR " " | 350 | #define CONFIG_AUTOBOOT_STOP_STR " " |
352 | 351 | ||
353 | /* | 352 | /* |
354 | * PCI stuff | 353 | * PCI stuff |
355 | */ | 354 | */ |
356 | #define CONFIG_PCI /* include pci support */ | 355 | #define CONFIG_PCI /* include pci support */ |
357 | #define CONFIG_PCI_PNP /* do (not) pci plug-and-play */ | 356 | #define CONFIG_PCI_PNP /* do (not) pci plug-and-play */ |
358 | #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ | 357 | #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ |
359 | #define CONFIG_SYS_PCI_TARGBASE 0x80000000 /* PCIaddr mapped to CONFIG_SYS_PCI_MEMBASE*/ | 358 | #define CONFIG_SYS_PCI_TARGBASE 0x80000000 /* PCIaddr mapped to CONFIG_SYS_PCI_MEMBASE*/ |
360 | 359 | ||
361 | /* Board-specific PCI */ | 360 | /* Board-specific PCI */ |
362 | #define CONFIG_SYS_PCI_TARGET_INIT | 361 | #define CONFIG_SYS_PCI_TARGET_INIT |
363 | #define CONFIG_SYS_PCI_MASTER_INIT | 362 | #define CONFIG_SYS_PCI_MASTER_INIT |
364 | 363 | ||
365 | /* | 364 | /* |
366 | * For booting Linux, the board info and command line data | 365 | * For booting Linux, the board info and command line data |
367 | * have to be in the first 8 MB of memory, since this is | 366 | * have to be in the first 8 MB of memory, since this is |
368 | * the maximum mapped by the Linux kernel during initialization. | 367 | * the maximum mapped by the Linux kernel during initialization. |
369 | */ | 368 | */ |
370 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ | 369 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ |
371 | 370 | ||
372 | /* | 371 | /* |
373 | * External Bus Controller (EBC) Setup | 372 | * External Bus Controller (EBC) Setup |
374 | */ | 373 | */ |
375 | #define CONFIG_SYS_FLASH CONFIG_SYS_FLASH_BASE | 374 | #define CONFIG_SYS_FLASH CONFIG_SYS_FLASH_BASE |
376 | 375 | ||
377 | #define CONFIG_SYS_CPLD_BASE 0xC0000000 | 376 | #define CONFIG_SYS_CPLD_BASE 0xC0000000 |
378 | #define CONFIG_SYS_CPLD_RANGE 0x00000010 | 377 | #define CONFIG_SYS_CPLD_RANGE 0x00000010 |
379 | #define CONFIG_SYS_DUMEM_BASE 0xC0100000 | 378 | #define CONFIG_SYS_DUMEM_BASE 0xC0100000 |
380 | #define CONFIG_SYS_DUMEM_RANGE 0x00100000 | 379 | #define CONFIG_SYS_DUMEM_RANGE 0x00100000 |
381 | #define CONFIG_SYS_DUIO_BASE 0xC0200000 | 380 | #define CONFIG_SYS_DUIO_BASE 0xC0200000 |
382 | #define CONFIG_SYS_DUIO_RANGE 0x00010000 | 381 | #define CONFIG_SYS_DUIO_RANGE 0x00010000 |
383 | 382 | ||
384 | #define CONFIG_SYS_NAND0_CS 2 /* NAND chip connected to CSx */ | 383 | #define CONFIG_SYS_NAND0_CS 2 /* NAND chip connected to CSx */ |
385 | #define CONFIG_SYS_NAND1_CS 3 /* NAND chip connected to CSx */ | 384 | #define CONFIG_SYS_NAND1_CS 3 /* NAND chip connected to CSx */ |
386 | /* Memory Bank 0 (NOR-FLASH) initialization */ | 385 | /* Memory Bank 0 (NOR-FLASH) initialization */ |
387 | #define CONFIG_SYS_EBC_PB0AP 0x04017200 | 386 | #define CONFIG_SYS_EBC_PB0AP 0x04017200 |
388 | #define CONFIG_SYS_EBC_PB0CR (CONFIG_SYS_FLASH_BASE | 0xda000) | 387 | #define CONFIG_SYS_EBC_PB0CR (CONFIG_SYS_FLASH_BASE | 0xda000) |
389 | 388 | ||
390 | /* Memory Bank 1 (CPLD, 16 bytes needed, but 1MB is minimum) */ | 389 | /* Memory Bank 1 (CPLD, 16 bytes needed, but 1MB is minimum) */ |
391 | #define CONFIG_SYS_EBC_PB1AP 0x018003c0 | 390 | #define CONFIG_SYS_EBC_PB1AP 0x018003c0 |
392 | #define CONFIG_SYS_EBC_PB1CR (CONFIG_SYS_CPLD_BASE | 0x18000) | 391 | #define CONFIG_SYS_EBC_PB1CR (CONFIG_SYS_CPLD_BASE | 0x18000) |
393 | 392 | ||
394 | /* Memory Bank 2 (NAND-FLASH) initialization */ | 393 | /* Memory Bank 2 (NAND-FLASH) initialization */ |
395 | #define CONFIG_SYS_EBC_PB2AP 0x018003c0 | 394 | #define CONFIG_SYS_EBC_PB2AP 0x018003c0 |
396 | #define CONFIG_SYS_EBC_PB2CR (CONFIG_SYS_NAND0_ADDR | 0x1c000) | 395 | #define CONFIG_SYS_EBC_PB2CR (CONFIG_SYS_NAND0_ADDR | 0x1c000) |
397 | 396 | ||
398 | /* Memory Bank 3 (NAND-FLASH) initialization */ | 397 | /* Memory Bank 3 (NAND-FLASH) initialization */ |
399 | #define CONFIG_SYS_EBC_PB3AP 0x018003c0 | 398 | #define CONFIG_SYS_EBC_PB3AP 0x018003c0 |
400 | #define CONFIG_SYS_EBC_PB3CR (CONFIG_SYS_NAND1_ADDR | 0x1c000) | 399 | #define CONFIG_SYS_EBC_PB3CR (CONFIG_SYS_NAND1_ADDR | 0x1c000) |
401 | 400 | ||
402 | /* Memory Bank 4 (DUMEM, 1MB) initialization */ | 401 | /* Memory Bank 4 (DUMEM, 1MB) initialization */ |
403 | #define CONFIG_SYS_EBC_PB4AP 0x018053c0 | 402 | #define CONFIG_SYS_EBC_PB4AP 0x018053c0 |
404 | #define CONFIG_SYS_EBC_PB4CR (CONFIG_SYS_DUMEM_BASE | 0x18000) | 403 | #define CONFIG_SYS_EBC_PB4CR (CONFIG_SYS_DUMEM_BASE | 0x18000) |
405 | 404 | ||
406 | /* Memory Bank 5 (DUIO, 64KB needed, but 1MB is minimum) */ | 405 | /* Memory Bank 5 (DUIO, 64KB needed, but 1MB is minimum) */ |
407 | #define CONFIG_SYS_EBC_PB5AP 0x018053c0 | 406 | #define CONFIG_SYS_EBC_PB5AP 0x018053c0 |
408 | #define CONFIG_SYS_EBC_PB5CR (CONFIG_SYS_DUIO_BASE | 0x18000) | 407 | #define CONFIG_SYS_EBC_PB5CR (CONFIG_SYS_DUIO_BASE | 0x18000) |
409 | 408 | ||
410 | /* | 409 | /* |
411 | * NAND FLASH | 410 | * NAND FLASH |
412 | */ | 411 | */ |
413 | #define CONFIG_SYS_MAX_NAND_DEVICE 2 | 412 | #define CONFIG_SYS_MAX_NAND_DEVICE 2 |
414 | #define CONFIG_SYS_NAND_SELECT_DEVICE 1 /* nand driver supports mutipl. chips */ | 413 | #define CONFIG_SYS_NAND_SELECT_DEVICE 1 /* nand driver supports mutipl. chips */ |
415 | #define CONFIG_SYS_NAND_BASE_LIST {CONFIG_SYS_NAND0_ADDR + CONFIG_SYS_NAND0_CS, \ | 414 | #define CONFIG_SYS_NAND_BASE_LIST {CONFIG_SYS_NAND0_ADDR + CONFIG_SYS_NAND0_CS, \ |
416 | CONFIG_SYS_NAND1_ADDR + CONFIG_SYS_NAND1_CS} | 415 | CONFIG_SYS_NAND1_ADDR + CONFIG_SYS_NAND1_CS} |
417 | 416 | ||
418 | /* | 417 | /* |
419 | * Internal Definitions | 418 | * Internal Definitions |
420 | * | 419 | * |
421 | * Boot Flags | 420 | * Boot Flags |
422 | */ | 421 | */ |
423 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 422 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
424 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 423 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
425 | 424 | ||
426 | #if defined(CONFIG_CMD_KGDB) | 425 | #if defined(CONFIG_CMD_KGDB) |
427 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ | 426 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ |
428 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ | 427 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ |
429 | #endif | 428 | #endif |
430 | 429 | ||
431 | #define CONFIG_SOURCE 1 | 430 | #define CONFIG_SOURCE 1 |
432 | 431 | ||
433 | #define CONFIG_OF_LIBFDT | 432 | #define CONFIG_OF_LIBFDT |
434 | #define CONFIG_OF_BOARD_SETUP | 433 | #define CONFIG_OF_BOARD_SETUP |
435 | 434 | ||
436 | #endif /* __CONFIG_H */ | 435 | #endif /* __CONFIG_H */ |
437 | 436 |
include/configs/MPC8313ERDB.h
1 | /* | 1 | /* |
2 | * Copyright (C) Freescale Semiconductor, Inc. 2006. | 2 | * Copyright (C) Freescale Semiconductor, Inc. 2006. |
3 | * | 3 | * |
4 | * See file CREDITS for list of people who contributed to this | 4 | * See file CREDITS for list of people who contributed to this |
5 | * project. | 5 | * project. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License as | 8 | * modify it under the terms of the GNU General Public License as |
9 | * published by the Free Software Foundation; either version 2 of | 9 | * published by the Free Software Foundation; either version 2 of |
10 | * the License, or (at your option) any later version. | 10 | * the License, or (at your option) any later version. |
11 | * | 11 | * |
12 | * This program is distributed in the hope that it will be useful, | 12 | * This program is distributed in the hope that it will be useful, |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
16 | * | 16 | * |
17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License |
18 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
20 | * MA 02111-1307 USA | 20 | * MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | /* | 22 | /* |
23 | * mpc8313epb board configuration file | 23 | * mpc8313epb board configuration file |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #ifndef __CONFIG_H | 26 | #ifndef __CONFIG_H |
27 | #define __CONFIG_H | 27 | #define __CONFIG_H |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * High Level Configuration Options | 30 | * High Level Configuration Options |
31 | */ | 31 | */ |
32 | #define CONFIG_E300 1 | 32 | #define CONFIG_E300 1 |
33 | #define CONFIG_MPC83XX 1 | 33 | #define CONFIG_MPC83XX 1 |
34 | #define CONFIG_MPC831X 1 | 34 | #define CONFIG_MPC831X 1 |
35 | #define CONFIG_MPC8313 1 | 35 | #define CONFIG_MPC8313 1 |
36 | #define CONFIG_MPC8313ERDB 1 | 36 | #define CONFIG_MPC8313ERDB 1 |
37 | 37 | ||
38 | #define CONFIG_PCI | 38 | #define CONFIG_PCI |
39 | #define CONFIG_83XX_GENERIC_PCI | 39 | #define CONFIG_83XX_GENERIC_PCI |
40 | 40 | ||
41 | #define CONFIG_MISC_INIT_R | 41 | #define CONFIG_MISC_INIT_R |
42 | 42 | ||
43 | /* | 43 | /* |
44 | * On-board devices | 44 | * On-board devices |
45 | * | 45 | * |
46 | * TSEC1 is VSC switch | 46 | * TSEC1 is VSC switch |
47 | * TSEC2 is SoC TSEC | 47 | * TSEC2 is SoC TSEC |
48 | */ | 48 | */ |
49 | #define CONFIG_VSC7385_ENET | 49 | #define CONFIG_VSC7385_ENET |
50 | #define CONFIG_TSEC2 | 50 | #define CONFIG_TSEC2 |
51 | 51 | ||
52 | #ifdef CONFIG_SYS_66MHZ | 52 | #ifdef CONFIG_SYS_66MHZ |
53 | #define CONFIG_83XX_CLKIN 66666667 /* in Hz */ | 53 | #define CONFIG_83XX_CLKIN 66666667 /* in Hz */ |
54 | #elif defined(CONFIG_SYS_33MHZ) | 54 | #elif defined(CONFIG_SYS_33MHZ) |
55 | #define CONFIG_83XX_CLKIN 33333333 /* in Hz */ | 55 | #define CONFIG_83XX_CLKIN 33333333 /* in Hz */ |
56 | #else | 56 | #else |
57 | #error Unknown oscillator frequency. | 57 | #error Unknown oscillator frequency. |
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | #define CONFIG_SYS_CLK_FREQ CONFIG_83XX_CLKIN | 60 | #define CONFIG_SYS_CLK_FREQ CONFIG_83XX_CLKIN |
61 | 61 | ||
62 | #define CONFIG_BOARD_EARLY_INIT_F /* call board_pre_init */ | 62 | #define CONFIG_BOARD_EARLY_INIT_F /* call board_pre_init */ |
63 | 63 | ||
64 | #define CONFIG_SYS_IMMR 0xE0000000 | 64 | #define CONFIG_SYS_IMMR 0xE0000000 |
65 | 65 | ||
66 | #if defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL) | 66 | #if defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL) |
67 | #define CONFIG_DEFAULT_IMMR CONFIG_SYS_IMMR | 67 | #define CONFIG_DEFAULT_IMMR CONFIG_SYS_IMMR |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | #define CONFIG_SYS_MEMTEST_START 0x00001000 | 70 | #define CONFIG_SYS_MEMTEST_START 0x00001000 |
71 | #define CONFIG_SYS_MEMTEST_END 0x07f00000 | 71 | #define CONFIG_SYS_MEMTEST_END 0x07f00000 |
72 | 72 | ||
73 | /* Early revs of this board will lock up hard when attempting | 73 | /* Early revs of this board will lock up hard when attempting |
74 | * to access the PMC registers, unless a JTAG debugger is | 74 | * to access the PMC registers, unless a JTAG debugger is |
75 | * connected, or some resistor modifications are made. | 75 | * connected, or some resistor modifications are made. |
76 | */ | 76 | */ |
77 | #define CONFIG_SYS_8313ERDB_BROKEN_PMC 1 | 77 | #define CONFIG_SYS_8313ERDB_BROKEN_PMC 1 |
78 | 78 | ||
79 | #define CONFIG_SYS_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */ | 79 | #define CONFIG_SYS_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */ |
80 | #define CONFIG_SYS_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */ | 80 | #define CONFIG_SYS_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */ |
81 | 81 | ||
82 | /* | 82 | /* |
83 | * Device configurations | 83 | * Device configurations |
84 | */ | 84 | */ |
85 | 85 | ||
86 | /* Vitesse 7385 */ | 86 | /* Vitesse 7385 */ |
87 | 87 | ||
88 | #ifdef CONFIG_VSC7385_ENET | 88 | #ifdef CONFIG_VSC7385_ENET |
89 | 89 | ||
90 | #define CONFIG_TSEC1 | 90 | #define CONFIG_TSEC1 |
91 | 91 | ||
92 | /* The flash address and size of the VSC7385 firmware image */ | 92 | /* The flash address and size of the VSC7385 firmware image */ |
93 | #define CONFIG_VSC7385_IMAGE 0xFE7FE000 | 93 | #define CONFIG_VSC7385_IMAGE 0xFE7FE000 |
94 | #define CONFIG_VSC7385_IMAGE_SIZE 8192 | 94 | #define CONFIG_VSC7385_IMAGE_SIZE 8192 |
95 | 95 | ||
96 | #endif | 96 | #endif |
97 | 97 | ||
98 | /* | 98 | /* |
99 | * DDR Setup | 99 | * DDR Setup |
100 | */ | 100 | */ |
101 | #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory*/ | 101 | #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory*/ |
102 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE | 102 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE |
103 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE | 103 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE |
104 | 104 | ||
105 | /* | 105 | /* |
106 | * Manually set up DDR parameters, as this board does not | 106 | * Manually set up DDR parameters, as this board does not |
107 | * seem to have the SPD connected to I2C. | 107 | * seem to have the SPD connected to I2C. |
108 | */ | 108 | */ |
109 | #define CONFIG_SYS_DDR_SIZE 128 /* MB */ | 109 | #define CONFIG_SYS_DDR_SIZE 128 /* MB */ |
110 | #define CONFIG_SYS_DDR_CONFIG ( CSCONFIG_EN \ | 110 | #define CONFIG_SYS_DDR_CONFIG ( CSCONFIG_EN \ |
111 | | 0x00010000 /* TODO */ \ | 111 | | 0x00010000 /* TODO */ \ |
112 | | CSCONFIG_ROW_BIT_13 | CSCONFIG_COL_BIT_10 ) | 112 | | CSCONFIG_ROW_BIT_13 | CSCONFIG_COL_BIT_10 ) |
113 | /* 0x80010102 */ | 113 | /* 0x80010102 */ |
114 | 114 | ||
115 | #define CONFIG_SYS_DDR_TIMING_3 0x00000000 | 115 | #define CONFIG_SYS_DDR_TIMING_3 0x00000000 |
116 | #define CONFIG_SYS_DDR_TIMING_0 ( ( 0 << TIMING_CFG0_RWT_SHIFT ) \ | 116 | #define CONFIG_SYS_DDR_TIMING_0 ( ( 0 << TIMING_CFG0_RWT_SHIFT ) \ |
117 | | ( 0 << TIMING_CFG0_WRT_SHIFT ) \ | 117 | | ( 0 << TIMING_CFG0_WRT_SHIFT ) \ |
118 | | ( 0 << TIMING_CFG0_RRT_SHIFT ) \ | 118 | | ( 0 << TIMING_CFG0_RRT_SHIFT ) \ |
119 | | ( 0 << TIMING_CFG0_WWT_SHIFT ) \ | 119 | | ( 0 << TIMING_CFG0_WWT_SHIFT ) \ |
120 | | ( 2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT ) \ | 120 | | ( 2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT ) \ |
121 | | ( 2 << TIMING_CFG0_PRE_PD_EXIT_SHIFT ) \ | 121 | | ( 2 << TIMING_CFG0_PRE_PD_EXIT_SHIFT ) \ |
122 | | ( 8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT ) \ | 122 | | ( 8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT ) \ |
123 | | ( 2 << TIMING_CFG0_MRS_CYC_SHIFT ) ) | 123 | | ( 2 << TIMING_CFG0_MRS_CYC_SHIFT ) ) |
124 | /* 0x00220802 */ | 124 | /* 0x00220802 */ |
125 | #define CONFIG_SYS_DDR_TIMING_1 ( ( 3 << TIMING_CFG1_PRETOACT_SHIFT ) \ | 125 | #define CONFIG_SYS_DDR_TIMING_1 ( ( 3 << TIMING_CFG1_PRETOACT_SHIFT ) \ |
126 | | ( 8 << TIMING_CFG1_ACTTOPRE_SHIFT ) \ | 126 | | ( 8 << TIMING_CFG1_ACTTOPRE_SHIFT ) \ |
127 | | ( 3 << TIMING_CFG1_ACTTORW_SHIFT ) \ | 127 | | ( 3 << TIMING_CFG1_ACTTORW_SHIFT ) \ |
128 | | ( 5 << TIMING_CFG1_CASLAT_SHIFT ) \ | 128 | | ( 5 << TIMING_CFG1_CASLAT_SHIFT ) \ |
129 | | (10 << TIMING_CFG1_REFREC_SHIFT ) \ | 129 | | (10 << TIMING_CFG1_REFREC_SHIFT ) \ |
130 | | ( 3 << TIMING_CFG1_WRREC_SHIFT ) \ | 130 | | ( 3 << TIMING_CFG1_WRREC_SHIFT ) \ |
131 | | ( 2 << TIMING_CFG1_ACTTOACT_SHIFT ) \ | 131 | | ( 2 << TIMING_CFG1_ACTTOACT_SHIFT ) \ |
132 | | ( 2 << TIMING_CFG1_WRTORD_SHIFT ) ) | 132 | | ( 2 << TIMING_CFG1_WRTORD_SHIFT ) ) |
133 | /* 0x3835a322 */ | 133 | /* 0x3835a322 */ |
134 | #define CONFIG_SYS_DDR_TIMING_2 ( ( 1 << TIMING_CFG2_ADD_LAT_SHIFT ) \ | 134 | #define CONFIG_SYS_DDR_TIMING_2 ( ( 1 << TIMING_CFG2_ADD_LAT_SHIFT ) \ |
135 | | ( 5 << TIMING_CFG2_CPO_SHIFT ) \ | 135 | | ( 5 << TIMING_CFG2_CPO_SHIFT ) \ |
136 | | ( 2 << TIMING_CFG2_WR_LAT_DELAY_SHIFT ) \ | 136 | | ( 2 << TIMING_CFG2_WR_LAT_DELAY_SHIFT ) \ |
137 | | ( 2 << TIMING_CFG2_RD_TO_PRE_SHIFT ) \ | 137 | | ( 2 << TIMING_CFG2_RD_TO_PRE_SHIFT ) \ |
138 | | ( 2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT ) \ | 138 | | ( 2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT ) \ |
139 | | ( 3 << TIMING_CFG2_CKE_PLS_SHIFT ) \ | 139 | | ( 3 << TIMING_CFG2_CKE_PLS_SHIFT ) \ |
140 | | ( 6 << TIMING_CFG2_FOUR_ACT_SHIFT) ) | 140 | | ( 6 << TIMING_CFG2_FOUR_ACT_SHIFT) ) |
141 | /* 0x129048c6 */ /* P9-45,may need tuning */ | 141 | /* 0x129048c6 */ /* P9-45,may need tuning */ |
142 | #define CONFIG_SYS_DDR_INTERVAL ( ( 1296 << SDRAM_INTERVAL_REFINT_SHIFT ) \ | 142 | #define CONFIG_SYS_DDR_INTERVAL ( ( 1296 << SDRAM_INTERVAL_REFINT_SHIFT ) \ |
143 | | ( 1280 << SDRAM_INTERVAL_BSTOPRE_SHIFT ) ) | 143 | | ( 1280 << SDRAM_INTERVAL_BSTOPRE_SHIFT ) ) |
144 | /* 0x05100500 */ | 144 | /* 0x05100500 */ |
145 | #if defined(CONFIG_DDR_2T_TIMING) | 145 | #if defined(CONFIG_DDR_2T_TIMING) |
146 | #define CONFIG_SYS_SDRAM_CFG ( SDRAM_CFG_SREN \ | 146 | #define CONFIG_SYS_SDRAM_CFG ( SDRAM_CFG_SREN \ |
147 | | SDRAM_CFG_SDRAM_TYPE_DDR2 \ | 147 | | SDRAM_CFG_SDRAM_TYPE_DDR2 \ |
148 | | SDRAM_CFG_2T_EN \ | 148 | | SDRAM_CFG_2T_EN \ |
149 | | SDRAM_CFG_DBW_32 ) | 149 | | SDRAM_CFG_DBW_32 ) |
150 | #else | 150 | #else |
151 | #define CONFIG_SYS_SDRAM_CFG ( SDRAM_CFG_SREN \ | 151 | #define CONFIG_SYS_SDRAM_CFG ( SDRAM_CFG_SREN \ |
152 | | SDRAM_CFG_SDRAM_TYPE_DDR2 \ | 152 | | SDRAM_CFG_SDRAM_TYPE_DDR2 \ |
153 | | SDRAM_CFG_32_BE ) | 153 | | SDRAM_CFG_32_BE ) |
154 | /* 0x43080000 */ | 154 | /* 0x43080000 */ |
155 | #endif | 155 | #endif |
156 | #define CONFIG_SYS_SDRAM_CFG2 0x00401000 | 156 | #define CONFIG_SYS_SDRAM_CFG2 0x00401000 |
157 | /* set burst length to 8 for 32-bit data path */ | 157 | /* set burst length to 8 for 32-bit data path */ |
158 | #define CONFIG_SYS_DDR_MODE ( ( 0x4448 << SDRAM_MODE_ESD_SHIFT ) \ | 158 | #define CONFIG_SYS_DDR_MODE ( ( 0x4448 << SDRAM_MODE_ESD_SHIFT ) \ |
159 | | ( 0x0632 << SDRAM_MODE_SD_SHIFT ) ) | 159 | | ( 0x0632 << SDRAM_MODE_SD_SHIFT ) ) |
160 | /* 0x44480632 */ | 160 | /* 0x44480632 */ |
161 | #define CONFIG_SYS_DDR_MODE_2 0x8000C000 | 161 | #define CONFIG_SYS_DDR_MODE_2 0x8000C000 |
162 | 162 | ||
163 | #define CONFIG_SYS_DDR_CLK_CNTL DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05 | 163 | #define CONFIG_SYS_DDR_CLK_CNTL DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05 |
164 | /*0x02000000*/ | 164 | /*0x02000000*/ |
165 | #define CONFIG_SYS_DDRCDR_VALUE ( DDRCDR_EN \ | 165 | #define CONFIG_SYS_DDRCDR_VALUE ( DDRCDR_EN \ |
166 | | DDRCDR_PZ_NOMZ \ | 166 | | DDRCDR_PZ_NOMZ \ |
167 | | DDRCDR_NZ_NOMZ \ | 167 | | DDRCDR_NZ_NOMZ \ |
168 | | DDRCDR_M_ODR ) | 168 | | DDRCDR_M_ODR ) |
169 | 169 | ||
170 | /* | 170 | /* |
171 | * FLASH on the Local Bus | 171 | * FLASH on the Local Bus |
172 | */ | 172 | */ |
173 | #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */ | 173 | #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */ |
174 | #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */ | 174 | #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */ |
175 | #define CONFIG_SYS_FLASH_BASE 0xFE000000 /* start of FLASH */ | 175 | #define CONFIG_SYS_FLASH_BASE 0xFE000000 /* start of FLASH */ |
176 | #define CONFIG_SYS_FLASH_SIZE 8 /* flash size in MB */ | 176 | #define CONFIG_SYS_FLASH_SIZE 8 /* flash size in MB */ |
177 | #define CONFIG_SYS_FLASH_PROTECTION 1 /* Use h/w Flash protection. */ | 177 | #define CONFIG_SYS_FLASH_PROTECTION 1 /* Use h/w Flash protection. */ |
178 | #define CONFIG_SYS_FLASH_EMPTY_INFO /* display empty sectors */ | 178 | #define CONFIG_SYS_FLASH_EMPTY_INFO /* display empty sectors */ |
179 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE /* buffer up multiple bytes */ | 179 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE /* buffer up multiple bytes */ |
180 | 180 | ||
181 | #define CONFIG_SYS_NOR_BR_PRELIM (CONFIG_SYS_FLASH_BASE | /* flash Base address */ \ | 181 | #define CONFIG_SYS_NOR_BR_PRELIM (CONFIG_SYS_FLASH_BASE | /* flash Base address */ \ |
182 | (2 << BR_PS_SHIFT) | /* 16 bit port size */ \ | 182 | (2 << BR_PS_SHIFT) | /* 16 bit port size */ \ |
183 | BR_V) /* valid */ | 183 | BR_V) /* valid */ |
184 | #define CONFIG_SYS_NOR_OR_PRELIM ( 0xFF800000 /* 8 MByte */ \ | 184 | #define CONFIG_SYS_NOR_OR_PRELIM ( 0xFF800000 /* 8 MByte */ \ |
185 | | OR_GPCM_XACS \ | 185 | | OR_GPCM_XACS \ |
186 | | OR_GPCM_SCY_9 \ | 186 | | OR_GPCM_SCY_9 \ |
187 | | OR_GPCM_EHTR \ | 187 | | OR_GPCM_EHTR \ |
188 | | OR_GPCM_EAD ) | 188 | | OR_GPCM_EAD ) |
189 | /* 0xFF006FF7 TODO SLOW 16 MB flash size */ | 189 | /* 0xFF006FF7 TODO SLOW 16 MB flash size */ |
190 | #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE /* window base at flash base */ | 190 | #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE /* window base at flash base */ |
191 | #define CONFIG_SYS_LBLAWAR0_PRELIM 0x80000017 /* 16 MB window size */ | 191 | #define CONFIG_SYS_LBLAWAR0_PRELIM 0x80000017 /* 16 MB window size */ |
192 | 192 | ||
193 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ | 193 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ |
194 | #define CONFIG_SYS_MAX_FLASH_SECT 135 /* sectors per device */ | 194 | #define CONFIG_SYS_MAX_FLASH_SECT 135 /* sectors per device */ |
195 | 195 | ||
196 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ | 196 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ |
197 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ | 197 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ |
198 | 198 | ||
199 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ | 199 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ |
200 | 200 | ||
201 | #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE) && !defined(CONFIG_NAND_SPL) | 201 | #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE) && !defined(CONFIG_NAND_SPL) |
202 | #define CONFIG_SYS_RAMBOOT | 202 | #define CONFIG_SYS_RAMBOOT |
203 | #endif | 203 | #endif |
204 | 204 | ||
205 | #define CONFIG_SYS_INIT_RAM_LOCK 1 | 205 | #define CONFIG_SYS_INIT_RAM_LOCK 1 |
206 | #define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 /* Initial RAM address */ | 206 | #define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 /* Initial RAM address */ |
207 | #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM*/ | 207 | #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM*/ |
208 | 208 | ||
209 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ | 209 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ |
210 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 210 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
211 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET | 211 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
212 | 212 | ||
213 | /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */ | 213 | /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */ |
214 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ | 214 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ |
215 | #define CONFIG_SYS_MALLOC_LEN (512 * 1024) /* Reserved for malloc */ | 215 | #define CONFIG_SYS_MALLOC_LEN (512 * 1024) /* Reserved for malloc */ |
216 | 216 | ||
217 | /* | 217 | /* |
218 | * Local Bus LCRR and LBCR regs | 218 | * Local Bus LCRR and LBCR regs |
219 | */ | 219 | */ |
220 | #define CONFIG_SYS_LCRR LCRR_EADC_1 | LCRR_CLKDIV_4 | 220 | #define CONFIG_SYS_LCRR LCRR_EADC_1 | LCRR_CLKDIV_4 |
221 | #define CONFIG_SYS_LBC_LBCR ( 0x00040000 /* TODO */ \ | 221 | #define CONFIG_SYS_LBC_LBCR ( 0x00040000 /* TODO */ \ |
222 | | (0xFF << LBCR_BMT_SHIFT) \ | 222 | | (0xFF << LBCR_BMT_SHIFT) \ |
223 | | 0xF ) /* 0x0004ff0f */ | 223 | | 0xF ) /* 0x0004ff0f */ |
224 | 224 | ||
225 | #define CONFIG_SYS_LBC_MRTPR 0x20000000 /*TODO */ /* LB refresh timer prescal, 266MHz/32 */ | 225 | #define CONFIG_SYS_LBC_MRTPR 0x20000000 /*TODO */ /* LB refresh timer prescal, 266MHz/32 */ |
226 | 226 | ||
227 | /* drivers/mtd/nand/nand.c */ | 227 | /* drivers/mtd/nand/nand.c */ |
228 | #ifdef CONFIG_NAND_SPL | 228 | #ifdef CONFIG_NAND_SPL |
229 | #define CONFIG_SYS_NAND_BASE 0xFFF00000 | 229 | #define CONFIG_SYS_NAND_BASE 0xFFF00000 |
230 | #else | 230 | #else |
231 | #define CONFIG_SYS_NAND_BASE 0xE2800000 | 231 | #define CONFIG_SYS_NAND_BASE 0xE2800000 |
232 | #endif | 232 | #endif |
233 | 233 | ||
234 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 | 234 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
235 | #define CONFIG_MTD_NAND_VERIFY_WRITE | 235 | #define CONFIG_MTD_NAND_VERIFY_WRITE |
236 | #define CONFIG_CMD_NAND 1 | 236 | #define CONFIG_CMD_NAND 1 |
237 | #define CONFIG_NAND_FSL_ELBC 1 | 237 | #define CONFIG_NAND_FSL_ELBC 1 |
238 | #define CONFIG_SYS_NAND_BLOCK_SIZE 16384 | 238 | #define CONFIG_SYS_NAND_BLOCK_SIZE 16384 |
239 | 239 | ||
240 | #define CONFIG_SYS_NAND_U_BOOT_SIZE (512 << 10) | 240 | #define CONFIG_SYS_NAND_U_BOOT_SIZE (512 << 10) |
241 | #define CONFIG_SYS_NAND_U_BOOT_DST 0x00100000 | 241 | #define CONFIG_SYS_NAND_U_BOOT_DST 0x00100000 |
242 | #define CONFIG_SYS_NAND_U_BOOT_START 0x00100100 | 242 | #define CONFIG_SYS_NAND_U_BOOT_START 0x00100100 |
243 | #define CONFIG_SYS_NAND_U_BOOT_OFFS 16384 | 243 | #define CONFIG_SYS_NAND_U_BOOT_OFFS 16384 |
244 | #define CONFIG_SYS_NAND_U_BOOT_RELOC 0x00010000 | 244 | #define CONFIG_SYS_NAND_U_BOOT_RELOC 0x00010000 |
245 | 245 | ||
246 | #define CONFIG_SYS_NAND_BR_PRELIM ( CONFIG_SYS_NAND_BASE \ | 246 | #define CONFIG_SYS_NAND_BR_PRELIM ( CONFIG_SYS_NAND_BASE \ |
247 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ | 247 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ |
248 | | BR_PS_8 /* Port Size = 8 bit */ \ | 248 | | BR_PS_8 /* Port Size = 8 bit */ \ |
249 | | BR_MS_FCM /* MSEL = FCM */ \ | 249 | | BR_MS_FCM /* MSEL = FCM */ \ |
250 | | BR_V ) /* valid */ | 250 | | BR_V ) /* valid */ |
251 | #define CONFIG_SYS_NAND_OR_PRELIM ( 0xFFFF8000 /* length 32K */ \ | 251 | #define CONFIG_SYS_NAND_OR_PRELIM ( 0xFFFF8000 /* length 32K */ \ |
252 | | OR_FCM_CSCT \ | 252 | | OR_FCM_CSCT \ |
253 | | OR_FCM_CST \ | 253 | | OR_FCM_CST \ |
254 | | OR_FCM_CHT \ | 254 | | OR_FCM_CHT \ |
255 | | OR_FCM_SCY_1 \ | 255 | | OR_FCM_SCY_1 \ |
256 | | OR_FCM_TRLX \ | 256 | | OR_FCM_TRLX \ |
257 | | OR_FCM_EHTR ) | 257 | | OR_FCM_EHTR ) |
258 | /* 0xFFFF8396 */ | 258 | /* 0xFFFF8396 */ |
259 | 259 | ||
260 | #ifdef CONFIG_NAND_U_BOOT | 260 | #ifdef CONFIG_NAND_U_BOOT |
261 | #define CONFIG_SYS_BR0_PRELIM CONFIG_SYS_NAND_BR_PRELIM | 261 | #define CONFIG_SYS_BR0_PRELIM CONFIG_SYS_NAND_BR_PRELIM |
262 | #define CONFIG_SYS_OR0_PRELIM CONFIG_SYS_NAND_OR_PRELIM | 262 | #define CONFIG_SYS_OR0_PRELIM CONFIG_SYS_NAND_OR_PRELIM |
263 | #define CONFIG_SYS_BR1_PRELIM CONFIG_SYS_NOR_BR_PRELIM | 263 | #define CONFIG_SYS_BR1_PRELIM CONFIG_SYS_NOR_BR_PRELIM |
264 | #define CONFIG_SYS_OR1_PRELIM CONFIG_SYS_NOR_OR_PRELIM | 264 | #define CONFIG_SYS_OR1_PRELIM CONFIG_SYS_NOR_OR_PRELIM |
265 | #else | 265 | #else |
266 | #define CONFIG_SYS_BR0_PRELIM CONFIG_SYS_NOR_BR_PRELIM | 266 | #define CONFIG_SYS_BR0_PRELIM CONFIG_SYS_NOR_BR_PRELIM |
267 | #define CONFIG_SYS_OR0_PRELIM CONFIG_SYS_NOR_OR_PRELIM | 267 | #define CONFIG_SYS_OR0_PRELIM CONFIG_SYS_NOR_OR_PRELIM |
268 | #define CONFIG_SYS_BR1_PRELIM CONFIG_SYS_NAND_BR_PRELIM | 268 | #define CONFIG_SYS_BR1_PRELIM CONFIG_SYS_NAND_BR_PRELIM |
269 | #define CONFIG_SYS_OR1_PRELIM CONFIG_SYS_NAND_OR_PRELIM | 269 | #define CONFIG_SYS_OR1_PRELIM CONFIG_SYS_NAND_OR_PRELIM |
270 | #endif | 270 | #endif |
271 | 271 | ||
272 | #define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_NAND_BASE | 272 | #define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_NAND_BASE |
273 | #define CONFIG_SYS_LBLAWAR1_PRELIM 0x8000000E /* 32KB */ | 273 | #define CONFIG_SYS_LBLAWAR1_PRELIM 0x8000000E /* 32KB */ |
274 | 274 | ||
275 | #define CONFIG_SYS_NAND_LBLAWBAR_PRELIM CONFIG_SYS_LBLAWBAR1_PRELIM | 275 | #define CONFIG_SYS_NAND_LBLAWBAR_PRELIM CONFIG_SYS_LBLAWBAR1_PRELIM |
276 | #define CONFIG_SYS_NAND_LBLAWAR_PRELIM CONFIG_SYS_LBLAWAR1_PRELIM | 276 | #define CONFIG_SYS_NAND_LBLAWAR_PRELIM CONFIG_SYS_LBLAWAR1_PRELIM |
277 | 277 | ||
278 | /* local bus read write buffer mapping */ | 278 | /* local bus read write buffer mapping */ |
279 | #define CONFIG_SYS_BR3_PRELIM 0xFA000801 /* map at 0xFA000000 */ | 279 | #define CONFIG_SYS_BR3_PRELIM 0xFA000801 /* map at 0xFA000000 */ |
280 | #define CONFIG_SYS_OR3_PRELIM 0xFFFF8FF7 /* 32kB */ | 280 | #define CONFIG_SYS_OR3_PRELIM 0xFFFF8FF7 /* 32kB */ |
281 | #define CONFIG_SYS_LBLAWBAR3_PRELIM 0xFA000000 | 281 | #define CONFIG_SYS_LBLAWBAR3_PRELIM 0xFA000000 |
282 | #define CONFIG_SYS_LBLAWAR3_PRELIM 0x8000000E /* 32KB */ | 282 | #define CONFIG_SYS_LBLAWAR3_PRELIM 0x8000000E /* 32KB */ |
283 | 283 | ||
284 | /* Vitesse 7385 */ | 284 | /* Vitesse 7385 */ |
285 | 285 | ||
286 | #define CONFIG_SYS_VSC7385_BASE 0xF0000000 | 286 | #define CONFIG_SYS_VSC7385_BASE 0xF0000000 |
287 | 287 | ||
288 | #ifdef CONFIG_VSC7385_ENET | 288 | #ifdef CONFIG_VSC7385_ENET |
289 | 289 | ||
290 | #define CONFIG_SYS_BR2_PRELIM 0xf0000801 /* VSC7385 Base address */ | 290 | #define CONFIG_SYS_BR2_PRELIM 0xf0000801 /* VSC7385 Base address */ |
291 | #define CONFIG_SYS_OR2_PRELIM 0xfffe09ff /* VSC7385, 128K bytes*/ | 291 | #define CONFIG_SYS_OR2_PRELIM 0xfffe09ff /* VSC7385, 128K bytes*/ |
292 | #define CONFIG_SYS_LBLAWBAR2_PRELIM CONFIG_SYS_VSC7385_BASE/* Access window base at VSC7385 base */ | 292 | #define CONFIG_SYS_LBLAWBAR2_PRELIM CONFIG_SYS_VSC7385_BASE/* Access window base at VSC7385 base */ |
293 | #define CONFIG_SYS_LBLAWAR2_PRELIM 0x80000010 /* Access window size 128K */ | 293 | #define CONFIG_SYS_LBLAWAR2_PRELIM 0x80000010 /* Access window size 128K */ |
294 | 294 | ||
295 | #endif | 295 | #endif |
296 | 296 | ||
297 | /* pass open firmware flat tree */ | 297 | /* pass open firmware flat tree */ |
298 | #define CONFIG_OF_LIBFDT 1 | 298 | #define CONFIG_OF_LIBFDT 1 |
299 | #define CONFIG_OF_BOARD_SETUP 1 | 299 | #define CONFIG_OF_BOARD_SETUP 1 |
300 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 | 300 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 |
301 | 301 | ||
302 | /* | 302 | /* |
303 | * Serial Port | 303 | * Serial Port |
304 | */ | 304 | */ |
305 | #define CONFIG_CONS_INDEX 1 | 305 | #define CONFIG_CONS_INDEX 1 |
306 | #define CONFIG_SYS_NS16550 | 306 | #define CONFIG_SYS_NS16550 |
307 | #define CONFIG_SYS_NS16550_SERIAL | 307 | #define CONFIG_SYS_NS16550_SERIAL |
308 | #define CONFIG_SYS_NS16550_REG_SIZE 1 | 308 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
309 | 309 | ||
310 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 310 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
311 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200} | 311 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200} |
312 | 312 | ||
313 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500) | 313 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500) |
314 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600) | 314 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600) |
315 | 315 | ||
316 | /* Use the HUSH parser */ | 316 | /* Use the HUSH parser */ |
317 | #define CONFIG_SYS_HUSH_PARSER | 317 | #define CONFIG_SYS_HUSH_PARSER |
318 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | 318 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
319 | 319 | ||
320 | /* I2C */ | 320 | /* I2C */ |
321 | #define CONFIG_HARD_I2C /* I2C with hardware support*/ | 321 | #define CONFIG_HARD_I2C /* I2C with hardware support*/ |
322 | #define CONFIG_FSL_I2C | 322 | #define CONFIG_FSL_I2C |
323 | #define CONFIG_I2C_MULTI_BUS | 323 | #define CONFIG_I2C_MULTI_BUS |
324 | #define CONFIG_I2C_CMD_TREE | ||
325 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ | 324 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ |
326 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 325 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
327 | #define CONFIG_SYS_I2C_NOPROBES {{0,0x69}} /* Don't probe these addrs */ | 326 | #define CONFIG_SYS_I2C_NOPROBES {{0,0x69}} /* Don't probe these addrs */ |
328 | #define CONFIG_SYS_I2C_OFFSET 0x3000 | 327 | #define CONFIG_SYS_I2C_OFFSET 0x3000 |
329 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 | 328 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 |
330 | 329 | ||
331 | /* | 330 | /* |
332 | * General PCI | 331 | * General PCI |
333 | * Addresses are mapped 1-1. | 332 | * Addresses are mapped 1-1. |
334 | */ | 333 | */ |
335 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 | 334 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 |
336 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE | 335 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE |
337 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */ | 336 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */ |
338 | #define CONFIG_SYS_PCI1_MMIO_BASE 0x90000000 | 337 | #define CONFIG_SYS_PCI1_MMIO_BASE 0x90000000 |
339 | #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE | 338 | #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE |
340 | #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */ | 339 | #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */ |
341 | #define CONFIG_SYS_PCI1_IO_BASE 0x00000000 | 340 | #define CONFIG_SYS_PCI1_IO_BASE 0x00000000 |
342 | #define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000 | 341 | #define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000 |
343 | #define CONFIG_SYS_PCI1_IO_SIZE 0x00100000 /* 1M */ | 342 | #define CONFIG_SYS_PCI1_IO_SIZE 0x00100000 /* 1M */ |
344 | 343 | ||
345 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ | 344 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ |
346 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1057 /* Motorola */ | 345 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1057 /* Motorola */ |
347 | 346 | ||
348 | /* | 347 | /* |
349 | * TSEC | 348 | * TSEC |
350 | */ | 349 | */ |
351 | #define CONFIG_TSEC_ENET /* TSEC ethernet support */ | 350 | #define CONFIG_TSEC_ENET /* TSEC ethernet support */ |
352 | 351 | ||
353 | #define CONFIG_NET_MULTI | 352 | #define CONFIG_NET_MULTI |
354 | #define CONFIG_GMII /* MII PHY management */ | 353 | #define CONFIG_GMII /* MII PHY management */ |
355 | 354 | ||
356 | #ifdef CONFIG_TSEC1 | 355 | #ifdef CONFIG_TSEC1 |
357 | #define CONFIG_HAS_ETH0 | 356 | #define CONFIG_HAS_ETH0 |
358 | #define CONFIG_TSEC1_NAME "TSEC0" | 357 | #define CONFIG_TSEC1_NAME "TSEC0" |
359 | #define CONFIG_SYS_TSEC1_OFFSET 0x24000 | 358 | #define CONFIG_SYS_TSEC1_OFFSET 0x24000 |
360 | #define TSEC1_PHY_ADDR 0x1c | 359 | #define TSEC1_PHY_ADDR 0x1c |
361 | #define TSEC1_FLAGS TSEC_GIGABIT | 360 | #define TSEC1_FLAGS TSEC_GIGABIT |
362 | #define TSEC1_PHYIDX 0 | 361 | #define TSEC1_PHYIDX 0 |
363 | #endif | 362 | #endif |
364 | 363 | ||
365 | #ifdef CONFIG_TSEC2 | 364 | #ifdef CONFIG_TSEC2 |
366 | #define CONFIG_HAS_ETH1 | 365 | #define CONFIG_HAS_ETH1 |
367 | #define CONFIG_TSEC2_NAME "TSEC1" | 366 | #define CONFIG_TSEC2_NAME "TSEC1" |
368 | #define CONFIG_SYS_TSEC2_OFFSET 0x25000 | 367 | #define CONFIG_SYS_TSEC2_OFFSET 0x25000 |
369 | #define TSEC2_PHY_ADDR 4 | 368 | #define TSEC2_PHY_ADDR 4 |
370 | #define TSEC2_FLAGS TSEC_GIGABIT | 369 | #define TSEC2_FLAGS TSEC_GIGABIT |
371 | #define TSEC2_PHYIDX 0 | 370 | #define TSEC2_PHYIDX 0 |
372 | #endif | 371 | #endif |
373 | 372 | ||
374 | 373 | ||
375 | /* Options are: TSEC[0-1] */ | 374 | /* Options are: TSEC[0-1] */ |
376 | #define CONFIG_ETHPRIME "TSEC1" | 375 | #define CONFIG_ETHPRIME "TSEC1" |
377 | 376 | ||
378 | /* | 377 | /* |
379 | * Configure on-board RTC | 378 | * Configure on-board RTC |
380 | */ | 379 | */ |
381 | #define CONFIG_RTC_DS1337 | 380 | #define CONFIG_RTC_DS1337 |
382 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 | 381 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 |
383 | 382 | ||
384 | /* | 383 | /* |
385 | * Environment | 384 | * Environment |
386 | */ | 385 | */ |
387 | #if defined(CONFIG_NAND_U_BOOT) | 386 | #if defined(CONFIG_NAND_U_BOOT) |
388 | #define CONFIG_ENV_IS_IN_NAND 1 | 387 | #define CONFIG_ENV_IS_IN_NAND 1 |
389 | #define CONFIG_ENV_OFFSET (512 * 1024) | 388 | #define CONFIG_ENV_OFFSET (512 * 1024) |
390 | #define CONFIG_ENV_SECT_SIZE CONFIG_SYS_NAND_BLOCK_SIZE | 389 | #define CONFIG_ENV_SECT_SIZE CONFIG_SYS_NAND_BLOCK_SIZE |
391 | #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE | 390 | #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE |
392 | #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE | 391 | #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE |
393 | #define CONFIG_ENV_RANGE (CONFIG_ENV_SECT_SIZE * 4) | 392 | #define CONFIG_ENV_RANGE (CONFIG_ENV_SECT_SIZE * 4) |
394 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE) | 393 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE) |
395 | #elif !defined(CONFIG_SYS_RAMBOOT) | 394 | #elif !defined(CONFIG_SYS_RAMBOOT) |
396 | #define CONFIG_ENV_IS_IN_FLASH 1 | 395 | #define CONFIG_ENV_IS_IN_FLASH 1 |
397 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) | 396 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) |
398 | #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64K(one sector) for env */ | 397 | #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64K(one sector) for env */ |
399 | #define CONFIG_ENV_SIZE 0x2000 | 398 | #define CONFIG_ENV_SIZE 0x2000 |
400 | 399 | ||
401 | /* Address and size of Redundant Environment Sector */ | 400 | /* Address and size of Redundant Environment Sector */ |
402 | #else | 401 | #else |
403 | #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */ | 402 | #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */ |
404 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000) | 403 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000) |
405 | #define CONFIG_ENV_SIZE 0x2000 | 404 | #define CONFIG_ENV_SIZE 0x2000 |
406 | #endif | 405 | #endif |
407 | 406 | ||
408 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ | 407 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
409 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ | 408 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
410 | 409 | ||
411 | /* | 410 | /* |
412 | * BOOTP options | 411 | * BOOTP options |
413 | */ | 412 | */ |
414 | #define CONFIG_BOOTP_BOOTFILESIZE | 413 | #define CONFIG_BOOTP_BOOTFILESIZE |
415 | #define CONFIG_BOOTP_BOOTPATH | 414 | #define CONFIG_BOOTP_BOOTPATH |
416 | #define CONFIG_BOOTP_GATEWAY | 415 | #define CONFIG_BOOTP_GATEWAY |
417 | #define CONFIG_BOOTP_HOSTNAME | 416 | #define CONFIG_BOOTP_HOSTNAME |
418 | 417 | ||
419 | 418 | ||
420 | /* | 419 | /* |
421 | * Command line configuration. | 420 | * Command line configuration. |
422 | */ | 421 | */ |
423 | #include <config_cmd_default.h> | 422 | #include <config_cmd_default.h> |
424 | 423 | ||
425 | #define CONFIG_CMD_PING | 424 | #define CONFIG_CMD_PING |
426 | #define CONFIG_CMD_DHCP | 425 | #define CONFIG_CMD_DHCP |
427 | #define CONFIG_CMD_I2C | 426 | #define CONFIG_CMD_I2C |
428 | #define CONFIG_CMD_MII | 427 | #define CONFIG_CMD_MII |
429 | #define CONFIG_CMD_DATE | 428 | #define CONFIG_CMD_DATE |
430 | #define CONFIG_CMD_PCI | 429 | #define CONFIG_CMD_PCI |
431 | 430 | ||
432 | #if defined(CONFIG_SYS_RAMBOOT) && !defined(CONFIG_NAND_U_BOOT) | 431 | #if defined(CONFIG_SYS_RAMBOOT) && !defined(CONFIG_NAND_U_BOOT) |
433 | #undef CONFIG_CMD_SAVEENV | 432 | #undef CONFIG_CMD_SAVEENV |
434 | #undef CONFIG_CMD_LOADS | 433 | #undef CONFIG_CMD_LOADS |
435 | #endif | 434 | #endif |
436 | 435 | ||
437 | #define CONFIG_CMDLINE_EDITING 1 | 436 | #define CONFIG_CMDLINE_EDITING 1 |
438 | 437 | ||
439 | 438 | ||
440 | /* | 439 | /* |
441 | * Miscellaneous configurable options | 440 | * Miscellaneous configurable options |
442 | */ | 441 | */ |
443 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 442 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
444 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ | 443 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ |
445 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | 444 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
446 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ | 445 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
447 | 446 | ||
448 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ | 447 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
449 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 448 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
450 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | 449 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
451 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ | 450 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ |
452 | 451 | ||
453 | /* | 452 | /* |
454 | * For booting Linux, the board info and command line data | 453 | * For booting Linux, the board info and command line data |
455 | * have to be in the first 8 MB of memory, since this is | 454 | * have to be in the first 8 MB of memory, since this is |
456 | * the maximum mapped by the Linux kernel during initialization. | 455 | * the maximum mapped by the Linux kernel during initialization. |
457 | */ | 456 | */ |
458 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ | 457 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ |
459 | 458 | ||
460 | #define CONFIG_SYS_RCWH_PCIHOST 0x80000000 /* PCIHOST */ | 459 | #define CONFIG_SYS_RCWH_PCIHOST 0x80000000 /* PCIHOST */ |
461 | 460 | ||
462 | #ifdef CONFIG_SYS_66MHZ | 461 | #ifdef CONFIG_SYS_66MHZ |
463 | 462 | ||
464 | /* 66MHz IN, 133MHz CSB, 266 DDR, 266 CORE */ | 463 | /* 66MHz IN, 133MHz CSB, 266 DDR, 266 CORE */ |
465 | /* 0x62040000 */ | 464 | /* 0x62040000 */ |
466 | #define CONFIG_SYS_HRCW_LOW (\ | 465 | #define CONFIG_SYS_HRCW_LOW (\ |
467 | 0x20000000 /* reserved, must be set */ |\ | 466 | 0x20000000 /* reserved, must be set */ |\ |
468 | HRCWL_DDRCM |\ | 467 | HRCWL_DDRCM |\ |
469 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ | 468 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ |
470 | HRCWL_DDR_TO_SCB_CLK_2X1 |\ | 469 | HRCWL_DDR_TO_SCB_CLK_2X1 |\ |
471 | HRCWL_CSB_TO_CLKIN_2X1 |\ | 470 | HRCWL_CSB_TO_CLKIN_2X1 |\ |
472 | HRCWL_CORE_TO_CSB_2X1) | 471 | HRCWL_CORE_TO_CSB_2X1) |
473 | 472 | ||
474 | #define CONFIG_SYS_NS16550_CLK (CONFIG_83XX_CLKIN * 2) | 473 | #define CONFIG_SYS_NS16550_CLK (CONFIG_83XX_CLKIN * 2) |
475 | 474 | ||
476 | #elif defined(CONFIG_SYS_33MHZ) | 475 | #elif defined(CONFIG_SYS_33MHZ) |
477 | 476 | ||
478 | /* 33MHz IN, 165MHz CSB, 330 DDR, 330 CORE */ | 477 | /* 33MHz IN, 165MHz CSB, 330 DDR, 330 CORE */ |
479 | /* 0x65040000 */ | 478 | /* 0x65040000 */ |
480 | #define CONFIG_SYS_HRCW_LOW (\ | 479 | #define CONFIG_SYS_HRCW_LOW (\ |
481 | 0x20000000 /* reserved, must be set */ |\ | 480 | 0x20000000 /* reserved, must be set */ |\ |
482 | HRCWL_DDRCM |\ | 481 | HRCWL_DDRCM |\ |
483 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ | 482 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ |
484 | HRCWL_DDR_TO_SCB_CLK_2X1 |\ | 483 | HRCWL_DDR_TO_SCB_CLK_2X1 |\ |
485 | HRCWL_CSB_TO_CLKIN_5X1 |\ | 484 | HRCWL_CSB_TO_CLKIN_5X1 |\ |
486 | HRCWL_CORE_TO_CSB_2X1) | 485 | HRCWL_CORE_TO_CSB_2X1) |
487 | 486 | ||
488 | #define CONFIG_SYS_NS16550_CLK (CONFIG_83XX_CLKIN * 5) | 487 | #define CONFIG_SYS_NS16550_CLK (CONFIG_83XX_CLKIN * 5) |
489 | 488 | ||
490 | #endif | 489 | #endif |
491 | 490 | ||
492 | #define CONFIG_SYS_HRCW_HIGH_BASE (\ | 491 | #define CONFIG_SYS_HRCW_HIGH_BASE (\ |
493 | HRCWH_PCI_HOST |\ | 492 | HRCWH_PCI_HOST |\ |
494 | HRCWH_PCI1_ARBITER_ENABLE |\ | 493 | HRCWH_PCI1_ARBITER_ENABLE |\ |
495 | HRCWH_CORE_ENABLE |\ | 494 | HRCWH_CORE_ENABLE |\ |
496 | HRCWH_BOOTSEQ_DISABLE |\ | 495 | HRCWH_BOOTSEQ_DISABLE |\ |
497 | HRCWH_SW_WATCHDOG_DISABLE |\ | 496 | HRCWH_SW_WATCHDOG_DISABLE |\ |
498 | HRCWH_TSEC1M_IN_RGMII |\ | 497 | HRCWH_TSEC1M_IN_RGMII |\ |
499 | HRCWH_TSEC2M_IN_RGMII |\ | 498 | HRCWH_TSEC2M_IN_RGMII |\ |
500 | HRCWH_BIG_ENDIAN) | 499 | HRCWH_BIG_ENDIAN) |
501 | 500 | ||
502 | #ifdef CONFIG_NAND_SPL | 501 | #ifdef CONFIG_NAND_SPL |
503 | #define CONFIG_SYS_HRCW_HIGH (CONFIG_SYS_HRCW_HIGH_BASE |\ | 502 | #define CONFIG_SYS_HRCW_HIGH (CONFIG_SYS_HRCW_HIGH_BASE |\ |
504 | HRCWH_FROM_0XFFF00100 |\ | 503 | HRCWH_FROM_0XFFF00100 |\ |
505 | HRCWH_ROM_LOC_NAND_SP_8BIT |\ | 504 | HRCWH_ROM_LOC_NAND_SP_8BIT |\ |
506 | HRCWH_RL_EXT_NAND) | 505 | HRCWH_RL_EXT_NAND) |
507 | #else | 506 | #else |
508 | #define CONFIG_SYS_HRCW_HIGH (CONFIG_SYS_HRCW_HIGH_BASE |\ | 507 | #define CONFIG_SYS_HRCW_HIGH (CONFIG_SYS_HRCW_HIGH_BASE |\ |
509 | HRCWH_FROM_0X00000100 |\ | 508 | HRCWH_FROM_0X00000100 |\ |
510 | HRCWH_ROM_LOC_LOCAL_16BIT |\ | 509 | HRCWH_ROM_LOC_LOCAL_16BIT |\ |
511 | HRCWH_RL_EXT_LEGACY) | 510 | HRCWH_RL_EXT_LEGACY) |
512 | #endif | 511 | #endif |
513 | 512 | ||
514 | /* System IO Config */ | 513 | /* System IO Config */ |
515 | #define CONFIG_SYS_SICRH (SICRH_TSOBI1 | SICRH_TSOBI2) /* RGMII */ | 514 | #define CONFIG_SYS_SICRH (SICRH_TSOBI1 | SICRH_TSOBI2) /* RGMII */ |
516 | #define CONFIG_SYS_SICRL SICRL_USBDR /* Enable Internal USB Phy */ | 515 | #define CONFIG_SYS_SICRL SICRL_USBDR /* Enable Internal USB Phy */ |
517 | 516 | ||
518 | #define CONFIG_SYS_HID0_INIT 0x000000000 | 517 | #define CONFIG_SYS_HID0_INIT 0x000000000 |
519 | #define CONFIG_SYS_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK | \ | 518 | #define CONFIG_SYS_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK | \ |
520 | HID0_ENABLE_DYNAMIC_POWER_MANAGMENT) | 519 | HID0_ENABLE_DYNAMIC_POWER_MANAGMENT) |
521 | 520 | ||
522 | #define CONFIG_SYS_HID2 HID2_HBE | 521 | #define CONFIG_SYS_HID2 HID2_HBE |
523 | 522 | ||
524 | #define CONFIG_HIGH_BATS 1 /* High BATs supported */ | 523 | #define CONFIG_HIGH_BATS 1 /* High BATs supported */ |
525 | 524 | ||
526 | /* DDR @ 0x00000000 */ | 525 | /* DDR @ 0x00000000 */ |
527 | #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10) | 526 | #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10) |
528 | #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 527 | #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
529 | 528 | ||
530 | /* PCI @ 0x80000000 */ | 529 | /* PCI @ 0x80000000 */ |
531 | #define CONFIG_SYS_IBAT1L (CONFIG_SYS_PCI1_MEM_BASE | BATL_PP_10) | 530 | #define CONFIG_SYS_IBAT1L (CONFIG_SYS_PCI1_MEM_BASE | BATL_PP_10) |
532 | #define CONFIG_SYS_IBAT1U (CONFIG_SYS_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 531 | #define CONFIG_SYS_IBAT1U (CONFIG_SYS_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
533 | #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 532 | #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
534 | #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 533 | #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
535 | 534 | ||
536 | /* PCI2 not supported on 8313 */ | 535 | /* PCI2 not supported on 8313 */ |
537 | #define CONFIG_SYS_IBAT3L (0) | 536 | #define CONFIG_SYS_IBAT3L (0) |
538 | #define CONFIG_SYS_IBAT3U (0) | 537 | #define CONFIG_SYS_IBAT3U (0) |
539 | #define CONFIG_SYS_IBAT4L (0) | 538 | #define CONFIG_SYS_IBAT4L (0) |
540 | #define CONFIG_SYS_IBAT4U (0) | 539 | #define CONFIG_SYS_IBAT4U (0) |
541 | 540 | ||
542 | /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 & BCSR @ 0xE2400000 */ | 541 | /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 & BCSR @ 0xE2400000 */ |
543 | #define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 542 | #define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
544 | #define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR | BATU_BL_256M | BATU_VS | BATU_VP) | 543 | #define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR | BATU_BL_256M | BATU_VS | BATU_VP) |
545 | 544 | ||
546 | /* SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */ | 545 | /* SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */ |
547 | #define CONFIG_SYS_IBAT6L (0xF0000000 | BATL_PP_10 | BATL_GUARDEDSTORAGE) | 546 | #define CONFIG_SYS_IBAT6L (0xF0000000 | BATL_PP_10 | BATL_GUARDEDSTORAGE) |
548 | #define CONFIG_SYS_IBAT6U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP) | 547 | #define CONFIG_SYS_IBAT6U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP) |
549 | 548 | ||
550 | #define CONFIG_SYS_IBAT7L (0) | 549 | #define CONFIG_SYS_IBAT7L (0) |
551 | #define CONFIG_SYS_IBAT7U (0) | 550 | #define CONFIG_SYS_IBAT7U (0) |
552 | 551 | ||
553 | #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L | 552 | #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L |
554 | #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U | 553 | #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U |
555 | #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L | 554 | #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L |
556 | #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U | 555 | #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U |
557 | #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L | 556 | #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L |
558 | #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U | 557 | #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U |
559 | #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L | 558 | #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L |
560 | #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U | 559 | #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U |
561 | #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L | 560 | #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L |
562 | #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U | 561 | #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U |
563 | #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L | 562 | #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L |
564 | #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U | 563 | #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U |
565 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L | 564 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L |
566 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U | 565 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U |
567 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L | 566 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L |
568 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U | 567 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U |
569 | 568 | ||
570 | /* | 569 | /* |
571 | * Internal Definitions | 570 | * Internal Definitions |
572 | * | 571 | * |
573 | * Boot Flags | 572 | * Boot Flags |
574 | */ | 573 | */ |
575 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 574 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
576 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 575 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
577 | 576 | ||
578 | /* | 577 | /* |
579 | * Environment Configuration | 578 | * Environment Configuration |
580 | */ | 579 | */ |
581 | #define CONFIG_ENV_OVERWRITE | 580 | #define CONFIG_ENV_OVERWRITE |
582 | 581 | ||
583 | #define CONFIG_ETHADDR 00:E0:0C:00:95:01 | 582 | #define CONFIG_ETHADDR 00:E0:0C:00:95:01 |
584 | #define CONFIG_ETH1ADDR 00:E0:0C:00:95:02 | 583 | #define CONFIG_ETH1ADDR 00:E0:0C:00:95:02 |
585 | 584 | ||
586 | #define CONFIG_IPADDR 10.0.0.2 | 585 | #define CONFIG_IPADDR 10.0.0.2 |
587 | #define CONFIG_SERVERIP 10.0.0.1 | 586 | #define CONFIG_SERVERIP 10.0.0.1 |
588 | #define CONFIG_GATEWAYIP 10.0.0.1 | 587 | #define CONFIG_GATEWAYIP 10.0.0.1 |
589 | #define CONFIG_NETMASK 255.0.0.0 | 588 | #define CONFIG_NETMASK 255.0.0.0 |
590 | #define CONFIG_NETDEV eth1 | 589 | #define CONFIG_NETDEV eth1 |
591 | 590 | ||
592 | #define CONFIG_HOSTNAME mpc8313erdb | 591 | #define CONFIG_HOSTNAME mpc8313erdb |
593 | #define CONFIG_ROOTPATH /nfs/root/path | 592 | #define CONFIG_ROOTPATH /nfs/root/path |
594 | #define CONFIG_BOOTFILE uImage | 593 | #define CONFIG_BOOTFILE uImage |
595 | #define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */ | 594 | #define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */ |
596 | #define CONFIG_FDTFILE mpc8313erdb.dtb | 595 | #define CONFIG_FDTFILE mpc8313erdb.dtb |
597 | 596 | ||
598 | #define CONFIG_LOADADDR 500000 /* default location for tftp and bootm */ | 597 | #define CONFIG_LOADADDR 500000 /* default location for tftp and bootm */ |
599 | #define CONFIG_BOOTDELAY 6 /* -1 disables auto-boot */ | 598 | #define CONFIG_BOOTDELAY 6 /* -1 disables auto-boot */ |
600 | #define CONFIG_BAUDRATE 115200 | 599 | #define CONFIG_BAUDRATE 115200 |
601 | 600 | ||
602 | #define XMK_STR(x) #x | 601 | #define XMK_STR(x) #x |
603 | #define MK_STR(x) XMK_STR(x) | 602 | #define MK_STR(x) XMK_STR(x) |
604 | 603 | ||
605 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 604 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
606 | "netdev=" MK_STR(CONFIG_NETDEV) "\0" \ | 605 | "netdev=" MK_STR(CONFIG_NETDEV) "\0" \ |
607 | "ethprime=TSEC1\0" \ | 606 | "ethprime=TSEC1\0" \ |
608 | "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \ | 607 | "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \ |
609 | "tftpflash=tftpboot $loadaddr $uboot; " \ | 608 | "tftpflash=tftpboot $loadaddr $uboot; " \ |
610 | "protect off " MK_STR(TEXT_BASE) " +$filesize; " \ | 609 | "protect off " MK_STR(TEXT_BASE) " +$filesize; " \ |
611 | "erase " MK_STR(TEXT_BASE) " +$filesize; " \ | 610 | "erase " MK_STR(TEXT_BASE) " +$filesize; " \ |
612 | "cp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize; " \ | 611 | "cp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize; " \ |
613 | "protect on " MK_STR(TEXT_BASE) " +$filesize; " \ | 612 | "protect on " MK_STR(TEXT_BASE) " +$filesize; " \ |
614 | "cmp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize\0" \ | 613 | "cmp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize\0" \ |
615 | "fdtaddr=400000\0" \ | 614 | "fdtaddr=400000\0" \ |
616 | "fdtfile=" MK_STR(CONFIG_FDTFILE) "\0" \ | 615 | "fdtfile=" MK_STR(CONFIG_FDTFILE) "\0" \ |
617 | "console=ttyS0\0" \ | 616 | "console=ttyS0\0" \ |
618 | "setbootargs=setenv bootargs " \ | 617 | "setbootargs=setenv bootargs " \ |
619 | "root=$rootdev rw console=$console,$baudrate $othbootargs\0" \ | 618 | "root=$rootdev rw console=$console,$baudrate $othbootargs\0" \ |
620 | "setipargs=setenv bootargs nfsroot=$serverip:$rootpath " \ | 619 | "setipargs=setenv bootargs nfsroot=$serverip:$rootpath " \ |
621 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ | 620 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ |
622 | "root=$rootdev rw console=$console,$baudrate $othbootargs\0" | 621 | "root=$rootdev rw console=$console,$baudrate $othbootargs\0" |
623 | 622 | ||
624 | #define CONFIG_NFSBOOTCOMMAND \ | 623 | #define CONFIG_NFSBOOTCOMMAND \ |
625 | "setenv rootdev /dev/nfs;" \ | 624 | "setenv rootdev /dev/nfs;" \ |
626 | "run setbootargs;" \ | 625 | "run setbootargs;" \ |
627 | "run setipargs;" \ | 626 | "run setipargs;" \ |
628 | "tftp $loadaddr $bootfile;" \ | 627 | "tftp $loadaddr $bootfile;" \ |
629 | "tftp $fdtaddr $fdtfile;" \ | 628 | "tftp $fdtaddr $fdtfile;" \ |
630 | "bootm $loadaddr - $fdtaddr" | 629 | "bootm $loadaddr - $fdtaddr" |
631 | 630 | ||
632 | #define CONFIG_RAMBOOTCOMMAND \ | 631 | #define CONFIG_RAMBOOTCOMMAND \ |
633 | "setenv rootdev /dev/ram;" \ | 632 | "setenv rootdev /dev/ram;" \ |
634 | "run setbootargs;" \ | 633 | "run setbootargs;" \ |
635 | "tftp $ramdiskaddr $ramdiskfile;" \ | 634 | "tftp $ramdiskaddr $ramdiskfile;" \ |
636 | "tftp $loadaddr $bootfile;" \ | 635 | "tftp $loadaddr $bootfile;" \ |
637 | "tftp $fdtaddr $fdtfile;" \ | 636 | "tftp $fdtaddr $fdtfile;" \ |
638 | "bootm $loadaddr $ramdiskaddr $fdtaddr" | 637 | "bootm $loadaddr $ramdiskaddr $fdtaddr" |
639 | 638 | ||
640 | #undef MK_STR | 639 | #undef MK_STR |
641 | #undef XMK_STR | 640 | #undef XMK_STR |
642 | 641 | ||
643 | #endif /* __CONFIG_H */ | 642 | #endif /* __CONFIG_H */ |
644 | 643 |
include/configs/MPC8349EMDS.h
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 | /* | 24 | /* |
25 | * mpc8349emds board configuration file | 25 | * mpc8349emds board configuration file |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifndef __CONFIG_H | 29 | #ifndef __CONFIG_H |
30 | #define __CONFIG_H | 30 | #define __CONFIG_H |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * High Level Configuration Options | 33 | * High Level Configuration Options |
34 | */ | 34 | */ |
35 | #define CONFIG_E300 1 /* E300 Family */ | 35 | #define CONFIG_E300 1 /* E300 Family */ |
36 | #define CONFIG_MPC83XX 1 /* MPC83XX family */ | 36 | #define CONFIG_MPC83XX 1 /* MPC83XX family */ |
37 | #define CONFIG_MPC834X 1 /* MPC834X family */ | 37 | #define CONFIG_MPC834X 1 /* MPC834X family */ |
38 | #define CONFIG_MPC8349 1 /* MPC8349 specific */ | 38 | #define CONFIG_MPC8349 1 /* MPC8349 specific */ |
39 | #define CONFIG_MPC8349EMDS 1 /* MPC8349EMDS board specific */ | 39 | #define CONFIG_MPC8349EMDS 1 /* MPC8349EMDS board specific */ |
40 | 40 | ||
41 | #undef CONFIG_PCI | 41 | #undef CONFIG_PCI |
42 | #undef CONFIG_MPC83XX_PCI2 /* support for 2nd PCI controller */ | 42 | #undef CONFIG_MPC83XX_PCI2 /* support for 2nd PCI controller */ |
43 | 43 | ||
44 | #define PCI_66M | 44 | #define PCI_66M |
45 | #ifdef PCI_66M | 45 | #ifdef PCI_66M |
46 | #define CONFIG_83XX_CLKIN 66000000 /* in Hz */ | 46 | #define CONFIG_83XX_CLKIN 66000000 /* in Hz */ |
47 | #else | 47 | #else |
48 | #define CONFIG_83XX_CLKIN 33000000 /* in Hz */ | 48 | #define CONFIG_83XX_CLKIN 33000000 /* in Hz */ |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | #ifdef CONFIG_PCISLAVE | 51 | #ifdef CONFIG_PCISLAVE |
52 | #define CONFIG_PCI | 52 | #define CONFIG_PCI |
53 | #define CONFIG_83XX_PCICLK 66666666 /* in Hz */ | 53 | #define CONFIG_83XX_PCICLK 66666666 /* in Hz */ |
54 | #endif /* CONFIG_PCISLAVE */ | 54 | #endif /* CONFIG_PCISLAVE */ |
55 | 55 | ||
56 | #ifndef CONFIG_SYS_CLK_FREQ | 56 | #ifndef CONFIG_SYS_CLK_FREQ |
57 | #ifdef PCI_66M | 57 | #ifdef PCI_66M |
58 | #define CONFIG_SYS_CLK_FREQ 66000000 | 58 | #define CONFIG_SYS_CLK_FREQ 66000000 |
59 | #define HRCWL_CSB_TO_CLKIN HRCWL_CSB_TO_CLKIN_4X1 | 59 | #define HRCWL_CSB_TO_CLKIN HRCWL_CSB_TO_CLKIN_4X1 |
60 | #else | 60 | #else |
61 | #define CONFIG_SYS_CLK_FREQ 33000000 | 61 | #define CONFIG_SYS_CLK_FREQ 33000000 |
62 | #define HRCWL_CSB_TO_CLKIN HRCWL_CSB_TO_CLKIN_8X1 | 62 | #define HRCWL_CSB_TO_CLKIN HRCWL_CSB_TO_CLKIN_8X1 |
63 | #endif | 63 | #endif |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #define CONFIG_BOARD_EARLY_INIT_F /* call board_pre_init */ | 66 | #define CONFIG_BOARD_EARLY_INIT_F /* call board_pre_init */ |
67 | 67 | ||
68 | #define CONFIG_SYS_IMMR 0xE0000000 | 68 | #define CONFIG_SYS_IMMR 0xE0000000 |
69 | 69 | ||
70 | #undef CONFIG_SYS_DRAM_TEST /* memory test, takes time */ | 70 | #undef CONFIG_SYS_DRAM_TEST /* memory test, takes time */ |
71 | #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest region */ | 71 | #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest region */ |
72 | #define CONFIG_SYS_MEMTEST_END 0x00100000 | 72 | #define CONFIG_SYS_MEMTEST_END 0x00100000 |
73 | 73 | ||
74 | /* | 74 | /* |
75 | * DDR Setup | 75 | * DDR Setup |
76 | */ | 76 | */ |
77 | #define CONFIG_DDR_ECC /* support DDR ECC function */ | 77 | #define CONFIG_DDR_ECC /* support DDR ECC function */ |
78 | #define CONFIG_DDR_ECC_CMD /* use DDR ECC user commands */ | 78 | #define CONFIG_DDR_ECC_CMD /* use DDR ECC user commands */ |
79 | #define CONFIG_SPD_EEPROM /* use SPD EEPROM for DDR setup*/ | 79 | #define CONFIG_SPD_EEPROM /* use SPD EEPROM for DDR setup*/ |
80 | 80 | ||
81 | /* | 81 | /* |
82 | * 32-bit data path mode. | 82 | * 32-bit data path mode. |
83 | * | 83 | * |
84 | * Please note that using this mode for devices with the real density of 64-bit | 84 | * Please note that using this mode for devices with the real density of 64-bit |
85 | * effectively reduces the amount of available memory due to the effect of | 85 | * effectively reduces the amount of available memory due to the effect of |
86 | * wrapping around while translating address to row/columns, for example in the | 86 | * wrapping around while translating address to row/columns, for example in the |
87 | * 256MB module the upper 128MB get aliased with contents of the lower | 87 | * 256MB module the upper 128MB get aliased with contents of the lower |
88 | * 128MB); normally this define should be used for devices with real 32-bit | 88 | * 128MB); normally this define should be used for devices with real 32-bit |
89 | * data path. | 89 | * data path. |
90 | */ | 90 | */ |
91 | #undef CONFIG_DDR_32BIT | 91 | #undef CONFIG_DDR_32BIT |
92 | 92 | ||
93 | #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory*/ | 93 | #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory*/ |
94 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE | 94 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE |
95 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE | 95 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE |
96 | #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \ | 96 | #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \ |
97 | DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05) | 97 | DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05) |
98 | #undef CONFIG_DDR_2T_TIMING | 98 | #undef CONFIG_DDR_2T_TIMING |
99 | 99 | ||
100 | /* | 100 | /* |
101 | * DDRCDR - DDR Control Driver Register | 101 | * DDRCDR - DDR Control Driver Register |
102 | */ | 102 | */ |
103 | #define CONFIG_SYS_DDRCDR_VALUE 0x80080001 | 103 | #define CONFIG_SYS_DDRCDR_VALUE 0x80080001 |
104 | 104 | ||
105 | #if defined(CONFIG_SPD_EEPROM) | 105 | #if defined(CONFIG_SPD_EEPROM) |
106 | /* | 106 | /* |
107 | * Determine DDR configuration from I2C interface. | 107 | * Determine DDR configuration from I2C interface. |
108 | */ | 108 | */ |
109 | #define SPD_EEPROM_ADDRESS 0x51 /* DDR DIMM */ | 109 | #define SPD_EEPROM_ADDRESS 0x51 /* DDR DIMM */ |
110 | #else | 110 | #else |
111 | /* | 111 | /* |
112 | * Manually set up DDR parameters | 112 | * Manually set up DDR parameters |
113 | */ | 113 | */ |
114 | #define CONFIG_SYS_DDR_SIZE 256 /* MB */ | 114 | #define CONFIG_SYS_DDR_SIZE 256 /* MB */ |
115 | #if defined(CONFIG_DDR_II) | 115 | #if defined(CONFIG_DDR_II) |
116 | #define CONFIG_SYS_DDRCDR 0x80080001 | 116 | #define CONFIG_SYS_DDRCDR 0x80080001 |
117 | #define CONFIG_SYS_DDR_CS2_BNDS 0x0000000f | 117 | #define CONFIG_SYS_DDR_CS2_BNDS 0x0000000f |
118 | #define CONFIG_SYS_DDR_CS2_CONFIG 0x80330102 | 118 | #define CONFIG_SYS_DDR_CS2_CONFIG 0x80330102 |
119 | #define CONFIG_SYS_DDR_TIMING_0 0x00220802 | 119 | #define CONFIG_SYS_DDR_TIMING_0 0x00220802 |
120 | #define CONFIG_SYS_DDR_TIMING_1 0x38357322 | 120 | #define CONFIG_SYS_DDR_TIMING_1 0x38357322 |
121 | #define CONFIG_SYS_DDR_TIMING_2 0x2f9048c8 | 121 | #define CONFIG_SYS_DDR_TIMING_2 0x2f9048c8 |
122 | #define CONFIG_SYS_DDR_TIMING_3 0x00000000 | 122 | #define CONFIG_SYS_DDR_TIMING_3 0x00000000 |
123 | #define CONFIG_SYS_DDR_CLK_CNTL 0x02000000 | 123 | #define CONFIG_SYS_DDR_CLK_CNTL 0x02000000 |
124 | #define CONFIG_SYS_DDR_MODE 0x47d00432 | 124 | #define CONFIG_SYS_DDR_MODE 0x47d00432 |
125 | #define CONFIG_SYS_DDR_MODE2 0x8000c000 | 125 | #define CONFIG_SYS_DDR_MODE2 0x8000c000 |
126 | #define CONFIG_SYS_DDR_INTERVAL 0x03cf0080 | 126 | #define CONFIG_SYS_DDR_INTERVAL 0x03cf0080 |
127 | #define CONFIG_SYS_DDR_SDRAM_CFG 0x43000000 | 127 | #define CONFIG_SYS_DDR_SDRAM_CFG 0x43000000 |
128 | #define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000 | 128 | #define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000 |
129 | #else | 129 | #else |
130 | #define CONFIG_SYS_DDR_CONFIG (CSCONFIG_EN | CSCONFIG_ROW_BIT_13 | CSCONFIG_COL_BIT_10) | 130 | #define CONFIG_SYS_DDR_CONFIG (CSCONFIG_EN | CSCONFIG_ROW_BIT_13 | CSCONFIG_COL_BIT_10) |
131 | #define CONFIG_SYS_DDR_TIMING_1 0x36332321 | 131 | #define CONFIG_SYS_DDR_TIMING_1 0x36332321 |
132 | #define CONFIG_SYS_DDR_TIMING_2 0x00000800 /* P9-45,may need tuning */ | 132 | #define CONFIG_SYS_DDR_TIMING_2 0x00000800 /* P9-45,may need tuning */ |
133 | #define CONFIG_SYS_DDR_CONTROL 0xc2000000 /* unbuffered,no DYN_PWR */ | 133 | #define CONFIG_SYS_DDR_CONTROL 0xc2000000 /* unbuffered,no DYN_PWR */ |
134 | #define CONFIG_SYS_DDR_INTERVAL 0x04060100 /* autocharge,no open page */ | 134 | #define CONFIG_SYS_DDR_INTERVAL 0x04060100 /* autocharge,no open page */ |
135 | 135 | ||
136 | #if defined(CONFIG_DDR_32BIT) | 136 | #if defined(CONFIG_DDR_32BIT) |
137 | /* set burst length to 8 for 32-bit data path */ | 137 | /* set burst length to 8 for 32-bit data path */ |
138 | #define CONFIG_SYS_DDR_MODE 0x00000023 /* DLL,normal,seq,4/2.5, 8 burst len */ | 138 | #define CONFIG_SYS_DDR_MODE 0x00000023 /* DLL,normal,seq,4/2.5, 8 burst len */ |
139 | #else | 139 | #else |
140 | /* the default burst length is 4 - for 64-bit data path */ | 140 | /* the default burst length is 4 - for 64-bit data path */ |
141 | #define CONFIG_SYS_DDR_MODE 0x00000022 /* DLL,normal,seq,4/2.5, 4 burst len */ | 141 | #define CONFIG_SYS_DDR_MODE 0x00000022 /* DLL,normal,seq,4/2.5, 4 burst len */ |
142 | #endif | 142 | #endif |
143 | #endif | 143 | #endif |
144 | #endif | 144 | #endif |
145 | 145 | ||
146 | /* | 146 | /* |
147 | * SDRAM on the Local Bus | 147 | * SDRAM on the Local Bus |
148 | */ | 148 | */ |
149 | #define CONFIG_SYS_LBC_SDRAM_BASE 0xF0000000 /* Localbus SDRAM */ | 149 | #define CONFIG_SYS_LBC_SDRAM_BASE 0xF0000000 /* Localbus SDRAM */ |
150 | #define CONFIG_SYS_LBC_SDRAM_SIZE 64 /* LBC SDRAM is 64MB */ | 150 | #define CONFIG_SYS_LBC_SDRAM_SIZE 64 /* LBC SDRAM is 64MB */ |
151 | 151 | ||
152 | /* | 152 | /* |
153 | * FLASH on the Local Bus | 153 | * FLASH on the Local Bus |
154 | */ | 154 | */ |
155 | #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */ | 155 | #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */ |
156 | #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */ | 156 | #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */ |
157 | #define CONFIG_SYS_FLASH_BASE 0xFE000000 /* start of FLASH */ | 157 | #define CONFIG_SYS_FLASH_BASE 0xFE000000 /* start of FLASH */ |
158 | #define CONFIG_SYS_FLASH_SIZE 32 /* max flash size in MB */ | 158 | #define CONFIG_SYS_FLASH_SIZE 32 /* max flash size in MB */ |
159 | #define CONFIG_SYS_FLASH_PROTECTION 1 /* Use h/w Flash protection. */ | 159 | #define CONFIG_SYS_FLASH_PROTECTION 1 /* Use h/w Flash protection. */ |
160 | /* #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE */ | 160 | /* #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE */ |
161 | 161 | ||
162 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | /* flash Base address */ \ | 162 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | /* flash Base address */ \ |
163 | (2 << BR_PS_SHIFT) | /* 16 bit port size */ \ | 163 | (2 << BR_PS_SHIFT) | /* 16 bit port size */ \ |
164 | BR_V) /* valid */ | 164 | BR_V) /* valid */ |
165 | #define CONFIG_SYS_OR0_PRELIM ((~(CONFIG_SYS_FLASH_SIZE - 1) << 20) | OR_UPM_XAM | \ | 165 | #define CONFIG_SYS_OR0_PRELIM ((~(CONFIG_SYS_FLASH_SIZE - 1) << 20) | OR_UPM_XAM | \ |
166 | OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | OR_GPCM_XACS | OR_GPCM_SCY_15 | \ | 166 | OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | OR_GPCM_XACS | OR_GPCM_SCY_15 | \ |
167 | OR_GPCM_TRLX | OR_GPCM_EHTR | OR_GPCM_EAD) | 167 | OR_GPCM_TRLX | OR_GPCM_EHTR | OR_GPCM_EAD) |
168 | #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE /* window base at flash base */ | 168 | #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE /* window base at flash base */ |
169 | #define CONFIG_SYS_LBLAWAR0_PRELIM 0x80000018 /* 32 MB window size */ | 169 | #define CONFIG_SYS_LBLAWAR0_PRELIM 0x80000018 /* 32 MB window size */ |
170 | 170 | ||
171 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ | 171 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ |
172 | #define CONFIG_SYS_MAX_FLASH_SECT 256 /* max sectors per device */ | 172 | #define CONFIG_SYS_MAX_FLASH_SECT 256 /* max sectors per device */ |
173 | 173 | ||
174 | #undef CONFIG_SYS_FLASH_CHECKSUM | 174 | #undef CONFIG_SYS_FLASH_CHECKSUM |
175 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ | 175 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ |
176 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ | 176 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ |
177 | 177 | ||
178 | #define CONFIG_SYS_MID_FLASH_JUMP 0x7F000000 | 178 | #define CONFIG_SYS_MID_FLASH_JUMP 0x7F000000 |
179 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ | 179 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ |
180 | 180 | ||
181 | #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE) | 181 | #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE) |
182 | #define CONFIG_SYS_RAMBOOT | 182 | #define CONFIG_SYS_RAMBOOT |
183 | #else | 183 | #else |
184 | #undef CONFIG_SYS_RAMBOOT | 184 | #undef CONFIG_SYS_RAMBOOT |
185 | #endif | 185 | #endif |
186 | 186 | ||
187 | /* | 187 | /* |
188 | * BCSR register on local bus 32KB, 8-bit wide for MDS config reg | 188 | * BCSR register on local bus 32KB, 8-bit wide for MDS config reg |
189 | */ | 189 | */ |
190 | #define CONFIG_SYS_BCSR 0xE2400000 | 190 | #define CONFIG_SYS_BCSR 0xE2400000 |
191 | #define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_BCSR /* Access window base at BCSR base */ | 191 | #define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_BCSR /* Access window base at BCSR base */ |
192 | #define CONFIG_SYS_LBLAWAR1_PRELIM 0x8000000E /* Access window size 32K */ | 192 | #define CONFIG_SYS_LBLAWAR1_PRELIM 0x8000000E /* Access window size 32K */ |
193 | #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_BCSR|0x00000801) /* Port-size=8bit, MSEL=GPCM */ | 193 | #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_BCSR|0x00000801) /* Port-size=8bit, MSEL=GPCM */ |
194 | #define CONFIG_SYS_OR1_PRELIM 0xFFFFE8F0 /* length 32K */ | 194 | #define CONFIG_SYS_OR1_PRELIM 0xFFFFE8F0 /* length 32K */ |
195 | 195 | ||
196 | #define CONFIG_SYS_INIT_RAM_LOCK 1 | 196 | #define CONFIG_SYS_INIT_RAM_LOCK 1 |
197 | #define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 /* Initial RAM address */ | 197 | #define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 /* Initial RAM address */ |
198 | #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM*/ | 198 | #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM*/ |
199 | 199 | ||
200 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ | 200 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ |
201 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 201 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
202 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET | 202 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
203 | 203 | ||
204 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ | 204 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ |
205 | #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserved for malloc */ | 205 | #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserved for malloc */ |
206 | 206 | ||
207 | /* | 207 | /* |
208 | * Local Bus LCRR and LBCR regs | 208 | * Local Bus LCRR and LBCR regs |
209 | * LCRR: DLL bypass, Clock divider is 4 | 209 | * LCRR: DLL bypass, Clock divider is 4 |
210 | * External Local Bus rate is | 210 | * External Local Bus rate is |
211 | * CLKIN * HRCWL_CSB_TO_CLKIN / HRCWL_LCL_BUS_TO_SCB_CLK / LCRR_CLKDIV | 211 | * CLKIN * HRCWL_CSB_TO_CLKIN / HRCWL_LCL_BUS_TO_SCB_CLK / LCRR_CLKDIV |
212 | */ | 212 | */ |
213 | #define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_CLKDIV_4) | 213 | #define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_CLKDIV_4) |
214 | #define CONFIG_SYS_LBC_LBCR 0x00000000 | 214 | #define CONFIG_SYS_LBC_LBCR 0x00000000 |
215 | 215 | ||
216 | /* | 216 | /* |
217 | * The MPC834xEA MDS for 834xE rev3.1 may not be assembled SDRAM memory. | 217 | * The MPC834xEA MDS for 834xE rev3.1 may not be assembled SDRAM memory. |
218 | * if board has SRDAM on local bus, you can define CONFIG_SYS_LB_SDRAM | 218 | * if board has SRDAM on local bus, you can define CONFIG_SYS_LB_SDRAM |
219 | */ | 219 | */ |
220 | #undef CONFIG_SYS_LB_SDRAM | 220 | #undef CONFIG_SYS_LB_SDRAM |
221 | 221 | ||
222 | #ifdef CONFIG_SYS_LB_SDRAM | 222 | #ifdef CONFIG_SYS_LB_SDRAM |
223 | /* Local bus BR2, OR2 definition for SDRAM if soldered on the MDS board */ | 223 | /* Local bus BR2, OR2 definition for SDRAM if soldered on the MDS board */ |
224 | /* | 224 | /* |
225 | * Base Register 2 and Option Register 2 configure SDRAM. | 225 | * Base Register 2 and Option Register 2 configure SDRAM. |
226 | * The SDRAM base address, CONFIG_SYS_LBC_SDRAM_BASE, is 0xf0000000. | 226 | * The SDRAM base address, CONFIG_SYS_LBC_SDRAM_BASE, is 0xf0000000. |
227 | * | 227 | * |
228 | * For BR2, need: | 228 | * For BR2, need: |
229 | * Base address of 0xf0000000 = BR[0:16] = 1111 0000 0000 0000 0 | 229 | * Base address of 0xf0000000 = BR[0:16] = 1111 0000 0000 0000 0 |
230 | * port-size = 32-bits = BR2[19:20] = 11 | 230 | * port-size = 32-bits = BR2[19:20] = 11 |
231 | * no parity checking = BR2[21:22] = 00 | 231 | * no parity checking = BR2[21:22] = 00 |
232 | * SDRAM for MSEL = BR2[24:26] = 011 | 232 | * SDRAM for MSEL = BR2[24:26] = 011 |
233 | * Valid = BR[31] = 1 | 233 | * Valid = BR[31] = 1 |
234 | * | 234 | * |
235 | * 0 4 8 12 16 20 24 28 | 235 | * 0 4 8 12 16 20 24 28 |
236 | * 1111 0000 0000 0000 0001 1000 0110 0001 = F0001861 | 236 | * 1111 0000 0000 0000 0001 1000 0110 0001 = F0001861 |
237 | * | 237 | * |
238 | * FIXME: CONFIG_SYS_LBC_SDRAM_BASE should be masked and OR'ed into | 238 | * FIXME: CONFIG_SYS_LBC_SDRAM_BASE should be masked and OR'ed into |
239 | * FIXME: the top 17 bits of BR2. | 239 | * FIXME: the top 17 bits of BR2. |
240 | */ | 240 | */ |
241 | 241 | ||
242 | #define CONFIG_SYS_BR2_PRELIM 0xF0001861 /* Port-size=32bit, MSEL=SDRAM */ | 242 | #define CONFIG_SYS_BR2_PRELIM 0xF0001861 /* Port-size=32bit, MSEL=SDRAM */ |
243 | #define CONFIG_SYS_LBLAWBAR2_PRELIM 0xF0000000 | 243 | #define CONFIG_SYS_LBLAWBAR2_PRELIM 0xF0000000 |
244 | #define CONFIG_SYS_LBLAWAR2_PRELIM 0x80000019 /* 64M */ | 244 | #define CONFIG_SYS_LBLAWAR2_PRELIM 0x80000019 /* 64M */ |
245 | 245 | ||
246 | /* | 246 | /* |
247 | * The SDRAM size in MB, CONFIG_SYS_LBC_SDRAM_SIZE, is 64. | 247 | * The SDRAM size in MB, CONFIG_SYS_LBC_SDRAM_SIZE, is 64. |
248 | * | 248 | * |
249 | * For OR2, need: | 249 | * For OR2, need: |
250 | * 64MB mask for AM, OR2[0:7] = 1111 1100 | 250 | * 64MB mask for AM, OR2[0:7] = 1111 1100 |
251 | * XAM, OR2[17:18] = 11 | 251 | * XAM, OR2[17:18] = 11 |
252 | * 9 columns OR2[19-21] = 010 | 252 | * 9 columns OR2[19-21] = 010 |
253 | * 13 rows OR2[23-25] = 100 | 253 | * 13 rows OR2[23-25] = 100 |
254 | * EAD set for extra time OR[31] = 1 | 254 | * EAD set for extra time OR[31] = 1 |
255 | * | 255 | * |
256 | * 0 4 8 12 16 20 24 28 | 256 | * 0 4 8 12 16 20 24 28 |
257 | * 1111 1100 0000 0000 0110 1001 0000 0001 = FC006901 | 257 | * 1111 1100 0000 0000 0110 1001 0000 0001 = FC006901 |
258 | */ | 258 | */ |
259 | 259 | ||
260 | #define CONFIG_SYS_OR2_PRELIM 0xFC006901 | 260 | #define CONFIG_SYS_OR2_PRELIM 0xFC006901 |
261 | 261 | ||
262 | #define CONFIG_SYS_LBC_LSRT 0x32000000 /* LB sdram refresh timer, about 6us */ | 262 | #define CONFIG_SYS_LBC_LSRT 0x32000000 /* LB sdram refresh timer, about 6us */ |
263 | #define CONFIG_SYS_LBC_MRTPR 0x20000000 /* LB refresh timer prescal, 266MHz/32 */ | 263 | #define CONFIG_SYS_LBC_MRTPR 0x20000000 /* LB refresh timer prescal, 266MHz/32 */ |
264 | 264 | ||
265 | #define CONFIG_SYS_LBC_LSDMR_COMMON ( LSDMR_RFEN \ | 265 | #define CONFIG_SYS_LBC_LSDMR_COMMON ( LSDMR_RFEN \ |
266 | | LSDMR_BSMA1516 \ | 266 | | LSDMR_BSMA1516 \ |
267 | | LSDMR_RFCR8 \ | 267 | | LSDMR_RFCR8 \ |
268 | | LSDMR_PRETOACT6 \ | 268 | | LSDMR_PRETOACT6 \ |
269 | | LSDMR_ACTTORW3 \ | 269 | | LSDMR_ACTTORW3 \ |
270 | | LSDMR_BL8 \ | 270 | | LSDMR_BL8 \ |
271 | | LSDMR_WRC3 \ | 271 | | LSDMR_WRC3 \ |
272 | | LSDMR_CL3 \ | 272 | | LSDMR_CL3 \ |
273 | ) | 273 | ) |
274 | 274 | ||
275 | /* | 275 | /* |
276 | * SDRAM Controller configuration sequence. | 276 | * SDRAM Controller configuration sequence. |
277 | */ | 277 | */ |
278 | #define CONFIG_SYS_LBC_LSDMR_1 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_PCHALL) | 278 | #define CONFIG_SYS_LBC_LSDMR_1 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_PCHALL) |
279 | #define CONFIG_SYS_LBC_LSDMR_2 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH) | 279 | #define CONFIG_SYS_LBC_LSDMR_2 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH) |
280 | #define CONFIG_SYS_LBC_LSDMR_3 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH) | 280 | #define CONFIG_SYS_LBC_LSDMR_3 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH) |
281 | #define CONFIG_SYS_LBC_LSDMR_4 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_MRW) | 281 | #define CONFIG_SYS_LBC_LSDMR_4 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_MRW) |
282 | #define CONFIG_SYS_LBC_LSDMR_5 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_NORMAL) | 282 | #define CONFIG_SYS_LBC_LSDMR_5 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_NORMAL) |
283 | #endif | 283 | #endif |
284 | 284 | ||
285 | /* | 285 | /* |
286 | * Serial Port | 286 | * Serial Port |
287 | */ | 287 | */ |
288 | #define CONFIG_CONS_INDEX 1 | 288 | #define CONFIG_CONS_INDEX 1 |
289 | #undef CONFIG_SERIAL_SOFTWARE_FIFO | 289 | #undef CONFIG_SERIAL_SOFTWARE_FIFO |
290 | #define CONFIG_SYS_NS16550 | 290 | #define CONFIG_SYS_NS16550 |
291 | #define CONFIG_SYS_NS16550_SERIAL | 291 | #define CONFIG_SYS_NS16550_SERIAL |
292 | #define CONFIG_SYS_NS16550_REG_SIZE 1 | 292 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
293 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) | 293 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) |
294 | 294 | ||
295 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 295 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
296 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} | 296 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} |
297 | 297 | ||
298 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500) | 298 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500) |
299 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600) | 299 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600) |
300 | 300 | ||
301 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ | 301 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ |
302 | /* Use the HUSH parser */ | 302 | /* Use the HUSH parser */ |
303 | #define CONFIG_SYS_HUSH_PARSER | 303 | #define CONFIG_SYS_HUSH_PARSER |
304 | #ifdef CONFIG_SYS_HUSH_PARSER | 304 | #ifdef CONFIG_SYS_HUSH_PARSER |
305 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | 305 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
306 | #endif | 306 | #endif |
307 | 307 | ||
308 | /* pass open firmware flat tree */ | 308 | /* pass open firmware flat tree */ |
309 | #define CONFIG_OF_LIBFDT 1 | 309 | #define CONFIG_OF_LIBFDT 1 |
310 | #define CONFIG_OF_BOARD_SETUP 1 | 310 | #define CONFIG_OF_BOARD_SETUP 1 |
311 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 | 311 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 |
312 | 312 | ||
313 | /* I2C */ | 313 | /* I2C */ |
314 | #define CONFIG_HARD_I2C /* I2C with hardware support*/ | 314 | #define CONFIG_HARD_I2C /* I2C with hardware support*/ |
315 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ | 315 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ |
316 | #define CONFIG_FSL_I2C | 316 | #define CONFIG_FSL_I2C |
317 | #define CONFIG_I2C_MULTI_BUS | 317 | #define CONFIG_I2C_MULTI_BUS |
318 | #define CONFIG_I2C_CMD_TREE | ||
319 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ | 318 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ |
320 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 319 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
321 | #define CONFIG_SYS_I2C_NOPROBES {{0,0x69}} /* Don't probe these addrs */ | 320 | #define CONFIG_SYS_I2C_NOPROBES {{0,0x69}} /* Don't probe these addrs */ |
322 | #define CONFIG_SYS_I2C_OFFSET 0x3000 | 321 | #define CONFIG_SYS_I2C_OFFSET 0x3000 |
323 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 | 322 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 |
324 | 323 | ||
325 | /* SPI */ | 324 | /* SPI */ |
326 | #define CONFIG_MPC8XXX_SPI | 325 | #define CONFIG_MPC8XXX_SPI |
327 | #undef CONFIG_SOFT_SPI /* SPI bit-banged */ | 326 | #undef CONFIG_SOFT_SPI /* SPI bit-banged */ |
328 | 327 | ||
329 | /* GPIOs. Used as SPI chip selects */ | 328 | /* GPIOs. Used as SPI chip selects */ |
330 | #define CONFIG_SYS_GPIO1_PRELIM | 329 | #define CONFIG_SYS_GPIO1_PRELIM |
331 | #define CONFIG_SYS_GPIO1_DIR 0xC0000000 /* SPI CS on 0, LED on 1 */ | 330 | #define CONFIG_SYS_GPIO1_DIR 0xC0000000 /* SPI CS on 0, LED on 1 */ |
332 | #define CONFIG_SYS_GPIO1_DAT 0xC0000000 /* Both are active LOW */ | 331 | #define CONFIG_SYS_GPIO1_DAT 0xC0000000 /* Both are active LOW */ |
333 | 332 | ||
334 | /* TSEC */ | 333 | /* TSEC */ |
335 | #define CONFIG_SYS_TSEC1_OFFSET 0x24000 | 334 | #define CONFIG_SYS_TSEC1_OFFSET 0x24000 |
336 | #define CONFIG_SYS_TSEC1 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC1_OFFSET) | 335 | #define CONFIG_SYS_TSEC1 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC1_OFFSET) |
337 | #define CONFIG_SYS_TSEC2_OFFSET 0x25000 | 336 | #define CONFIG_SYS_TSEC2_OFFSET 0x25000 |
338 | #define CONFIG_SYS_TSEC2 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC2_OFFSET) | 337 | #define CONFIG_SYS_TSEC2 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC2_OFFSET) |
339 | 338 | ||
340 | /* USB */ | 339 | /* USB */ |
341 | #define CONFIG_SYS_USE_MPC834XSYS_USB_PHY 1 /* Use SYS board PHY */ | 340 | #define CONFIG_SYS_USE_MPC834XSYS_USB_PHY 1 /* Use SYS board PHY */ |
342 | 341 | ||
343 | /* | 342 | /* |
344 | * General PCI | 343 | * General PCI |
345 | * Addresses are mapped 1-1. | 344 | * Addresses are mapped 1-1. |
346 | */ | 345 | */ |
347 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 | 346 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 |
348 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE | 347 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE |
349 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */ | 348 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */ |
350 | #define CONFIG_SYS_PCI1_MMIO_BASE 0x90000000 | 349 | #define CONFIG_SYS_PCI1_MMIO_BASE 0x90000000 |
351 | #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE | 350 | #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE |
352 | #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */ | 351 | #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */ |
353 | #define CONFIG_SYS_PCI1_IO_BASE 0x00000000 | 352 | #define CONFIG_SYS_PCI1_IO_BASE 0x00000000 |
354 | #define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000 | 353 | #define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000 |
355 | #define CONFIG_SYS_PCI1_IO_SIZE 0x00100000 /* 1M */ | 354 | #define CONFIG_SYS_PCI1_IO_SIZE 0x00100000 /* 1M */ |
356 | 355 | ||
357 | #define CONFIG_SYS_PCI2_MEM_BASE 0xA0000000 | 356 | #define CONFIG_SYS_PCI2_MEM_BASE 0xA0000000 |
358 | #define CONFIG_SYS_PCI2_MEM_PHYS CONFIG_SYS_PCI2_MEM_BASE | 357 | #define CONFIG_SYS_PCI2_MEM_PHYS CONFIG_SYS_PCI2_MEM_BASE |
359 | #define CONFIG_SYS_PCI2_MEM_SIZE 0x10000000 /* 256M */ | 358 | #define CONFIG_SYS_PCI2_MEM_SIZE 0x10000000 /* 256M */ |
360 | #define CONFIG_SYS_PCI2_MMIO_BASE 0xB0000000 | 359 | #define CONFIG_SYS_PCI2_MMIO_BASE 0xB0000000 |
361 | #define CONFIG_SYS_PCI2_MMIO_PHYS CONFIG_SYS_PCI2_MMIO_BASE | 360 | #define CONFIG_SYS_PCI2_MMIO_PHYS CONFIG_SYS_PCI2_MMIO_BASE |
362 | #define CONFIG_SYS_PCI2_MMIO_SIZE 0x10000000 /* 256M */ | 361 | #define CONFIG_SYS_PCI2_MMIO_SIZE 0x10000000 /* 256M */ |
363 | #define CONFIG_SYS_PCI2_IO_BASE 0x00000000 | 362 | #define CONFIG_SYS_PCI2_IO_BASE 0x00000000 |
364 | #define CONFIG_SYS_PCI2_IO_PHYS 0xE2100000 | 363 | #define CONFIG_SYS_PCI2_IO_PHYS 0xE2100000 |
365 | #define CONFIG_SYS_PCI2_IO_SIZE 0x00100000 /* 1M */ | 364 | #define CONFIG_SYS_PCI2_IO_SIZE 0x00100000 /* 1M */ |
366 | 365 | ||
367 | #if defined(CONFIG_PCI) | 366 | #if defined(CONFIG_PCI) |
368 | 367 | ||
369 | #define PCI_ONE_PCI1 | 368 | #define PCI_ONE_PCI1 |
370 | #if defined(PCI_64BIT) | 369 | #if defined(PCI_64BIT) |
371 | #undef PCI_ALL_PCI1 | 370 | #undef PCI_ALL_PCI1 |
372 | #undef PCI_TWO_PCI1 | 371 | #undef PCI_TWO_PCI1 |
373 | #undef PCI_ONE_PCI1 | 372 | #undef PCI_ONE_PCI1 |
374 | #endif | 373 | #endif |
375 | 374 | ||
376 | #define CONFIG_NET_MULTI | 375 | #define CONFIG_NET_MULTI |
377 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ | 376 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ |
378 | #define CONFIG_83XX_GENERIC_PCI | 377 | #define CONFIG_83XX_GENERIC_PCI |
379 | #define CONFIG_83XX_PCI_STREAMING | 378 | #define CONFIG_83XX_PCI_STREAMING |
380 | 379 | ||
381 | #undef CONFIG_EEPRO100 | 380 | #undef CONFIG_EEPRO100 |
382 | #undef CONFIG_TULIP | 381 | #undef CONFIG_TULIP |
383 | 382 | ||
384 | #if !defined(CONFIG_PCI_PNP) | 383 | #if !defined(CONFIG_PCI_PNP) |
385 | #define PCI_ENET0_IOADDR 0xFIXME | 384 | #define PCI_ENET0_IOADDR 0xFIXME |
386 | #define PCI_ENET0_MEMADDR 0xFIXME | 385 | #define PCI_ENET0_MEMADDR 0xFIXME |
387 | #define PCI_IDSEL_NUMBER 0x0c /* slot0->3(IDSEL)=12->15 */ | 386 | #define PCI_IDSEL_NUMBER 0x0c /* slot0->3(IDSEL)=12->15 */ |
388 | #endif | 387 | #endif |
389 | 388 | ||
390 | #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ | 389 | #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ |
391 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1957 /* Freescale */ | 390 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1957 /* Freescale */ |
392 | 391 | ||
393 | #endif /* CONFIG_PCI */ | 392 | #endif /* CONFIG_PCI */ |
394 | 393 | ||
395 | /* | 394 | /* |
396 | * TSEC configuration | 395 | * TSEC configuration |
397 | */ | 396 | */ |
398 | #define CONFIG_TSEC_ENET /* TSEC ethernet support */ | 397 | #define CONFIG_TSEC_ENET /* TSEC ethernet support */ |
399 | 398 | ||
400 | #if defined(CONFIG_TSEC_ENET) | 399 | #if defined(CONFIG_TSEC_ENET) |
401 | #ifndef CONFIG_NET_MULTI | 400 | #ifndef CONFIG_NET_MULTI |
402 | #define CONFIG_NET_MULTI 1 | 401 | #define CONFIG_NET_MULTI 1 |
403 | #endif | 402 | #endif |
404 | 403 | ||
405 | #define CONFIG_GMII 1 /* MII PHY management */ | 404 | #define CONFIG_GMII 1 /* MII PHY management */ |
406 | #define CONFIG_TSEC1 1 | 405 | #define CONFIG_TSEC1 1 |
407 | #define CONFIG_TSEC1_NAME "TSEC0" | 406 | #define CONFIG_TSEC1_NAME "TSEC0" |
408 | #define CONFIG_TSEC2 1 | 407 | #define CONFIG_TSEC2 1 |
409 | #define CONFIG_TSEC2_NAME "TSEC1" | 408 | #define CONFIG_TSEC2_NAME "TSEC1" |
410 | #define TSEC1_PHY_ADDR 0 | 409 | #define TSEC1_PHY_ADDR 0 |
411 | #define TSEC2_PHY_ADDR 1 | 410 | #define TSEC2_PHY_ADDR 1 |
412 | #define TSEC1_PHYIDX 0 | 411 | #define TSEC1_PHYIDX 0 |
413 | #define TSEC2_PHYIDX 0 | 412 | #define TSEC2_PHYIDX 0 |
414 | #define TSEC1_FLAGS TSEC_GIGABIT | 413 | #define TSEC1_FLAGS TSEC_GIGABIT |
415 | #define TSEC2_FLAGS TSEC_GIGABIT | 414 | #define TSEC2_FLAGS TSEC_GIGABIT |
416 | 415 | ||
417 | /* Options are: TSEC[0-1] */ | 416 | /* Options are: TSEC[0-1] */ |
418 | #define CONFIG_ETHPRIME "TSEC0" | 417 | #define CONFIG_ETHPRIME "TSEC0" |
419 | 418 | ||
420 | #endif /* CONFIG_TSEC_ENET */ | 419 | #endif /* CONFIG_TSEC_ENET */ |
421 | 420 | ||
422 | /* | 421 | /* |
423 | * Configure on-board RTC | 422 | * Configure on-board RTC |
424 | */ | 423 | */ |
425 | #define CONFIG_RTC_DS1374 /* use ds1374 rtc via i2c */ | 424 | #define CONFIG_RTC_DS1374 /* use ds1374 rtc via i2c */ |
426 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 /* at address 0x68 */ | 425 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 /* at address 0x68 */ |
427 | 426 | ||
428 | /* | 427 | /* |
429 | * Environment | 428 | * Environment |
430 | */ | 429 | */ |
431 | #ifndef CONFIG_SYS_RAMBOOT | 430 | #ifndef CONFIG_SYS_RAMBOOT |
432 | #define CONFIG_ENV_IS_IN_FLASH 1 | 431 | #define CONFIG_ENV_IS_IN_FLASH 1 |
433 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) | 432 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) |
434 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */ | 433 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */ |
435 | #define CONFIG_ENV_SIZE 0x2000 | 434 | #define CONFIG_ENV_SIZE 0x2000 |
436 | 435 | ||
437 | /* Address and size of Redundant Environment Sector */ | 436 | /* Address and size of Redundant Environment Sector */ |
438 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE) | 437 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE) |
439 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) | 438 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) |
440 | 439 | ||
441 | #else | 440 | #else |
442 | #define CONFIG_SYS_NO_FLASH 1 /* Flash is not usable now */ | 441 | #define CONFIG_SYS_NO_FLASH 1 /* Flash is not usable now */ |
443 | #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */ | 442 | #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */ |
444 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000) | 443 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000) |
445 | #define CONFIG_ENV_SIZE 0x2000 | 444 | #define CONFIG_ENV_SIZE 0x2000 |
446 | #endif | 445 | #endif |
447 | 446 | ||
448 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ | 447 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
449 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ | 448 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
450 | 449 | ||
451 | 450 | ||
452 | /* | 451 | /* |
453 | * BOOTP options | 452 | * BOOTP options |
454 | */ | 453 | */ |
455 | #define CONFIG_BOOTP_BOOTFILESIZE | 454 | #define CONFIG_BOOTP_BOOTFILESIZE |
456 | #define CONFIG_BOOTP_BOOTPATH | 455 | #define CONFIG_BOOTP_BOOTPATH |
457 | #define CONFIG_BOOTP_GATEWAY | 456 | #define CONFIG_BOOTP_GATEWAY |
458 | #define CONFIG_BOOTP_HOSTNAME | 457 | #define CONFIG_BOOTP_HOSTNAME |
459 | 458 | ||
460 | 459 | ||
461 | /* | 460 | /* |
462 | * Command line configuration. | 461 | * Command line configuration. |
463 | */ | 462 | */ |
464 | #include <config_cmd_default.h> | 463 | #include <config_cmd_default.h> |
465 | 464 | ||
466 | #define CONFIG_CMD_PING | 465 | #define CONFIG_CMD_PING |
467 | #define CONFIG_CMD_I2C | 466 | #define CONFIG_CMD_I2C |
468 | #define CONFIG_CMD_DATE | 467 | #define CONFIG_CMD_DATE |
469 | #define CONFIG_CMD_MII | 468 | #define CONFIG_CMD_MII |
470 | 469 | ||
471 | #if defined(CONFIG_PCI) | 470 | #if defined(CONFIG_PCI) |
472 | #define CONFIG_CMD_PCI | 471 | #define CONFIG_CMD_PCI |
473 | #endif | 472 | #endif |
474 | 473 | ||
475 | #if defined(CONFIG_SYS_RAMBOOT) | 474 | #if defined(CONFIG_SYS_RAMBOOT) |
476 | #undef CONFIG_CMD_SAVEENV | 475 | #undef CONFIG_CMD_SAVEENV |
477 | #undef CONFIG_CMD_LOADS | 476 | #undef CONFIG_CMD_LOADS |
478 | #endif | 477 | #endif |
479 | 478 | ||
480 | 479 | ||
481 | #undef CONFIG_WATCHDOG /* watchdog disabled */ | 480 | #undef CONFIG_WATCHDOG /* watchdog disabled */ |
482 | 481 | ||
483 | /* | 482 | /* |
484 | * Miscellaneous configurable options | 483 | * Miscellaneous configurable options |
485 | */ | 484 | */ |
486 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 485 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
487 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ | 486 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ |
488 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | 487 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
489 | 488 | ||
490 | #if defined(CONFIG_CMD_KGDB) | 489 | #if defined(CONFIG_CMD_KGDB) |
491 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ | 490 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
492 | #else | 491 | #else |
493 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | 492 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
494 | #endif | 493 | #endif |
495 | 494 | ||
496 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ | 495 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
497 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 496 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
498 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | 497 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
499 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ | 498 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ |
500 | 499 | ||
501 | /* | 500 | /* |
502 | * For booting Linux, the board info and command line data | 501 | * For booting Linux, the board info and command line data |
503 | * have to be in the first 8 MB of memory, since this is | 502 | * have to be in the first 8 MB of memory, since this is |
504 | * the maximum mapped by the Linux kernel during initialization. | 503 | * the maximum mapped by the Linux kernel during initialization. |
505 | */ | 504 | */ |
506 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ | 505 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ |
507 | 506 | ||
508 | #define CONFIG_SYS_RCWH_PCIHOST 0x80000000 /* PCIHOST */ | 507 | #define CONFIG_SYS_RCWH_PCIHOST 0x80000000 /* PCIHOST */ |
509 | 508 | ||
510 | #if 1 /*528/264*/ | 509 | #if 1 /*528/264*/ |
511 | #define CONFIG_SYS_HRCW_LOW (\ | 510 | #define CONFIG_SYS_HRCW_LOW (\ |
512 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ | 511 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ |
513 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ | 512 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ |
514 | HRCWL_CSB_TO_CLKIN |\ | 513 | HRCWL_CSB_TO_CLKIN |\ |
515 | HRCWL_VCO_1X2 |\ | 514 | HRCWL_VCO_1X2 |\ |
516 | HRCWL_CORE_TO_CSB_2X1) | 515 | HRCWL_CORE_TO_CSB_2X1) |
517 | #elif 0 /*396/132*/ | 516 | #elif 0 /*396/132*/ |
518 | #define CONFIG_SYS_HRCW_LOW (\ | 517 | #define CONFIG_SYS_HRCW_LOW (\ |
519 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ | 518 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ |
520 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ | 519 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ |
521 | HRCWL_CSB_TO_CLKIN |\ | 520 | HRCWL_CSB_TO_CLKIN |\ |
522 | HRCWL_VCO_1X4 |\ | 521 | HRCWL_VCO_1X4 |\ |
523 | HRCWL_CORE_TO_CSB_3X1) | 522 | HRCWL_CORE_TO_CSB_3X1) |
524 | #elif 0 /*264/132*/ | 523 | #elif 0 /*264/132*/ |
525 | #define CONFIG_SYS_HRCW_LOW (\ | 524 | #define CONFIG_SYS_HRCW_LOW (\ |
526 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ | 525 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ |
527 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ | 526 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ |
528 | HRCWL_CSB_TO_CLKIN |\ | 527 | HRCWL_CSB_TO_CLKIN |\ |
529 | HRCWL_VCO_1X4 |\ | 528 | HRCWL_VCO_1X4 |\ |
530 | HRCWL_CORE_TO_CSB_2X1) | 529 | HRCWL_CORE_TO_CSB_2X1) |
531 | #elif 0 /*132/132*/ | 530 | #elif 0 /*132/132*/ |
532 | #define CONFIG_SYS_HRCW_LOW (\ | 531 | #define CONFIG_SYS_HRCW_LOW (\ |
533 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ | 532 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ |
534 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ | 533 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ |
535 | HRCWL_CSB_TO_CLKIN |\ | 534 | HRCWL_CSB_TO_CLKIN |\ |
536 | HRCWL_VCO_1X4 |\ | 535 | HRCWL_VCO_1X4 |\ |
537 | HRCWL_CORE_TO_CSB_1X1) | 536 | HRCWL_CORE_TO_CSB_1X1) |
538 | #elif 0 /*264/264 */ | 537 | #elif 0 /*264/264 */ |
539 | #define CONFIG_SYS_HRCW_LOW (\ | 538 | #define CONFIG_SYS_HRCW_LOW (\ |
540 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ | 539 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ |
541 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ | 540 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ |
542 | HRCWL_CSB_TO_CLKIN |\ | 541 | HRCWL_CSB_TO_CLKIN |\ |
543 | HRCWL_VCO_1X4 |\ | 542 | HRCWL_VCO_1X4 |\ |
544 | HRCWL_CORE_TO_CSB_1X1) | 543 | HRCWL_CORE_TO_CSB_1X1) |
545 | #endif | 544 | #endif |
546 | 545 | ||
547 | #ifdef CONFIG_PCISLAVE | 546 | #ifdef CONFIG_PCISLAVE |
548 | #define CONFIG_SYS_HRCW_HIGH (\ | 547 | #define CONFIG_SYS_HRCW_HIGH (\ |
549 | HRCWH_PCI_AGENT |\ | 548 | HRCWH_PCI_AGENT |\ |
550 | HRCWH_64_BIT_PCI |\ | 549 | HRCWH_64_BIT_PCI |\ |
551 | HRCWH_PCI1_ARBITER_DISABLE |\ | 550 | HRCWH_PCI1_ARBITER_DISABLE |\ |
552 | HRCWH_PCI2_ARBITER_DISABLE |\ | 551 | HRCWH_PCI2_ARBITER_DISABLE |\ |
553 | HRCWH_CORE_ENABLE |\ | 552 | HRCWH_CORE_ENABLE |\ |
554 | HRCWH_FROM_0X00000100 |\ | 553 | HRCWH_FROM_0X00000100 |\ |
555 | HRCWH_BOOTSEQ_DISABLE |\ | 554 | HRCWH_BOOTSEQ_DISABLE |\ |
556 | HRCWH_SW_WATCHDOG_DISABLE |\ | 555 | HRCWH_SW_WATCHDOG_DISABLE |\ |
557 | HRCWH_ROM_LOC_LOCAL_16BIT |\ | 556 | HRCWH_ROM_LOC_LOCAL_16BIT |\ |
558 | HRCWH_TSEC1M_IN_GMII |\ | 557 | HRCWH_TSEC1M_IN_GMII |\ |
559 | HRCWH_TSEC2M_IN_GMII ) | 558 | HRCWH_TSEC2M_IN_GMII ) |
560 | #else | 559 | #else |
561 | #if defined(PCI_64BIT) | 560 | #if defined(PCI_64BIT) |
562 | #define CONFIG_SYS_HRCW_HIGH (\ | 561 | #define CONFIG_SYS_HRCW_HIGH (\ |
563 | HRCWH_PCI_HOST |\ | 562 | HRCWH_PCI_HOST |\ |
564 | HRCWH_64_BIT_PCI |\ | 563 | HRCWH_64_BIT_PCI |\ |
565 | HRCWH_PCI1_ARBITER_ENABLE |\ | 564 | HRCWH_PCI1_ARBITER_ENABLE |\ |
566 | HRCWH_PCI2_ARBITER_DISABLE |\ | 565 | HRCWH_PCI2_ARBITER_DISABLE |\ |
567 | HRCWH_CORE_ENABLE |\ | 566 | HRCWH_CORE_ENABLE |\ |
568 | HRCWH_FROM_0X00000100 |\ | 567 | HRCWH_FROM_0X00000100 |\ |
569 | HRCWH_BOOTSEQ_DISABLE |\ | 568 | HRCWH_BOOTSEQ_DISABLE |\ |
570 | HRCWH_SW_WATCHDOG_DISABLE |\ | 569 | HRCWH_SW_WATCHDOG_DISABLE |\ |
571 | HRCWH_ROM_LOC_LOCAL_16BIT |\ | 570 | HRCWH_ROM_LOC_LOCAL_16BIT |\ |
572 | HRCWH_TSEC1M_IN_GMII |\ | 571 | HRCWH_TSEC1M_IN_GMII |\ |
573 | HRCWH_TSEC2M_IN_GMII ) | 572 | HRCWH_TSEC2M_IN_GMII ) |
574 | #else | 573 | #else |
575 | #define CONFIG_SYS_HRCW_HIGH (\ | 574 | #define CONFIG_SYS_HRCW_HIGH (\ |
576 | HRCWH_PCI_HOST |\ | 575 | HRCWH_PCI_HOST |\ |
577 | HRCWH_32_BIT_PCI |\ | 576 | HRCWH_32_BIT_PCI |\ |
578 | HRCWH_PCI1_ARBITER_ENABLE |\ | 577 | HRCWH_PCI1_ARBITER_ENABLE |\ |
579 | HRCWH_PCI2_ARBITER_ENABLE |\ | 578 | HRCWH_PCI2_ARBITER_ENABLE |\ |
580 | HRCWH_CORE_ENABLE |\ | 579 | HRCWH_CORE_ENABLE |\ |
581 | HRCWH_FROM_0X00000100 |\ | 580 | HRCWH_FROM_0X00000100 |\ |
582 | HRCWH_BOOTSEQ_DISABLE |\ | 581 | HRCWH_BOOTSEQ_DISABLE |\ |
583 | HRCWH_SW_WATCHDOG_DISABLE |\ | 582 | HRCWH_SW_WATCHDOG_DISABLE |\ |
584 | HRCWH_ROM_LOC_LOCAL_16BIT |\ | 583 | HRCWH_ROM_LOC_LOCAL_16BIT |\ |
585 | HRCWH_TSEC1M_IN_GMII |\ | 584 | HRCWH_TSEC1M_IN_GMII |\ |
586 | HRCWH_TSEC2M_IN_GMII ) | 585 | HRCWH_TSEC2M_IN_GMII ) |
587 | #endif /* PCI_64BIT */ | 586 | #endif /* PCI_64BIT */ |
588 | #endif /* CONFIG_PCISLAVE */ | 587 | #endif /* CONFIG_PCISLAVE */ |
589 | 588 | ||
590 | /* | 589 | /* |
591 | * System performance | 590 | * System performance |
592 | */ | 591 | */ |
593 | #define CONFIG_SYS_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */ | 592 | #define CONFIG_SYS_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */ |
594 | #define CONFIG_SYS_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */ | 593 | #define CONFIG_SYS_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */ |
595 | #define CONFIG_SYS_SPCR_TSEC1EP 3 /* TSEC1 emergency priority (0-3) */ | 594 | #define CONFIG_SYS_SPCR_TSEC1EP 3 /* TSEC1 emergency priority (0-3) */ |
596 | #define CONFIG_SYS_SPCR_TSEC2EP 3 /* TSEC2 emergency priority (0-3) */ | 595 | #define CONFIG_SYS_SPCR_TSEC2EP 3 /* TSEC2 emergency priority (0-3) */ |
597 | #define CONFIG_SYS_SCCR_TSEC1CM 1 /* TSEC1 clock mode (0-3) */ | 596 | #define CONFIG_SYS_SCCR_TSEC1CM 1 /* TSEC1 clock mode (0-3) */ |
598 | #define CONFIG_SYS_SCCR_TSEC2CM 1 /* TSEC2 & I2C0 clock mode (0-3) */ | 597 | #define CONFIG_SYS_SCCR_TSEC2CM 1 /* TSEC2 & I2C0 clock mode (0-3) */ |
599 | 598 | ||
600 | /* System IO Config */ | 599 | /* System IO Config */ |
601 | #define CONFIG_SYS_SICRH 0 | 600 | #define CONFIG_SYS_SICRH 0 |
602 | #define CONFIG_SYS_SICRL SICRL_LDP_A | 601 | #define CONFIG_SYS_SICRL SICRL_LDP_A |
603 | 602 | ||
604 | #define CONFIG_SYS_HID0_INIT 0x000000000 | 603 | #define CONFIG_SYS_HID0_INIT 0x000000000 |
605 | #define CONFIG_SYS_HID0_FINAL HID0_ENABLE_MACHINE_CHECK | 604 | #define CONFIG_SYS_HID0_FINAL HID0_ENABLE_MACHINE_CHECK |
606 | 605 | ||
607 | /* #define CONFIG_SYS_HID0_FINAL (\ | 606 | /* #define CONFIG_SYS_HID0_FINAL (\ |
608 | HID0_ENABLE_INSTRUCTION_CACHE |\ | 607 | HID0_ENABLE_INSTRUCTION_CACHE |\ |
609 | HID0_ENABLE_M_BIT |\ | 608 | HID0_ENABLE_M_BIT |\ |
610 | HID0_ENABLE_ADDRESS_BROADCAST ) */ | 609 | HID0_ENABLE_ADDRESS_BROADCAST ) */ |
611 | 610 | ||
612 | 611 | ||
613 | #define CONFIG_SYS_HID2 HID2_HBE | 612 | #define CONFIG_SYS_HID2 HID2_HBE |
614 | #define CONFIG_HIGH_BATS 1 /* High BATs supported */ | 613 | #define CONFIG_HIGH_BATS 1 /* High BATs supported */ |
615 | 614 | ||
616 | /* DDR @ 0x00000000 */ | 615 | /* DDR @ 0x00000000 */ |
617 | #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) | 616 | #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) |
618 | #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 617 | #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
619 | 618 | ||
620 | /* PCI @ 0x80000000 */ | 619 | /* PCI @ 0x80000000 */ |
621 | #ifdef CONFIG_PCI | 620 | #ifdef CONFIG_PCI |
622 | #define CONFIG_SYS_IBAT1L (CONFIG_SYS_PCI1_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) | 621 | #define CONFIG_SYS_IBAT1L (CONFIG_SYS_PCI1_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) |
623 | #define CONFIG_SYS_IBAT1U (CONFIG_SYS_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 622 | #define CONFIG_SYS_IBAT1U (CONFIG_SYS_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
624 | #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 623 | #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
625 | #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 624 | #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
626 | #else | 625 | #else |
627 | #define CONFIG_SYS_IBAT1L (0) | 626 | #define CONFIG_SYS_IBAT1L (0) |
628 | #define CONFIG_SYS_IBAT1U (0) | 627 | #define CONFIG_SYS_IBAT1U (0) |
629 | #define CONFIG_SYS_IBAT2L (0) | 628 | #define CONFIG_SYS_IBAT2L (0) |
630 | #define CONFIG_SYS_IBAT2U (0) | 629 | #define CONFIG_SYS_IBAT2U (0) |
631 | #endif | 630 | #endif |
632 | 631 | ||
633 | #ifdef CONFIG_MPC83XX_PCI2 | 632 | #ifdef CONFIG_MPC83XX_PCI2 |
634 | #define CONFIG_SYS_IBAT3L (CONFIG_SYS_PCI2_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) | 633 | #define CONFIG_SYS_IBAT3L (CONFIG_SYS_PCI2_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) |
635 | #define CONFIG_SYS_IBAT3U (CONFIG_SYS_PCI2_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 634 | #define CONFIG_SYS_IBAT3U (CONFIG_SYS_PCI2_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
636 | #define CONFIG_SYS_IBAT4L (CONFIG_SYS_PCI2_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 635 | #define CONFIG_SYS_IBAT4L (CONFIG_SYS_PCI2_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
637 | #define CONFIG_SYS_IBAT4U (CONFIG_SYS_PCI2_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 636 | #define CONFIG_SYS_IBAT4U (CONFIG_SYS_PCI2_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
638 | #else | 637 | #else |
639 | #define CONFIG_SYS_IBAT3L (0) | 638 | #define CONFIG_SYS_IBAT3L (0) |
640 | #define CONFIG_SYS_IBAT3U (0) | 639 | #define CONFIG_SYS_IBAT3U (0) |
641 | #define CONFIG_SYS_IBAT4L (0) | 640 | #define CONFIG_SYS_IBAT4L (0) |
642 | #define CONFIG_SYS_IBAT4U (0) | 641 | #define CONFIG_SYS_IBAT4U (0) |
643 | #endif | 642 | #endif |
644 | 643 | ||
645 | /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 & BCSR @ 0xE2400000 */ | 644 | /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 & BCSR @ 0xE2400000 */ |
646 | #define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 645 | #define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
647 | #define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR | BATU_BL_256M | BATU_VS | BATU_VP) | 646 | #define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR | BATU_BL_256M | BATU_VS | BATU_VP) |
648 | 647 | ||
649 | /* SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */ | 648 | /* SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */ |
650 | #define CONFIG_SYS_IBAT6L (0xF0000000 | BATL_PP_10 | BATL_MEMCOHERENCE | \ | 649 | #define CONFIG_SYS_IBAT6L (0xF0000000 | BATL_PP_10 | BATL_MEMCOHERENCE | \ |
651 | BATL_GUARDEDSTORAGE) | 650 | BATL_GUARDEDSTORAGE) |
652 | #define CONFIG_SYS_IBAT6U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP) | 651 | #define CONFIG_SYS_IBAT6U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP) |
653 | 652 | ||
654 | #define CONFIG_SYS_IBAT7L (0) | 653 | #define CONFIG_SYS_IBAT7L (0) |
655 | #define CONFIG_SYS_IBAT7U (0) | 654 | #define CONFIG_SYS_IBAT7U (0) |
656 | 655 | ||
657 | #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L | 656 | #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L |
658 | #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U | 657 | #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U |
659 | #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L | 658 | #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L |
660 | #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U | 659 | #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U |
661 | #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L | 660 | #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L |
662 | #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U | 661 | #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U |
663 | #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L | 662 | #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L |
664 | #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U | 663 | #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U |
665 | #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L | 664 | #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L |
666 | #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U | 665 | #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U |
667 | #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L | 666 | #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L |
668 | #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U | 667 | #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U |
669 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L | 668 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L |
670 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U | 669 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U |
671 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L | 670 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L |
672 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U | 671 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U |
673 | 672 | ||
674 | /* | 673 | /* |
675 | * Internal Definitions | 674 | * Internal Definitions |
676 | * | 675 | * |
677 | * Boot Flags | 676 | * Boot Flags |
678 | */ | 677 | */ |
679 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 678 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
680 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 679 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
681 | 680 | ||
682 | #if defined(CONFIG_CMD_KGDB) | 681 | #if defined(CONFIG_CMD_KGDB) |
683 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */ | 682 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */ |
684 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ | 683 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ |
685 | #endif | 684 | #endif |
686 | 685 | ||
687 | /* | 686 | /* |
688 | * Environment Configuration | 687 | * Environment Configuration |
689 | */ | 688 | */ |
690 | #define CONFIG_ENV_OVERWRITE | 689 | #define CONFIG_ENV_OVERWRITE |
691 | 690 | ||
692 | #if defined(CONFIG_TSEC_ENET) | 691 | #if defined(CONFIG_TSEC_ENET) |
693 | #define CONFIG_ETHADDR 00:04:9f:ef:23:33 | 692 | #define CONFIG_ETHADDR 00:04:9f:ef:23:33 |
694 | #define CONFIG_HAS_ETH1 | 693 | #define CONFIG_HAS_ETH1 |
695 | #define CONFIG_HAS_ETH0 | 694 | #define CONFIG_HAS_ETH0 |
696 | #define CONFIG_ETH1ADDR 00:E0:0C:00:7E:21 | 695 | #define CONFIG_ETH1ADDR 00:E0:0C:00:7E:21 |
697 | #endif | 696 | #endif |
698 | 697 | ||
699 | #define CONFIG_IPADDR 192.168.1.253 | 698 | #define CONFIG_IPADDR 192.168.1.253 |
700 | 699 | ||
701 | #define CONFIG_HOSTNAME mpc8349emds | 700 | #define CONFIG_HOSTNAME mpc8349emds |
702 | #define CONFIG_ROOTPATH /nfsroot/rootfs | 701 | #define CONFIG_ROOTPATH /nfsroot/rootfs |
703 | #define CONFIG_BOOTFILE uImage | 702 | #define CONFIG_BOOTFILE uImage |
704 | 703 | ||
705 | #define CONFIG_SERVERIP 192.168.1.1 | 704 | #define CONFIG_SERVERIP 192.168.1.1 |
706 | #define CONFIG_GATEWAYIP 192.168.1.1 | 705 | #define CONFIG_GATEWAYIP 192.168.1.1 |
707 | #define CONFIG_NETMASK 255.255.255.0 | 706 | #define CONFIG_NETMASK 255.255.255.0 |
708 | 707 | ||
709 | #define CONFIG_LOADADDR 500000 /* default location for tftp and bootm */ | 708 | #define CONFIG_LOADADDR 500000 /* default location for tftp and bootm */ |
710 | 709 | ||
711 | #define CONFIG_BOOTDELAY 6 /* -1 disables auto-boot */ | 710 | #define CONFIG_BOOTDELAY 6 /* -1 disables auto-boot */ |
712 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs */ | 711 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs */ |
713 | 712 | ||
714 | #define CONFIG_BAUDRATE 115200 | 713 | #define CONFIG_BAUDRATE 115200 |
715 | 714 | ||
716 | #define CONFIG_PREBOOT "echo;" \ | 715 | #define CONFIG_PREBOOT "echo;" \ |
717 | "echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;" \ | 716 | "echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;" \ |
718 | "echo" | 717 | "echo" |
719 | 718 | ||
720 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 719 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
721 | "netdev=eth0\0" \ | 720 | "netdev=eth0\0" \ |
722 | "hostname=mpc8349emds\0" \ | 721 | "hostname=mpc8349emds\0" \ |
723 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ | 722 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
724 | "nfsroot=${serverip}:${rootpath}\0" \ | 723 | "nfsroot=${serverip}:${rootpath}\0" \ |
725 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ | 724 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ |
726 | "addip=setenv bootargs ${bootargs} " \ | 725 | "addip=setenv bootargs ${bootargs} " \ |
727 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ | 726 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ |
728 | ":${hostname}:${netdev}:off panic=1\0" \ | 727 | ":${hostname}:${netdev}:off panic=1\0" \ |
729 | "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\ | 728 | "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\ |
730 | "flash_nfs=run nfsargs addip addtty;" \ | 729 | "flash_nfs=run nfsargs addip addtty;" \ |
731 | "bootm ${kernel_addr}\0" \ | 730 | "bootm ${kernel_addr}\0" \ |
732 | "flash_self=run ramargs addip addtty;" \ | 731 | "flash_self=run ramargs addip addtty;" \ |
733 | "bootm ${kernel_addr} ${ramdisk_addr}\0" \ | 732 | "bootm ${kernel_addr} ${ramdisk_addr}\0" \ |
734 | "net_nfs=tftp 200000 ${bootfile};run nfsargs addip addtty;" \ | 733 | "net_nfs=tftp 200000 ${bootfile};run nfsargs addip addtty;" \ |
735 | "bootm\0" \ | 734 | "bootm\0" \ |
736 | "load=tftp 100000 /tftpboot/mpc8349emds/u-boot.bin\0" \ | 735 | "load=tftp 100000 /tftpboot/mpc8349emds/u-boot.bin\0" \ |
737 | "update=protect off fe000000 fe03ffff; " \ | 736 | "update=protect off fe000000 fe03ffff; " \ |
738 | "era fe000000 fe03ffff; cp.b 100000 fe000000 ${filesize}\0" \ | 737 | "era fe000000 fe03ffff; cp.b 100000 fe000000 ${filesize}\0" \ |
739 | "upd=run load update\0" \ | 738 | "upd=run load update\0" \ |
740 | "fdtaddr=400000\0" \ | 739 | "fdtaddr=400000\0" \ |
741 | "fdtfile=mpc8349emds.dtb\0" \ | 740 | "fdtfile=mpc8349emds.dtb\0" \ |
742 | "" | 741 | "" |
743 | 742 | ||
744 | #define CONFIG_NFSBOOTCOMMAND \ | 743 | #define CONFIG_NFSBOOTCOMMAND \ |
745 | "setenv bootargs root=/dev/nfs rw " \ | 744 | "setenv bootargs root=/dev/nfs rw " \ |
746 | "nfsroot=$serverip:$rootpath " \ | 745 | "nfsroot=$serverip:$rootpath " \ |
747 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ | 746 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ |
748 | "console=$consoledev,$baudrate $othbootargs;" \ | 747 | "console=$consoledev,$baudrate $othbootargs;" \ |
749 | "tftp $loadaddr $bootfile;" \ | 748 | "tftp $loadaddr $bootfile;" \ |
750 | "tftp $fdtaddr $fdtfile;" \ | 749 | "tftp $fdtaddr $fdtfile;" \ |
751 | "bootm $loadaddr - $fdtaddr" | 750 | "bootm $loadaddr - $fdtaddr" |
752 | 751 | ||
753 | #define CONFIG_RAMBOOTCOMMAND \ | 752 | #define CONFIG_RAMBOOTCOMMAND \ |
754 | "setenv bootargs root=/dev/ram rw " \ | 753 | "setenv bootargs root=/dev/ram rw " \ |
755 | "console=$consoledev,$baudrate $othbootargs;" \ | 754 | "console=$consoledev,$baudrate $othbootargs;" \ |
756 | "tftp $ramdiskaddr $ramdiskfile;" \ | 755 | "tftp $ramdiskaddr $ramdiskfile;" \ |
757 | "tftp $loadaddr $bootfile;" \ | 756 | "tftp $loadaddr $bootfile;" \ |
758 | "tftp $fdtaddr $fdtfile;" \ | 757 | "tftp $fdtaddr $fdtfile;" \ |
759 | "bootm $loadaddr $ramdiskaddr $fdtaddr" | 758 | "bootm $loadaddr $ramdiskaddr $fdtaddr" |
760 | 759 | ||
761 | #define CONFIG_BOOTCOMMAND "run flash_self" | 760 | #define CONFIG_BOOTCOMMAND "run flash_self" |
762 | 761 | ||
763 | #endif /* __CONFIG_H */ | 762 | #endif /* __CONFIG_H */ |
764 | 763 |
include/configs/MPC8349ITX.h
1 | /* | 1 | /* |
2 | * Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved. | 2 | * Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved. |
3 | * | 3 | * |
4 | * See file CREDITS for list of people who contributed to this | 4 | * See file CREDITS for list of people who contributed to this |
5 | * project. | 5 | * project. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License as | 8 | * modify it under the terms of the GNU General Public License as |
9 | * published by the Free Software Foundation; either version 2 of | 9 | * published by the Free Software Foundation; either version 2 of |
10 | * the License, or (at your option) any later version. | 10 | * the License, or (at your option) any later version. |
11 | * | 11 | * |
12 | * This program is distributed in the hope that it will be useful, | 12 | * This program is distributed in the hope that it will be useful, |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
16 | * | 16 | * |
17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License |
18 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
20 | * MA 02111-1307 USA | 20 | * MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | 22 | ||
23 | /* | 23 | /* |
24 | MPC8349E-mITX and MPC8349E-mITX-GP board configuration file | 24 | MPC8349E-mITX and MPC8349E-mITX-GP board configuration file |
25 | 25 | ||
26 | Memory map: | 26 | Memory map: |
27 | 27 | ||
28 | 0x0000_0000-0x0FFF_FFFF DDR SDRAM (256 MB) | 28 | 0x0000_0000-0x0FFF_FFFF DDR SDRAM (256 MB) |
29 | 0x8000_0000-0x9FFF_FFFF PCI1 memory space (512 MB) | 29 | 0x8000_0000-0x9FFF_FFFF PCI1 memory space (512 MB) |
30 | 0xA000_0000-0xBFFF_FFFF PCI2 memory space (512 MB) | 30 | 0xA000_0000-0xBFFF_FFFF PCI2 memory space (512 MB) |
31 | 0xE000_0000-0xEFFF_FFFF IMMR (1 MB) | 31 | 0xE000_0000-0xEFFF_FFFF IMMR (1 MB) |
32 | 0xE200_0000-0xE2FF_FFFF PCI1 I/O space (16 MB) | 32 | 0xE200_0000-0xE2FF_FFFF PCI1 I/O space (16 MB) |
33 | 0xE300_0000-0xE3FF_FFFF PCI2 I/O space (16 MB) | 33 | 0xE300_0000-0xE3FF_FFFF PCI2 I/O space (16 MB) |
34 | 0xF000_0000-0xF000_FFFF Compact Flash (MPC8349E-mITX only) | 34 | 0xF000_0000-0xF000_FFFF Compact Flash (MPC8349E-mITX only) |
35 | 0xF001_0000-0xF001_FFFF Local bus expansion slot | 35 | 0xF001_0000-0xF001_FFFF Local bus expansion slot |
36 | 0xF800_0000-0xF801_FFFF Vitesse 7385 Parallel Interface (MPC8349E-mITX only) | 36 | 0xF800_0000-0xF801_FFFF Vitesse 7385 Parallel Interface (MPC8349E-mITX only) |
37 | 0xFE00_0000-0xFE7F_FFFF First 8MB bank of Flash memory | 37 | 0xFE00_0000-0xFE7F_FFFF First 8MB bank of Flash memory |
38 | 0xFE80_0000-0xFEFF_FFFF Second 8MB bank of Flash memory (MPC8349E-mITX only) | 38 | 0xFE80_0000-0xFEFF_FFFF Second 8MB bank of Flash memory (MPC8349E-mITX only) |
39 | 39 | ||
40 | I2C address list: | 40 | I2C address list: |
41 | Align. Board | 41 | Align. Board |
42 | Bus Addr Part No. Description Length Location | 42 | Bus Addr Part No. Description Length Location |
43 | ---------------------------------------------------------------- | 43 | ---------------------------------------------------------------- |
44 | I2C0 0x50 M24256-BWMN6P Board EEPROM 2 U64 | 44 | I2C0 0x50 M24256-BWMN6P Board EEPROM 2 U64 |
45 | 45 | ||
46 | I2C1 0x20 PCF8574 I2C Expander 0 U8 | 46 | I2C1 0x20 PCF8574 I2C Expander 0 U8 |
47 | I2C1 0x21 PCF8574 I2C Expander 0 U10 | 47 | I2C1 0x21 PCF8574 I2C Expander 0 U10 |
48 | I2C1 0x38 PCF8574A I2C Expander 0 U8 | 48 | I2C1 0x38 PCF8574A I2C Expander 0 U8 |
49 | I2C1 0x39 PCF8574A I2C Expander 0 U10 | 49 | I2C1 0x39 PCF8574A I2C Expander 0 U10 |
50 | I2C1 0x51 (DDR) DDR EEPROM 1 U1 | 50 | I2C1 0x51 (DDR) DDR EEPROM 1 U1 |
51 | I2C1 0x68 DS1339 RTC 1 U68 | 51 | I2C1 0x68 DS1339 RTC 1 U68 |
52 | 52 | ||
53 | Note that a given board has *either* a pair of 8574s or a pair of 8574As. | 53 | Note that a given board has *either* a pair of 8574s or a pair of 8574As. |
54 | */ | 54 | */ |
55 | 55 | ||
56 | #ifndef __CONFIG_H | 56 | #ifndef __CONFIG_H |
57 | #define __CONFIG_H | 57 | #define __CONFIG_H |
58 | 58 | ||
59 | #if (TEXT_BASE == 0xFE000000) | 59 | #if (TEXT_BASE == 0xFE000000) |
60 | #define CONFIG_SYS_LOWBOOT | 60 | #define CONFIG_SYS_LOWBOOT |
61 | #endif | 61 | #endif |
62 | 62 | ||
63 | /* | 63 | /* |
64 | * High Level Configuration Options | 64 | * High Level Configuration Options |
65 | */ | 65 | */ |
66 | #define CONFIG_MPC834X /* MPC834x family (8343, 8347, 8349) */ | 66 | #define CONFIG_MPC834X /* MPC834x family (8343, 8347, 8349) */ |
67 | #define CONFIG_MPC8349 /* MPC8349 specific */ | 67 | #define CONFIG_MPC8349 /* MPC8349 specific */ |
68 | 68 | ||
69 | #define CONFIG_SYS_IMMR 0xE0000000 /* The IMMR is relocated to here */ | 69 | #define CONFIG_SYS_IMMR 0xE0000000 /* The IMMR is relocated to here */ |
70 | 70 | ||
71 | #define CONFIG_MISC_INIT_F | 71 | #define CONFIG_MISC_INIT_F |
72 | #define CONFIG_MISC_INIT_R | 72 | #define CONFIG_MISC_INIT_R |
73 | 73 | ||
74 | /* | 74 | /* |
75 | * On-board devices | 75 | * On-board devices |
76 | */ | 76 | */ |
77 | 77 | ||
78 | #ifdef CONFIG_MPC8349ITX | 78 | #ifdef CONFIG_MPC8349ITX |
79 | #define CONFIG_COMPACT_FLASH /* The CF card interface on the back of the board */ | 79 | #define CONFIG_COMPACT_FLASH /* The CF card interface on the back of the board */ |
80 | #define CONFIG_VSC7385_ENET /* VSC7385 ethernet support */ | 80 | #define CONFIG_VSC7385_ENET /* VSC7385 ethernet support */ |
81 | #define CONFIG_SATA_SIL3114 /* SIL3114 SATA controller */ | 81 | #define CONFIG_SATA_SIL3114 /* SIL3114 SATA controller */ |
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | #define CONFIG_PCI | 84 | #define CONFIG_PCI |
85 | #define CONFIG_RTC_DS1337 | 85 | #define CONFIG_RTC_DS1337 |
86 | #define CONFIG_HARD_I2C | 86 | #define CONFIG_HARD_I2C |
87 | #define CONFIG_TSEC_ENET /* TSEC Ethernet support */ | 87 | #define CONFIG_TSEC_ENET /* TSEC Ethernet support */ |
88 | 88 | ||
89 | /* | 89 | /* |
90 | * Device configurations | 90 | * Device configurations |
91 | */ | 91 | */ |
92 | 92 | ||
93 | /* I2C */ | 93 | /* I2C */ |
94 | #ifdef CONFIG_HARD_I2C | 94 | #ifdef CONFIG_HARD_I2C |
95 | 95 | ||
96 | #define CONFIG_FSL_I2C | 96 | #define CONFIG_FSL_I2C |
97 | #define CONFIG_I2C_MULTI_BUS | 97 | #define CONFIG_I2C_MULTI_BUS |
98 | #define CONFIG_I2C_CMD_TREE | ||
99 | #define CONFIG_SYS_I2C_OFFSET 0x3000 | 98 | #define CONFIG_SYS_I2C_OFFSET 0x3000 |
100 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 | 99 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 |
101 | #define CONFIG_SYS_SPD_BUS_NUM 1 /* The I2C bus for SPD */ | 100 | #define CONFIG_SYS_SPD_BUS_NUM 1 /* The I2C bus for SPD */ |
102 | #define CONFIG_SYS_RTC_BUS_NUM 1 /* The I2C bus for RTC */ | 101 | #define CONFIG_SYS_RTC_BUS_NUM 1 /* The I2C bus for RTC */ |
103 | 102 | ||
104 | #define CONFIG_SYS_I2C_8574_ADDR1 0x20 /* I2C1, PCF8574 */ | 103 | #define CONFIG_SYS_I2C_8574_ADDR1 0x20 /* I2C1, PCF8574 */ |
105 | #define CONFIG_SYS_I2C_8574_ADDR2 0x21 /* I2C1, PCF8574 */ | 104 | #define CONFIG_SYS_I2C_8574_ADDR2 0x21 /* I2C1, PCF8574 */ |
106 | #define CONFIG_SYS_I2C_8574A_ADDR1 0x38 /* I2C1, PCF8574A */ | 105 | #define CONFIG_SYS_I2C_8574A_ADDR1 0x38 /* I2C1, PCF8574A */ |
107 | #define CONFIG_SYS_I2C_8574A_ADDR2 0x39 /* I2C1, PCF8574A */ | 106 | #define CONFIG_SYS_I2C_8574A_ADDR2 0x39 /* I2C1, PCF8574A */ |
108 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* I2C0, Board EEPROM */ | 107 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* I2C0, Board EEPROM */ |
109 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 /* I2C1, DS1339 RTC*/ | 108 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 /* I2C1, DS1339 RTC*/ |
110 | #define SPD_EEPROM_ADDRESS 0x51 /* I2C1, DDR */ | 109 | #define SPD_EEPROM_ADDRESS 0x51 /* I2C1, DDR */ |
111 | 110 | ||
112 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ | 111 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ |
113 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 112 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
114 | 113 | ||
115 | /* Don't probe these addresses: */ | 114 | /* Don't probe these addresses: */ |
116 | #define CONFIG_SYS_I2C_NOPROBES {{1, CONFIG_SYS_I2C_8574_ADDR1}, \ | 115 | #define CONFIG_SYS_I2C_NOPROBES {{1, CONFIG_SYS_I2C_8574_ADDR1}, \ |
117 | {1, CONFIG_SYS_I2C_8574_ADDR2}, \ | 116 | {1, CONFIG_SYS_I2C_8574_ADDR2}, \ |
118 | {1, CONFIG_SYS_I2C_8574A_ADDR1}, \ | 117 | {1, CONFIG_SYS_I2C_8574A_ADDR1}, \ |
119 | {1, CONFIG_SYS_I2C_8574A_ADDR2}} | 118 | {1, CONFIG_SYS_I2C_8574A_ADDR2}} |
120 | /* Bit definitions for the 8574[A] I2C expander */ | 119 | /* Bit definitions for the 8574[A] I2C expander */ |
121 | #define I2C_8574_REVISION 0x03 /* Board revision, 00=0.0, 01=0.1, 10=1.0 */ | 120 | #define I2C_8574_REVISION 0x03 /* Board revision, 00=0.0, 01=0.1, 10=1.0 */ |
122 | #define I2C_8574_CF 0x08 /* 1=Compact flash absent, 0=present */ | 121 | #define I2C_8574_CF 0x08 /* 1=Compact flash absent, 0=present */ |
123 | #define I2C_8574_MPCICLKRN 0x10 /* MiniPCI Clk Run */ | 122 | #define I2C_8574_MPCICLKRN 0x10 /* MiniPCI Clk Run */ |
124 | #define I2C_8574_PCI66 0x20 /* 0=33MHz PCI, 1=66MHz PCI */ | 123 | #define I2C_8574_PCI66 0x20 /* 0=33MHz PCI, 1=66MHz PCI */ |
125 | #define I2C_8574_FLASHSIDE 0x40 /* 0=Reset vector from U4, 1=from U7*/ | 124 | #define I2C_8574_FLASHSIDE 0x40 /* 0=Reset vector from U4, 1=from U7*/ |
126 | 125 | ||
127 | #undef CONFIG_SOFT_I2C | 126 | #undef CONFIG_SOFT_I2C |
128 | 127 | ||
129 | #endif | 128 | #endif |
130 | 129 | ||
131 | /* Compact Flash */ | 130 | /* Compact Flash */ |
132 | #ifdef CONFIG_COMPACT_FLASH | 131 | #ifdef CONFIG_COMPACT_FLASH |
133 | 132 | ||
134 | #define CONFIG_SYS_IDE_MAXBUS 1 | 133 | #define CONFIG_SYS_IDE_MAXBUS 1 |
135 | #define CONFIG_SYS_IDE_MAXDEVICE 1 | 134 | #define CONFIG_SYS_IDE_MAXDEVICE 1 |
136 | 135 | ||
137 | #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000 | 136 | #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000 |
138 | #define CONFIG_SYS_ATA_BASE_ADDR CONFIG_SYS_CF_BASE | 137 | #define CONFIG_SYS_ATA_BASE_ADDR CONFIG_SYS_CF_BASE |
139 | #define CONFIG_SYS_ATA_DATA_OFFSET 0x0000 | 138 | #define CONFIG_SYS_ATA_DATA_OFFSET 0x0000 |
140 | #define CONFIG_SYS_ATA_REG_OFFSET 0 | 139 | #define CONFIG_SYS_ATA_REG_OFFSET 0 |
141 | #define CONFIG_SYS_ATA_ALT_OFFSET 0x0200 | 140 | #define CONFIG_SYS_ATA_ALT_OFFSET 0x0200 |
142 | #define CONFIG_SYS_ATA_STRIDE 2 | 141 | #define CONFIG_SYS_ATA_STRIDE 2 |
143 | 142 | ||
144 | #define ATA_RESET_TIME 1 /* If a CF card is not inserted, time out quickly */ | 143 | #define ATA_RESET_TIME 1 /* If a CF card is not inserted, time out quickly */ |
145 | 144 | ||
146 | #endif | 145 | #endif |
147 | 146 | ||
148 | /* | 147 | /* |
149 | * SATA | 148 | * SATA |
150 | */ | 149 | */ |
151 | #ifdef CONFIG_SATA_SIL3114 | 150 | #ifdef CONFIG_SATA_SIL3114 |
152 | 151 | ||
153 | #define CONFIG_SYS_SATA_MAX_DEVICE 4 | 152 | #define CONFIG_SYS_SATA_MAX_DEVICE 4 |
154 | #define CONFIG_LIBATA | 153 | #define CONFIG_LIBATA |
155 | #define CONFIG_LBA48 | 154 | #define CONFIG_LBA48 |
156 | 155 | ||
157 | #endif | 156 | #endif |
158 | 157 | ||
159 | /* | 158 | /* |
160 | * DDR Setup | 159 | * DDR Setup |
161 | */ | 160 | */ |
162 | #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory*/ | 161 | #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory*/ |
163 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE | 162 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE |
164 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE | 163 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE |
165 | #define CONFIG_SYS_83XX_DDR_USES_CS0 | 164 | #define CONFIG_SYS_83XX_DDR_USES_CS0 |
166 | #define CONFIG_SYS_MEMTEST_START 0x1000 /* memtest region */ | 165 | #define CONFIG_SYS_MEMTEST_START 0x1000 /* memtest region */ |
167 | #define CONFIG_SYS_MEMTEST_END 0x2000 | 166 | #define CONFIG_SYS_MEMTEST_END 0x2000 |
168 | 167 | ||
169 | #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \ | 168 | #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \ |
170 | DDR_SDRAM_CLK_CNTL_CLK_ADJUST_075) | 169 | DDR_SDRAM_CLK_CNTL_CLK_ADJUST_075) |
171 | 170 | ||
172 | #define CONFIG_VERY_BIG_RAM | 171 | #define CONFIG_VERY_BIG_RAM |
173 | #define CONFIG_MAX_MEM_MAPPED ((phys_size_t)256 << 20) | 172 | #define CONFIG_MAX_MEM_MAPPED ((phys_size_t)256 << 20) |
174 | 173 | ||
175 | #ifdef CONFIG_HARD_I2C | 174 | #ifdef CONFIG_HARD_I2C |
176 | #define CONFIG_SPD_EEPROM /* use SPD EEPROM for DDR setup*/ | 175 | #define CONFIG_SPD_EEPROM /* use SPD EEPROM for DDR setup*/ |
177 | #endif | 176 | #endif |
178 | 177 | ||
179 | #ifndef CONFIG_SPD_EEPROM /* No SPD? Then manually set up DDR parameters */ | 178 | #ifndef CONFIG_SPD_EEPROM /* No SPD? Then manually set up DDR parameters */ |
180 | #define CONFIG_SYS_DDR_SIZE 256 /* Mb */ | 179 | #define CONFIG_SYS_DDR_SIZE 256 /* Mb */ |
181 | #define CONFIG_SYS_DDR_CONFIG (CSCONFIG_EN | CSCONFIG_ROW_BIT_13 | CSCONFIG_COL_BIT_10) | 180 | #define CONFIG_SYS_DDR_CONFIG (CSCONFIG_EN | CSCONFIG_ROW_BIT_13 | CSCONFIG_COL_BIT_10) |
182 | 181 | ||
183 | #define CONFIG_SYS_DDR_TIMING_1 0x26242321 | 182 | #define CONFIG_SYS_DDR_TIMING_1 0x26242321 |
184 | #define CONFIG_SYS_DDR_TIMING_2 0x00000800 /* P9-45, may need tuning */ | 183 | #define CONFIG_SYS_DDR_TIMING_2 0x00000800 /* P9-45, may need tuning */ |
185 | #endif | 184 | #endif |
186 | 185 | ||
187 | /* | 186 | /* |
188 | *Flash on the Local Bus | 187 | *Flash on the Local Bus |
189 | */ | 188 | */ |
190 | 189 | ||
191 | #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */ | 190 | #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */ |
192 | #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */ | 191 | #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */ |
193 | #define CONFIG_SYS_FLASH_BASE 0xFE000000 /* start of FLASH */ | 192 | #define CONFIG_SYS_FLASH_BASE 0xFE000000 /* start of FLASH */ |
194 | #define CONFIG_SYS_FLASH_EMPTY_INFO | 193 | #define CONFIG_SYS_FLASH_EMPTY_INFO |
195 | #define CONFIG_SYS_MAX_FLASH_SECT 135 /* 127 64KB sectors + 8 8KB sectors per device */ | 194 | #define CONFIG_SYS_MAX_FLASH_SECT 135 /* 127 64KB sectors + 8 8KB sectors per device */ |
196 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ | 195 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ |
197 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ | 196 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ |
198 | #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT | 197 | #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT |
199 | 198 | ||
200 | /* The ITX has two flash chips, but the ITX-GP has only one. To support both | 199 | /* The ITX has two flash chips, but the ITX-GP has only one. To support both |
201 | boards, we say we have two, but don't display a message if we find only one. */ | 200 | boards, we say we have two, but don't display a message if we find only one. */ |
202 | #define CONFIG_SYS_FLASH_QUIET_TEST | 201 | #define CONFIG_SYS_FLASH_QUIET_TEST |
203 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */ | 202 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */ |
204 | #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE + 0x800000} | 203 | #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE + 0x800000} |
205 | #define CONFIG_SYS_FLASH_SIZE 16 /* FLASH size in MB */ | 204 | #define CONFIG_SYS_FLASH_SIZE 16 /* FLASH size in MB */ |
206 | #define CONFIG_SYS_FLASH_SIZE_SHIFT 4 /* log2 of the above value */ | 205 | #define CONFIG_SYS_FLASH_SIZE_SHIFT 4 /* log2 of the above value */ |
207 | #define CONFIG_SYS_FLASH_PROTECTION 1 /* Use h/w Flash protection. */ | 206 | #define CONFIG_SYS_FLASH_PROTECTION 1 /* Use h/w Flash protection. */ |
208 | 207 | ||
209 | /* Vitesse 7385 */ | 208 | /* Vitesse 7385 */ |
210 | 209 | ||
211 | #ifdef CONFIG_VSC7385_ENET | 210 | #ifdef CONFIG_VSC7385_ENET |
212 | 211 | ||
213 | #define CONFIG_TSEC2 | 212 | #define CONFIG_TSEC2 |
214 | 213 | ||
215 | /* The flash address and size of the VSC7385 firmware image */ | 214 | /* The flash address and size of the VSC7385 firmware image */ |
216 | #define CONFIG_VSC7385_IMAGE 0xFEFFE000 | 215 | #define CONFIG_VSC7385_IMAGE 0xFEFFE000 |
217 | #define CONFIG_VSC7385_IMAGE_SIZE 8192 | 216 | #define CONFIG_VSC7385_IMAGE_SIZE 8192 |
218 | 217 | ||
219 | #endif | 218 | #endif |
220 | 219 | ||
221 | /* | 220 | /* |
222 | * BRx, ORx, LBLAWBARx, and LBLAWARx | 221 | * BRx, ORx, LBLAWBARx, and LBLAWARx |
223 | */ | 222 | */ |
224 | 223 | ||
225 | /* Flash */ | 224 | /* Flash */ |
226 | 225 | ||
227 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | BR_PS_16 | BR_V) | 226 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | BR_PS_16 | BR_V) |
228 | #define CONFIG_SYS_OR0_PRELIM ((~(CONFIG_SYS_FLASH_SIZE - 1) << 20) | OR_UPM_XAM | \ | 227 | #define CONFIG_SYS_OR0_PRELIM ((~(CONFIG_SYS_FLASH_SIZE - 1) << 20) | OR_UPM_XAM | \ |
229 | OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | OR_GPCM_XACS | OR_GPCM_SCY_15 | \ | 228 | OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | OR_GPCM_XACS | OR_GPCM_SCY_15 | \ |
230 | OR_GPCM_TRLX | OR_GPCM_EHTR | OR_GPCM_EAD) | 229 | OR_GPCM_TRLX | OR_GPCM_EHTR | OR_GPCM_EAD) |
231 | #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE | 230 | #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE |
232 | #define CONFIG_SYS_LBLAWAR0_PRELIM (LBLAWAR_EN | (0x13 + CONFIG_SYS_FLASH_SIZE_SHIFT)) | 231 | #define CONFIG_SYS_LBLAWAR0_PRELIM (LBLAWAR_EN | (0x13 + CONFIG_SYS_FLASH_SIZE_SHIFT)) |
233 | 232 | ||
234 | /* Vitesse 7385 */ | 233 | /* Vitesse 7385 */ |
235 | 234 | ||
236 | #define CONFIG_SYS_VSC7385_BASE 0xF8000000 | 235 | #define CONFIG_SYS_VSC7385_BASE 0xF8000000 |
237 | 236 | ||
238 | #ifdef CONFIG_VSC7385_ENET | 237 | #ifdef CONFIG_VSC7385_ENET |
239 | 238 | ||
240 | #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_VSC7385_BASE | BR_PS_8 | BR_V) | 239 | #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_VSC7385_BASE | BR_PS_8 | BR_V) |
241 | #define CONFIG_SYS_OR1_PRELIM (OR_AM_128KB | OR_GPCM_CSNT | OR_GPCM_XACS | \ | 240 | #define CONFIG_SYS_OR1_PRELIM (OR_AM_128KB | OR_GPCM_CSNT | OR_GPCM_XACS | \ |
242 | OR_GPCM_SCY_15 | OR_GPCM_SETA | OR_GPCM_TRLX | \ | 241 | OR_GPCM_SCY_15 | OR_GPCM_SETA | OR_GPCM_TRLX | \ |
243 | OR_GPCM_EHTR | OR_GPCM_EAD) | 242 | OR_GPCM_EHTR | OR_GPCM_EAD) |
244 | 243 | ||
245 | #define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_VSC7385_BASE | 244 | #define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_VSC7385_BASE |
246 | #define CONFIG_SYS_LBLAWAR1_PRELIM (LBLAWAR_EN | LBLAWAR_128KB) | 245 | #define CONFIG_SYS_LBLAWAR1_PRELIM (LBLAWAR_EN | LBLAWAR_128KB) |
247 | 246 | ||
248 | #endif | 247 | #endif |
249 | 248 | ||
250 | /* LED */ | 249 | /* LED */ |
251 | 250 | ||
252 | #define CONFIG_SYS_LED_BASE 0xF9000000 | 251 | #define CONFIG_SYS_LED_BASE 0xF9000000 |
253 | #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_LED_BASE | BR_PS_8 | BR_V) | 252 | #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_LED_BASE | BR_PS_8 | BR_V) |
254 | #define CONFIG_SYS_OR2_PRELIM (OR_AM_2MB | OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | \ | 253 | #define CONFIG_SYS_OR2_PRELIM (OR_AM_2MB | OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | \ |
255 | OR_GPCM_XACS | OR_GPCM_SCY_9 | OR_GPCM_TRLX | \ | 254 | OR_GPCM_XACS | OR_GPCM_SCY_9 | OR_GPCM_TRLX | \ |
256 | OR_GPCM_EHTR | OR_GPCM_EAD) | 255 | OR_GPCM_EHTR | OR_GPCM_EAD) |
257 | 256 | ||
258 | /* Compact Flash */ | 257 | /* Compact Flash */ |
259 | 258 | ||
260 | #ifdef CONFIG_COMPACT_FLASH | 259 | #ifdef CONFIG_COMPACT_FLASH |
261 | 260 | ||
262 | #define CONFIG_SYS_CF_BASE 0xF0000000 | 261 | #define CONFIG_SYS_CF_BASE 0xF0000000 |
263 | 262 | ||
264 | #define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_CF_BASE | BR_PS_16 | BR_MS_UPMA | BR_V) | 263 | #define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_CF_BASE | BR_PS_16 | BR_MS_UPMA | BR_V) |
265 | #define CONFIG_SYS_OR3_PRELIM (OR_UPM_AM | OR_UPM_BI) | 264 | #define CONFIG_SYS_OR3_PRELIM (OR_UPM_AM | OR_UPM_BI) |
266 | 265 | ||
267 | #define CONFIG_SYS_LBLAWBAR3_PRELIM CONFIG_SYS_CF_BASE | 266 | #define CONFIG_SYS_LBLAWBAR3_PRELIM CONFIG_SYS_CF_BASE |
268 | #define CONFIG_SYS_LBLAWAR3_PRELIM (LBLAWAR_EN | LBLAWAR_64KB) | 267 | #define CONFIG_SYS_LBLAWAR3_PRELIM (LBLAWAR_EN | LBLAWAR_64KB) |
269 | 268 | ||
270 | #endif | 269 | #endif |
271 | 270 | ||
272 | /* | 271 | /* |
273 | * U-Boot memory configuration | 272 | * U-Boot memory configuration |
274 | */ | 273 | */ |
275 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ | 274 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ |
276 | 275 | ||
277 | #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE) | 276 | #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE) |
278 | #define CONFIG_SYS_RAMBOOT | 277 | #define CONFIG_SYS_RAMBOOT |
279 | #else | 278 | #else |
280 | #undef CONFIG_SYS_RAMBOOT | 279 | #undef CONFIG_SYS_RAMBOOT |
281 | #endif | 280 | #endif |
282 | 281 | ||
283 | #define CONFIG_SYS_INIT_RAM_LOCK | 282 | #define CONFIG_SYS_INIT_RAM_LOCK |
284 | #define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 /* Initial RAM address */ | 283 | #define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 /* Initial RAM address */ |
285 | #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM*/ | 284 | #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM*/ |
286 | 285 | ||
287 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ | 286 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ |
288 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 287 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
289 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET | 288 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
290 | 289 | ||
291 | /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */ | 290 | /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */ |
292 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ | 291 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ |
293 | #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserved for malloc */ | 292 | #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserved for malloc */ |
294 | 293 | ||
295 | /* | 294 | /* |
296 | * Local Bus LCRR and LBCR regs | 295 | * Local Bus LCRR and LBCR regs |
297 | * LCRR: DLL bypass, Clock divider is 4 | 296 | * LCRR: DLL bypass, Clock divider is 4 |
298 | * External Local Bus rate is | 297 | * External Local Bus rate is |
299 | * CLKIN * HRCWL_CSB_TO_CLKIN / HRCWL_LCL_BUS_TO_SCB_CLK / LCRR_CLKDIV | 298 | * CLKIN * HRCWL_CSB_TO_CLKIN / HRCWL_LCL_BUS_TO_SCB_CLK / LCRR_CLKDIV |
300 | */ | 299 | */ |
301 | #define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_CLKDIV_4) | 300 | #define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_CLKDIV_4) |
302 | #define CONFIG_SYS_LBC_LBCR 0x00000000 | 301 | #define CONFIG_SYS_LBC_LBCR 0x00000000 |
303 | 302 | ||
304 | #define CONFIG_SYS_LBC_LSRT 0x32000000 /* LB sdram refresh timer, about 6us */ | 303 | #define CONFIG_SYS_LBC_LSRT 0x32000000 /* LB sdram refresh timer, about 6us */ |
305 | #define CONFIG_SYS_LBC_MRTPR 0x20000000 /* LB refresh timer prescal, 266MHz/32*/ | 304 | #define CONFIG_SYS_LBC_MRTPR 0x20000000 /* LB refresh timer prescal, 266MHz/32*/ |
306 | 305 | ||
307 | /* | 306 | /* |
308 | * Serial Port | 307 | * Serial Port |
309 | */ | 308 | */ |
310 | #define CONFIG_CONS_INDEX 1 | 309 | #define CONFIG_CONS_INDEX 1 |
311 | #undef CONFIG_SERIAL_SOFTWARE_FIFO | 310 | #undef CONFIG_SERIAL_SOFTWARE_FIFO |
312 | #define CONFIG_SYS_NS16550 | 311 | #define CONFIG_SYS_NS16550 |
313 | #define CONFIG_SYS_NS16550_SERIAL | 312 | #define CONFIG_SYS_NS16550_SERIAL |
314 | #define CONFIG_SYS_NS16550_REG_SIZE 1 | 313 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
315 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) | 314 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) |
316 | 315 | ||
317 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 316 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
318 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200} | 317 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200} |
319 | 318 | ||
320 | #define CONFIG_CONSOLE ttyS0 | 319 | #define CONFIG_CONSOLE ttyS0 |
321 | #define CONFIG_BAUDRATE 115200 | 320 | #define CONFIG_BAUDRATE 115200 |
322 | 321 | ||
323 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR + 0x4500) | 322 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR + 0x4500) |
324 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR + 0x4600) | 323 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR + 0x4600) |
325 | 324 | ||
326 | /* pass open firmware flat tree */ | 325 | /* pass open firmware flat tree */ |
327 | #define CONFIG_OF_LIBFDT 1 | 326 | #define CONFIG_OF_LIBFDT 1 |
328 | #define CONFIG_OF_BOARD_SETUP 1 | 327 | #define CONFIG_OF_BOARD_SETUP 1 |
329 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 | 328 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 |
330 | 329 | ||
331 | /* | 330 | /* |
332 | * PCI | 331 | * PCI |
333 | */ | 332 | */ |
334 | #ifdef CONFIG_PCI | 333 | #ifdef CONFIG_PCI |
335 | 334 | ||
336 | #define CONFIG_MPC83XX_PCI2 | 335 | #define CONFIG_MPC83XX_PCI2 |
337 | 336 | ||
338 | /* | 337 | /* |
339 | * General PCI | 338 | * General PCI |
340 | * Addresses are mapped 1-1. | 339 | * Addresses are mapped 1-1. |
341 | */ | 340 | */ |
342 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 | 341 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 |
343 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE | 342 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE |
344 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */ | 343 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */ |
345 | #define CONFIG_SYS_PCI1_MMIO_BASE (CONFIG_SYS_PCI1_MEM_BASE + CONFIG_SYS_PCI1_MEM_SIZE) | 344 | #define CONFIG_SYS_PCI1_MMIO_BASE (CONFIG_SYS_PCI1_MEM_BASE + CONFIG_SYS_PCI1_MEM_SIZE) |
346 | #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE | 345 | #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE |
347 | #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */ | 346 | #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */ |
348 | #define CONFIG_SYS_PCI1_IO_BASE 0x00000000 | 347 | #define CONFIG_SYS_PCI1_IO_BASE 0x00000000 |
349 | #define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000 | 348 | #define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000 |
350 | #define CONFIG_SYS_PCI1_IO_SIZE 0x01000000 /* 16M */ | 349 | #define CONFIG_SYS_PCI1_IO_SIZE 0x01000000 /* 16M */ |
351 | 350 | ||
352 | #ifdef CONFIG_MPC83XX_PCI2 | 351 | #ifdef CONFIG_MPC83XX_PCI2 |
353 | #define CONFIG_SYS_PCI2_MEM_BASE (CONFIG_SYS_PCI1_MMIO_BASE + CONFIG_SYS_PCI1_MMIO_SIZE) | 352 | #define CONFIG_SYS_PCI2_MEM_BASE (CONFIG_SYS_PCI1_MMIO_BASE + CONFIG_SYS_PCI1_MMIO_SIZE) |
354 | #define CONFIG_SYS_PCI2_MEM_PHYS CONFIG_SYS_PCI2_MEM_BASE | 353 | #define CONFIG_SYS_PCI2_MEM_PHYS CONFIG_SYS_PCI2_MEM_BASE |
355 | #define CONFIG_SYS_PCI2_MEM_SIZE 0x10000000 /* 256M */ | 354 | #define CONFIG_SYS_PCI2_MEM_SIZE 0x10000000 /* 256M */ |
356 | #define CONFIG_SYS_PCI2_MMIO_BASE (CONFIG_SYS_PCI2_MEM_BASE + CONFIG_SYS_PCI2_MEM_SIZE) | 355 | #define CONFIG_SYS_PCI2_MMIO_BASE (CONFIG_SYS_PCI2_MEM_BASE + CONFIG_SYS_PCI2_MEM_SIZE) |
357 | #define CONFIG_SYS_PCI2_MMIO_PHYS CONFIG_SYS_PCI2_MMIO_BASE | 356 | #define CONFIG_SYS_PCI2_MMIO_PHYS CONFIG_SYS_PCI2_MMIO_BASE |
358 | #define CONFIG_SYS_PCI2_MMIO_SIZE 0x10000000 /* 256M */ | 357 | #define CONFIG_SYS_PCI2_MMIO_SIZE 0x10000000 /* 256M */ |
359 | #define CONFIG_SYS_PCI2_IO_BASE 0x00000000 | 358 | #define CONFIG_SYS_PCI2_IO_BASE 0x00000000 |
360 | #define CONFIG_SYS_PCI2_IO_PHYS (CONFIG_SYS_PCI1_IO_PHYS + CONFIG_SYS_PCI1_IO_SIZE) | 359 | #define CONFIG_SYS_PCI2_IO_PHYS (CONFIG_SYS_PCI1_IO_PHYS + CONFIG_SYS_PCI1_IO_SIZE) |
361 | #define CONFIG_SYS_PCI2_IO_SIZE 0x01000000 /* 16M */ | 360 | #define CONFIG_SYS_PCI2_IO_SIZE 0x01000000 /* 16M */ |
362 | #endif | 361 | #endif |
363 | 362 | ||
364 | #define _IO_BASE 0x00000000 /* points to PCI I/O space */ | 363 | #define _IO_BASE 0x00000000 /* points to PCI I/O space */ |
365 | 364 | ||
366 | #define CONFIG_NET_MULTI | 365 | #define CONFIG_NET_MULTI |
367 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ | 366 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ |
368 | 367 | ||
369 | #ifdef CONFIG_RTL8139 | 368 | #ifdef CONFIG_RTL8139 |
370 | /* This macro is used by RTL8139 but not defined in PPC architecture */ | 369 | /* This macro is used by RTL8139 but not defined in PPC architecture */ |
371 | #define KSEG1ADDR(x) (x) | 370 | #define KSEG1ADDR(x) (x) |
372 | #endif | 371 | #endif |
373 | 372 | ||
374 | #ifndef CONFIG_PCI_PNP | 373 | #ifndef CONFIG_PCI_PNP |
375 | #define PCI_ENET0_IOADDR 0x00000000 | 374 | #define PCI_ENET0_IOADDR 0x00000000 |
376 | #define PCI_ENET0_MEMADDR CONFIG_SYS_PCI2_MEM_BASE | 375 | #define PCI_ENET0_MEMADDR CONFIG_SYS_PCI2_MEM_BASE |
377 | #define PCI_IDSEL_NUMBER 0x0f /* IDSEL = AD15 */ | 376 | #define PCI_IDSEL_NUMBER 0x0f /* IDSEL = AD15 */ |
378 | #endif | 377 | #endif |
379 | 378 | ||
380 | #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ | 379 | #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ |
381 | 380 | ||
382 | #endif | 381 | #endif |
383 | 382 | ||
384 | #define PCI_66M | 383 | #define PCI_66M |
385 | #ifdef PCI_66M | 384 | #ifdef PCI_66M |
386 | #define CONFIG_83XX_CLKIN 66666666 /* in Hz */ | 385 | #define CONFIG_83XX_CLKIN 66666666 /* in Hz */ |
387 | #else | 386 | #else |
388 | #define CONFIG_83XX_CLKIN 33333333 /* in Hz */ | 387 | #define CONFIG_83XX_CLKIN 33333333 /* in Hz */ |
389 | #endif | 388 | #endif |
390 | 389 | ||
391 | /* TSEC */ | 390 | /* TSEC */ |
392 | 391 | ||
393 | #ifdef CONFIG_TSEC_ENET | 392 | #ifdef CONFIG_TSEC_ENET |
394 | 393 | ||
395 | #define CONFIG_NET_MULTI | 394 | #define CONFIG_NET_MULTI |
396 | #define CONFIG_MII | 395 | #define CONFIG_MII |
397 | #define CONFIG_PHY_GIGE /* In case CONFIG_CMD_MII is specified */ | 396 | #define CONFIG_PHY_GIGE /* In case CONFIG_CMD_MII is specified */ |
398 | 397 | ||
399 | #define CONFIG_TSEC1 | 398 | #define CONFIG_TSEC1 |
400 | 399 | ||
401 | #ifdef CONFIG_TSEC1 | 400 | #ifdef CONFIG_TSEC1 |
402 | #define CONFIG_HAS_ETH0 | 401 | #define CONFIG_HAS_ETH0 |
403 | #define CONFIG_TSEC1_NAME "TSEC0" | 402 | #define CONFIG_TSEC1_NAME "TSEC0" |
404 | #define CONFIG_SYS_TSEC1_OFFSET 0x24000 | 403 | #define CONFIG_SYS_TSEC1_OFFSET 0x24000 |
405 | #define TSEC1_PHY_ADDR 0x1c /* VSC8201 uses address 0x1c */ | 404 | #define TSEC1_PHY_ADDR 0x1c /* VSC8201 uses address 0x1c */ |
406 | #define TSEC1_PHYIDX 0 | 405 | #define TSEC1_PHYIDX 0 |
407 | #define TSEC1_FLAGS TSEC_GIGABIT | 406 | #define TSEC1_FLAGS TSEC_GIGABIT |
408 | #endif | 407 | #endif |
409 | 408 | ||
410 | #ifdef CONFIG_TSEC2 | 409 | #ifdef CONFIG_TSEC2 |
411 | #define CONFIG_HAS_ETH1 | 410 | #define CONFIG_HAS_ETH1 |
412 | #define CONFIG_TSEC2_NAME "TSEC1" | 411 | #define CONFIG_TSEC2_NAME "TSEC1" |
413 | #define CONFIG_SYS_TSEC2_OFFSET 0x25000 | 412 | #define CONFIG_SYS_TSEC2_OFFSET 0x25000 |
414 | 413 | ||
415 | #define TSEC2_PHY_ADDR 4 | 414 | #define TSEC2_PHY_ADDR 4 |
416 | #define TSEC2_PHYIDX 0 | 415 | #define TSEC2_PHYIDX 0 |
417 | #define TSEC2_FLAGS TSEC_GIGABIT | 416 | #define TSEC2_FLAGS TSEC_GIGABIT |
418 | #endif | 417 | #endif |
419 | 418 | ||
420 | #define CONFIG_ETHPRIME "Freescale TSEC" | 419 | #define CONFIG_ETHPRIME "Freescale TSEC" |
421 | 420 | ||
422 | #endif | 421 | #endif |
423 | 422 | ||
424 | /* | 423 | /* |
425 | * Environment | 424 | * Environment |
426 | */ | 425 | */ |
427 | #define CONFIG_ENV_OVERWRITE | 426 | #define CONFIG_ENV_OVERWRITE |
428 | 427 | ||
429 | #ifndef CONFIG_SYS_RAMBOOT | 428 | #ifndef CONFIG_SYS_RAMBOOT |
430 | #define CONFIG_ENV_IS_IN_FLASH | 429 | #define CONFIG_ENV_IS_IN_FLASH |
431 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) | 430 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) |
432 | #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64K (one sector) for environment */ | 431 | #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64K (one sector) for environment */ |
433 | #define CONFIG_ENV_SIZE 0x2000 | 432 | #define CONFIG_ENV_SIZE 0x2000 |
434 | #else | 433 | #else |
435 | #define CONFIG_SYS_NO_FLASH /* Flash is not usable now */ | 434 | #define CONFIG_SYS_NO_FLASH /* Flash is not usable now */ |
436 | #undef CONFIG_FLASH_CFI_DRIVER | 435 | #undef CONFIG_FLASH_CFI_DRIVER |
437 | #define CONFIG_ENV_IS_NOWHERE /* Store ENV in memory only */ | 436 | #define CONFIG_ENV_IS_NOWHERE /* Store ENV in memory only */ |
438 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000) | 437 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000) |
439 | #define CONFIG_ENV_SIZE 0x2000 | 438 | #define CONFIG_ENV_SIZE 0x2000 |
440 | #endif | 439 | #endif |
441 | 440 | ||
442 | #define CONFIG_LOADS_ECHO /* echo on for serial download */ | 441 | #define CONFIG_LOADS_ECHO /* echo on for serial download */ |
443 | #define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */ | 442 | #define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */ |
444 | 443 | ||
445 | /* | 444 | /* |
446 | * BOOTP options | 445 | * BOOTP options |
447 | */ | 446 | */ |
448 | #define CONFIG_BOOTP_BOOTFILESIZE | 447 | #define CONFIG_BOOTP_BOOTFILESIZE |
449 | #define CONFIG_BOOTP_BOOTPATH | 448 | #define CONFIG_BOOTP_BOOTPATH |
450 | #define CONFIG_BOOTP_GATEWAY | 449 | #define CONFIG_BOOTP_GATEWAY |
451 | #define CONFIG_BOOTP_HOSTNAME | 450 | #define CONFIG_BOOTP_HOSTNAME |
452 | 451 | ||
453 | 452 | ||
454 | /* | 453 | /* |
455 | * Command line configuration. | 454 | * Command line configuration. |
456 | */ | 455 | */ |
457 | #include <config_cmd_default.h> | 456 | #include <config_cmd_default.h> |
458 | 457 | ||
459 | #define CONFIG_CMD_CACHE | 458 | #define CONFIG_CMD_CACHE |
460 | #define CONFIG_CMD_DATE | 459 | #define CONFIG_CMD_DATE |
461 | #define CONFIG_CMD_IRQ | 460 | #define CONFIG_CMD_IRQ |
462 | #define CONFIG_CMD_NET | 461 | #define CONFIG_CMD_NET |
463 | #define CONFIG_CMD_PING | 462 | #define CONFIG_CMD_PING |
464 | #define CONFIG_CMD_DHCP | 463 | #define CONFIG_CMD_DHCP |
465 | #define CONFIG_CMD_SDRAM | 464 | #define CONFIG_CMD_SDRAM |
466 | 465 | ||
467 | #if defined(CONFIG_COMPACT_FLASH) || defined(CONFIG_SATA_SIL3114) | 466 | #if defined(CONFIG_COMPACT_FLASH) || defined(CONFIG_SATA_SIL3114) |
468 | #define CONFIG_DOS_PARTITION | 467 | #define CONFIG_DOS_PARTITION |
469 | #define CONFIG_CMD_FAT | 468 | #define CONFIG_CMD_FAT |
470 | #endif | 469 | #endif |
471 | 470 | ||
472 | #ifdef CONFIG_COMPACT_FLASH | 471 | #ifdef CONFIG_COMPACT_FLASH |
473 | #define CONFIG_CMD_IDE | 472 | #define CONFIG_CMD_IDE |
474 | #endif | 473 | #endif |
475 | 474 | ||
476 | #ifdef CONFIG_SATA_SIL3114 | 475 | #ifdef CONFIG_SATA_SIL3114 |
477 | #define CONFIG_CMD_SATA | 476 | #define CONFIG_CMD_SATA |
478 | #define CONFIG_CMD_EXT2 | 477 | #define CONFIG_CMD_EXT2 |
479 | #endif | 478 | #endif |
480 | 479 | ||
481 | #ifdef CONFIG_PCI | 480 | #ifdef CONFIG_PCI |
482 | #define CONFIG_CMD_PCI | 481 | #define CONFIG_CMD_PCI |
483 | #endif | 482 | #endif |
484 | 483 | ||
485 | #ifdef CONFIG_HARD_I2C | 484 | #ifdef CONFIG_HARD_I2C |
486 | #define CONFIG_CMD_I2C | 485 | #define CONFIG_CMD_I2C |
487 | #endif | 486 | #endif |
488 | 487 | ||
489 | /* Watchdog */ | 488 | /* Watchdog */ |
490 | #undef CONFIG_WATCHDOG /* watchdog disabled */ | 489 | #undef CONFIG_WATCHDOG /* watchdog disabled */ |
491 | 490 | ||
492 | /* | 491 | /* |
493 | * Miscellaneous configurable options | 492 | * Miscellaneous configurable options |
494 | */ | 493 | */ |
495 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 494 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
496 | #define CONFIG_CMDLINE_EDITING /* Command-line editing */ | 495 | #define CONFIG_CMDLINE_EDITING /* Command-line editing */ |
497 | #define CONFIG_SYS_HUSH_PARSER /* Use the HUSH parser */ | 496 | #define CONFIG_SYS_HUSH_PARSER /* Use the HUSH parser */ |
498 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | 497 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
499 | 498 | ||
500 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ | 499 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ |
501 | #define CONFIG_LOADADDR 500000 /* default location for tftp and bootm */ | 500 | #define CONFIG_LOADADDR 500000 /* default location for tftp and bootm */ |
502 | 501 | ||
503 | #ifdef CONFIG_MPC8349ITX | 502 | #ifdef CONFIG_MPC8349ITX |
504 | #define CONFIG_SYS_PROMPT "MPC8349E-mITX> " /* Monitor Command Prompt */ | 503 | #define CONFIG_SYS_PROMPT "MPC8349E-mITX> " /* Monitor Command Prompt */ |
505 | #else | 504 | #else |
506 | #define CONFIG_SYS_PROMPT "MPC8349E-mITX-GP> " /* Monitor Command Prompt */ | 505 | #define CONFIG_SYS_PROMPT "MPC8349E-mITX-GP> " /* Monitor Command Prompt */ |
507 | #endif | 506 | #endif |
508 | 507 | ||
509 | #if defined(CONFIG_CMD_KGDB) | 508 | #if defined(CONFIG_CMD_KGDB) |
510 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ | 509 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
511 | #else | 510 | #else |
512 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | 511 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
513 | #endif | 512 | #endif |
514 | 513 | ||
515 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) /* Print Buffer Size */ | 514 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) /* Print Buffer Size */ |
516 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 515 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
517 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | 516 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
518 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ | 517 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ |
519 | 518 | ||
520 | /* | 519 | /* |
521 | * For booting Linux, the board info and command line data | 520 | * For booting Linux, the board info and command line data |
522 | * have to be in the first 8 MB of memory, since this is | 521 | * have to be in the first 8 MB of memory, since this is |
523 | * the maximum mapped by the Linux kernel during initialization. | 522 | * the maximum mapped by the Linux kernel during initialization. |
524 | */ | 523 | */ |
525 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ | 524 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ |
526 | 525 | ||
527 | #define CONFIG_SYS_HRCW_LOW (\ | 526 | #define CONFIG_SYS_HRCW_LOW (\ |
528 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ | 527 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ |
529 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ | 528 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ |
530 | HRCWL_CSB_TO_CLKIN_4X1 |\ | 529 | HRCWL_CSB_TO_CLKIN_4X1 |\ |
531 | HRCWL_VCO_1X2 |\ | 530 | HRCWL_VCO_1X2 |\ |
532 | HRCWL_CORE_TO_CSB_2X1) | 531 | HRCWL_CORE_TO_CSB_2X1) |
533 | 532 | ||
534 | #ifdef CONFIG_SYS_LOWBOOT | 533 | #ifdef CONFIG_SYS_LOWBOOT |
535 | #define CONFIG_SYS_HRCW_HIGH (\ | 534 | #define CONFIG_SYS_HRCW_HIGH (\ |
536 | HRCWH_PCI_HOST |\ | 535 | HRCWH_PCI_HOST |\ |
537 | HRCWH_32_BIT_PCI |\ | 536 | HRCWH_32_BIT_PCI |\ |
538 | HRCWH_PCI1_ARBITER_ENABLE |\ | 537 | HRCWH_PCI1_ARBITER_ENABLE |\ |
539 | HRCWH_PCI2_ARBITER_ENABLE |\ | 538 | HRCWH_PCI2_ARBITER_ENABLE |\ |
540 | HRCWH_CORE_ENABLE |\ | 539 | HRCWH_CORE_ENABLE |\ |
541 | HRCWH_FROM_0X00000100 |\ | 540 | HRCWH_FROM_0X00000100 |\ |
542 | HRCWH_BOOTSEQ_DISABLE |\ | 541 | HRCWH_BOOTSEQ_DISABLE |\ |
543 | HRCWH_SW_WATCHDOG_DISABLE |\ | 542 | HRCWH_SW_WATCHDOG_DISABLE |\ |
544 | HRCWH_ROM_LOC_LOCAL_16BIT |\ | 543 | HRCWH_ROM_LOC_LOCAL_16BIT |\ |
545 | HRCWH_TSEC1M_IN_GMII |\ | 544 | HRCWH_TSEC1M_IN_GMII |\ |
546 | HRCWH_TSEC2M_IN_GMII ) | 545 | HRCWH_TSEC2M_IN_GMII ) |
547 | #else | 546 | #else |
548 | #define CONFIG_SYS_HRCW_HIGH (\ | 547 | #define CONFIG_SYS_HRCW_HIGH (\ |
549 | HRCWH_PCI_HOST |\ | 548 | HRCWH_PCI_HOST |\ |
550 | HRCWH_32_BIT_PCI |\ | 549 | HRCWH_32_BIT_PCI |\ |
551 | HRCWH_PCI1_ARBITER_ENABLE |\ | 550 | HRCWH_PCI1_ARBITER_ENABLE |\ |
552 | HRCWH_PCI2_ARBITER_ENABLE |\ | 551 | HRCWH_PCI2_ARBITER_ENABLE |\ |
553 | HRCWH_CORE_ENABLE |\ | 552 | HRCWH_CORE_ENABLE |\ |
554 | HRCWH_FROM_0XFFF00100 |\ | 553 | HRCWH_FROM_0XFFF00100 |\ |
555 | HRCWH_BOOTSEQ_DISABLE |\ | 554 | HRCWH_BOOTSEQ_DISABLE |\ |
556 | HRCWH_SW_WATCHDOG_DISABLE |\ | 555 | HRCWH_SW_WATCHDOG_DISABLE |\ |
557 | HRCWH_ROM_LOC_LOCAL_16BIT |\ | 556 | HRCWH_ROM_LOC_LOCAL_16BIT |\ |
558 | HRCWH_TSEC1M_IN_GMII |\ | 557 | HRCWH_TSEC1M_IN_GMII |\ |
559 | HRCWH_TSEC2M_IN_GMII ) | 558 | HRCWH_TSEC2M_IN_GMII ) |
560 | #endif | 559 | #endif |
561 | 560 | ||
562 | /* | 561 | /* |
563 | * System performance | 562 | * System performance |
564 | */ | 563 | */ |
565 | #define CONFIG_SYS_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */ | 564 | #define CONFIG_SYS_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */ |
566 | #define CONFIG_SYS_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */ | 565 | #define CONFIG_SYS_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */ |
567 | #define CONFIG_SYS_SPCR_TSEC1EP 3 /* TSEC1 emergency priority (0-3) */ | 566 | #define CONFIG_SYS_SPCR_TSEC1EP 3 /* TSEC1 emergency priority (0-3) */ |
568 | #define CONFIG_SYS_SPCR_TSEC2EP 3 /* TSEC2 emergency priority (0-3) */ | 567 | #define CONFIG_SYS_SPCR_TSEC2EP 3 /* TSEC2 emergency priority (0-3) */ |
569 | #define CONFIG_SYS_SCCR_TSEC1CM 1 /* TSEC1 clock mode (0-3) */ | 568 | #define CONFIG_SYS_SCCR_TSEC1CM 1 /* TSEC1 clock mode (0-3) */ |
570 | #define CONFIG_SYS_SCCR_TSEC2CM 1 /* TSEC2 & I2C0 clock mode (0-3) */ | 569 | #define CONFIG_SYS_SCCR_TSEC2CM 1 /* TSEC2 & I2C0 clock mode (0-3) */ |
571 | 570 | ||
572 | /* | 571 | /* |
573 | * System IO Config | 572 | * System IO Config |
574 | */ | 573 | */ |
575 | #define CONFIG_SYS_SICRH SICRH_TSOBI1 /* Needed for gigabit to work on TSEC 1 */ | 574 | #define CONFIG_SYS_SICRH SICRH_TSOBI1 /* Needed for gigabit to work on TSEC 1 */ |
576 | #define CONFIG_SYS_SICRL (SICRL_LDP_A | SICRL_USB1) | 575 | #define CONFIG_SYS_SICRL (SICRL_LDP_A | SICRL_USB1) |
577 | 576 | ||
578 | #define CONFIG_SYS_HID0_INIT 0x000000000 | 577 | #define CONFIG_SYS_HID0_INIT 0x000000000 |
579 | #define CONFIG_SYS_HID0_FINAL CONFIG_SYS_HID0_INIT | 578 | #define CONFIG_SYS_HID0_FINAL CONFIG_SYS_HID0_INIT |
580 | 579 | ||
581 | #define CONFIG_SYS_HID2 HID2_HBE | 580 | #define CONFIG_SYS_HID2 HID2_HBE |
582 | #define CONFIG_HIGH_BATS 1 /* High BATs supported */ | 581 | #define CONFIG_HIGH_BATS 1 /* High BATs supported */ |
583 | 582 | ||
584 | /* DDR */ | 583 | /* DDR */ |
585 | #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) | 584 | #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) |
586 | #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 585 | #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
587 | 586 | ||
588 | /* PCI */ | 587 | /* PCI */ |
589 | #ifdef CONFIG_PCI | 588 | #ifdef CONFIG_PCI |
590 | #define CONFIG_SYS_IBAT1L (CONFIG_SYS_PCI1_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) | 589 | #define CONFIG_SYS_IBAT1L (CONFIG_SYS_PCI1_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) |
591 | #define CONFIG_SYS_IBAT1U (CONFIG_SYS_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 590 | #define CONFIG_SYS_IBAT1U (CONFIG_SYS_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
592 | #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 591 | #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
593 | #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 592 | #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
594 | #else | 593 | #else |
595 | #define CONFIG_SYS_IBAT1L 0 | 594 | #define CONFIG_SYS_IBAT1L 0 |
596 | #define CONFIG_SYS_IBAT1U 0 | 595 | #define CONFIG_SYS_IBAT1U 0 |
597 | #define CONFIG_SYS_IBAT2L 0 | 596 | #define CONFIG_SYS_IBAT2L 0 |
598 | #define CONFIG_SYS_IBAT2U 0 | 597 | #define CONFIG_SYS_IBAT2U 0 |
599 | #endif | 598 | #endif |
600 | 599 | ||
601 | #ifdef CONFIG_MPC83XX_PCI2 | 600 | #ifdef CONFIG_MPC83XX_PCI2 |
602 | #define CONFIG_SYS_IBAT3L (CONFIG_SYS_PCI2_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) | 601 | #define CONFIG_SYS_IBAT3L (CONFIG_SYS_PCI2_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) |
603 | #define CONFIG_SYS_IBAT3U (CONFIG_SYS_PCI2_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 602 | #define CONFIG_SYS_IBAT3U (CONFIG_SYS_PCI2_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
604 | #define CONFIG_SYS_IBAT4L (CONFIG_SYS_PCI2_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 603 | #define CONFIG_SYS_IBAT4L (CONFIG_SYS_PCI2_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
605 | #define CONFIG_SYS_IBAT4U (CONFIG_SYS_PCI2_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 604 | #define CONFIG_SYS_IBAT4U (CONFIG_SYS_PCI2_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
606 | #else | 605 | #else |
607 | #define CONFIG_SYS_IBAT3L 0 | 606 | #define CONFIG_SYS_IBAT3L 0 |
608 | #define CONFIG_SYS_IBAT3U 0 | 607 | #define CONFIG_SYS_IBAT3U 0 |
609 | #define CONFIG_SYS_IBAT4L 0 | 608 | #define CONFIG_SYS_IBAT4L 0 |
610 | #define CONFIG_SYS_IBAT4U 0 | 609 | #define CONFIG_SYS_IBAT4U 0 |
611 | #endif | 610 | #endif |
612 | 611 | ||
613 | /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 & BCSR @ 0xE2400000 */ | 612 | /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 & BCSR @ 0xE2400000 */ |
614 | #define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 613 | #define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
615 | #define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR | BATU_BL_256M | BATU_VS | BATU_VP) | 614 | #define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR | BATU_BL_256M | BATU_VS | BATU_VP) |
616 | 615 | ||
617 | /* SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */ | 616 | /* SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */ |
618 | #define CONFIG_SYS_IBAT6L (0xF0000000 | BATL_PP_10 | BATL_MEMCOHERENCE | \ | 617 | #define CONFIG_SYS_IBAT6L (0xF0000000 | BATL_PP_10 | BATL_MEMCOHERENCE | \ |
619 | BATL_GUARDEDSTORAGE) | 618 | BATL_GUARDEDSTORAGE) |
620 | #define CONFIG_SYS_IBAT6U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP) | 619 | #define CONFIG_SYS_IBAT6U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP) |
621 | 620 | ||
622 | #define CONFIG_SYS_IBAT7L 0 | 621 | #define CONFIG_SYS_IBAT7L 0 |
623 | #define CONFIG_SYS_IBAT7U 0 | 622 | #define CONFIG_SYS_IBAT7U 0 |
624 | 623 | ||
625 | #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L | 624 | #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L |
626 | #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U | 625 | #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U |
627 | #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L | 626 | #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L |
628 | #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U | 627 | #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U |
629 | #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L | 628 | #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L |
630 | #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U | 629 | #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U |
631 | #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L | 630 | #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L |
632 | #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U | 631 | #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U |
633 | #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L | 632 | #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L |
634 | #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U | 633 | #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U |
635 | #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L | 634 | #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L |
636 | #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U | 635 | #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U |
637 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L | 636 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L |
638 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U | 637 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U |
639 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L | 638 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L |
640 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U | 639 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U |
641 | 640 | ||
642 | /* | 641 | /* |
643 | * Internal Definitions | 642 | * Internal Definitions |
644 | * | 643 | * |
645 | * Boot Flags | 644 | * Boot Flags |
646 | */ | 645 | */ |
647 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 646 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
648 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 647 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
649 | 648 | ||
650 | #if defined(CONFIG_CMD_KGDB) | 649 | #if defined(CONFIG_CMD_KGDB) |
651 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */ | 650 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */ |
652 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ | 651 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ |
653 | #endif | 652 | #endif |
654 | 653 | ||
655 | 654 | ||
656 | /* | 655 | /* |
657 | * Environment Configuration | 656 | * Environment Configuration |
658 | */ | 657 | */ |
659 | #define CONFIG_ENV_OVERWRITE | 658 | #define CONFIG_ENV_OVERWRITE |
660 | 659 | ||
661 | #ifdef CONFIG_HAS_ETH0 | 660 | #ifdef CONFIG_HAS_ETH0 |
662 | #define CONFIG_ETHADDR 00:E0:0C:00:8C:01 | 661 | #define CONFIG_ETHADDR 00:E0:0C:00:8C:01 |
663 | #endif | 662 | #endif |
664 | 663 | ||
665 | #ifdef CONFIG_HAS_ETH1 | 664 | #ifdef CONFIG_HAS_ETH1 |
666 | #define CONFIG_ETH1ADDR 00:E0:0C:00:8C:02 | 665 | #define CONFIG_ETH1ADDR 00:E0:0C:00:8C:02 |
667 | #endif | 666 | #endif |
668 | 667 | ||
669 | #define CONFIG_IPADDR 192.168.1.253 | 668 | #define CONFIG_IPADDR 192.168.1.253 |
670 | #define CONFIG_SERVERIP 192.168.1.1 | 669 | #define CONFIG_SERVERIP 192.168.1.1 |
671 | #define CONFIG_GATEWAYIP 192.168.1.1 | 670 | #define CONFIG_GATEWAYIP 192.168.1.1 |
672 | #define CONFIG_NETMASK 255.255.252.0 | 671 | #define CONFIG_NETMASK 255.255.252.0 |
673 | #define CONFIG_NETDEV eth0 | 672 | #define CONFIG_NETDEV eth0 |
674 | 673 | ||
675 | #ifdef CONFIG_MPC8349ITX | 674 | #ifdef CONFIG_MPC8349ITX |
676 | #define CONFIG_HOSTNAME mpc8349emitx | 675 | #define CONFIG_HOSTNAME mpc8349emitx |
677 | #else | 676 | #else |
678 | #define CONFIG_HOSTNAME mpc8349emitxgp | 677 | #define CONFIG_HOSTNAME mpc8349emitxgp |
679 | #endif | 678 | #endif |
680 | 679 | ||
681 | /* Default path and filenames */ | 680 | /* Default path and filenames */ |
682 | #define CONFIG_ROOTPATH /nfsroot/rootfs | 681 | #define CONFIG_ROOTPATH /nfsroot/rootfs |
683 | #define CONFIG_BOOTFILE uImage | 682 | #define CONFIG_BOOTFILE uImage |
684 | #define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */ | 683 | #define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */ |
685 | 684 | ||
686 | #ifdef CONFIG_MPC8349ITX | 685 | #ifdef CONFIG_MPC8349ITX |
687 | #define CONFIG_FDTFILE mpc8349emitx.dtb | 686 | #define CONFIG_FDTFILE mpc8349emitx.dtb |
688 | #else | 687 | #else |
689 | #define CONFIG_FDTFILE mpc8349emitxgp.dtb | 688 | #define CONFIG_FDTFILE mpc8349emitxgp.dtb |
690 | #endif | 689 | #endif |
691 | 690 | ||
692 | #define CONFIG_BOOTDELAY 0 | 691 | #define CONFIG_BOOTDELAY 0 |
693 | 692 | ||
694 | #define XMK_STR(x) #x | 693 | #define XMK_STR(x) #x |
695 | #define MK_STR(x) XMK_STR(x) | 694 | #define MK_STR(x) XMK_STR(x) |
696 | 695 | ||
697 | #define CONFIG_BOOTARGS \ | 696 | #define CONFIG_BOOTARGS \ |
698 | "root=/dev/nfs rw" \ | 697 | "root=/dev/nfs rw" \ |
699 | " nfsroot=" MK_STR(CONFIG_SERVERIP) ":" MK_STR(CONFIG_ROOTPATH) \ | 698 | " nfsroot=" MK_STR(CONFIG_SERVERIP) ":" MK_STR(CONFIG_ROOTPATH) \ |
700 | " ip=" MK_STR(CONFIG_IPADDR) ":" MK_STR(CONFIG_SERVERIP) ":" \ | 699 | " ip=" MK_STR(CONFIG_IPADDR) ":" MK_STR(CONFIG_SERVERIP) ":" \ |
701 | MK_STR(CONFIG_GATEWAYIP) ":" MK_STR(CONFIG_NETMASK) ":" \ | 700 | MK_STR(CONFIG_GATEWAYIP) ":" MK_STR(CONFIG_NETMASK) ":" \ |
702 | MK_STR(CONFIG_HOSTNAME) ":" MK_STR(CONFIG_NETDEV) ":off" \ | 701 | MK_STR(CONFIG_HOSTNAME) ":" MK_STR(CONFIG_NETDEV) ":off" \ |
703 | " console=" MK_STR(CONFIG_CONSOLE) "," MK_STR(CONFIG_BAUDRATE) | 702 | " console=" MK_STR(CONFIG_CONSOLE) "," MK_STR(CONFIG_BAUDRATE) |
704 | 703 | ||
705 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 704 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
706 | "console=" MK_STR(CONFIG_CONSOLE) "\0" \ | 705 | "console=" MK_STR(CONFIG_CONSOLE) "\0" \ |
707 | "netdev=" MK_STR(CONFIG_NETDEV) "\0" \ | 706 | "netdev=" MK_STR(CONFIG_NETDEV) "\0" \ |
708 | "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \ | 707 | "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \ |
709 | "tftpflash=tftpboot $loadaddr $uboot; " \ | 708 | "tftpflash=tftpboot $loadaddr $uboot; " \ |
710 | "protect off " MK_STR(TEXT_BASE) " +$filesize; " \ | 709 | "protect off " MK_STR(TEXT_BASE) " +$filesize; " \ |
711 | "erase " MK_STR(TEXT_BASE) " +$filesize; " \ | 710 | "erase " MK_STR(TEXT_BASE) " +$filesize; " \ |
712 | "cp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize; " \ | 711 | "cp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize; " \ |
713 | "protect on " MK_STR(TEXT_BASE) " +$filesize; " \ | 712 | "protect on " MK_STR(TEXT_BASE) " +$filesize; " \ |
714 | "cmp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize\0" \ | 713 | "cmp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize\0" \ |
715 | "fdtaddr=400000\0" \ | 714 | "fdtaddr=400000\0" \ |
716 | "fdtfile=" MK_STR(CONFIG_FDTFILE) "\0" | 715 | "fdtfile=" MK_STR(CONFIG_FDTFILE) "\0" |
717 | 716 | ||
718 | #define CONFIG_NFSBOOTCOMMAND \ | 717 | #define CONFIG_NFSBOOTCOMMAND \ |
719 | "setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath" \ | 718 | "setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath" \ |
720 | " ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ | 719 | " ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ |
721 | " console=$console,$baudrate $othbootargs; " \ | 720 | " console=$console,$baudrate $othbootargs; " \ |
722 | "tftp $loadaddr $bootfile;" \ | 721 | "tftp $loadaddr $bootfile;" \ |
723 | "tftp $fdtaddr $fdtfile;" \ | 722 | "tftp $fdtaddr $fdtfile;" \ |
724 | "bootm $loadaddr - $fdtaddr" | 723 | "bootm $loadaddr - $fdtaddr" |
725 | 724 | ||
726 | #define CONFIG_RAMBOOTCOMMAND \ | 725 | #define CONFIG_RAMBOOTCOMMAND \ |
727 | "setenv bootargs root=/dev/ram rw" \ | 726 | "setenv bootargs root=/dev/ram rw" \ |
728 | " console=$console,$baudrate $othbootargs; " \ | 727 | " console=$console,$baudrate $othbootargs; " \ |
729 | "tftp $ramdiskaddr $ramdiskfile;" \ | 728 | "tftp $ramdiskaddr $ramdiskfile;" \ |
730 | "tftp $loadaddr $bootfile;" \ | 729 | "tftp $loadaddr $bootfile;" \ |
731 | "tftp $fdtaddr $fdtfile;" \ | 730 | "tftp $fdtaddr $fdtfile;" \ |
732 | "bootm $loadaddr $ramdiskaddr $fdtaddr" | 731 | "bootm $loadaddr $ramdiskaddr $fdtaddr" |
733 | 732 | ||
734 | #undef MK_STR | 733 | #undef MK_STR |
735 | #undef XMK_STR | 734 | #undef XMK_STR |
736 | 735 | ||
737 | #endif | 736 | #endif |
738 | 737 |
include/configs/MPC8360ERDK.h
1 | /* | 1 | /* |
2 | * Copyright (C) 2006 Freescale Semiconductor, Inc. | 2 | * Copyright (C) 2006 Freescale Semiconductor, Inc. |
3 | * Dave Liu <daveliu@freescale.com> | 3 | * Dave Liu <daveliu@freescale.com> |
4 | * | 4 | * |
5 | * Copyright (C) 2007 Logic Product Development, Inc. | 5 | * Copyright (C) 2007 Logic Product Development, Inc. |
6 | * Peter Barada <peterb@logicpd.com> | 6 | * Peter Barada <peterb@logicpd.com> |
7 | * | 7 | * |
8 | * Copyright (C) 2007 MontaVista Software, Inc. | 8 | * Copyright (C) 2007 MontaVista Software, Inc. |
9 | * Anton Vorontsov <avorontsov@ru.mvista.com> | 9 | * Anton Vorontsov <avorontsov@ru.mvista.com> |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or | 11 | * This program is free software; you can redistribute it and/or |
12 | * modify it under the terms of the GNU General Public License as | 12 | * modify it under the terms of the GNU General Public License as |
13 | * published by the Free Software Foundation; either version 2 of | 13 | * published by the Free Software Foundation; either version 2 of |
14 | * the License, or (at your option) any later version. | 14 | * the License, or (at your option) any later version. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifndef __CONFIG_H | 17 | #ifndef __CONFIG_H |
18 | #define __CONFIG_H | 18 | #define __CONFIG_H |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * High Level Configuration Options | 21 | * High Level Configuration Options |
22 | */ | 22 | */ |
23 | #define CONFIG_E300 1 /* E300 family */ | 23 | #define CONFIG_E300 1 /* E300 family */ |
24 | #define CONFIG_QE 1 /* Has QE */ | 24 | #define CONFIG_QE 1 /* Has QE */ |
25 | #define CONFIG_MPC83XX 1 /* MPC83XX family */ | 25 | #define CONFIG_MPC83XX 1 /* MPC83XX family */ |
26 | #define CONFIG_MPC8360 1 /* MPC8360 CPU specific */ | 26 | #define CONFIG_MPC8360 1 /* MPC8360 CPU specific */ |
27 | #define CONFIG_MPC8360ERDK 1 /* MPC8360ERDK board specific */ | 27 | #define CONFIG_MPC8360ERDK 1 /* MPC8360ERDK board specific */ |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * System Clock Setup | 30 | * System Clock Setup |
31 | */ | 31 | */ |
32 | #ifdef CONFIG_CLKIN_33MHZ | 32 | #ifdef CONFIG_CLKIN_33MHZ |
33 | #define CONFIG_83XX_CLKIN 33333333 | 33 | #define CONFIG_83XX_CLKIN 33333333 |
34 | #define CONFIG_SYS_CLK_FREQ 33333333 | 34 | #define CONFIG_SYS_CLK_FREQ 33333333 |
35 | #define PCI_33M 1 | 35 | #define PCI_33M 1 |
36 | #define HRCWL_CSB_TO_CLKIN_MPC8360ERDK HRCWL_CSB_TO_CLKIN_10X1 | 36 | #define HRCWL_CSB_TO_CLKIN_MPC8360ERDK HRCWL_CSB_TO_CLKIN_10X1 |
37 | #else | 37 | #else |
38 | #define CONFIG_83XX_CLKIN 66000000 | 38 | #define CONFIG_83XX_CLKIN 66000000 |
39 | #define CONFIG_SYS_CLK_FREQ 66000000 | 39 | #define CONFIG_SYS_CLK_FREQ 66000000 |
40 | #define PCI_66M 1 | 40 | #define PCI_66M 1 |
41 | #define HRCWL_CSB_TO_CLKIN_MPC8360ERDK HRCWL_CSB_TO_CLKIN_5X1 | 41 | #define HRCWL_CSB_TO_CLKIN_MPC8360ERDK HRCWL_CSB_TO_CLKIN_5X1 |
42 | #endif /* CONFIG_CLKIN_33MHZ */ | 42 | #endif /* CONFIG_CLKIN_33MHZ */ |
43 | 43 | ||
44 | /* | 44 | /* |
45 | * Hardware Reset Configuration Word | 45 | * Hardware Reset Configuration Word |
46 | */ | 46 | */ |
47 | #define CONFIG_SYS_HRCW_LOW (\ | 47 | #define CONFIG_SYS_HRCW_LOW (\ |
48 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ | 48 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ |
49 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ | 49 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ |
50 | HRCWL_CSB_TO_CLKIN_MPC8360ERDK |\ | 50 | HRCWL_CSB_TO_CLKIN_MPC8360ERDK |\ |
51 | HRCWL_CORE_TO_CSB_2X1 |\ | 51 | HRCWL_CORE_TO_CSB_2X1 |\ |
52 | HRCWL_CE_TO_PLL_1X15) | 52 | HRCWL_CE_TO_PLL_1X15) |
53 | 53 | ||
54 | #define CONFIG_SYS_HRCW_HIGH (\ | 54 | #define CONFIG_SYS_HRCW_HIGH (\ |
55 | HRCWH_PCI_HOST |\ | 55 | HRCWH_PCI_HOST |\ |
56 | HRCWH_PCI1_ARBITER_ENABLE |\ | 56 | HRCWH_PCI1_ARBITER_ENABLE |\ |
57 | HRCWH_PCICKDRV_ENABLE |\ | 57 | HRCWH_PCICKDRV_ENABLE |\ |
58 | HRCWH_CORE_ENABLE |\ | 58 | HRCWH_CORE_ENABLE |\ |
59 | HRCWH_FROM_0X00000100 |\ | 59 | HRCWH_FROM_0X00000100 |\ |
60 | HRCWH_BOOTSEQ_DISABLE |\ | 60 | HRCWH_BOOTSEQ_DISABLE |\ |
61 | HRCWH_SW_WATCHDOG_DISABLE |\ | 61 | HRCWH_SW_WATCHDOG_DISABLE |\ |
62 | HRCWH_ROM_LOC_LOCAL_16BIT |\ | 62 | HRCWH_ROM_LOC_LOCAL_16BIT |\ |
63 | HRCWH_SECONDARY_DDR_DISABLE |\ | 63 | HRCWH_SECONDARY_DDR_DISABLE |\ |
64 | HRCWH_BIG_ENDIAN |\ | 64 | HRCWH_BIG_ENDIAN |\ |
65 | HRCWH_LALE_EARLY) | 65 | HRCWH_LALE_EARLY) |
66 | 66 | ||
67 | /* | 67 | /* |
68 | * System IO Config | 68 | * System IO Config |
69 | */ | 69 | */ |
70 | #define CONFIG_SYS_SICRH 0x00000000 | 70 | #define CONFIG_SYS_SICRH 0x00000000 |
71 | #define CONFIG_SYS_SICRL 0x40000000 | 71 | #define CONFIG_SYS_SICRL 0x40000000 |
72 | 72 | ||
73 | #define CONFIG_BOARD_EARLY_INIT_F /* call board_pre_init */ | 73 | #define CONFIG_BOARD_EARLY_INIT_F /* call board_pre_init */ |
74 | #define CONFIG_BOARD_EARLY_INIT_R | 74 | #define CONFIG_BOARD_EARLY_INIT_R |
75 | 75 | ||
76 | /* | 76 | /* |
77 | * IMMR new address | 77 | * IMMR new address |
78 | */ | 78 | */ |
79 | #define CONFIG_SYS_IMMR 0xE0000000 | 79 | #define CONFIG_SYS_IMMR 0xE0000000 |
80 | 80 | ||
81 | /* | 81 | /* |
82 | * DDR Setup | 82 | * DDR Setup |
83 | */ | 83 | */ |
84 | #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory */ | 84 | #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory */ |
85 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE | 85 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE |
86 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE | 86 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE |
87 | #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \ | 87 | #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \ |
88 | DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05) | 88 | DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05) |
89 | 89 | ||
90 | #define CONFIG_SYS_83XX_DDR_USES_CS0 | 90 | #define CONFIG_SYS_83XX_DDR_USES_CS0 |
91 | 91 | ||
92 | #define CONFIG_DDR_ECC /* support DDR ECC function */ | 92 | #define CONFIG_DDR_ECC /* support DDR ECC function */ |
93 | #define CONFIG_DDR_ECC_CMD /* Use DDR ECC user commands */ | 93 | #define CONFIG_DDR_ECC_CMD /* Use DDR ECC user commands */ |
94 | 94 | ||
95 | /* | 95 | /* |
96 | * DDRCDR - DDR Control Driver Register | 96 | * DDRCDR - DDR Control Driver Register |
97 | */ | 97 | */ |
98 | #define CONFIG_SYS_DDRCDR_VALUE 0x80080001 | 98 | #define CONFIG_SYS_DDRCDR_VALUE 0x80080001 |
99 | 99 | ||
100 | #undef CONFIG_SPD_EEPROM /* Do not use SPD EEPROM for DDR setup */ | 100 | #undef CONFIG_SPD_EEPROM /* Do not use SPD EEPROM for DDR setup */ |
101 | 101 | ||
102 | /* | 102 | /* |
103 | * Manually set up DDR parameters | 103 | * Manually set up DDR parameters |
104 | */ | 104 | */ |
105 | #define CONFIG_DDR_II | 105 | #define CONFIG_DDR_II |
106 | #define CONFIG_SYS_DDR_SIZE 256 /* MB */ | 106 | #define CONFIG_SYS_DDR_SIZE 256 /* MB */ |
107 | #define CONFIG_SYS_DDR_CS0_BNDS 0x0000000f | 107 | #define CONFIG_SYS_DDR_CS0_BNDS 0x0000000f |
108 | #define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN | CSCONFIG_ROW_BIT_13 | \ | 108 | #define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN | CSCONFIG_ROW_BIT_13 | \ |
109 | CSCONFIG_COL_BIT_10 | CSCONFIG_ODT_WR_ACS) | 109 | CSCONFIG_COL_BIT_10 | CSCONFIG_ODT_WR_ACS) |
110 | #define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SDRAM_TYPE_DDR2 | SDRAM_CFG_ECC_EN) | 110 | #define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SDRAM_TYPE_DDR2 | SDRAM_CFG_ECC_EN) |
111 | #define CONFIG_SYS_DDR_SDRAM_CFG2 0x00001000 | 111 | #define CONFIG_SYS_DDR_SDRAM_CFG2 0x00001000 |
112 | #define CONFIG_SYS_DDR_CLK_CNTL (DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05) | 112 | #define CONFIG_SYS_DDR_CLK_CNTL (DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05) |
113 | #define CONFIG_SYS_DDR_INTERVAL ((256 << SDRAM_INTERVAL_BSTOPRE_SHIFT) | \ | 113 | #define CONFIG_SYS_DDR_INTERVAL ((256 << SDRAM_INTERVAL_BSTOPRE_SHIFT) | \ |
114 | (1115 << SDRAM_INTERVAL_REFINT_SHIFT)) | 114 | (1115 << SDRAM_INTERVAL_REFINT_SHIFT)) |
115 | #define CONFIG_SYS_DDR_MODE 0x47800432 | 115 | #define CONFIG_SYS_DDR_MODE 0x47800432 |
116 | #define CONFIG_SYS_DDR_MODE2 0x8000c000 | 116 | #define CONFIG_SYS_DDR_MODE2 0x8000c000 |
117 | 117 | ||
118 | #define CONFIG_SYS_DDR_TIMING_0 ((2 << TIMING_CFG0_MRS_CYC_SHIFT) | \ | 118 | #define CONFIG_SYS_DDR_TIMING_0 ((2 << TIMING_CFG0_MRS_CYC_SHIFT) | \ |
119 | (9 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) | \ | 119 | (9 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) | \ |
120 | (3 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) | \ | 120 | (3 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) | \ |
121 | (3 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) | \ | 121 | (3 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) | \ |
122 | (0 << TIMING_CFG0_WWT_SHIFT) | \ | 122 | (0 << TIMING_CFG0_WWT_SHIFT) | \ |
123 | (0 << TIMING_CFG0_RRT_SHIFT) | \ | 123 | (0 << TIMING_CFG0_RRT_SHIFT) | \ |
124 | (0 << TIMING_CFG0_WRT_SHIFT) | \ | 124 | (0 << TIMING_CFG0_WRT_SHIFT) | \ |
125 | (0 << TIMING_CFG0_RWT_SHIFT)) | 125 | (0 << TIMING_CFG0_RWT_SHIFT)) |
126 | 126 | ||
127 | #define CONFIG_SYS_DDR_TIMING_1 (( TIMING_CFG1_CASLAT_30) | \ | 127 | #define CONFIG_SYS_DDR_TIMING_1 (( TIMING_CFG1_CASLAT_30) | \ |
128 | ( 2 << TIMING_CFG1_WRTORD_SHIFT) | \ | 128 | ( 2 << TIMING_CFG1_WRTORD_SHIFT) | \ |
129 | ( 2 << TIMING_CFG1_ACTTOACT_SHIFT) | \ | 129 | ( 2 << TIMING_CFG1_ACTTOACT_SHIFT) | \ |
130 | ( 3 << TIMING_CFG1_WRREC_SHIFT) | \ | 130 | ( 3 << TIMING_CFG1_WRREC_SHIFT) | \ |
131 | (10 << TIMING_CFG1_REFREC_SHIFT) | \ | 131 | (10 << TIMING_CFG1_REFREC_SHIFT) | \ |
132 | ( 3 << TIMING_CFG1_ACTTORW_SHIFT) | \ | 132 | ( 3 << TIMING_CFG1_ACTTORW_SHIFT) | \ |
133 | ( 8 << TIMING_CFG1_ACTTOPRE_SHIFT) | \ | 133 | ( 8 << TIMING_CFG1_ACTTOPRE_SHIFT) | \ |
134 | ( 3 << TIMING_CFG1_PRETOACT_SHIFT)) | 134 | ( 3 << TIMING_CFG1_PRETOACT_SHIFT)) |
135 | 135 | ||
136 | #define CONFIG_SYS_DDR_TIMING_2 ((9 << TIMING_CFG2_FOUR_ACT_SHIFT) | \ | 136 | #define CONFIG_SYS_DDR_TIMING_2 ((9 << TIMING_CFG2_FOUR_ACT_SHIFT) | \ |
137 | (4 << TIMING_CFG2_CKE_PLS_SHIFT) | \ | 137 | (4 << TIMING_CFG2_CKE_PLS_SHIFT) | \ |
138 | (2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) | \ | 138 | (2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) | \ |
139 | (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) | \ | 139 | (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) | \ |
140 | (2 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) | \ | 140 | (2 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) | \ |
141 | (0 << TIMING_CFG2_ADD_LAT_SHIFT) | \ | 141 | (0 << TIMING_CFG2_ADD_LAT_SHIFT) | \ |
142 | (0 << TIMING_CFG2_CPO_SHIFT)) | 142 | (0 << TIMING_CFG2_CPO_SHIFT)) |
143 | 143 | ||
144 | #define CONFIG_SYS_DDR_TIMING_3 0x00000000 | 144 | #define CONFIG_SYS_DDR_TIMING_3 0x00000000 |
145 | 145 | ||
146 | /* | 146 | /* |
147 | * Memory test | 147 | * Memory test |
148 | */ | 148 | */ |
149 | #undef CONFIG_SYS_DRAM_TEST /* memory test, takes time */ | 149 | #undef CONFIG_SYS_DRAM_TEST /* memory test, takes time */ |
150 | #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest region */ | 150 | #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest region */ |
151 | #define CONFIG_SYS_MEMTEST_END 0x00100000 | 151 | #define CONFIG_SYS_MEMTEST_END 0x00100000 |
152 | 152 | ||
153 | /* | 153 | /* |
154 | * The reserved memory | 154 | * The reserved memory |
155 | */ | 155 | */ |
156 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ | 156 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ |
157 | #define CONFIG_SYS_FLASH_BASE 0xFF800000 /* FLASH base address */ | 157 | #define CONFIG_SYS_FLASH_BASE 0xFF800000 /* FLASH base address */ |
158 | 158 | ||
159 | #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE) | 159 | #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE) |
160 | #define CONFIG_SYS_RAMBOOT | 160 | #define CONFIG_SYS_RAMBOOT |
161 | #else | 161 | #else |
162 | #undef CONFIG_SYS_RAMBOOT | 162 | #undef CONFIG_SYS_RAMBOOT |
163 | #endif | 163 | #endif |
164 | 164 | ||
165 | #define CONFIG_SYS_MONITOR_LEN (384 * 1024) /* Reserve 384 kB for Mon */ | 165 | #define CONFIG_SYS_MONITOR_LEN (384 * 1024) /* Reserve 384 kB for Mon */ |
166 | #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserved for malloc */ | 166 | #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserved for malloc */ |
167 | 167 | ||
168 | /* | 168 | /* |
169 | * Initial RAM Base Address Setup | 169 | * Initial RAM Base Address Setup |
170 | */ | 170 | */ |
171 | #define CONFIG_SYS_INIT_RAM_LOCK 1 | 171 | #define CONFIG_SYS_INIT_RAM_LOCK 1 |
172 | #define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM address */ | 172 | #define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM address */ |
173 | #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM */ | 173 | #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM */ |
174 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ | 174 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ |
175 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 175 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
176 | 176 | ||
177 | /* | 177 | /* |
178 | * Local Bus Configuration & Clock Setup | 178 | * Local Bus Configuration & Clock Setup |
179 | */ | 179 | */ |
180 | #define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_CLKDIV_4) | 180 | #define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_CLKDIV_4) |
181 | #define CONFIG_SYS_LBC_LBCR 0x00000000 | 181 | #define CONFIG_SYS_LBC_LBCR 0x00000000 |
182 | 182 | ||
183 | /* | 183 | /* |
184 | * FLASH on the Local Bus | 184 | * FLASH on the Local Bus |
185 | */ | 185 | */ |
186 | #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */ | 186 | #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */ |
187 | #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */ | 187 | #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */ |
188 | #define CONFIG_SYS_FLASH_SIZE 8 /* max FLASH size is 32M */ | 188 | #define CONFIG_SYS_FLASH_SIZE 8 /* max FLASH size is 32M */ |
189 | #define CONFIG_SYS_FLASH_PROTECTION 1 /* Use intel Flash protection. */ | 189 | #define CONFIG_SYS_FLASH_PROTECTION 1 /* Use intel Flash protection. */ |
190 | 190 | ||
191 | #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE /* Window base at flash base */ | 191 | #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE /* Window base at flash base */ |
192 | #define CONFIG_SYS_LBLAWAR0_PRELIM 0x80000018 /* 32MB window size */ | 192 | #define CONFIG_SYS_LBLAWAR0_PRELIM 0x80000018 /* 32MB window size */ |
193 | 193 | ||
194 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | /* Flash Base address */ \ | 194 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | /* Flash Base address */ \ |
195 | (2 << BR_PS_SHIFT) | /* 16 bit port size */ \ | 195 | (2 << BR_PS_SHIFT) | /* 16 bit port size */ \ |
196 | BR_V) /* valid */ | 196 | BR_V) /* valid */ |
197 | #define CONFIG_SYS_OR0_PRELIM ((~(CONFIG_SYS_FLASH_SIZE - 1) << 20) | OR_UPM_XAM | \ | 197 | #define CONFIG_SYS_OR0_PRELIM ((~(CONFIG_SYS_FLASH_SIZE - 1) << 20) | OR_UPM_XAM | \ |
198 | OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | \ | 198 | OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | \ |
199 | OR_GPCM_XACS | OR_GPCM_SCY_15 | \ | 199 | OR_GPCM_XACS | OR_GPCM_SCY_15 | \ |
200 | OR_GPCM_TRLX | OR_GPCM_EHTR | OR_GPCM_EAD) | 200 | OR_GPCM_TRLX | OR_GPCM_EHTR | OR_GPCM_EAD) |
201 | 201 | ||
202 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ | 202 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ |
203 | #define CONFIG_SYS_MAX_FLASH_SECT 256 /* max sectors per device */ | 203 | #define CONFIG_SYS_MAX_FLASH_SECT 256 /* max sectors per device */ |
204 | 204 | ||
205 | #undef CONFIG_SYS_FLASH_CHECKSUM | 205 | #undef CONFIG_SYS_FLASH_CHECKSUM |
206 | 206 | ||
207 | /* | 207 | /* |
208 | * NAND flash on the local bus | 208 | * NAND flash on the local bus |
209 | */ | 209 | */ |
210 | #define CONFIG_SYS_NAND_BASE 0x60000000 | 210 | #define CONFIG_SYS_NAND_BASE 0x60000000 |
211 | #define CONFIG_CMD_NAND 1 | 211 | #define CONFIG_CMD_NAND 1 |
212 | #define CONFIG_NAND_FSL_UPM 1 | 212 | #define CONFIG_NAND_FSL_UPM 1 |
213 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 | 213 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
214 | #define CONFIG_MTD_NAND_VERIFY_WRITE | 214 | #define CONFIG_MTD_NAND_VERIFY_WRITE |
215 | 215 | ||
216 | #define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_NAND_BASE | 216 | #define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_NAND_BASE |
217 | #define CONFIG_SYS_LBLAWAR1_PRELIM 0x8000001b /* Access window size 4K */ | 217 | #define CONFIG_SYS_LBLAWAR1_PRELIM 0x8000001b /* Access window size 4K */ |
218 | 218 | ||
219 | /* Port size 8 bit, UPMA */ | 219 | /* Port size 8 bit, UPMA */ |
220 | #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_NAND_BASE | 0x00000881) | 220 | #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_NAND_BASE | 0x00000881) |
221 | #define CONFIG_SYS_OR1_PRELIM 0xfc000001 | 221 | #define CONFIG_SYS_OR1_PRELIM 0xfc000001 |
222 | 222 | ||
223 | /* | 223 | /* |
224 | * Fujitsu MB86277 (MINT) graphics controller | 224 | * Fujitsu MB86277 (MINT) graphics controller |
225 | */ | 225 | */ |
226 | #define CONFIG_SYS_VIDEO_BASE 0x70000000 | 226 | #define CONFIG_SYS_VIDEO_BASE 0x70000000 |
227 | 227 | ||
228 | #define CONFIG_SYS_LBLAWBAR2_PRELIM CONFIG_SYS_VIDEO_BASE | 228 | #define CONFIG_SYS_LBLAWBAR2_PRELIM CONFIG_SYS_VIDEO_BASE |
229 | #define CONFIG_SYS_LBLAWAR2_PRELIM 0x80000019 /* Access window size 64MB */ | 229 | #define CONFIG_SYS_LBLAWAR2_PRELIM 0x80000019 /* Access window size 64MB */ |
230 | 230 | ||
231 | /* Port size 32 bit, UPMB */ | 231 | /* Port size 32 bit, UPMB */ |
232 | #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_VIDEO_BASE | 0x000018a1) /* PS=11, UPMB */ | 232 | #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_VIDEO_BASE | 0x000018a1) /* PS=11, UPMB */ |
233 | #define CONFIG_SYS_OR2_PRELIM 0xfc000001 /* (64MB, EAD=1) */ | 233 | #define CONFIG_SYS_OR2_PRELIM 0xfc000001 /* (64MB, EAD=1) */ |
234 | 234 | ||
235 | /* | 235 | /* |
236 | * Serial Port | 236 | * Serial Port |
237 | */ | 237 | */ |
238 | #define CONFIG_CONS_INDEX 1 | 238 | #define CONFIG_CONS_INDEX 1 |
239 | #undef CONFIG_SERIAL_SOFTWARE_FIFO | 239 | #undef CONFIG_SERIAL_SOFTWARE_FIFO |
240 | #define CONFIG_SYS_NS16550 | 240 | #define CONFIG_SYS_NS16550 |
241 | #define CONFIG_SYS_NS16550_SERIAL | 241 | #define CONFIG_SYS_NS16550_SERIAL |
242 | #define CONFIG_SYS_NS16550_REG_SIZE 1 | 242 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
243 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) | 243 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) |
244 | 244 | ||
245 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 245 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
246 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200,} | 246 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200,} |
247 | 247 | ||
248 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500) | 248 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500) |
249 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600) | 249 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600) |
250 | 250 | ||
251 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ | 251 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ |
252 | /* Use the HUSH parser */ | 252 | /* Use the HUSH parser */ |
253 | #define CONFIG_SYS_HUSH_PARSER | 253 | #define CONFIG_SYS_HUSH_PARSER |
254 | #ifdef CONFIG_SYS_HUSH_PARSER | 254 | #ifdef CONFIG_SYS_HUSH_PARSER |
255 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | 255 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
256 | #endif | 256 | #endif |
257 | 257 | ||
258 | /* Pass open firmware flat tree */ | 258 | /* Pass open firmware flat tree */ |
259 | #define CONFIG_OF_LIBFDT 1 | 259 | #define CONFIG_OF_LIBFDT 1 |
260 | #define CONFIG_OF_BOARD_SETUP 1 | 260 | #define CONFIG_OF_BOARD_SETUP 1 |
261 | #define CONFIG_OF_STDOUT_VIA_ALIAS | 261 | #define CONFIG_OF_STDOUT_VIA_ALIAS |
262 | 262 | ||
263 | /* I2C */ | 263 | /* I2C */ |
264 | #define CONFIG_HARD_I2C /* I2C with hardware support */ | 264 | #define CONFIG_HARD_I2C /* I2C with hardware support */ |
265 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ | 265 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ |
266 | #define CONFIG_FSL_I2C | 266 | #define CONFIG_FSL_I2C |
267 | #define CONFIG_I2C_MULTI_BUS | 267 | #define CONFIG_I2C_MULTI_BUS |
268 | #define CONFIG_I2C_CMD_TREE | ||
269 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ | 268 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ |
270 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 269 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
271 | #define CONFIG_SYS_I2C_NOPROBES {{0x52}} /* Don't probe these addrs */ | 270 | #define CONFIG_SYS_I2C_NOPROBES {{0x52}} /* Don't probe these addrs */ |
272 | #define CONFIG_SYS_I2C_OFFSET 0x3000 | 271 | #define CONFIG_SYS_I2C_OFFSET 0x3000 |
273 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 | 272 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 |
274 | 273 | ||
275 | /* | 274 | /* |
276 | * General PCI | 275 | * General PCI |
277 | * Addresses are mapped 1-1. | 276 | * Addresses are mapped 1-1. |
278 | */ | 277 | */ |
279 | #define CONFIG_PCI | 278 | #define CONFIG_PCI |
280 | #define CONFIG_83XX_GENERIC_PCI 1 | 279 | #define CONFIG_83XX_GENERIC_PCI 1 |
281 | 280 | ||
282 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 | 281 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 |
283 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE | 282 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE |
284 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */ | 283 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */ |
285 | #define CONFIG_SYS_PCI1_MMIO_BASE 0x90000000 | 284 | #define CONFIG_SYS_PCI1_MMIO_BASE 0x90000000 |
286 | #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE | 285 | #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE |
287 | #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */ | 286 | #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */ |
288 | #define CONFIG_SYS_PCI1_IO_BASE 0xE0300000 | 287 | #define CONFIG_SYS_PCI1_IO_BASE 0xE0300000 |
289 | #define CONFIG_SYS_PCI1_IO_PHYS 0xE0300000 | 288 | #define CONFIG_SYS_PCI1_IO_PHYS 0xE0300000 |
290 | #define CONFIG_SYS_PCI1_IO_SIZE 0x100000 /* 1M */ | 289 | #define CONFIG_SYS_PCI1_IO_SIZE 0x100000 /* 1M */ |
291 | 290 | ||
292 | #ifdef CONFIG_PCI | 291 | #ifdef CONFIG_PCI |
293 | 292 | ||
294 | #define CONFIG_NET_MULTI | 293 | #define CONFIG_NET_MULTI |
295 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ | 294 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ |
296 | 295 | ||
297 | #undef CONFIG_EEPRO100 | 296 | #undef CONFIG_EEPRO100 |
298 | #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ | 297 | #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ |
299 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1957 /* Freescale */ | 298 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1957 /* Freescale */ |
300 | 299 | ||
301 | #endif /* CONFIG_PCI */ | 300 | #endif /* CONFIG_PCI */ |
302 | 301 | ||
303 | 302 | ||
304 | #ifndef CONFIG_NET_MULTI | 303 | #ifndef CONFIG_NET_MULTI |
305 | #define CONFIG_NET_MULTI 1 | 304 | #define CONFIG_NET_MULTI 1 |
306 | #endif | 305 | #endif |
307 | 306 | ||
308 | /* | 307 | /* |
309 | * QE UEC ethernet configuration | 308 | * QE UEC ethernet configuration |
310 | */ | 309 | */ |
311 | #define CONFIG_UEC_ETH | 310 | #define CONFIG_UEC_ETH |
312 | #define CONFIG_ETHPRIME "FSL UEC0" | 311 | #define CONFIG_ETHPRIME "FSL UEC0" |
313 | 312 | ||
314 | #define CONFIG_UEC_ETH1 /* GETH1 */ | 313 | #define CONFIG_UEC_ETH1 /* GETH1 */ |
315 | 314 | ||
316 | #ifdef CONFIG_UEC_ETH1 | 315 | #ifdef CONFIG_UEC_ETH1 |
317 | #define CONFIG_SYS_UEC1_UCC_NUM 0 /* UCC1 */ | 316 | #define CONFIG_SYS_UEC1_UCC_NUM 0 /* UCC1 */ |
318 | #define CONFIG_SYS_UEC1_RX_CLK QE_CLK_NONE | 317 | #define CONFIG_SYS_UEC1_RX_CLK QE_CLK_NONE |
319 | #define CONFIG_SYS_UEC1_TX_CLK QE_CLK9 | 318 | #define CONFIG_SYS_UEC1_TX_CLK QE_CLK9 |
320 | #define CONFIG_SYS_UEC1_ETH_TYPE GIGA_ETH | 319 | #define CONFIG_SYS_UEC1_ETH_TYPE GIGA_ETH |
321 | #define CONFIG_SYS_UEC1_PHY_ADDR 2 | 320 | #define CONFIG_SYS_UEC1_PHY_ADDR 2 |
322 | #define CONFIG_SYS_UEC1_INTERFACE_MODE ENET_1000_RGMII_RXID | 321 | #define CONFIG_SYS_UEC1_INTERFACE_MODE ENET_1000_RGMII_RXID |
323 | #endif | 322 | #endif |
324 | 323 | ||
325 | #define CONFIG_UEC_ETH2 /* GETH2 */ | 324 | #define CONFIG_UEC_ETH2 /* GETH2 */ |
326 | 325 | ||
327 | #ifdef CONFIG_UEC_ETH2 | 326 | #ifdef CONFIG_UEC_ETH2 |
328 | #define CONFIG_SYS_UEC2_UCC_NUM 1 /* UCC2 */ | 327 | #define CONFIG_SYS_UEC2_UCC_NUM 1 /* UCC2 */ |
329 | #define CONFIG_SYS_UEC2_RX_CLK QE_CLK_NONE | 328 | #define CONFIG_SYS_UEC2_RX_CLK QE_CLK_NONE |
330 | #define CONFIG_SYS_UEC2_TX_CLK QE_CLK4 | 329 | #define CONFIG_SYS_UEC2_TX_CLK QE_CLK4 |
331 | #define CONFIG_SYS_UEC2_ETH_TYPE GIGA_ETH | 330 | #define CONFIG_SYS_UEC2_ETH_TYPE GIGA_ETH |
332 | #define CONFIG_SYS_UEC2_PHY_ADDR 4 | 331 | #define CONFIG_SYS_UEC2_PHY_ADDR 4 |
333 | #define CONFIG_SYS_UEC2_INTERFACE_MODE ENET_1000_RGMII_RXID | 332 | #define CONFIG_SYS_UEC2_INTERFACE_MODE ENET_1000_RGMII_RXID |
334 | #endif | 333 | #endif |
335 | 334 | ||
336 | /* | 335 | /* |
337 | * Environment | 336 | * Environment |
338 | */ | 337 | */ |
339 | 338 | ||
340 | #ifndef CONFIG_SYS_RAMBOOT | 339 | #ifndef CONFIG_SYS_RAMBOOT |
341 | #define CONFIG_ENV_IS_IN_FLASH 1 | 340 | #define CONFIG_ENV_IS_IN_FLASH 1 |
342 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) | 341 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) |
343 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */ | 342 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */ |
344 | #define CONFIG_ENV_SIZE 0x20000 | 343 | #define CONFIG_ENV_SIZE 0x20000 |
345 | #else /* CONFIG_SYS_RAMBOOT */ | 344 | #else /* CONFIG_SYS_RAMBOOT */ |
346 | #define CONFIG_SYS_NO_FLASH 1 /* Flash is not usable now */ | 345 | #define CONFIG_SYS_NO_FLASH 1 /* Flash is not usable now */ |
347 | #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */ | 346 | #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */ |
348 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000) | 347 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000) |
349 | #define CONFIG_ENV_SIZE 0x2000 | 348 | #define CONFIG_ENV_SIZE 0x2000 |
350 | #endif /* CONFIG_SYS_RAMBOOT */ | 349 | #endif /* CONFIG_SYS_RAMBOOT */ |
351 | 350 | ||
352 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ | 351 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
353 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ | 352 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
354 | 353 | ||
355 | /* | 354 | /* |
356 | * BOOTP options | 355 | * BOOTP options |
357 | */ | 356 | */ |
358 | #define CONFIG_BOOTP_BOOTFILESIZE | 357 | #define CONFIG_BOOTP_BOOTFILESIZE |
359 | #define CONFIG_BOOTP_BOOTPATH | 358 | #define CONFIG_BOOTP_BOOTPATH |
360 | #define CONFIG_BOOTP_GATEWAY | 359 | #define CONFIG_BOOTP_GATEWAY |
361 | #define CONFIG_BOOTP_HOSTNAME | 360 | #define CONFIG_BOOTP_HOSTNAME |
362 | 361 | ||
363 | 362 | ||
364 | /* | 363 | /* |
365 | * Command line configuration. | 364 | * Command line configuration. |
366 | */ | 365 | */ |
367 | #include <config_cmd_default.h> | 366 | #include <config_cmd_default.h> |
368 | 367 | ||
369 | #define CONFIG_CMD_PING | 368 | #define CONFIG_CMD_PING |
370 | #define CONFIG_CMD_I2C | 369 | #define CONFIG_CMD_I2C |
371 | #define CONFIG_CMD_ASKENV | 370 | #define CONFIG_CMD_ASKENV |
372 | #define CONFIG_CMD_DHCP | 371 | #define CONFIG_CMD_DHCP |
373 | 372 | ||
374 | #if defined(CONFIG_PCI) | 373 | #if defined(CONFIG_PCI) |
375 | #define CONFIG_CMD_PCI | 374 | #define CONFIG_CMD_PCI |
376 | #endif | 375 | #endif |
377 | 376 | ||
378 | #if defined(CONFIG_SYS_RAMBOOT) | 377 | #if defined(CONFIG_SYS_RAMBOOT) |
379 | #undef CONFIG_CMD_SAVEENV | 378 | #undef CONFIG_CMD_SAVEENV |
380 | #undef CONFIG_CMD_LOADS | 379 | #undef CONFIG_CMD_LOADS |
381 | #endif | 380 | #endif |
382 | 381 | ||
383 | #undef CONFIG_WATCHDOG /* watchdog disabled */ | 382 | #undef CONFIG_WATCHDOG /* watchdog disabled */ |
384 | 383 | ||
385 | /* | 384 | /* |
386 | * Miscellaneous configurable options | 385 | * Miscellaneous configurable options |
387 | */ | 386 | */ |
388 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 387 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
389 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ | 388 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ |
390 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | 389 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
391 | 390 | ||
392 | #if defined(CONFIG_CMD_KGDB) | 391 | #if defined(CONFIG_CMD_KGDB) |
393 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ | 392 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
394 | #else | 393 | #else |
395 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | 394 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
396 | #endif | 395 | #endif |
397 | 396 | ||
398 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ | 397 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
399 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 398 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
400 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | 399 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
401 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ | 400 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ |
402 | 401 | ||
403 | /* | 402 | /* |
404 | * For booting Linux, the board info and command line data | 403 | * For booting Linux, the board info and command line data |
405 | * have to be in the first 8 MB of memory, since this is | 404 | * have to be in the first 8 MB of memory, since this is |
406 | * the maximum mapped by the Linux kernel during initialization. | 405 | * the maximum mapped by the Linux kernel during initialization. |
407 | */ | 406 | */ |
408 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ | 407 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ |
409 | 408 | ||
410 | /* | 409 | /* |
411 | * Core HID Setup | 410 | * Core HID Setup |
412 | */ | 411 | */ |
413 | #define CONFIG_SYS_HID0_INIT 0x000000000 | 412 | #define CONFIG_SYS_HID0_INIT 0x000000000 |
414 | #define CONFIG_SYS_HID0_FINAL HID0_ENABLE_MACHINE_CHECK | 413 | #define CONFIG_SYS_HID0_FINAL HID0_ENABLE_MACHINE_CHECK |
415 | #define CONFIG_SYS_HID2 HID2_HBE | 414 | #define CONFIG_SYS_HID2 HID2_HBE |
416 | 415 | ||
417 | /* | 416 | /* |
418 | * MMU Setup | 417 | * MMU Setup |
419 | */ | 418 | */ |
420 | 419 | ||
421 | #define CONFIG_HIGH_BATS 1 /* High BATs supported */ | 420 | #define CONFIG_HIGH_BATS 1 /* High BATs supported */ |
422 | 421 | ||
423 | /* DDR: cache cacheable */ | 422 | /* DDR: cache cacheable */ |
424 | #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) | 423 | #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) |
425 | #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 424 | #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
426 | #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L | 425 | #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L |
427 | #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U | 426 | #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U |
428 | 427 | ||
429 | /* IMMRBAR & PCI IO: cache-inhibit and guarded */ | 428 | /* IMMRBAR & PCI IO: cache-inhibit and guarded */ |
430 | #define CONFIG_SYS_IBAT1L (CONFIG_SYS_IMMR | BATL_PP_10 | \ | 429 | #define CONFIG_SYS_IBAT1L (CONFIG_SYS_IMMR | BATL_PP_10 | \ |
431 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 430 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
432 | #define CONFIG_SYS_IBAT1U (CONFIG_SYS_IMMR | BATU_BL_4M | BATU_VS | BATU_VP) | 431 | #define CONFIG_SYS_IBAT1U (CONFIG_SYS_IMMR | BATU_BL_4M | BATU_VS | BATU_VP) |
433 | #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L | 432 | #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L |
434 | #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U | 433 | #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U |
435 | 434 | ||
436 | /* NAND: cache-inhibit and guarded */ | 435 | /* NAND: cache-inhibit and guarded */ |
437 | #define CONFIG_SYS_IBAT2L (CONFIG_SYS_NAND_BASE | BATL_PP_10 | BATL_CACHEINHIBIT |\ | 436 | #define CONFIG_SYS_IBAT2L (CONFIG_SYS_NAND_BASE | BATL_PP_10 | BATL_CACHEINHIBIT |\ |
438 | BATL_GUARDEDSTORAGE) | 437 | BATL_GUARDEDSTORAGE) |
439 | #define CONFIG_SYS_IBAT2U (CONFIG_SYS_NAND_BASE | BATU_BL_64M | BATU_VS | BATU_VP) | 438 | #define CONFIG_SYS_IBAT2U (CONFIG_SYS_NAND_BASE | BATU_BL_64M | BATU_VS | BATU_VP) |
440 | #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L | 439 | #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L |
441 | #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U | 440 | #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U |
442 | 441 | ||
443 | /* FLASH: icache cacheable, but dcache-inhibit and guarded */ | 442 | /* FLASH: icache cacheable, but dcache-inhibit and guarded */ |
444 | #define CONFIG_SYS_IBAT3L (CONFIG_SYS_FLASH_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) | 443 | #define CONFIG_SYS_IBAT3L (CONFIG_SYS_FLASH_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) |
445 | #define CONFIG_SYS_IBAT3U (CONFIG_SYS_FLASH_BASE | BATU_BL_32M | BATU_VS | BATU_VP) | 444 | #define CONFIG_SYS_IBAT3U (CONFIG_SYS_FLASH_BASE | BATU_BL_32M | BATU_VS | BATU_VP) |
446 | #define CONFIG_SYS_DBAT3L (CONFIG_SYS_FLASH_BASE | BATL_PP_10 | \ | 445 | #define CONFIG_SYS_DBAT3L (CONFIG_SYS_FLASH_BASE | BATL_PP_10 | \ |
447 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 446 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
448 | #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U | 447 | #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U |
449 | 448 | ||
450 | /* Stack in dcache: cacheable, no memory coherence */ | 449 | /* Stack in dcache: cacheable, no memory coherence */ |
451 | #define CONFIG_SYS_IBAT4L (CONFIG_SYS_INIT_RAM_ADDR | BATL_PP_10) | 450 | #define CONFIG_SYS_IBAT4L (CONFIG_SYS_INIT_RAM_ADDR | BATL_PP_10) |
452 | #define CONFIG_SYS_IBAT4U (CONFIG_SYS_INIT_RAM_ADDR | BATU_BL_128K | BATU_VS | BATU_VP) | 451 | #define CONFIG_SYS_IBAT4U (CONFIG_SYS_INIT_RAM_ADDR | BATU_BL_128K | BATU_VS | BATU_VP) |
453 | #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L | 452 | #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L |
454 | #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U | 453 | #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U |
455 | 454 | ||
456 | #define CONFIG_SYS_IBAT5L (CONFIG_SYS_VIDEO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | \ | 455 | #define CONFIG_SYS_IBAT5L (CONFIG_SYS_VIDEO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | \ |
457 | BATL_GUARDEDSTORAGE) | 456 | BATL_GUARDEDSTORAGE) |
458 | #define CONFIG_SYS_IBAT5U (CONFIG_SYS_VIDEO_BASE | BATU_BL_64M | BATU_VS | BATU_VP) | 457 | #define CONFIG_SYS_IBAT5U (CONFIG_SYS_VIDEO_BASE | BATU_BL_64M | BATU_VS | BATU_VP) |
459 | #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L | 458 | #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L |
460 | #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U | 459 | #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U |
461 | 460 | ||
462 | #ifdef CONFIG_PCI | 461 | #ifdef CONFIG_PCI |
463 | /* PCI MEM space: cacheable */ | 462 | /* PCI MEM space: cacheable */ |
464 | #define CONFIG_SYS_IBAT6L (CONFIG_SYS_PCI1_MEM_PHYS | BATL_PP_10 | BATL_MEMCOHERENCE) | 463 | #define CONFIG_SYS_IBAT6L (CONFIG_SYS_PCI1_MEM_PHYS | BATL_PP_10 | BATL_MEMCOHERENCE) |
465 | #define CONFIG_SYS_IBAT6U (CONFIG_SYS_PCI1_MEM_PHYS | BATU_BL_256M | BATU_VS | BATU_VP) | 464 | #define CONFIG_SYS_IBAT6U (CONFIG_SYS_PCI1_MEM_PHYS | BATU_BL_256M | BATU_VS | BATU_VP) |
466 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L | 465 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L |
467 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U | 466 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U |
468 | /* PCI MMIO space: cache-inhibit and guarded */ | 467 | /* PCI MMIO space: cache-inhibit and guarded */ |
469 | #define CONFIG_SYS_IBAT7L (CONFIG_SYS_PCI1_MMIO_PHYS | BATL_PP_10 | \ | 468 | #define CONFIG_SYS_IBAT7L (CONFIG_SYS_PCI1_MMIO_PHYS | BATL_PP_10 | \ |
470 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 469 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
471 | #define CONFIG_SYS_IBAT7U (CONFIG_SYS_PCI1_MMIO_PHYS | BATU_BL_256M | BATU_VS | BATU_VP) | 470 | #define CONFIG_SYS_IBAT7U (CONFIG_SYS_PCI1_MMIO_PHYS | BATU_BL_256M | BATU_VS | BATU_VP) |
472 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L | 471 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L |
473 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U | 472 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U |
474 | #else /* CONFIG_PCI */ | 473 | #else /* CONFIG_PCI */ |
475 | #define CONFIG_SYS_IBAT6L (0) | 474 | #define CONFIG_SYS_IBAT6L (0) |
476 | #define CONFIG_SYS_IBAT6U (0) | 475 | #define CONFIG_SYS_IBAT6U (0) |
477 | #define CONFIG_SYS_IBAT7L (0) | 476 | #define CONFIG_SYS_IBAT7L (0) |
478 | #define CONFIG_SYS_IBAT7U (0) | 477 | #define CONFIG_SYS_IBAT7U (0) |
479 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L | 478 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L |
480 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U | 479 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U |
481 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L | 480 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L |
482 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U | 481 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U |
483 | #endif /* CONFIG_PCI */ | 482 | #endif /* CONFIG_PCI */ |
484 | 483 | ||
485 | /* | 484 | /* |
486 | * Internal Definitions | 485 | * Internal Definitions |
487 | * | 486 | * |
488 | * Boot Flags | 487 | * Boot Flags |
489 | */ | 488 | */ |
490 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 489 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
491 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 490 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
492 | 491 | ||
493 | #if defined(CONFIG_CMD_KGDB) | 492 | #if defined(CONFIG_CMD_KGDB) |
494 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */ | 493 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */ |
495 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ | 494 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ |
496 | #endif | 495 | #endif |
497 | 496 | ||
498 | /* | 497 | /* |
499 | * Environment Configuration | 498 | * Environment Configuration |
500 | */ | 499 | */ |
501 | #define CONFIG_ENV_OVERWRITE | 500 | #define CONFIG_ENV_OVERWRITE |
502 | 501 | ||
503 | #if defined(CONFIG_UEC_ETH) | 502 | #if defined(CONFIG_UEC_ETH) |
504 | #define CONFIG_HAS_ETH0 | 503 | #define CONFIG_HAS_ETH0 |
505 | #define CONFIG_HAS_ETH1 | 504 | #define CONFIG_HAS_ETH1 |
506 | #define CONFIG_HAS_ETH2 | 505 | #define CONFIG_HAS_ETH2 |
507 | #define CONFIG_HAS_ETH3 | 506 | #define CONFIG_HAS_ETH3 |
508 | #define CONFIG_ETHADDR 00:04:9f:ef:01:01 | 507 | #define CONFIG_ETHADDR 00:04:9f:ef:01:01 |
509 | #define CONFIG_ETH1ADDR 00:04:9f:ef:01:02 | 508 | #define CONFIG_ETH1ADDR 00:04:9f:ef:01:02 |
510 | #define CONFIG_ETH2ADDR 00:04:9f:ef:01:03 | 509 | #define CONFIG_ETH2ADDR 00:04:9f:ef:01:03 |
511 | #define CONFIG_ETH3ADDR 00:04:9f:ef:01:04 | 510 | #define CONFIG_ETH3ADDR 00:04:9f:ef:01:04 |
512 | #endif | 511 | #endif |
513 | 512 | ||
514 | #define CONFIG_BAUDRATE 115200 | 513 | #define CONFIG_BAUDRATE 115200 |
515 | 514 | ||
516 | #define CONFIG_LOADADDR a00000 | 515 | #define CONFIG_LOADADDR a00000 |
517 | #define CONFIG_HOSTNAME mpc8360erdk | 516 | #define CONFIG_HOSTNAME mpc8360erdk |
518 | #define CONFIG_BOOTFILE uImage | 517 | #define CONFIG_BOOTFILE uImage |
519 | 518 | ||
520 | #define CONFIG_IPADDR 10.0.0.99 | 519 | #define CONFIG_IPADDR 10.0.0.99 |
521 | #define CONFIG_SERVERIP 10.0.0.2 | 520 | #define CONFIG_SERVERIP 10.0.0.2 |
522 | #define CONFIG_GATEWAYIP 10.0.0.2 | 521 | #define CONFIG_GATEWAYIP 10.0.0.2 |
523 | #define CONFIG_NETMASK 255.255.255.0 | 522 | #define CONFIG_NETMASK 255.255.255.0 |
524 | #define CONFIG_ROOTPATH /nfsroot/ | 523 | #define CONFIG_ROOTPATH /nfsroot/ |
525 | 524 | ||
526 | #define CONFIG_BOOTDELAY 2 /* -1 disables auto-boot */ | 525 | #define CONFIG_BOOTDELAY 2 /* -1 disables auto-boot */ |
527 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs */ | 526 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs */ |
528 | 527 | ||
529 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 528 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
530 | "netdev=eth0\0"\ | 529 | "netdev=eth0\0"\ |
531 | "consoledev=ttyS0\0"\ | 530 | "consoledev=ttyS0\0"\ |
532 | "loadaddr=a00000\0"\ | 531 | "loadaddr=a00000\0"\ |
533 | "fdtaddr=900000\0"\ | 532 | "fdtaddr=900000\0"\ |
534 | "fdtfile=dtb\0"\ | 533 | "fdtfile=dtb\0"\ |
535 | "fsfile=fs\0"\ | 534 | "fsfile=fs\0"\ |
536 | "ubootfile=u-boot.bin\0"\ | 535 | "ubootfile=u-boot.bin\0"\ |
537 | "mtdparts=mtdparts=60000000.nand-flash:4096k(kernel),128k(dtb),-(rootfs)\0"\ | 536 | "mtdparts=mtdparts=60000000.nand-flash:4096k(kernel),128k(dtb),-(rootfs)\0"\ |
538 | "setbootargs=setenv bootargs console=$consoledev,$baudrate "\ | 537 | "setbootargs=setenv bootargs console=$consoledev,$baudrate "\ |
539 | "$mtdparts panic=1\0"\ | 538 | "$mtdparts panic=1\0"\ |
540 | "adddhcpargs=setenv bootargs $bootargs ip=on\0"\ | 539 | "adddhcpargs=setenv bootargs $bootargs ip=on\0"\ |
541 | "addnfsargs=setenv bootargs $bootargs ip=$ipaddr:$serverip:"\ | 540 | "addnfsargs=setenv bootargs $bootargs ip=$ipaddr:$serverip:"\ |
542 | "$gatewayip:$netmask:$hostname:$netdev:off "\ | 541 | "$gatewayip:$netmask:$hostname:$netdev:off "\ |
543 | "root=/dev/nfs rw nfsroot=$serverip:$rootpath\0"\ | 542 | "root=/dev/nfs rw nfsroot=$serverip:$rootpath\0"\ |
544 | "addnandargs=setenv bootargs $bootargs root=/dev/mtdblock3 "\ | 543 | "addnandargs=setenv bootargs $bootargs root=/dev/mtdblock3 "\ |
545 | "rootfstype=jffs2 rw\0"\ | 544 | "rootfstype=jffs2 rw\0"\ |
546 | "tftp_get_uboot=tftp 100000 $ubootfile\0"\ | 545 | "tftp_get_uboot=tftp 100000 $ubootfile\0"\ |
547 | "tftp_get_kernel=tftp $loadaddr $bootfile\0"\ | 546 | "tftp_get_kernel=tftp $loadaddr $bootfile\0"\ |
548 | "tftp_get_dtb=tftp $fdtaddr $fdtfile\0"\ | 547 | "tftp_get_dtb=tftp $fdtaddr $fdtfile\0"\ |
549 | "tftp_get_fs=tftp c00000 $fsfile\0"\ | 548 | "tftp_get_fs=tftp c00000 $fsfile\0"\ |
550 | "nand_erase_kernel=nand erase 0 400000\0"\ | 549 | "nand_erase_kernel=nand erase 0 400000\0"\ |
551 | "nand_erase_dtb=nand erase 400000 20000\0"\ | 550 | "nand_erase_dtb=nand erase 400000 20000\0"\ |
552 | "nand_erase_fs=nand erase 420000 3be0000\0"\ | 551 | "nand_erase_fs=nand erase 420000 3be0000\0"\ |
553 | "nand_write_kernel=nand write.jffs2 $loadaddr 0 400000\0"\ | 552 | "nand_write_kernel=nand write.jffs2 $loadaddr 0 400000\0"\ |
554 | "nand_write_dtb=nand write.jffs2 $fdtaddr 400000 20000\0"\ | 553 | "nand_write_dtb=nand write.jffs2 $fdtaddr 400000 20000\0"\ |
555 | "nand_write_fs=nand write.jffs2 c00000 420000 $filesize\0"\ | 554 | "nand_write_fs=nand write.jffs2 c00000 420000 $filesize\0"\ |
556 | "nand_read_kernel=nand read.jffs2 $loadaddr 0 400000\0"\ | 555 | "nand_read_kernel=nand read.jffs2 $loadaddr 0 400000\0"\ |
557 | "nand_read_dtb=nand read.jffs2 $fdtaddr 400000 20000\0"\ | 556 | "nand_read_dtb=nand read.jffs2 $fdtaddr 400000 20000\0"\ |
558 | "nor_reflash=protect off ff800000 ff87ffff ; erase ff800000 ff87ffff ; "\ | 557 | "nor_reflash=protect off ff800000 ff87ffff ; erase ff800000 ff87ffff ; "\ |
559 | "cp.b 100000 ff800000 $filesize\0"\ | 558 | "cp.b 100000 ff800000 $filesize\0"\ |
560 | "nand_reflash_kernel=run tftp_get_kernel nand_erase_kernel "\ | 559 | "nand_reflash_kernel=run tftp_get_kernel nand_erase_kernel "\ |
561 | "nand_write_kernel\0"\ | 560 | "nand_write_kernel\0"\ |
562 | "nand_reflash_dtb=run tftp_get_dtb nand_erase_dtb nand_write_dtb\0"\ | 561 | "nand_reflash_dtb=run tftp_get_dtb nand_erase_dtb nand_write_dtb\0"\ |
563 | "nand_reflash_fs=run tftp_get_fs nand_erase_fs nand_write_fs\0"\ | 562 | "nand_reflash_fs=run tftp_get_fs nand_erase_fs nand_write_fs\0"\ |
564 | "nand_reflash=run nand_reflash_kernel nand_reflash_dtb "\ | 563 | "nand_reflash=run nand_reflash_kernel nand_reflash_dtb "\ |
565 | "nand_reflash_fs\0"\ | 564 | "nand_reflash_fs\0"\ |
566 | "boot_m=bootm $loadaddr - $fdtaddr\0"\ | 565 | "boot_m=bootm $loadaddr - $fdtaddr\0"\ |
567 | "dhcpboot=dhcp ; run setbootargs adddhcpargs tftp_get_dtb boot_m\0"\ | 566 | "dhcpboot=dhcp ; run setbootargs adddhcpargs tftp_get_dtb boot_m\0"\ |
568 | "nfsboot=run setbootargs addnfsargs tftp_get_kernel tftp_get_dtb "\ | 567 | "nfsboot=run setbootargs addnfsargs tftp_get_kernel tftp_get_dtb "\ |
569 | "boot_m\0"\ | 568 | "boot_m\0"\ |
570 | "nandboot=run setbootargs addnandargs nand_read_kernel nand_read_dtb "\ | 569 | "nandboot=run setbootargs addnandargs nand_read_kernel nand_read_dtb "\ |
571 | "boot_m\0"\ | 570 | "boot_m\0"\ |
572 | "" | 571 | "" |
573 | 572 | ||
574 | #define CONFIG_BOOTCOMMAND "run dhcpboot" | 573 | #define CONFIG_BOOTCOMMAND "run dhcpboot" |
575 | 574 | ||
576 | #endif /* __CONFIG_H */ | 575 | #endif /* __CONFIG_H */ |
577 | 576 |
include/configs/MPC8536DS.h
1 | /* | 1 | /* |
2 | * Copyright 2008 Freescale Semiconductor, Inc. | 2 | * Copyright 2008 Freescale Semiconductor, Inc. |
3 | * | 3 | * |
4 | * See file CREDITS for list of people who contributed to this | 4 | * See file CREDITS for list of people who contributed to this |
5 | * project. | 5 | * project. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License as | 8 | * modify it under the terms of the GNU General Public License as |
9 | * published by the Free Software Foundation; either version 2 of | 9 | * published by the Free Software Foundation; either version 2 of |
10 | * the License, or (at your option) any later version. | 10 | * the License, or (at your option) any later version. |
11 | * | 11 | * |
12 | * This program is distributed in the hope that it will be useful, | 12 | * This program is distributed in the hope that it will be useful, |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
16 | * | 16 | * |
17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License |
18 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
20 | * MA 02111-1307 USA | 20 | * MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | 22 | ||
23 | /* | 23 | /* |
24 | * mpc8536ds board configuration file | 24 | * mpc8536ds board configuration file |
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | #ifndef __CONFIG_H | 27 | #ifndef __CONFIG_H |
28 | #define __CONFIG_H | 28 | #define __CONFIG_H |
29 | 29 | ||
30 | /* High Level Configuration Options */ | 30 | /* High Level Configuration Options */ |
31 | #define CONFIG_BOOKE 1 /* BOOKE */ | 31 | #define CONFIG_BOOKE 1 /* BOOKE */ |
32 | #define CONFIG_E500 1 /* BOOKE e500 family */ | 32 | #define CONFIG_E500 1 /* BOOKE e500 family */ |
33 | #define CONFIG_MPC85xx 1 /* MPC8540/60/55/41/48 */ | 33 | #define CONFIG_MPC85xx 1 /* MPC8540/60/55/41/48 */ |
34 | #define CONFIG_MPC8536 1 | 34 | #define CONFIG_MPC8536 1 |
35 | #define CONFIG_MPC8536DS 1 | 35 | #define CONFIG_MPC8536DS 1 |
36 | 36 | ||
37 | #define CONFIG_FSL_ELBC 1 /* Has Enhanced localbus controller */ | 37 | #define CONFIG_FSL_ELBC 1 /* Has Enhanced localbus controller */ |
38 | #define CONFIG_PCI 1 /* Enable PCI/PCIE */ | 38 | #define CONFIG_PCI 1 /* Enable PCI/PCIE */ |
39 | #define CONFIG_PCI1 1 /* Enable PCI controller 1 */ | 39 | #define CONFIG_PCI1 1 /* Enable PCI controller 1 */ |
40 | #define CONFIG_PCIE1 1 /* PCIE controler 1 (slot 1) */ | 40 | #define CONFIG_PCIE1 1 /* PCIE controler 1 (slot 1) */ |
41 | #define CONFIG_PCIE2 1 /* PCIE controler 2 (slot 2) */ | 41 | #define CONFIG_PCIE2 1 /* PCIE controler 2 (slot 2) */ |
42 | #define CONFIG_PCIE3 1 /* PCIE controler 3 (ULI bridge) */ | 42 | #define CONFIG_PCIE3 1 /* PCIE controler 3 (ULI bridge) */ |
43 | #define CONFIG_FSL_PCI_INIT 1 /* Use common FSL init code */ | 43 | #define CONFIG_FSL_PCI_INIT 1 /* Use common FSL init code */ |
44 | #define CONFIG_FSL_PCIE_RESET 1 /* need PCIe reset errata */ | 44 | #define CONFIG_FSL_PCIE_RESET 1 /* need PCIe reset errata */ |
45 | #define CONFIG_SYS_PCI_64BIT 1 /* enable 64-bit PCI resources */ | 45 | #define CONFIG_SYS_PCI_64BIT 1 /* enable 64-bit PCI resources */ |
46 | 46 | ||
47 | #define CONFIG_FSL_LAW 1 /* Use common FSL init code */ | 47 | #define CONFIG_FSL_LAW 1 /* Use common FSL init code */ |
48 | 48 | ||
49 | #define CONFIG_TSEC_ENET /* tsec ethernet support */ | 49 | #define CONFIG_TSEC_ENET /* tsec ethernet support */ |
50 | #define CONFIG_ENV_OVERWRITE | 50 | #define CONFIG_ENV_OVERWRITE |
51 | 51 | ||
52 | /* | 52 | /* |
53 | * When initializing flash, if we cannot find the manufacturer ID, | 53 | * When initializing flash, if we cannot find the manufacturer ID, |
54 | * assume this is the AMD flash associated with the CDS board. | 54 | * assume this is the AMD flash associated with the CDS board. |
55 | * This allows booting from a promjet. | 55 | * This allows booting from a promjet. |
56 | */ | 56 | */ |
57 | #define CONFIG_ASSUME_AMD_FLASH | 57 | #define CONFIG_ASSUME_AMD_FLASH |
58 | 58 | ||
59 | #ifndef __ASSEMBLY__ | 59 | #ifndef __ASSEMBLY__ |
60 | extern unsigned long get_board_sys_clk(unsigned long dummy); | 60 | extern unsigned long get_board_sys_clk(unsigned long dummy); |
61 | extern unsigned long get_board_ddr_clk(unsigned long dummy); | 61 | extern unsigned long get_board_ddr_clk(unsigned long dummy); |
62 | #endif | 62 | #endif |
63 | #define CONFIG_SYS_CLK_FREQ get_board_sys_clk(0) /* sysclk for MPC85xx */ | 63 | #define CONFIG_SYS_CLK_FREQ get_board_sys_clk(0) /* sysclk for MPC85xx */ |
64 | #define CONFIG_DDR_CLK_FREQ get_board_ddr_clk(0) | 64 | #define CONFIG_DDR_CLK_FREQ get_board_ddr_clk(0) |
65 | #define CONFIG_ICS307_REFCLK_HZ 33333000 /* ICS307 clock chip ref freq */ | 65 | #define CONFIG_ICS307_REFCLK_HZ 33333000 /* ICS307 clock chip ref freq */ |
66 | #define CONFIG_GET_CLK_FROM_ICS307 /* decode sysclk and ddrclk freq | 66 | #define CONFIG_GET_CLK_FROM_ICS307 /* decode sysclk and ddrclk freq |
67 | from ICS307 instead of switches */ | 67 | from ICS307 instead of switches */ |
68 | 68 | ||
69 | /* | 69 | /* |
70 | * These can be toggled for performance analysis, otherwise use default. | 70 | * These can be toggled for performance analysis, otherwise use default. |
71 | */ | 71 | */ |
72 | #define CONFIG_L2_CACHE /* toggle L2 cache */ | 72 | #define CONFIG_L2_CACHE /* toggle L2 cache */ |
73 | #define CONFIG_BTB /* toggle branch predition */ | 73 | #define CONFIG_BTB /* toggle branch predition */ |
74 | 74 | ||
75 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_pre_init */ | 75 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_pre_init */ |
76 | 76 | ||
77 | #define CONFIG_ENABLE_36BIT_PHYS 1 | 77 | #define CONFIG_ENABLE_36BIT_PHYS 1 |
78 | 78 | ||
79 | #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest works on */ | 79 | #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest works on */ |
80 | #define CONFIG_SYS_MEMTEST_END 0x7fffffff | 80 | #define CONFIG_SYS_MEMTEST_END 0x7fffffff |
81 | #define CONFIG_PANIC_HANG /* do not reset board on panic */ | 81 | #define CONFIG_PANIC_HANG /* do not reset board on panic */ |
82 | 82 | ||
83 | /* | 83 | /* |
84 | * Base addresses -- Note these are effective addresses where the | 84 | * Base addresses -- Note these are effective addresses where the |
85 | * actual resources get mapped (not physical addresses) | 85 | * actual resources get mapped (not physical addresses) |
86 | */ | 86 | */ |
87 | #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff700000 /* CCSRBAR Default */ | 87 | #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff700000 /* CCSRBAR Default */ |
88 | #define CONFIG_SYS_CCSRBAR 0xffe00000 /* relocated CCSRBAR */ | 88 | #define CONFIG_SYS_CCSRBAR 0xffe00000 /* relocated CCSRBAR */ |
89 | #define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR /* physical addr of CCSRBAR */ | 89 | #define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR /* physical addr of CCSRBAR */ |
90 | #define CONFIG_SYS_IMMR CONFIG_SYS_CCSRBAR /* PQII uses CONFIG_SYS_IMMR */ | 90 | #define CONFIG_SYS_IMMR CONFIG_SYS_CCSRBAR /* PQII uses CONFIG_SYS_IMMR */ |
91 | 91 | ||
92 | #define CONFIG_SYS_PCI1_ADDR (CONFIG_SYS_CCSRBAR+0x8000) | 92 | #define CONFIG_SYS_PCI1_ADDR (CONFIG_SYS_CCSRBAR+0x8000) |
93 | #define CONFIG_SYS_PCIE1_ADDR (CONFIG_SYS_CCSRBAR+0xa000) | 93 | #define CONFIG_SYS_PCIE1_ADDR (CONFIG_SYS_CCSRBAR+0xa000) |
94 | #define CONFIG_SYS_PCIE2_ADDR (CONFIG_SYS_CCSRBAR+0x9000) | 94 | #define CONFIG_SYS_PCIE2_ADDR (CONFIG_SYS_CCSRBAR+0x9000) |
95 | #define CONFIG_SYS_PCIE3_ADDR (CONFIG_SYS_CCSRBAR+0xb000) | 95 | #define CONFIG_SYS_PCIE3_ADDR (CONFIG_SYS_CCSRBAR+0xb000) |
96 | 96 | ||
97 | /* DDR Setup */ | 97 | /* DDR Setup */ |
98 | #define CONFIG_FSL_DDR2 | 98 | #define CONFIG_FSL_DDR2 |
99 | #undef CONFIG_FSL_DDR_INTERACTIVE | 99 | #undef CONFIG_FSL_DDR_INTERACTIVE |
100 | #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup */ | 100 | #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup */ |
101 | #define CONFIG_DDR_SPD | 101 | #define CONFIG_DDR_SPD |
102 | #undef CONFIG_DDR_DLL | 102 | #undef CONFIG_DDR_DLL |
103 | 103 | ||
104 | #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER /* DDR controller or DMA? */ | 104 | #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER /* DDR controller or DMA? */ |
105 | #define CONFIG_MEM_INIT_VALUE 0xDeadBeef | 105 | #define CONFIG_MEM_INIT_VALUE 0xDeadBeef |
106 | 106 | ||
107 | #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 | 107 | #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 |
108 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE | 108 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE |
109 | 109 | ||
110 | #define CONFIG_NUM_DDR_CONTROLLERS 1 | 110 | #define CONFIG_NUM_DDR_CONTROLLERS 1 |
111 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 | 111 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 |
112 | #define CONFIG_CHIP_SELECTS_PER_CTRL 2 | 112 | #define CONFIG_CHIP_SELECTS_PER_CTRL 2 |
113 | 113 | ||
114 | /* I2C addresses of SPD EEPROMs */ | 114 | /* I2C addresses of SPD EEPROMs */ |
115 | #define SPD_EEPROM_ADDRESS 0x51 /* CTLR 0 DIMM 0 */ | 115 | #define SPD_EEPROM_ADDRESS 0x51 /* CTLR 0 DIMM 0 */ |
116 | #define CONFIG_SYS_SPD_BUS_NUM 1 | 116 | #define CONFIG_SYS_SPD_BUS_NUM 1 |
117 | 117 | ||
118 | /* These are used when DDR doesn't use SPD. */ | 118 | /* These are used when DDR doesn't use SPD. */ |
119 | #define CONFIG_SYS_SDRAM_SIZE 256 /* DDR is 256MB */ | 119 | #define CONFIG_SYS_SDRAM_SIZE 256 /* DDR is 256MB */ |
120 | #define CONFIG_SYS_DDR_CS0_BNDS 0x0000001F | 120 | #define CONFIG_SYS_DDR_CS0_BNDS 0x0000001F |
121 | #define CONFIG_SYS_DDR_CS0_CONFIG 0x80010102 /* Enable, no interleaving */ | 121 | #define CONFIG_SYS_DDR_CS0_CONFIG 0x80010102 /* Enable, no interleaving */ |
122 | #define CONFIG_SYS_DDR_TIMING_3 0x00000000 | 122 | #define CONFIG_SYS_DDR_TIMING_3 0x00000000 |
123 | #define CONFIG_SYS_DDR_TIMING_0 0x00260802 | 123 | #define CONFIG_SYS_DDR_TIMING_0 0x00260802 |
124 | #define CONFIG_SYS_DDR_TIMING_1 0x3935d322 | 124 | #define CONFIG_SYS_DDR_TIMING_1 0x3935d322 |
125 | #define CONFIG_SYS_DDR_TIMING_2 0x14904cc8 | 125 | #define CONFIG_SYS_DDR_TIMING_2 0x14904cc8 |
126 | #define CONFIG_SYS_DDR_MODE_1 0x00480432 | 126 | #define CONFIG_SYS_DDR_MODE_1 0x00480432 |
127 | #define CONFIG_SYS_DDR_MODE_2 0x00000000 | 127 | #define CONFIG_SYS_DDR_MODE_2 0x00000000 |
128 | #define CONFIG_SYS_DDR_INTERVAL 0x06180100 | 128 | #define CONFIG_SYS_DDR_INTERVAL 0x06180100 |
129 | #define CONFIG_SYS_DDR_DATA_INIT 0xdeadbeef | 129 | #define CONFIG_SYS_DDR_DATA_INIT 0xdeadbeef |
130 | #define CONFIG_SYS_DDR_CLK_CTRL 0x03800000 | 130 | #define CONFIG_SYS_DDR_CLK_CTRL 0x03800000 |
131 | #define CONFIG_SYS_DDR_OCD_CTRL 0x00000000 | 131 | #define CONFIG_SYS_DDR_OCD_CTRL 0x00000000 |
132 | #define CONFIG_SYS_DDR_OCD_STATUS 0x00000000 | 132 | #define CONFIG_SYS_DDR_OCD_STATUS 0x00000000 |
133 | #define CONFIG_SYS_DDR_CONTROL 0xC3008000 /* Type = DDR2 */ | 133 | #define CONFIG_SYS_DDR_CONTROL 0xC3008000 /* Type = DDR2 */ |
134 | #define CONFIG_SYS_DDR_CONTROL2 0x04400010 | 134 | #define CONFIG_SYS_DDR_CONTROL2 0x04400010 |
135 | 135 | ||
136 | #define CONFIG_SYS_DDR_ERR_INT_EN 0x0000000d | 136 | #define CONFIG_SYS_DDR_ERR_INT_EN 0x0000000d |
137 | #define CONFIG_SYS_DDR_ERR_DIS 0x00000000 | 137 | #define CONFIG_SYS_DDR_ERR_DIS 0x00000000 |
138 | #define CONFIG_SYS_DDR_SBE 0x00010000 | 138 | #define CONFIG_SYS_DDR_SBE 0x00010000 |
139 | 139 | ||
140 | /* Make sure required options are set */ | 140 | /* Make sure required options are set */ |
141 | #ifndef CONFIG_SPD_EEPROM | 141 | #ifndef CONFIG_SPD_EEPROM |
142 | #error ("CONFIG_SPD_EEPROM is required") | 142 | #error ("CONFIG_SPD_EEPROM is required") |
143 | #endif | 143 | #endif |
144 | 144 | ||
145 | #undef CONFIG_CLOCKS_IN_MHZ | 145 | #undef CONFIG_CLOCKS_IN_MHZ |
146 | 146 | ||
147 | 147 | ||
148 | /* | 148 | /* |
149 | * Memory map -- xxx -this is wrong, needs updating | 149 | * Memory map -- xxx -this is wrong, needs updating |
150 | * | 150 | * |
151 | * 0x0000_0000 0x7fff_ffff DDR 2G Cacheable | 151 | * 0x0000_0000 0x7fff_ffff DDR 2G Cacheable |
152 | * 0x8000_0000 0xbfff_ffff PCI Express Mem 1G non-cacheable | 152 | * 0x8000_0000 0xbfff_ffff PCI Express Mem 1G non-cacheable |
153 | * 0xc000_0000 0xdfff_ffff PCI 512M non-cacheable | 153 | * 0xc000_0000 0xdfff_ffff PCI 512M non-cacheable |
154 | * 0xe100_0000 0xe3ff_ffff PCI IO range 4M non-cacheable | 154 | * 0xe100_0000 0xe3ff_ffff PCI IO range 4M non-cacheable |
155 | * | 155 | * |
156 | * Localbus cacheable (TBD) | 156 | * Localbus cacheable (TBD) |
157 | * 0xXXXX_XXXX 0xXXXX_XXXX SRAM YZ M Cacheable | 157 | * 0xXXXX_XXXX 0xXXXX_XXXX SRAM YZ M Cacheable |
158 | * | 158 | * |
159 | * Localbus non-cacheable | 159 | * Localbus non-cacheable |
160 | * 0xe000_0000 0xe7ff_ffff Promjet/free 128M non-cacheable | 160 | * 0xe000_0000 0xe7ff_ffff Promjet/free 128M non-cacheable |
161 | * 0xe800_0000 0xefff_ffff FLASH 128M non-cacheable | 161 | * 0xe800_0000 0xefff_ffff FLASH 128M non-cacheable |
162 | * 0xffa0_0000 0xffaf_ffff NAND 1M non-cacheable | 162 | * 0xffa0_0000 0xffaf_ffff NAND 1M non-cacheable |
163 | * 0xffdf_0000 0xffdf_7fff PIXIS 32K non-cacheable TLB0 | 163 | * 0xffdf_0000 0xffdf_7fff PIXIS 32K non-cacheable TLB0 |
164 | * 0xffd0_0000 0xffd0_3fff L1 for stack 16K Cacheable TLB0 | 164 | * 0xffd0_0000 0xffd0_3fff L1 for stack 16K Cacheable TLB0 |
165 | * 0xffe0_0000 0xffef_ffff CCSR 1M non-cacheable | 165 | * 0xffe0_0000 0xffef_ffff CCSR 1M non-cacheable |
166 | */ | 166 | */ |
167 | 167 | ||
168 | /* | 168 | /* |
169 | * Local Bus Definitions | 169 | * Local Bus Definitions |
170 | */ | 170 | */ |
171 | #define CONFIG_SYS_FLASH_BASE 0xe0000000 /* start of FLASH 128M */ | 171 | #define CONFIG_SYS_FLASH_BASE 0xe0000000 /* start of FLASH 128M */ |
172 | #define CONFIG_SYS_FLASH_BASE_PHYS CONFIG_SYS_FLASH_BASE | 172 | #define CONFIG_SYS_FLASH_BASE_PHYS CONFIG_SYS_FLASH_BASE |
173 | 173 | ||
174 | #define CONFIG_SYS_BR0_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_FLASH_BASE_PHYS + 0x8000000)) | BR_PS_16 | BR_V) | 174 | #define CONFIG_SYS_BR0_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_FLASH_BASE_PHYS + 0x8000000)) | BR_PS_16 | BR_V) |
175 | #define CONFIG_SYS_OR0_PRELIM 0xf8000ff7 | 175 | #define CONFIG_SYS_OR0_PRELIM 0xf8000ff7 |
176 | 176 | ||
177 | #define CONFIG_SYS_BR1_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | BR_PS_16 | BR_V) | 177 | #define CONFIG_SYS_BR1_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | BR_PS_16 | BR_V) |
178 | #define CONFIG_SYS_OR1_PRELIM 0xf8000ff7 | 178 | #define CONFIG_SYS_OR1_PRELIM 0xf8000ff7 |
179 | 179 | ||
180 | #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE + 0x8000000, CONFIG_SYS_FLASH_BASE} | 180 | #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE + 0x8000000, CONFIG_SYS_FLASH_BASE} |
181 | #define CONFIG_SYS_FLASH_QUIET_TEST | 181 | #define CONFIG_SYS_FLASH_QUIET_TEST |
182 | #define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */ | 182 | #define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */ |
183 | 183 | ||
184 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */ | 184 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */ |
185 | #define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */ | 185 | #define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */ |
186 | #undef CONFIG_SYS_FLASH_CHECKSUM | 186 | #undef CONFIG_SYS_FLASH_CHECKSUM |
187 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ | 187 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ |
188 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ | 188 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ |
189 | 189 | ||
190 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ | 190 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ |
191 | 191 | ||
192 | #define CONFIG_FLASH_CFI_DRIVER | 192 | #define CONFIG_FLASH_CFI_DRIVER |
193 | #define CONFIG_SYS_FLASH_CFI | 193 | #define CONFIG_SYS_FLASH_CFI |
194 | #define CONFIG_SYS_FLASH_EMPTY_INFO | 194 | #define CONFIG_SYS_FLASH_EMPTY_INFO |
195 | #define CONFIG_SYS_FLASH_AMD_CHECK_DQ7 | 195 | #define CONFIG_SYS_FLASH_AMD_CHECK_DQ7 |
196 | 196 | ||
197 | #define CONFIG_BOARD_EARLY_INIT_R /* call board_early_init_r function */ | 197 | #define CONFIG_BOARD_EARLY_INIT_R /* call board_early_init_r function */ |
198 | 198 | ||
199 | #define CONFIG_FSL_PIXIS 1 /* use common PIXIS code */ | 199 | #define CONFIG_FSL_PIXIS 1 /* use common PIXIS code */ |
200 | #define PIXIS_BASE 0xffdf0000 /* PIXIS registers */ | 200 | #define PIXIS_BASE 0xffdf0000 /* PIXIS registers */ |
201 | #define PIXIS_BASE_PHYS PIXIS_BASE | 201 | #define PIXIS_BASE_PHYS PIXIS_BASE |
202 | 202 | ||
203 | #define CONFIG_SYS_BR3_PRELIM (BR_PHYS_ADDR(PIXIS_BASE_PHYS) | BR_PS_8 | BR_V) | 203 | #define CONFIG_SYS_BR3_PRELIM (BR_PHYS_ADDR(PIXIS_BASE_PHYS) | BR_PS_8 | BR_V) |
204 | #define CONFIG_SYS_OR3_PRELIM 0xffffeff7 /* 32KB but only 4k mapped */ | 204 | #define CONFIG_SYS_OR3_PRELIM 0xffffeff7 /* 32KB but only 4k mapped */ |
205 | 205 | ||
206 | #define PIXIS_ID 0x0 /* Board ID at offset 0 */ | 206 | #define PIXIS_ID 0x0 /* Board ID at offset 0 */ |
207 | #define PIXIS_VER 0x1 /* Board version at offset 1 */ | 207 | #define PIXIS_VER 0x1 /* Board version at offset 1 */ |
208 | #define PIXIS_PVER 0x2 /* PIXIS FPGA version at offset 2 */ | 208 | #define PIXIS_PVER 0x2 /* PIXIS FPGA version at offset 2 */ |
209 | #define PIXIS_CSR 0x3 /* PIXIS General control/status register */ | 209 | #define PIXIS_CSR 0x3 /* PIXIS General control/status register */ |
210 | #define PIXIS_RST 0x4 /* PIXIS Reset Control register */ | 210 | #define PIXIS_RST 0x4 /* PIXIS Reset Control register */ |
211 | #define PIXIS_PWR 0x5 /* PIXIS Power status register */ | 211 | #define PIXIS_PWR 0x5 /* PIXIS Power status register */ |
212 | #define PIXIS_AUX 0x6 /* Auxiliary 1 register */ | 212 | #define PIXIS_AUX 0x6 /* Auxiliary 1 register */ |
213 | #define PIXIS_SPD 0x7 /* Register for SYSCLK speed */ | 213 | #define PIXIS_SPD 0x7 /* Register for SYSCLK speed */ |
214 | #define PIXIS_AUX2 0x8 /* Auxiliary 2 register */ | 214 | #define PIXIS_AUX2 0x8 /* Auxiliary 2 register */ |
215 | #define PIXIS_VCTL 0x10 /* VELA Control Register */ | 215 | #define PIXIS_VCTL 0x10 /* VELA Control Register */ |
216 | #define PIXIS_VSTAT 0x11 /* VELA Status Register */ | 216 | #define PIXIS_VSTAT 0x11 /* VELA Status Register */ |
217 | #define PIXIS_VCFGEN0 0x12 /* VELA Config Enable 0 */ | 217 | #define PIXIS_VCFGEN0 0x12 /* VELA Config Enable 0 */ |
218 | #define PIXIS_VCFGEN1 0x13 /* VELA Config Enable 1 */ | 218 | #define PIXIS_VCFGEN1 0x13 /* VELA Config Enable 1 */ |
219 | #define PIXIS_VCORE0 0x14 /* VELA VCORE0 Register */ | 219 | #define PIXIS_VCORE0 0x14 /* VELA VCORE0 Register */ |
220 | #define PIXIS_VBOOT 0x16 /* VELA VBOOT Register */ | 220 | #define PIXIS_VBOOT 0x16 /* VELA VBOOT Register */ |
221 | #define PIXIS_VSPEED0 0x17 /* VELA VSpeed 0 */ | 221 | #define PIXIS_VSPEED0 0x17 /* VELA VSpeed 0 */ |
222 | #define PIXIS_VSPEED1 0x18 /* VELA VSpeed 1 */ | 222 | #define PIXIS_VSPEED1 0x18 /* VELA VSpeed 1 */ |
223 | #define PIXIS_VSPEED2 0x19 /* VELA VSpeed 2 */ | 223 | #define PIXIS_VSPEED2 0x19 /* VELA VSpeed 2 */ |
224 | #define PIXIS_VSYSCLK0 0x1A /* VELA SYSCLK0 Register */ | 224 | #define PIXIS_VSYSCLK0 0x1A /* VELA SYSCLK0 Register */ |
225 | #define PIXIS_VSYSCLK1 0x1B /* VELA SYSCLK1 Register */ | 225 | #define PIXIS_VSYSCLK1 0x1B /* VELA SYSCLK1 Register */ |
226 | #define PIXIS_VSYSCLK2 0x1C /* VELA SYSCLK2 Register */ | 226 | #define PIXIS_VSYSCLK2 0x1C /* VELA SYSCLK2 Register */ |
227 | #define PIXIS_VDDRCLK0 0x1D /* VELA DDRCLK0 Register */ | 227 | #define PIXIS_VDDRCLK0 0x1D /* VELA DDRCLK0 Register */ |
228 | #define PIXIS_VDDRCLK1 0x1E /* VELA DDRCLK1 Register */ | 228 | #define PIXIS_VDDRCLK1 0x1E /* VELA DDRCLK1 Register */ |
229 | #define PIXIS_VDDRCLK2 0x1F /* VELA DDRCLK2 Register */ | 229 | #define PIXIS_VDDRCLK2 0x1F /* VELA DDRCLK2 Register */ |
230 | #define PIXIS_VWATCH 0x24 /* Watchdog Register */ | 230 | #define PIXIS_VWATCH 0x24 /* Watchdog Register */ |
231 | #define PIXIS_LED 0x25 /* LED Register */ | 231 | #define PIXIS_LED 0x25 /* LED Register */ |
232 | 232 | ||
233 | /* old pixis referenced names */ | 233 | /* old pixis referenced names */ |
234 | #define PIXIS_VCLKH 0x19 /* VELA VCLKH register */ | 234 | #define PIXIS_VCLKH 0x19 /* VELA VCLKH register */ |
235 | #define PIXIS_VCLKL 0x1A /* VELA VCLKL register */ | 235 | #define PIXIS_VCLKL 0x1A /* VELA VCLKL register */ |
236 | #define CONFIG_SYS_PIXIS_VBOOT_MASK 0xc0 | 236 | #define CONFIG_SYS_PIXIS_VBOOT_MASK 0xc0 |
237 | 237 | ||
238 | #define CONFIG_SYS_INIT_RAM_LOCK 1 | 238 | #define CONFIG_SYS_INIT_RAM_LOCK 1 |
239 | #define CONFIG_SYS_INIT_RAM_ADDR 0xffd00000 /* Initial L1 address */ | 239 | #define CONFIG_SYS_INIT_RAM_ADDR 0xffd00000 /* Initial L1 address */ |
240 | #define CONFIG_SYS_INIT_RAM_END 0x00004000 /* End of used area in RAM */ | 240 | #define CONFIG_SYS_INIT_RAM_END 0x00004000 /* End of used area in RAM */ |
241 | 241 | ||
242 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data */ | 242 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data */ |
243 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 243 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
244 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET | 244 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
245 | 245 | ||
246 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ | 246 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ |
247 | #define CONFIG_SYS_MALLOC_LEN (1024 * 1024) /* Reserved for malloc */ | 247 | #define CONFIG_SYS_MALLOC_LEN (1024 * 1024) /* Reserved for malloc */ |
248 | 248 | ||
249 | #define CONFIG_SYS_NAND_BASE 0xffa00000 | 249 | #define CONFIG_SYS_NAND_BASE 0xffa00000 |
250 | #define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE | 250 | #define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE |
251 | #define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE,\ | 251 | #define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE,\ |
252 | CONFIG_SYS_NAND_BASE + 0x40000, \ | 252 | CONFIG_SYS_NAND_BASE + 0x40000, \ |
253 | CONFIG_SYS_NAND_BASE + 0x80000, \ | 253 | CONFIG_SYS_NAND_BASE + 0x80000, \ |
254 | CONFIG_SYS_NAND_BASE + 0xC0000} | 254 | CONFIG_SYS_NAND_BASE + 0xC0000} |
255 | #define CONFIG_SYS_MAX_NAND_DEVICE 4 | 255 | #define CONFIG_SYS_MAX_NAND_DEVICE 4 |
256 | #define CONFIG_MTD_NAND_VERIFY_WRITE | 256 | #define CONFIG_MTD_NAND_VERIFY_WRITE |
257 | #define CONFIG_CMD_NAND 1 | 257 | #define CONFIG_CMD_NAND 1 |
258 | #define CONFIG_NAND_FSL_ELBC 1 | 258 | #define CONFIG_NAND_FSL_ELBC 1 |
259 | #define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024) | 259 | #define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024) |
260 | 260 | ||
261 | /* NAND flash config */ | 261 | /* NAND flash config */ |
262 | #define CONFIG_NAND_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \ | 262 | #define CONFIG_NAND_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \ |
263 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ | 263 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ |
264 | | BR_PS_8 /* Port Size = 8 bit */ \ | 264 | | BR_PS_8 /* Port Size = 8 bit */ \ |
265 | | BR_MS_FCM /* MSEL = FCM */ \ | 265 | | BR_MS_FCM /* MSEL = FCM */ \ |
266 | | BR_V) /* valid */ | 266 | | BR_V) /* valid */ |
267 | #define CONFIG_NAND_OR_PRELIM (0xFFFC0000 /* length 256K */ \ | 267 | #define CONFIG_NAND_OR_PRELIM (0xFFFC0000 /* length 256K */ \ |
268 | | OR_FCM_PGS /* Large Page*/ \ | 268 | | OR_FCM_PGS /* Large Page*/ \ |
269 | | OR_FCM_CSCT \ | 269 | | OR_FCM_CSCT \ |
270 | | OR_FCM_CST \ | 270 | | OR_FCM_CST \ |
271 | | OR_FCM_CHT \ | 271 | | OR_FCM_CHT \ |
272 | | OR_FCM_SCY_1 \ | 272 | | OR_FCM_SCY_1 \ |
273 | | OR_FCM_TRLX \ | 273 | | OR_FCM_TRLX \ |
274 | | OR_FCM_EHTR) | 274 | | OR_FCM_EHTR) |
275 | 275 | ||
276 | #define CONFIG_SYS_BR2_PRELIM CONFIG_NAND_BR_PRELIM /* NAND Base Address */ | 276 | #define CONFIG_SYS_BR2_PRELIM CONFIG_NAND_BR_PRELIM /* NAND Base Address */ |
277 | #define CONFIG_SYS_OR2_PRELIM CONFIG_NAND_OR_PRELIM /* NAND Options */ | 277 | #define CONFIG_SYS_OR2_PRELIM CONFIG_NAND_OR_PRELIM /* NAND Options */ |
278 | 278 | ||
279 | #define CONFIG_SYS_BR4_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_NAND_BASE_PHYS + 0x40000))\ | 279 | #define CONFIG_SYS_BR4_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_NAND_BASE_PHYS + 0x40000))\ |
280 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ | 280 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ |
281 | | BR_PS_8 /* Port Size = 8 bit */ \ | 281 | | BR_PS_8 /* Port Size = 8 bit */ \ |
282 | | BR_MS_FCM /* MSEL = FCM */ \ | 282 | | BR_MS_FCM /* MSEL = FCM */ \ |
283 | | BR_V) /* valid */ | 283 | | BR_V) /* valid */ |
284 | #define CONFIG_SYS_OR4_PRELIM CONFIG_NAND_OR_PRELIM /* NAND Options */ | 284 | #define CONFIG_SYS_OR4_PRELIM CONFIG_NAND_OR_PRELIM /* NAND Options */ |
285 | #define CONFIG_SYS_BR5_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_NAND_BASE_PHYS + 0x80000))\ | 285 | #define CONFIG_SYS_BR5_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_NAND_BASE_PHYS + 0x80000))\ |
286 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ | 286 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ |
287 | | BR_PS_8 /* Port Size = 8 bit */ \ | 287 | | BR_PS_8 /* Port Size = 8 bit */ \ |
288 | | BR_MS_FCM /* MSEL = FCM */ \ | 288 | | BR_MS_FCM /* MSEL = FCM */ \ |
289 | | BR_V) /* valid */ | 289 | | BR_V) /* valid */ |
290 | #define CONFIG_SYS_OR5_PRELIM CONFIG_NAND_OR_PRELIM /* NAND Options */ | 290 | #define CONFIG_SYS_OR5_PRELIM CONFIG_NAND_OR_PRELIM /* NAND Options */ |
291 | 291 | ||
292 | #define CONFIG_SYS_BR6_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_NAND_BASE_PHYS + 0xc0000))\ | 292 | #define CONFIG_SYS_BR6_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_NAND_BASE_PHYS + 0xc0000))\ |
293 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ | 293 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ |
294 | | BR_PS_8 /* Port Size = 8 bit */ \ | 294 | | BR_PS_8 /* Port Size = 8 bit */ \ |
295 | | BR_MS_FCM /* MSEL = FCM */ \ | 295 | | BR_MS_FCM /* MSEL = FCM */ \ |
296 | | BR_V) /* valid */ | 296 | | BR_V) /* valid */ |
297 | #define CONFIG_SYS_OR6_PRELIM CONFIG_NAND_OR_PRELIM /* NAND Options */ | 297 | #define CONFIG_SYS_OR6_PRELIM CONFIG_NAND_OR_PRELIM /* NAND Options */ |
298 | 298 | ||
299 | /* Serial Port - controlled on board with jumper J8 | 299 | /* Serial Port - controlled on board with jumper J8 |
300 | * open - index 2 | 300 | * open - index 2 |
301 | * shorted - index 1 | 301 | * shorted - index 1 |
302 | */ | 302 | */ |
303 | #define CONFIG_CONS_INDEX 1 | 303 | #define CONFIG_CONS_INDEX 1 |
304 | #undef CONFIG_SERIAL_SOFTWARE_FIFO | 304 | #undef CONFIG_SERIAL_SOFTWARE_FIFO |
305 | #define CONFIG_SYS_NS16550 | 305 | #define CONFIG_SYS_NS16550 |
306 | #define CONFIG_SYS_NS16550_SERIAL | 306 | #define CONFIG_SYS_NS16550_SERIAL |
307 | #define CONFIG_SYS_NS16550_REG_SIZE 1 | 307 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
308 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) | 308 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) |
309 | 309 | ||
310 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 310 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
311 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} | 311 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} |
312 | 312 | ||
313 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) | 313 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) |
314 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) | 314 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) |
315 | 315 | ||
316 | /* Use the HUSH parser */ | 316 | /* Use the HUSH parser */ |
317 | #define CONFIG_SYS_HUSH_PARSER | 317 | #define CONFIG_SYS_HUSH_PARSER |
318 | #ifdef CONFIG_SYS_HUSH_PARSER | 318 | #ifdef CONFIG_SYS_HUSH_PARSER |
319 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | 319 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
320 | #endif | 320 | #endif |
321 | 321 | ||
322 | /* | 322 | /* |
323 | * Pass open firmware flat tree | 323 | * Pass open firmware flat tree |
324 | */ | 324 | */ |
325 | #define CONFIG_OF_LIBFDT 1 | 325 | #define CONFIG_OF_LIBFDT 1 |
326 | #define CONFIG_OF_BOARD_SETUP 1 | 326 | #define CONFIG_OF_BOARD_SETUP 1 |
327 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 | 327 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 |
328 | 328 | ||
329 | #define CONFIG_SYS_64BIT_STRTOUL 1 | 329 | #define CONFIG_SYS_64BIT_STRTOUL 1 |
330 | #define CONFIG_SYS_64BIT_VSPRINTF 1 | 330 | #define CONFIG_SYS_64BIT_VSPRINTF 1 |
331 | 331 | ||
332 | 332 | ||
333 | /* | 333 | /* |
334 | * I2C | 334 | * I2C |
335 | */ | 335 | */ |
336 | #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ | 336 | #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ |
337 | #define CONFIG_HARD_I2C /* I2C with hardware support */ | 337 | #define CONFIG_HARD_I2C /* I2C with hardware support */ |
338 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ | 338 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ |
339 | #define CONFIG_I2C_MULTI_BUS | 339 | #define CONFIG_I2C_MULTI_BUS |
340 | #define CONFIG_I2C_CMD_TREE | ||
341 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ | 340 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ |
342 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 341 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
343 | #define CONFIG_SYS_I2C_NOPROBES {{0, 0x29}} /* Don't probe these addrs */ | 342 | #define CONFIG_SYS_I2C_NOPROBES {{0, 0x29}} /* Don't probe these addrs */ |
344 | #define CONFIG_SYS_I2C_OFFSET 0x3000 | 343 | #define CONFIG_SYS_I2C_OFFSET 0x3000 |
345 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 | 344 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 |
346 | 345 | ||
347 | /* | 346 | /* |
348 | * I2C2 EEPROM | 347 | * I2C2 EEPROM |
349 | */ | 348 | */ |
350 | #define CONFIG_ID_EEPROM | 349 | #define CONFIG_ID_EEPROM |
351 | #ifdef CONFIG_ID_EEPROM | 350 | #ifdef CONFIG_ID_EEPROM |
352 | #define CONFIG_SYS_I2C_EEPROM_NXID | 351 | #define CONFIG_SYS_I2C_EEPROM_NXID |
353 | #endif | 352 | #endif |
354 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 | 353 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 |
355 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 | 354 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 |
356 | #define CONFIG_SYS_EEPROM_BUS_NUM 1 | 355 | #define CONFIG_SYS_EEPROM_BUS_NUM 1 |
357 | 356 | ||
358 | /* | 357 | /* |
359 | * General PCI | 358 | * General PCI |
360 | * Memory space is mapped 1-1, but I/O space must start from 0. | 359 | * Memory space is mapped 1-1, but I/O space must start from 0. |
361 | */ | 360 | */ |
362 | 361 | ||
363 | #define CONFIG_SYS_PCI1_MEM_VIRT 0x80000000 | 362 | #define CONFIG_SYS_PCI1_MEM_VIRT 0x80000000 |
364 | #define CONFIG_SYS_PCI1_MEM_BUS 0x80000000 | 363 | #define CONFIG_SYS_PCI1_MEM_BUS 0x80000000 |
365 | #define CONFIG_SYS_PCI1_MEM_PHYS 0x80000000 | 364 | #define CONFIG_SYS_PCI1_MEM_PHYS 0x80000000 |
366 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */ | 365 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */ |
367 | #define CONFIG_SYS_PCI1_IO_VIRT 0xffc00000 | 366 | #define CONFIG_SYS_PCI1_IO_VIRT 0xffc00000 |
368 | #define CONFIG_SYS_PCI1_IO_BUS 0x00000000 | 367 | #define CONFIG_SYS_PCI1_IO_BUS 0x00000000 |
369 | #define CONFIG_SYS_PCI1_IO_PHYS 0xffc00000 | 368 | #define CONFIG_SYS_PCI1_IO_PHYS 0xffc00000 |
370 | #define CONFIG_SYS_PCI1_IO_SIZE 0x00010000 /* 64k */ | 369 | #define CONFIG_SYS_PCI1_IO_SIZE 0x00010000 /* 64k */ |
371 | 370 | ||
372 | /* controller 1, Slot 1, tgtid 1, Base address a000 */ | 371 | /* controller 1, Slot 1, tgtid 1, Base address a000 */ |
373 | #define CONFIG_SYS_PCIE1_MEM_VIRT 0x90000000 | 372 | #define CONFIG_SYS_PCIE1_MEM_VIRT 0x90000000 |
374 | #define CONFIG_SYS_PCIE1_MEM_BUS 0x90000000 | 373 | #define CONFIG_SYS_PCIE1_MEM_BUS 0x90000000 |
375 | #define CONFIG_SYS_PCIE1_MEM_PHYS 0x90000000 | 374 | #define CONFIG_SYS_PCIE1_MEM_PHYS 0x90000000 |
376 | #define CONFIG_SYS_PCIE1_MEM_SIZE 0x08000000 /* 128M */ | 375 | #define CONFIG_SYS_PCIE1_MEM_SIZE 0x08000000 /* 128M */ |
377 | #define CONFIG_SYS_PCIE1_IO_VIRT 0xffc10000 | 376 | #define CONFIG_SYS_PCIE1_IO_VIRT 0xffc10000 |
378 | #define CONFIG_SYS_PCIE1_IO_BUS 0x00000000 | 377 | #define CONFIG_SYS_PCIE1_IO_BUS 0x00000000 |
379 | #define CONFIG_SYS_PCIE1_IO_PHYS 0xffc10000 | 378 | #define CONFIG_SYS_PCIE1_IO_PHYS 0xffc10000 |
380 | #define CONFIG_SYS_PCIE1_IO_SIZE 0x00010000 /* 64k */ | 379 | #define CONFIG_SYS_PCIE1_IO_SIZE 0x00010000 /* 64k */ |
381 | 380 | ||
382 | /* controller 2, Slot 2, tgtid 2, Base address 9000 */ | 381 | /* controller 2, Slot 2, tgtid 2, Base address 9000 */ |
383 | #define CONFIG_SYS_PCIE2_MEM_VIRT 0x98000000 | 382 | #define CONFIG_SYS_PCIE2_MEM_VIRT 0x98000000 |
384 | #define CONFIG_SYS_PCIE2_MEM_BUS 0x98000000 | 383 | #define CONFIG_SYS_PCIE2_MEM_BUS 0x98000000 |
385 | #define CONFIG_SYS_PCIE2_MEM_PHYS 0x98000000 | 384 | #define CONFIG_SYS_PCIE2_MEM_PHYS 0x98000000 |
386 | #define CONFIG_SYS_PCIE2_MEM_SIZE 0x08000000 /* 128M */ | 385 | #define CONFIG_SYS_PCIE2_MEM_SIZE 0x08000000 /* 128M */ |
387 | #define CONFIG_SYS_PCIE2_IO_VIRT 0xffc20000 | 386 | #define CONFIG_SYS_PCIE2_IO_VIRT 0xffc20000 |
388 | #define CONFIG_SYS_PCIE2_IO_BUS 0x00000000 | 387 | #define CONFIG_SYS_PCIE2_IO_BUS 0x00000000 |
389 | #define CONFIG_SYS_PCIE2_IO_PHYS 0xffc20000 | 388 | #define CONFIG_SYS_PCIE2_IO_PHYS 0xffc20000 |
390 | #define CONFIG_SYS_PCIE2_IO_SIZE 0x00010000 /* 64k */ | 389 | #define CONFIG_SYS_PCIE2_IO_SIZE 0x00010000 /* 64k */ |
391 | 390 | ||
392 | /* controller 3, direct to uli, tgtid 3, Base address 8000 */ | 391 | /* controller 3, direct to uli, tgtid 3, Base address 8000 */ |
393 | #define CONFIG_SYS_PCIE3_MEM_VIRT 0xa0000000 | 392 | #define CONFIG_SYS_PCIE3_MEM_VIRT 0xa0000000 |
394 | #define CONFIG_SYS_PCIE3_MEM_BUS 0xa0000000 | 393 | #define CONFIG_SYS_PCIE3_MEM_BUS 0xa0000000 |
395 | #define CONFIG_SYS_PCIE3_MEM_PHYS 0xa0000000 | 394 | #define CONFIG_SYS_PCIE3_MEM_PHYS 0xa0000000 |
396 | #define CONFIG_SYS_PCIE3_MEM_SIZE 0x20000000 /* 512M */ | 395 | #define CONFIG_SYS_PCIE3_MEM_SIZE 0x20000000 /* 512M */ |
397 | #define CONFIG_SYS_PCIE3_IO_VIRT 0xffc30000 | 396 | #define CONFIG_SYS_PCIE3_IO_VIRT 0xffc30000 |
398 | #define CONFIG_SYS_PCIE3_IO_BUS 0x00000000 | 397 | #define CONFIG_SYS_PCIE3_IO_BUS 0x00000000 |
399 | #define CONFIG_SYS_PCIE3_IO_PHYS 0xffc30000 | 398 | #define CONFIG_SYS_PCIE3_IO_PHYS 0xffc30000 |
400 | #define CONFIG_SYS_PCIE3_IO_SIZE 0x00010000 /* 64k */ | 399 | #define CONFIG_SYS_PCIE3_IO_SIZE 0x00010000 /* 64k */ |
401 | 400 | ||
402 | #if defined(CONFIG_PCI) | 401 | #if defined(CONFIG_PCI) |
403 | 402 | ||
404 | #define CONFIG_NET_MULTI | 403 | #define CONFIG_NET_MULTI |
405 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ | 404 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ |
406 | 405 | ||
407 | /*PCIE video card used*/ | 406 | /*PCIE video card used*/ |
408 | #define VIDEO_IO_OFFSET CONFIG_SYS_PCIE3_IO_VIRT | 407 | #define VIDEO_IO_OFFSET CONFIG_SYS_PCIE3_IO_VIRT |
409 | 408 | ||
410 | /*PCI video card used*/ | 409 | /*PCI video card used*/ |
411 | /*#define VIDEO_IO_OFFSET CONFIG_SYS_PCI1_IO_VIRT*/ | 410 | /*#define VIDEO_IO_OFFSET CONFIG_SYS_PCI1_IO_VIRT*/ |
412 | 411 | ||
413 | /* video */ | 412 | /* video */ |
414 | #define CONFIG_VIDEO | 413 | #define CONFIG_VIDEO |
415 | 414 | ||
416 | #if defined(CONFIG_VIDEO) | 415 | #if defined(CONFIG_VIDEO) |
417 | #define CONFIG_BIOSEMU | 416 | #define CONFIG_BIOSEMU |
418 | #define CONFIG_CFB_CONSOLE | 417 | #define CONFIG_CFB_CONSOLE |
419 | #define CONFIG_VIDEO_SW_CURSOR | 418 | #define CONFIG_VIDEO_SW_CURSOR |
420 | #define CONFIG_VGA_AS_SINGLE_DEVICE | 419 | #define CONFIG_VGA_AS_SINGLE_DEVICE |
421 | #define CONFIG_ATI_RADEON_FB | 420 | #define CONFIG_ATI_RADEON_FB |
422 | #define CONFIG_VIDEO_LOGO | 421 | #define CONFIG_VIDEO_LOGO |
423 | /*#define CONFIG_CONSOLE_CURSOR*/ | 422 | /*#define CONFIG_CONSOLE_CURSOR*/ |
424 | #define CONFIG_SYS_ISA_IO_BASE_ADDRESS CONFIG_SYS_PCIE3_IO_VIRT | 423 | #define CONFIG_SYS_ISA_IO_BASE_ADDRESS CONFIG_SYS_PCIE3_IO_VIRT |
425 | #endif | 424 | #endif |
426 | 425 | ||
427 | #undef CONFIG_EEPRO100 | 426 | #undef CONFIG_EEPRO100 |
428 | #undef CONFIG_TULIP | 427 | #undef CONFIG_TULIP |
429 | #undef CONFIG_RTL8139 | 428 | #undef CONFIG_RTL8139 |
430 | 429 | ||
431 | #ifdef CONFIG_RTL8139 | 430 | #ifdef CONFIG_RTL8139 |
432 | /* This macro is used by RTL8139 but not defined in PPC architecture */ | 431 | /* This macro is used by RTL8139 but not defined in PPC architecture */ |
433 | #define KSEG1ADDR(x) ({u32 _x=le32_to_cpu(*(u32 *)(x)); (&_x);}) | 432 | #define KSEG1ADDR(x) ({u32 _x=le32_to_cpu(*(u32 *)(x)); (&_x);}) |
434 | #define _IO_BASE 0x00000000 | 433 | #define _IO_BASE 0x00000000 |
435 | #endif | 434 | #endif |
436 | 435 | ||
437 | #ifndef CONFIG_PCI_PNP | 436 | #ifndef CONFIG_PCI_PNP |
438 | #define PCI_ENET0_IOADDR CONFIG_SYS_PCI1_IO_BUS | 437 | #define PCI_ENET0_IOADDR CONFIG_SYS_PCI1_IO_BUS |
439 | #define PCI_ENET0_MEMADDR CONFIG_SYS_PCI1_IO_BUS | 438 | #define PCI_ENET0_MEMADDR CONFIG_SYS_PCI1_IO_BUS |
440 | #define PCI_IDSEL_NUMBER 0x11 /* IDSEL = AD11 */ | 439 | #define PCI_IDSEL_NUMBER 0x11 /* IDSEL = AD11 */ |
441 | #endif | 440 | #endif |
442 | 441 | ||
443 | #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ | 442 | #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ |
444 | 443 | ||
445 | #endif /* CONFIG_PCI */ | 444 | #endif /* CONFIG_PCI */ |
446 | 445 | ||
447 | /* SATA */ | 446 | /* SATA */ |
448 | #define CONFIG_LIBATA | 447 | #define CONFIG_LIBATA |
449 | #define CONFIG_FSL_SATA | 448 | #define CONFIG_FSL_SATA |
450 | 449 | ||
451 | #define CONFIG_SYS_SATA_MAX_DEVICE 2 | 450 | #define CONFIG_SYS_SATA_MAX_DEVICE 2 |
452 | #define CONFIG_SATA1 | 451 | #define CONFIG_SATA1 |
453 | #define CONFIG_SYS_SATA1 CONFIG_SYS_MPC85xx_SATA1_ADDR | 452 | #define CONFIG_SYS_SATA1 CONFIG_SYS_MPC85xx_SATA1_ADDR |
454 | #define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA | 453 | #define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA |
455 | #define CONFIG_SATA2 | 454 | #define CONFIG_SATA2 |
456 | #define CONFIG_SYS_SATA2 CONFIG_SYS_MPC85xx_SATA2_ADDR | 455 | #define CONFIG_SYS_SATA2 CONFIG_SYS_MPC85xx_SATA2_ADDR |
457 | #define CONFIG_SYS_SATA2_FLAGS FLAGS_DMA | 456 | #define CONFIG_SYS_SATA2_FLAGS FLAGS_DMA |
458 | 457 | ||
459 | #ifdef CONFIG_FSL_SATA | 458 | #ifdef CONFIG_FSL_SATA |
460 | #define CONFIG_LBA48 | 459 | #define CONFIG_LBA48 |
461 | #define CONFIG_CMD_SATA | 460 | #define CONFIG_CMD_SATA |
462 | #define CONFIG_DOS_PARTITION | 461 | #define CONFIG_DOS_PARTITION |
463 | #define CONFIG_CMD_EXT2 | 462 | #define CONFIG_CMD_EXT2 |
464 | #endif | 463 | #endif |
465 | 464 | ||
466 | #if defined(CONFIG_TSEC_ENET) | 465 | #if defined(CONFIG_TSEC_ENET) |
467 | 466 | ||
468 | #ifndef CONFIG_NET_MULTI | 467 | #ifndef CONFIG_NET_MULTI |
469 | #define CONFIG_NET_MULTI 1 | 468 | #define CONFIG_NET_MULTI 1 |
470 | #endif | 469 | #endif |
471 | 470 | ||
472 | #define CONFIG_MII 1 /* MII PHY management */ | 471 | #define CONFIG_MII 1 /* MII PHY management */ |
473 | #define CONFIG_MII_DEFAULT_TSEC 1 /* Allow unregistered phys */ | 472 | #define CONFIG_MII_DEFAULT_TSEC 1 /* Allow unregistered phys */ |
474 | #define CONFIG_TSEC1 1 | 473 | #define CONFIG_TSEC1 1 |
475 | #define CONFIG_TSEC1_NAME "eTSEC1" | 474 | #define CONFIG_TSEC1_NAME "eTSEC1" |
476 | #define CONFIG_TSEC3 1 | 475 | #define CONFIG_TSEC3 1 |
477 | #define CONFIG_TSEC3_NAME "eTSEC3" | 476 | #define CONFIG_TSEC3_NAME "eTSEC3" |
478 | 477 | ||
479 | #define CONFIG_FSL_SGMII_RISER 1 | 478 | #define CONFIG_FSL_SGMII_RISER 1 |
480 | #define SGMII_RISER_PHY_OFFSET 0x1c | 479 | #define SGMII_RISER_PHY_OFFSET 0x1c |
481 | 480 | ||
482 | #define TSEC1_PHY_ADDR 1 /* TSEC1 -> PHY1 */ | 481 | #define TSEC1_PHY_ADDR 1 /* TSEC1 -> PHY1 */ |
483 | #define TSEC3_PHY_ADDR 0 /* TSEC3 -> PHY0 */ | 482 | #define TSEC3_PHY_ADDR 0 /* TSEC3 -> PHY0 */ |
484 | 483 | ||
485 | #define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) | 484 | #define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) |
486 | #define TSEC3_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) | 485 | #define TSEC3_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) |
487 | 486 | ||
488 | #define TSEC1_PHYIDX 0 | 487 | #define TSEC1_PHYIDX 0 |
489 | #define TSEC3_PHYIDX 0 | 488 | #define TSEC3_PHYIDX 0 |
490 | 489 | ||
491 | #define CONFIG_ETHPRIME "eTSEC1" | 490 | #define CONFIG_ETHPRIME "eTSEC1" |
492 | 491 | ||
493 | #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */ | 492 | #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */ |
494 | 493 | ||
495 | #endif /* CONFIG_TSEC_ENET */ | 494 | #endif /* CONFIG_TSEC_ENET */ |
496 | 495 | ||
497 | /* | 496 | /* |
498 | * Environment | 497 | * Environment |
499 | */ | 498 | */ |
500 | #define CONFIG_ENV_IS_IN_FLASH 1 | 499 | #define CONFIG_ENV_IS_IN_FLASH 1 |
501 | #if CONFIG_SYS_MONITOR_BASE > 0xfff80000 | 500 | #if CONFIG_SYS_MONITOR_BASE > 0xfff80000 |
502 | #define CONFIG_ENV_ADDR 0xfff80000 | 501 | #define CONFIG_ENV_ADDR 0xfff80000 |
503 | #else | 502 | #else |
504 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE) | 503 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE) |
505 | #endif | 504 | #endif |
506 | #define CONFIG_ENV_SIZE 0x2000 | 505 | #define CONFIG_ENV_SIZE 0x2000 |
507 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K (one sector) */ | 506 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K (one sector) */ |
508 | 507 | ||
509 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ | 508 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
510 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ | 509 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
511 | 510 | ||
512 | /* | 511 | /* |
513 | * Command line configuration. | 512 | * Command line configuration. |
514 | */ | 513 | */ |
515 | #include <config_cmd_default.h> | 514 | #include <config_cmd_default.h> |
516 | 515 | ||
517 | #define CONFIG_CMD_IRQ | 516 | #define CONFIG_CMD_IRQ |
518 | #define CONFIG_CMD_PING | 517 | #define CONFIG_CMD_PING |
519 | #define CONFIG_CMD_I2C | 518 | #define CONFIG_CMD_I2C |
520 | #define CONFIG_CMD_MII | 519 | #define CONFIG_CMD_MII |
521 | #define CONFIG_CMD_ELF | 520 | #define CONFIG_CMD_ELF |
522 | #define CONFIG_CMD_IRQ | 521 | #define CONFIG_CMD_IRQ |
523 | #define CONFIG_CMD_SETEXPR | 522 | #define CONFIG_CMD_SETEXPR |
524 | 523 | ||
525 | #if defined(CONFIG_PCI) | 524 | #if defined(CONFIG_PCI) |
526 | #define CONFIG_CMD_PCI | 525 | #define CONFIG_CMD_PCI |
527 | #define CONFIG_CMD_BEDBUG | 526 | #define CONFIG_CMD_BEDBUG |
528 | #define CONFIG_CMD_NET | 527 | #define CONFIG_CMD_NET |
529 | #endif | 528 | #endif |
530 | 529 | ||
531 | #undef CONFIG_WATCHDOG /* watchdog disabled */ | 530 | #undef CONFIG_WATCHDOG /* watchdog disabled */ |
532 | 531 | ||
533 | #define CONFIG_MMC 1 | 532 | #define CONFIG_MMC 1 |
534 | 533 | ||
535 | #ifdef CONFIG_MMC | 534 | #ifdef CONFIG_MMC |
536 | #define CONFIG_FSL_ESDHC | 535 | #define CONFIG_FSL_ESDHC |
537 | #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR | 536 | #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR |
538 | #define CONFIG_CMD_MMC | 537 | #define CONFIG_CMD_MMC |
539 | #define CONFIG_GENERIC_MMC | 538 | #define CONFIG_GENERIC_MMC |
540 | #define CONFIG_CMD_EXT2 | 539 | #define CONFIG_CMD_EXT2 |
541 | #define CONFIG_CMD_FAT | 540 | #define CONFIG_CMD_FAT |
542 | #define CONFIG_DOS_PARTITION | 541 | #define CONFIG_DOS_PARTITION |
543 | #endif | 542 | #endif |
544 | 543 | ||
545 | /* | 544 | /* |
546 | * Miscellaneous configurable options | 545 | * Miscellaneous configurable options |
547 | */ | 546 | */ |
548 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 547 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
549 | #define CONFIG_CMDLINE_EDITING /* Command-line editing */ | 548 | #define CONFIG_CMDLINE_EDITING /* Command-line editing */ |
550 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ | 549 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ |
551 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | 550 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
552 | #if defined(CONFIG_CMD_KGDB) | 551 | #if defined(CONFIG_CMD_KGDB) |
553 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ | 552 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
554 | #else | 553 | #else |
555 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | 554 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
556 | #endif | 555 | #endif |
557 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ | 556 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
558 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 557 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
559 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | 558 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
560 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ | 559 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ |
561 | 560 | ||
562 | /* | 561 | /* |
563 | * For booting Linux, the board info and command line data | 562 | * For booting Linux, the board info and command line data |
564 | * have to be in the first 8 MB of memory, since this is | 563 | * have to be in the first 8 MB of memory, since this is |
565 | * the maximum mapped by the Linux kernel during initialization. | 564 | * the maximum mapped by the Linux kernel during initialization. |
566 | */ | 565 | */ |
567 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ | 566 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ |
568 | 567 | ||
569 | /* | 568 | /* |
570 | * Internal Definitions | 569 | * Internal Definitions |
571 | * | 570 | * |
572 | * Boot Flags | 571 | * Boot Flags |
573 | */ | 572 | */ |
574 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 573 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
575 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 574 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
576 | 575 | ||
577 | #if defined(CONFIG_CMD_KGDB) | 576 | #if defined(CONFIG_CMD_KGDB) |
578 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ | 577 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ |
579 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ | 578 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ |
580 | #endif | 579 | #endif |
581 | 580 | ||
582 | /* | 581 | /* |
583 | * Environment Configuration | 582 | * Environment Configuration |
584 | */ | 583 | */ |
585 | 584 | ||
586 | /* The mac addresses for all ethernet interface */ | 585 | /* The mac addresses for all ethernet interface */ |
587 | #if defined(CONFIG_TSEC_ENET) | 586 | #if defined(CONFIG_TSEC_ENET) |
588 | #define CONFIG_HAS_ETH0 | 587 | #define CONFIG_HAS_ETH0 |
589 | #define CONFIG_ETHADDR 00:E0:0C:02:00:FD | 588 | #define CONFIG_ETHADDR 00:E0:0C:02:00:FD |
590 | #define CONFIG_HAS_ETH1 | 589 | #define CONFIG_HAS_ETH1 |
591 | #define CONFIG_ETH1ADDR 00:E0:0C:02:01:FD | 590 | #define CONFIG_ETH1ADDR 00:E0:0C:02:01:FD |
592 | #define CONFIG_HAS_ETH2 | 591 | #define CONFIG_HAS_ETH2 |
593 | #define CONFIG_ETH2ADDR 00:E0:0C:02:02:FD | 592 | #define CONFIG_ETH2ADDR 00:E0:0C:02:02:FD |
594 | #define CONFIG_HAS_ETH3 | 593 | #define CONFIG_HAS_ETH3 |
595 | #define CONFIG_ETH3ADDR 00:E0:0C:02:03:FD | 594 | #define CONFIG_ETH3ADDR 00:E0:0C:02:03:FD |
596 | #endif | 595 | #endif |
597 | 596 | ||
598 | #define CONFIG_IPADDR 192.168.1.254 | 597 | #define CONFIG_IPADDR 192.168.1.254 |
599 | 598 | ||
600 | #define CONFIG_HOSTNAME unknown | 599 | #define CONFIG_HOSTNAME unknown |
601 | #define CONFIG_ROOTPATH /opt/nfsroot | 600 | #define CONFIG_ROOTPATH /opt/nfsroot |
602 | #define CONFIG_BOOTFILE uImage | 601 | #define CONFIG_BOOTFILE uImage |
603 | #define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */ | 602 | #define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */ |
604 | 603 | ||
605 | #define CONFIG_SERVERIP 192.168.1.1 | 604 | #define CONFIG_SERVERIP 192.168.1.1 |
606 | #define CONFIG_GATEWAYIP 192.168.1.1 | 605 | #define CONFIG_GATEWAYIP 192.168.1.1 |
607 | #define CONFIG_NETMASK 255.255.255.0 | 606 | #define CONFIG_NETMASK 255.255.255.0 |
608 | 607 | ||
609 | /* default location for tftp and bootm */ | 608 | /* default location for tftp and bootm */ |
610 | #define CONFIG_LOADADDR 1000000 | 609 | #define CONFIG_LOADADDR 1000000 |
611 | 610 | ||
612 | #define CONFIG_BOOTDELAY 10 /* -1 disables auto-boot */ | 611 | #define CONFIG_BOOTDELAY 10 /* -1 disables auto-boot */ |
613 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs */ | 612 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs */ |
614 | 613 | ||
615 | #define CONFIG_BAUDRATE 115200 | 614 | #define CONFIG_BAUDRATE 115200 |
616 | 615 | ||
617 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 616 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
618 | "netdev=eth0\0" \ | 617 | "netdev=eth0\0" \ |
619 | "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \ | 618 | "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \ |
620 | "tftpflash=tftpboot $loadaddr $uboot; " \ | 619 | "tftpflash=tftpboot $loadaddr $uboot; " \ |
621 | "protect off " MK_STR(TEXT_BASE) " +$filesize; " \ | 620 | "protect off " MK_STR(TEXT_BASE) " +$filesize; " \ |
622 | "erase " MK_STR(TEXT_BASE) " +$filesize; " \ | 621 | "erase " MK_STR(TEXT_BASE) " +$filesize; " \ |
623 | "cp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize; " \ | 622 | "cp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize; " \ |
624 | "protect on " MK_STR(TEXT_BASE) " +$filesize; " \ | 623 | "protect on " MK_STR(TEXT_BASE) " +$filesize; " \ |
625 | "cmp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize\0" \ | 624 | "cmp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize\0" \ |
626 | "consoledev=ttyS0\0" \ | 625 | "consoledev=ttyS0\0" \ |
627 | "ramdiskaddr=2000000\0" \ | 626 | "ramdiskaddr=2000000\0" \ |
628 | "ramdiskfile=8536ds/ramdisk.uboot\0" \ | 627 | "ramdiskfile=8536ds/ramdisk.uboot\0" \ |
629 | "fdtaddr=c00000\0" \ | 628 | "fdtaddr=c00000\0" \ |
630 | "fdtfile=8536ds/mpc8536ds.dtb\0" \ | 629 | "fdtfile=8536ds/mpc8536ds.dtb\0" \ |
631 | "bdev=sda3\0" | 630 | "bdev=sda3\0" |
632 | 631 | ||
633 | #define CONFIG_HDBOOT \ | 632 | #define CONFIG_HDBOOT \ |
634 | "setenv bootargs root=/dev/$bdev rw " \ | 633 | "setenv bootargs root=/dev/$bdev rw " \ |
635 | "console=$consoledev,$baudrate $othbootargs;" \ | 634 | "console=$consoledev,$baudrate $othbootargs;" \ |
636 | "tftp $loadaddr $bootfile;" \ | 635 | "tftp $loadaddr $bootfile;" \ |
637 | "tftp $fdtaddr $fdtfile;" \ | 636 | "tftp $fdtaddr $fdtfile;" \ |
638 | "bootm $loadaddr - $fdtaddr" | 637 | "bootm $loadaddr - $fdtaddr" |
639 | 638 | ||
640 | #define CONFIG_NFSBOOTCOMMAND \ | 639 | #define CONFIG_NFSBOOTCOMMAND \ |
641 | "setenv bootargs root=/dev/nfs rw " \ | 640 | "setenv bootargs root=/dev/nfs rw " \ |
642 | "nfsroot=$serverip:$rootpath " \ | 641 | "nfsroot=$serverip:$rootpath " \ |
643 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ | 642 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ |
644 | "console=$consoledev,$baudrate $othbootargs;" \ | 643 | "console=$consoledev,$baudrate $othbootargs;" \ |
645 | "tftp $loadaddr $bootfile;" \ | 644 | "tftp $loadaddr $bootfile;" \ |
646 | "tftp $fdtaddr $fdtfile;" \ | 645 | "tftp $fdtaddr $fdtfile;" \ |
647 | "bootm $loadaddr - $fdtaddr" | 646 | "bootm $loadaddr - $fdtaddr" |
648 | 647 | ||
649 | #define CONFIG_RAMBOOTCOMMAND \ | 648 | #define CONFIG_RAMBOOTCOMMAND \ |
650 | "setenv bootargs root=/dev/ram rw " \ | 649 | "setenv bootargs root=/dev/ram rw " \ |
651 | "console=$consoledev,$baudrate $othbootargs;" \ | 650 | "console=$consoledev,$baudrate $othbootargs;" \ |
652 | "tftp $ramdiskaddr $ramdiskfile;" \ | 651 | "tftp $ramdiskaddr $ramdiskfile;" \ |
653 | "tftp $loadaddr $bootfile;" \ | 652 | "tftp $loadaddr $bootfile;" \ |
654 | "tftp $fdtaddr $fdtfile;" \ | 653 | "tftp $fdtaddr $fdtfile;" \ |
655 | "bootm $loadaddr $ramdiskaddr $fdtaddr" | 654 | "bootm $loadaddr $ramdiskaddr $fdtaddr" |
656 | 655 | ||
657 | #define CONFIG_BOOTCOMMAND CONFIG_HDBOOT | 656 | #define CONFIG_BOOTCOMMAND CONFIG_HDBOOT |
658 | 657 | ||
659 | #endif /* __CONFIG_H */ | 658 | #endif /* __CONFIG_H */ |
660 | 659 |
include/configs/MPC8568MDS.h
1 | /* | 1 | /* |
2 | * Copyright 2004-2007 Freescale Semiconductor. | 2 | * Copyright 2004-2007 Freescale Semiconductor. |
3 | * | 3 | * |
4 | * See file CREDITS for list of people who contributed to this | 4 | * See file CREDITS for list of people who contributed to this |
5 | * project. | 5 | * project. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License as | 8 | * modify it under the terms of the GNU General Public License as |
9 | * published by the Free Software Foundation; either version 2 of | 9 | * published by the Free Software Foundation; either version 2 of |
10 | * the License, or (at your option) any later version. | 10 | * the License, or (at your option) any later version. |
11 | * | 11 | * |
12 | * This program is distributed in the hope that it will be useful, | 12 | * This program is distributed in the hope that it will be useful, |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
16 | * | 16 | * |
17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License |
18 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
20 | * MA 02111-1307 USA | 20 | * MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | 22 | ||
23 | /* | 23 | /* |
24 | * mpc8568mds board configuration file | 24 | * mpc8568mds board configuration file |
25 | */ | 25 | */ |
26 | #ifndef __CONFIG_H | 26 | #ifndef __CONFIG_H |
27 | #define __CONFIG_H | 27 | #define __CONFIG_H |
28 | 28 | ||
29 | /* High Level Configuration Options */ | 29 | /* High Level Configuration Options */ |
30 | #define CONFIG_BOOKE 1 /* BOOKE */ | 30 | #define CONFIG_BOOKE 1 /* BOOKE */ |
31 | #define CONFIG_E500 1 /* BOOKE e500 family */ | 31 | #define CONFIG_E500 1 /* BOOKE e500 family */ |
32 | #define CONFIG_MPC85xx 1 /* MPC8540/60/55/41/48/68 */ | 32 | #define CONFIG_MPC85xx 1 /* MPC8540/60/55/41/48/68 */ |
33 | #define CONFIG_MPC8568 1 /* MPC8568 specific */ | 33 | #define CONFIG_MPC8568 1 /* MPC8568 specific */ |
34 | #define CONFIG_MPC8568MDS 1 /* MPC8568MDS board specific */ | 34 | #define CONFIG_MPC8568MDS 1 /* MPC8568MDS board specific */ |
35 | 35 | ||
36 | #define CONFIG_PCI 1 /* Enable PCI/PCIE */ | 36 | #define CONFIG_PCI 1 /* Enable PCI/PCIE */ |
37 | #define CONFIG_PCI1 1 /* PCI controller */ | 37 | #define CONFIG_PCI1 1 /* PCI controller */ |
38 | #define CONFIG_PCIE1 1 /* PCIE controller */ | 38 | #define CONFIG_PCIE1 1 /* PCIE controller */ |
39 | #define CONFIG_FSL_PCI_INIT 1 /* use common fsl pci init code */ | 39 | #define CONFIG_FSL_PCI_INIT 1 /* use common fsl pci init code */ |
40 | #define CONFIG_FSL_PCIE_RESET 1 /* need PCIe reset errata */ | 40 | #define CONFIG_FSL_PCIE_RESET 1 /* need PCIe reset errata */ |
41 | #define CONFIG_SYS_PCI_64BIT 1 /* enable 64-bit PCI resources */ | 41 | #define CONFIG_SYS_PCI_64BIT 1 /* enable 64-bit PCI resources */ |
42 | #define CONFIG_TSEC_ENET /* tsec ethernet support */ | 42 | #define CONFIG_TSEC_ENET /* tsec ethernet support */ |
43 | #define CONFIG_QE /* Enable QE */ | 43 | #define CONFIG_QE /* Enable QE */ |
44 | #define CONFIG_ENV_OVERWRITE | 44 | #define CONFIG_ENV_OVERWRITE |
45 | #define CONFIG_FSL_LAW 1 /* Use common FSL init code */ | 45 | #define CONFIG_FSL_LAW 1 /* Use common FSL init code */ |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * When initializing flash, if we cannot find the manufacturer ID, | 48 | * When initializing flash, if we cannot find the manufacturer ID, |
49 | * assume this is the AMD flash associated with the MDS board. | 49 | * assume this is the AMD flash associated with the MDS board. |
50 | * This allows booting from a promjet. | 50 | * This allows booting from a promjet. |
51 | */ | 51 | */ |
52 | #define CONFIG_ASSUME_AMD_FLASH | 52 | #define CONFIG_ASSUME_AMD_FLASH |
53 | 53 | ||
54 | #ifndef __ASSEMBLY__ | 54 | #ifndef __ASSEMBLY__ |
55 | extern unsigned long get_clock_freq(void); | 55 | extern unsigned long get_clock_freq(void); |
56 | #endif /*Replace a call to get_clock_freq (after it is implemented)*/ | 56 | #endif /*Replace a call to get_clock_freq (after it is implemented)*/ |
57 | #define CONFIG_SYS_CLK_FREQ 66000000 /*TODO: restore if wanting to read from BCSR: get_clock_freq()*/ /* sysclk for MPC85xx */ | 57 | #define CONFIG_SYS_CLK_FREQ 66000000 /*TODO: restore if wanting to read from BCSR: get_clock_freq()*/ /* sysclk for MPC85xx */ |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * These can be toggled for performance analysis, otherwise use default. | 60 | * These can be toggled for performance analysis, otherwise use default. |
61 | */ | 61 | */ |
62 | #define CONFIG_L2_CACHE /* toggle L2 cache */ | 62 | #define CONFIG_L2_CACHE /* toggle L2 cache */ |
63 | #define CONFIG_BTB /* toggle branch predition */ | 63 | #define CONFIG_BTB /* toggle branch predition */ |
64 | 64 | ||
65 | /* | 65 | /* |
66 | * Only possible on E500 Version 2 or newer cores. | 66 | * Only possible on E500 Version 2 or newer cores. |
67 | */ | 67 | */ |
68 | #define CONFIG_ENABLE_36BIT_PHYS 1 | 68 | #define CONFIG_ENABLE_36BIT_PHYS 1 |
69 | 69 | ||
70 | 70 | ||
71 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_pre_init */ | 71 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_pre_init */ |
72 | 72 | ||
73 | #define CONFIG_SYS_MEMTEST_START 0x00200000 /* memtest works on */ | 73 | #define CONFIG_SYS_MEMTEST_START 0x00200000 /* memtest works on */ |
74 | #define CONFIG_SYS_MEMTEST_END 0x00400000 | 74 | #define CONFIG_SYS_MEMTEST_END 0x00400000 |
75 | 75 | ||
76 | /* | 76 | /* |
77 | * Base addresses -- Note these are effective addresses where the | 77 | * Base addresses -- Note these are effective addresses where the |
78 | * actual resources get mapped (not physical addresses) | 78 | * actual resources get mapped (not physical addresses) |
79 | */ | 79 | */ |
80 | #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff700000 /* CCSRBAR Default */ | 80 | #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff700000 /* CCSRBAR Default */ |
81 | #define CONFIG_SYS_CCSRBAR 0xe0000000 /* relocated CCSRBAR */ | 81 | #define CONFIG_SYS_CCSRBAR 0xe0000000 /* relocated CCSRBAR */ |
82 | #define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR /* physical addr of CCSRBAR */ | 82 | #define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR /* physical addr of CCSRBAR */ |
83 | #define CONFIG_SYS_IMMR CONFIG_SYS_CCSRBAR /* PQII uses CONFIG_SYS_IMMR */ | 83 | #define CONFIG_SYS_IMMR CONFIG_SYS_CCSRBAR /* PQII uses CONFIG_SYS_IMMR */ |
84 | 84 | ||
85 | #define CONFIG_SYS_PCI1_ADDR (CONFIG_SYS_CCSRBAR+0x8000) | 85 | #define CONFIG_SYS_PCI1_ADDR (CONFIG_SYS_CCSRBAR+0x8000) |
86 | #define CONFIG_SYS_PCIE1_ADDR (CONFIG_SYS_CCSRBAR+0xa000) | 86 | #define CONFIG_SYS_PCIE1_ADDR (CONFIG_SYS_CCSRBAR+0xa000) |
87 | 87 | ||
88 | /* DDR Setup */ | 88 | /* DDR Setup */ |
89 | #define CONFIG_FSL_DDR2 | 89 | #define CONFIG_FSL_DDR2 |
90 | #undef CONFIG_FSL_DDR_INTERACTIVE | 90 | #undef CONFIG_FSL_DDR_INTERACTIVE |
91 | #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup*/ | 91 | #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup*/ |
92 | #define CONFIG_DDR_SPD | 92 | #define CONFIG_DDR_SPD |
93 | #define CONFIG_DDR_DLL /* possible DLL fix needed */ | 93 | #define CONFIG_DDR_DLL /* possible DLL fix needed */ |
94 | #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER /* DDR controller or DMA? */ | 94 | #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER /* DDR controller or DMA? */ |
95 | 95 | ||
96 | #define CONFIG_MEM_INIT_VALUE 0xDeadBeef | 96 | #define CONFIG_MEM_INIT_VALUE 0xDeadBeef |
97 | 97 | ||
98 | #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 /* DDR is system memory*/ | 98 | #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 /* DDR is system memory*/ |
99 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE | 99 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE |
100 | 100 | ||
101 | #define CONFIG_NUM_DDR_CONTROLLERS 1 | 101 | #define CONFIG_NUM_DDR_CONTROLLERS 1 |
102 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 | 102 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 |
103 | #define CONFIG_CHIP_SELECTS_PER_CTRL (2 * CONFIG_DIMM_SLOTS_PER_CTLR) | 103 | #define CONFIG_CHIP_SELECTS_PER_CTRL (2 * CONFIG_DIMM_SLOTS_PER_CTLR) |
104 | 104 | ||
105 | /* I2C addresses of SPD EEPROMs */ | 105 | /* I2C addresses of SPD EEPROMs */ |
106 | #define SPD_EEPROM_ADDRESS 0x51 /* CTLR 0 DIMM 0 */ | 106 | #define SPD_EEPROM_ADDRESS 0x51 /* CTLR 0 DIMM 0 */ |
107 | 107 | ||
108 | /* Make sure required options are set */ | 108 | /* Make sure required options are set */ |
109 | #ifndef CONFIG_SPD_EEPROM | 109 | #ifndef CONFIG_SPD_EEPROM |
110 | #error ("CONFIG_SPD_EEPROM is required") | 110 | #error ("CONFIG_SPD_EEPROM is required") |
111 | #endif | 111 | #endif |
112 | 112 | ||
113 | #undef CONFIG_CLOCKS_IN_MHZ | 113 | #undef CONFIG_CLOCKS_IN_MHZ |
114 | 114 | ||
115 | /* | 115 | /* |
116 | * Local Bus Definitions | 116 | * Local Bus Definitions |
117 | */ | 117 | */ |
118 | 118 | ||
119 | /* | 119 | /* |
120 | * FLASH on the Local Bus | 120 | * FLASH on the Local Bus |
121 | * Two banks, 8M each, using the CFI driver. | 121 | * Two banks, 8M each, using the CFI driver. |
122 | * Boot from BR0/OR0 bank at 0xff00_0000 | 122 | * Boot from BR0/OR0 bank at 0xff00_0000 |
123 | * Alternate BR1/OR1 bank at 0xff80_0000 | 123 | * Alternate BR1/OR1 bank at 0xff80_0000 |
124 | * | 124 | * |
125 | * BR0, BR1: | 125 | * BR0, BR1: |
126 | * Base address 0 = 0xff00_0000 = BR0[0:16] = 1111 1111 0000 0000 0 | 126 | * Base address 0 = 0xff00_0000 = BR0[0:16] = 1111 1111 0000 0000 0 |
127 | * Base address 1 = 0xff80_0000 = BR1[0:16] = 1111 1111 1000 0000 0 | 127 | * Base address 1 = 0xff80_0000 = BR1[0:16] = 1111 1111 1000 0000 0 |
128 | * Port Size = 16 bits = BRx[19:20] = 10 | 128 | * Port Size = 16 bits = BRx[19:20] = 10 |
129 | * Use GPCM = BRx[24:26] = 000 | 129 | * Use GPCM = BRx[24:26] = 000 |
130 | * Valid = BRx[31] = 1 | 130 | * Valid = BRx[31] = 1 |
131 | * | 131 | * |
132 | * 0 4 8 12 16 20 24 28 | 132 | * 0 4 8 12 16 20 24 28 |
133 | * 1111 1111 1000 0000 0001 0000 0000 0001 = ff801001 BR0 | 133 | * 1111 1111 1000 0000 0001 0000 0000 0001 = ff801001 BR0 |
134 | * 1111 1111 0000 0000 0001 0000 0000 0001 = ff001001 BR1 | 134 | * 1111 1111 0000 0000 0001 0000 0000 0001 = ff001001 BR1 |
135 | * | 135 | * |
136 | * OR0, OR1: | 136 | * OR0, OR1: |
137 | * Addr Mask = 8M = ORx[0:16] = 1111 1111 1000 0000 0 | 137 | * Addr Mask = 8M = ORx[0:16] = 1111 1111 1000 0000 0 |
138 | * Reserved ORx[17:18] = 11, confusion here? | 138 | * Reserved ORx[17:18] = 11, confusion here? |
139 | * CSNT = ORx[20] = 1 | 139 | * CSNT = ORx[20] = 1 |
140 | * ACS = half cycle delay = ORx[21:22] = 11 | 140 | * ACS = half cycle delay = ORx[21:22] = 11 |
141 | * SCY = 6 = ORx[24:27] = 0110 | 141 | * SCY = 6 = ORx[24:27] = 0110 |
142 | * TRLX = use relaxed timing = ORx[29] = 1 | 142 | * TRLX = use relaxed timing = ORx[29] = 1 |
143 | * EAD = use external address latch delay = OR[31] = 1 | 143 | * EAD = use external address latch delay = OR[31] = 1 |
144 | * | 144 | * |
145 | * 0 4 8 12 16 20 24 28 | 145 | * 0 4 8 12 16 20 24 28 |
146 | * 1111 1111 1000 0000 0110 1110 0110 0101 = ff806e65 ORx | 146 | * 1111 1111 1000 0000 0110 1110 0110 0101 = ff806e65 ORx |
147 | */ | 147 | */ |
148 | #define CONFIG_SYS_BCSR_BASE 0xf8000000 | 148 | #define CONFIG_SYS_BCSR_BASE 0xf8000000 |
149 | 149 | ||
150 | #define CONFIG_SYS_FLASH_BASE 0xfe000000 /* start of FLASH 32M */ | 150 | #define CONFIG_SYS_FLASH_BASE 0xfe000000 /* start of FLASH 32M */ |
151 | 151 | ||
152 | /*Chip select 0 - Flash*/ | 152 | /*Chip select 0 - Flash*/ |
153 | #define CONFIG_SYS_BR0_PRELIM 0xfe001001 | 153 | #define CONFIG_SYS_BR0_PRELIM 0xfe001001 |
154 | #define CONFIG_SYS_OR0_PRELIM 0xfe006ff7 | 154 | #define CONFIG_SYS_OR0_PRELIM 0xfe006ff7 |
155 | 155 | ||
156 | /*Chip slelect 1 - BCSR*/ | 156 | /*Chip slelect 1 - BCSR*/ |
157 | #define CONFIG_SYS_BR1_PRELIM 0xf8000801 | 157 | #define CONFIG_SYS_BR1_PRELIM 0xf8000801 |
158 | #define CONFIG_SYS_OR1_PRELIM 0xffffe9f7 | 158 | #define CONFIG_SYS_OR1_PRELIM 0xffffe9f7 |
159 | 159 | ||
160 | /*#define CONFIG_SYS_FLASH_BANKS_LIST {0xff800000, CONFIG_SYS_FLASH_BASE} */ | 160 | /*#define CONFIG_SYS_FLASH_BANKS_LIST {0xff800000, CONFIG_SYS_FLASH_BASE} */ |
161 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ | 161 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ |
162 | #define CONFIG_SYS_MAX_FLASH_SECT 512 /* sectors per device */ | 162 | #define CONFIG_SYS_MAX_FLASH_SECT 512 /* sectors per device */ |
163 | #undef CONFIG_SYS_FLASH_CHECKSUM | 163 | #undef CONFIG_SYS_FLASH_CHECKSUM |
164 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ | 164 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ |
165 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ | 165 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ |
166 | 166 | ||
167 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ | 167 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ |
168 | 168 | ||
169 | #define CONFIG_FLASH_CFI_DRIVER | 169 | #define CONFIG_FLASH_CFI_DRIVER |
170 | #define CONFIG_SYS_FLASH_CFI | 170 | #define CONFIG_SYS_FLASH_CFI |
171 | #define CONFIG_SYS_FLASH_EMPTY_INFO | 171 | #define CONFIG_SYS_FLASH_EMPTY_INFO |
172 | 172 | ||
173 | 173 | ||
174 | /* | 174 | /* |
175 | * SDRAM on the LocalBus | 175 | * SDRAM on the LocalBus |
176 | */ | 176 | */ |
177 | #define CONFIG_SYS_LBC_SDRAM_BASE 0xf0000000 /* Localbus SDRAM */ | 177 | #define CONFIG_SYS_LBC_SDRAM_BASE 0xf0000000 /* Localbus SDRAM */ |
178 | #define CONFIG_SYS_LBC_SDRAM_SIZE 64 /* LBC SDRAM is 64MB */ | 178 | #define CONFIG_SYS_LBC_SDRAM_SIZE 64 /* LBC SDRAM is 64MB */ |
179 | 179 | ||
180 | 180 | ||
181 | /*Chip select 2 - SDRAM*/ | 181 | /*Chip select 2 - SDRAM*/ |
182 | #define CONFIG_SYS_BR2_PRELIM 0xf0001861 | 182 | #define CONFIG_SYS_BR2_PRELIM 0xf0001861 |
183 | #define CONFIG_SYS_OR2_PRELIM 0xfc006901 | 183 | #define CONFIG_SYS_OR2_PRELIM 0xfc006901 |
184 | 184 | ||
185 | #define CONFIG_SYS_LBC_LCRR 0x00030004 /* LB clock ratio reg */ | 185 | #define CONFIG_SYS_LBC_LCRR 0x00030004 /* LB clock ratio reg */ |
186 | #define CONFIG_SYS_LBC_LBCR 0x00000000 /* LB config reg */ | 186 | #define CONFIG_SYS_LBC_LBCR 0x00000000 /* LB config reg */ |
187 | #define CONFIG_SYS_LBC_LSRT 0x20000000 /* LB sdram refresh timer */ | 187 | #define CONFIG_SYS_LBC_LSRT 0x20000000 /* LB sdram refresh timer */ |
188 | #define CONFIG_SYS_LBC_MRTPR 0x00000000 /* LB refresh timer prescal*/ | 188 | #define CONFIG_SYS_LBC_MRTPR 0x00000000 /* LB refresh timer prescal*/ |
189 | 189 | ||
190 | /* | 190 | /* |
191 | * Common settings for all Local Bus SDRAM commands. | 191 | * Common settings for all Local Bus SDRAM commands. |
192 | * At run time, either BSMA1516 (for CPU 1.1) | 192 | * At run time, either BSMA1516 (for CPU 1.1) |
193 | * or BSMA1617 (for CPU 1.0) (old) | 193 | * or BSMA1617 (for CPU 1.0) (old) |
194 | * is OR'ed in too. | 194 | * is OR'ed in too. |
195 | */ | 195 | */ |
196 | #define CONFIG_SYS_LBC_LSDMR_COMMON ( LSDMR_RFCR16 \ | 196 | #define CONFIG_SYS_LBC_LSDMR_COMMON ( LSDMR_RFCR16 \ |
197 | | LSDMR_PRETOACT7 \ | 197 | | LSDMR_PRETOACT7 \ |
198 | | LSDMR_ACTTORW7 \ | 198 | | LSDMR_ACTTORW7 \ |
199 | | LSDMR_BL8 \ | 199 | | LSDMR_BL8 \ |
200 | | LSDMR_WRC4 \ | 200 | | LSDMR_WRC4 \ |
201 | | LSDMR_CL3 \ | 201 | | LSDMR_CL3 \ |
202 | | LSDMR_RFEN \ | 202 | | LSDMR_RFEN \ |
203 | ) | 203 | ) |
204 | 204 | ||
205 | /* | 205 | /* |
206 | * The bcsr registers are connected to CS3 on MDS. | 206 | * The bcsr registers are connected to CS3 on MDS. |
207 | * The new memory map places bcsr at 0xf8000000. | 207 | * The new memory map places bcsr at 0xf8000000. |
208 | * | 208 | * |
209 | * For BR3, need: | 209 | * For BR3, need: |
210 | * Base address of 0xf8000000 = BR[0:16] = 1111 1000 0000 0000 0 | 210 | * Base address of 0xf8000000 = BR[0:16] = 1111 1000 0000 0000 0 |
211 | * port-size = 8-bits = BR[19:20] = 01 | 211 | * port-size = 8-bits = BR[19:20] = 01 |
212 | * no parity checking = BR[21:22] = 00 | 212 | * no parity checking = BR[21:22] = 00 |
213 | * GPMC for MSEL = BR[24:26] = 000 | 213 | * GPMC for MSEL = BR[24:26] = 000 |
214 | * Valid = BR[31] = 1 | 214 | * Valid = BR[31] = 1 |
215 | * | 215 | * |
216 | * 0 4 8 12 16 20 24 28 | 216 | * 0 4 8 12 16 20 24 28 |
217 | * 1111 1000 0000 0000 0000 1000 0000 0001 = f8000801 | 217 | * 1111 1000 0000 0000 0000 1000 0000 0001 = f8000801 |
218 | * | 218 | * |
219 | * For OR3, need: | 219 | * For OR3, need: |
220 | * 1 MB mask for AM, OR[0:16] = 1111 1111 1111 0000 0 | 220 | * 1 MB mask for AM, OR[0:16] = 1111 1111 1111 0000 0 |
221 | * disable buffer ctrl OR[19] = 0 | 221 | * disable buffer ctrl OR[19] = 0 |
222 | * CSNT OR[20] = 1 | 222 | * CSNT OR[20] = 1 |
223 | * ACS OR[21:22] = 11 | 223 | * ACS OR[21:22] = 11 |
224 | * XACS OR[23] = 1 | 224 | * XACS OR[23] = 1 |
225 | * SCY 15 wait states OR[24:27] = 1111 max is suboptimal but safe | 225 | * SCY 15 wait states OR[24:27] = 1111 max is suboptimal but safe |
226 | * SETA OR[28] = 0 | 226 | * SETA OR[28] = 0 |
227 | * TRLX OR[29] = 1 | 227 | * TRLX OR[29] = 1 |
228 | * EHTR OR[30] = 1 | 228 | * EHTR OR[30] = 1 |
229 | * EAD extra time OR[31] = 1 | 229 | * EAD extra time OR[31] = 1 |
230 | * | 230 | * |
231 | * 0 4 8 12 16 20 24 28 | 231 | * 0 4 8 12 16 20 24 28 |
232 | * 1111 1111 1111 0000 0000 1111 1111 0111 = fff00ff7 | 232 | * 1111 1111 1111 0000 0000 1111 1111 0111 = fff00ff7 |
233 | */ | 233 | */ |
234 | #define CONFIG_SYS_BCSR (0xf8000000) | 234 | #define CONFIG_SYS_BCSR (0xf8000000) |
235 | 235 | ||
236 | /*Chip slelect 4 - PIB*/ | 236 | /*Chip slelect 4 - PIB*/ |
237 | #define CONFIG_SYS_BR4_PRELIM 0xf8008801 | 237 | #define CONFIG_SYS_BR4_PRELIM 0xf8008801 |
238 | #define CONFIG_SYS_OR4_PRELIM 0xffffe9f7 | 238 | #define CONFIG_SYS_OR4_PRELIM 0xffffe9f7 |
239 | 239 | ||
240 | /*Chip select 5 - PIB*/ | 240 | /*Chip select 5 - PIB*/ |
241 | #define CONFIG_SYS_BR5_PRELIM 0xf8010801 | 241 | #define CONFIG_SYS_BR5_PRELIM 0xf8010801 |
242 | #define CONFIG_SYS_OR5_PRELIM 0xffff69f7 | 242 | #define CONFIG_SYS_OR5_PRELIM 0xffff69f7 |
243 | 243 | ||
244 | #define CONFIG_SYS_INIT_RAM_LOCK 1 | 244 | #define CONFIG_SYS_INIT_RAM_LOCK 1 |
245 | #define CONFIG_SYS_INIT_RAM_ADDR 0xe4010000 /* Initial RAM address */ | 245 | #define CONFIG_SYS_INIT_RAM_ADDR 0xe4010000 /* Initial RAM address */ |
246 | #define CONFIG_SYS_INIT_RAM_END 0x4000 /* End of used area in RAM */ | 246 | #define CONFIG_SYS_INIT_RAM_END 0x4000 /* End of used area in RAM */ |
247 | 247 | ||
248 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data */ | 248 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data */ |
249 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 249 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
250 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET | 250 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
251 | 251 | ||
252 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ | 252 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ |
253 | #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserved for malloc */ | 253 | #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserved for malloc */ |
254 | 254 | ||
255 | /* Serial Port */ | 255 | /* Serial Port */ |
256 | #define CONFIG_CONS_INDEX 1 | 256 | #define CONFIG_CONS_INDEX 1 |
257 | #undef CONFIG_SERIAL_SOFTWARE_FIFO | 257 | #undef CONFIG_SERIAL_SOFTWARE_FIFO |
258 | #define CONFIG_SYS_NS16550 | 258 | #define CONFIG_SYS_NS16550 |
259 | #define CONFIG_SYS_NS16550_SERIAL | 259 | #define CONFIG_SYS_NS16550_SERIAL |
260 | #define CONFIG_SYS_NS16550_REG_SIZE 1 | 260 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
261 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) | 261 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) |
262 | 262 | ||
263 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 263 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
264 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} | 264 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} |
265 | 265 | ||
266 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) | 266 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) |
267 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) | 267 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) |
268 | 268 | ||
269 | /* Use the HUSH parser*/ | 269 | /* Use the HUSH parser*/ |
270 | #define CONFIG_SYS_HUSH_PARSER | 270 | #define CONFIG_SYS_HUSH_PARSER |
271 | #ifdef CONFIG_SYS_HUSH_PARSER | 271 | #ifdef CONFIG_SYS_HUSH_PARSER |
272 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | 272 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
273 | #endif | 273 | #endif |
274 | 274 | ||
275 | /* pass open firmware flat tree */ | 275 | /* pass open firmware flat tree */ |
276 | #define CONFIG_OF_LIBFDT 1 | 276 | #define CONFIG_OF_LIBFDT 1 |
277 | #define CONFIG_OF_BOARD_SETUP 1 | 277 | #define CONFIG_OF_BOARD_SETUP 1 |
278 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 | 278 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 |
279 | 279 | ||
280 | #define CONFIG_SYS_64BIT_VSPRINTF 1 | 280 | #define CONFIG_SYS_64BIT_VSPRINTF 1 |
281 | #define CONFIG_SYS_64BIT_STRTOUL 1 | 281 | #define CONFIG_SYS_64BIT_STRTOUL 1 |
282 | 282 | ||
283 | /* | 283 | /* |
284 | * I2C | 284 | * I2C |
285 | */ | 285 | */ |
286 | #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ | 286 | #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ |
287 | #define CONFIG_HARD_I2C /* I2C with hardware support*/ | 287 | #define CONFIG_HARD_I2C /* I2C with hardware support*/ |
288 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ | 288 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ |
289 | #define CONFIG_I2C_MULTI_BUS | 289 | #define CONFIG_I2C_MULTI_BUS |
290 | #define CONFIG_I2C_CMD_TREE | ||
291 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ | 290 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ |
292 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x52 | 291 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x52 |
293 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 292 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
294 | #define CONFIG_SYS_I2C_NOPROBES {{0,0x69}} /* Don't probe these addrs */ | 293 | #define CONFIG_SYS_I2C_NOPROBES {{0,0x69}} /* Don't probe these addrs */ |
295 | #define CONFIG_SYS_I2C_OFFSET 0x3000 | 294 | #define CONFIG_SYS_I2C_OFFSET 0x3000 |
296 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 | 295 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 |
297 | 296 | ||
298 | /* | 297 | /* |
299 | * General PCI | 298 | * General PCI |
300 | * Memory Addresses are mapped 1-1. I/O is mapped from 0 | 299 | * Memory Addresses are mapped 1-1. I/O is mapped from 0 |
301 | */ | 300 | */ |
302 | #define CONFIG_SYS_PCI1_MEM_VIRT 0x80000000 | 301 | #define CONFIG_SYS_PCI1_MEM_VIRT 0x80000000 |
303 | #define CONFIG_SYS_PCI1_MEM_BUS 0x80000000 | 302 | #define CONFIG_SYS_PCI1_MEM_BUS 0x80000000 |
304 | #define CONFIG_SYS_PCI1_MEM_PHYS 0x80000000 | 303 | #define CONFIG_SYS_PCI1_MEM_PHYS 0x80000000 |
305 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x20000000 /* 512M */ | 304 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x20000000 /* 512M */ |
306 | #define CONFIG_SYS_PCI1_IO_VIRT 0xe2000000 | 305 | #define CONFIG_SYS_PCI1_IO_VIRT 0xe2000000 |
307 | #define CONFIG_SYS_PCI1_IO_BUS 0x00000000 | 306 | #define CONFIG_SYS_PCI1_IO_BUS 0x00000000 |
308 | #define CONFIG_SYS_PCI1_IO_PHYS 0xe2000000 | 307 | #define CONFIG_SYS_PCI1_IO_PHYS 0xe2000000 |
309 | #define CONFIG_SYS_PCI1_IO_SIZE 0x00800000 /* 8M */ | 308 | #define CONFIG_SYS_PCI1_IO_SIZE 0x00800000 /* 8M */ |
310 | 309 | ||
311 | #define CONFIG_SYS_PCIE1_MEM_VIRT 0xa0000000 | 310 | #define CONFIG_SYS_PCIE1_MEM_VIRT 0xa0000000 |
312 | #define CONFIG_SYS_PCIE1_MEM_BUS 0xa0000000 | 311 | #define CONFIG_SYS_PCIE1_MEM_BUS 0xa0000000 |
313 | #define CONFIG_SYS_PCIE1_MEM_PHYS 0xa0000000 | 312 | #define CONFIG_SYS_PCIE1_MEM_PHYS 0xa0000000 |
314 | #define CONFIG_SYS_PCIE1_MEM_SIZE 0x20000000 /* 512M */ | 313 | #define CONFIG_SYS_PCIE1_MEM_SIZE 0x20000000 /* 512M */ |
315 | #define CONFIG_SYS_PCIE1_IO_VIRT 0xe2800000 | 314 | #define CONFIG_SYS_PCIE1_IO_VIRT 0xe2800000 |
316 | #define CONFIG_SYS_PCIE1_IO_BUS 0x00000000 | 315 | #define CONFIG_SYS_PCIE1_IO_BUS 0x00000000 |
317 | #define CONFIG_SYS_PCIE1_IO_PHYS 0xe2800000 | 316 | #define CONFIG_SYS_PCIE1_IO_PHYS 0xe2800000 |
318 | #define CONFIG_SYS_PCIE1_IO_SIZE 0x00800000 /* 8M */ | 317 | #define CONFIG_SYS_PCIE1_IO_SIZE 0x00800000 /* 8M */ |
319 | 318 | ||
320 | #define CONFIG_SYS_SRIO_MEM_VIRT 0xc0000000 | 319 | #define CONFIG_SYS_SRIO_MEM_VIRT 0xc0000000 |
321 | #define CONFIG_SYS_SRIO_MEM_BUS 0xc0000000 | 320 | #define CONFIG_SYS_SRIO_MEM_BUS 0xc0000000 |
322 | #define CONFIG_SYS_SRIO_MEM_PHYS 0xc0000000 | 321 | #define CONFIG_SYS_SRIO_MEM_PHYS 0xc0000000 |
323 | 322 | ||
324 | #ifdef CONFIG_QE | 323 | #ifdef CONFIG_QE |
325 | /* | 324 | /* |
326 | * QE UEC ethernet configuration | 325 | * QE UEC ethernet configuration |
327 | */ | 326 | */ |
328 | #define CONFIG_UEC_ETH | 327 | #define CONFIG_UEC_ETH |
329 | #ifndef CONFIG_TSEC_ENET | 328 | #ifndef CONFIG_TSEC_ENET |
330 | #define CONFIG_ETHPRIME "FSL UEC0" | 329 | #define CONFIG_ETHPRIME "FSL UEC0" |
331 | #endif | 330 | #endif |
332 | #define CONFIG_PHY_MODE_NEED_CHANGE | 331 | #define CONFIG_PHY_MODE_NEED_CHANGE |
333 | #define CONFIG_eTSEC_MDIO_BUS | 332 | #define CONFIG_eTSEC_MDIO_BUS |
334 | 333 | ||
335 | #ifdef CONFIG_eTSEC_MDIO_BUS | 334 | #ifdef CONFIG_eTSEC_MDIO_BUS |
336 | #define CONFIG_MIIM_ADDRESS 0xE0024520 | 335 | #define CONFIG_MIIM_ADDRESS 0xE0024520 |
337 | #endif | 336 | #endif |
338 | 337 | ||
339 | #define CONFIG_UEC_ETH1 /* GETH1 */ | 338 | #define CONFIG_UEC_ETH1 /* GETH1 */ |
340 | 339 | ||
341 | #ifdef CONFIG_UEC_ETH1 | 340 | #ifdef CONFIG_UEC_ETH1 |
342 | #define CONFIG_SYS_UEC1_UCC_NUM 0 /* UCC1 */ | 341 | #define CONFIG_SYS_UEC1_UCC_NUM 0 /* UCC1 */ |
343 | #define CONFIG_SYS_UEC1_RX_CLK QE_CLK_NONE | 342 | #define CONFIG_SYS_UEC1_RX_CLK QE_CLK_NONE |
344 | #define CONFIG_SYS_UEC1_TX_CLK QE_CLK16 | 343 | #define CONFIG_SYS_UEC1_TX_CLK QE_CLK16 |
345 | #define CONFIG_SYS_UEC1_ETH_TYPE GIGA_ETH | 344 | #define CONFIG_SYS_UEC1_ETH_TYPE GIGA_ETH |
346 | #define CONFIG_SYS_UEC1_PHY_ADDR 7 | 345 | #define CONFIG_SYS_UEC1_PHY_ADDR 7 |
347 | #define CONFIG_SYS_UEC1_INTERFACE_MODE ENET_1000_RGMII_ID | 346 | #define CONFIG_SYS_UEC1_INTERFACE_MODE ENET_1000_RGMII_ID |
348 | #endif | 347 | #endif |
349 | 348 | ||
350 | #define CONFIG_UEC_ETH2 /* GETH2 */ | 349 | #define CONFIG_UEC_ETH2 /* GETH2 */ |
351 | 350 | ||
352 | #ifdef CONFIG_UEC_ETH2 | 351 | #ifdef CONFIG_UEC_ETH2 |
353 | #define CONFIG_SYS_UEC2_UCC_NUM 1 /* UCC2 */ | 352 | #define CONFIG_SYS_UEC2_UCC_NUM 1 /* UCC2 */ |
354 | #define CONFIG_SYS_UEC2_RX_CLK QE_CLK_NONE | 353 | #define CONFIG_SYS_UEC2_RX_CLK QE_CLK_NONE |
355 | #define CONFIG_SYS_UEC2_TX_CLK QE_CLK16 | 354 | #define CONFIG_SYS_UEC2_TX_CLK QE_CLK16 |
356 | #define CONFIG_SYS_UEC2_ETH_TYPE GIGA_ETH | 355 | #define CONFIG_SYS_UEC2_ETH_TYPE GIGA_ETH |
357 | #define CONFIG_SYS_UEC2_PHY_ADDR 1 | 356 | #define CONFIG_SYS_UEC2_PHY_ADDR 1 |
358 | #define CONFIG_SYS_UEC2_INTERFACE_MODE ENET_1000_RGMII_ID | 357 | #define CONFIG_SYS_UEC2_INTERFACE_MODE ENET_1000_RGMII_ID |
359 | #endif | 358 | #endif |
360 | #endif /* CONFIG_QE */ | 359 | #endif /* CONFIG_QE */ |
361 | 360 | ||
362 | #if defined(CONFIG_PCI) | 361 | #if defined(CONFIG_PCI) |
363 | 362 | ||
364 | #define CONFIG_NET_MULTI | 363 | #define CONFIG_NET_MULTI |
365 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ | 364 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ |
366 | 365 | ||
367 | #undef CONFIG_EEPRO100 | 366 | #undef CONFIG_EEPRO100 |
368 | #undef CONFIG_TULIP | 367 | #undef CONFIG_TULIP |
369 | 368 | ||
370 | #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ | 369 | #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ |
371 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1057 /* Motorola */ | 370 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1057 /* Motorola */ |
372 | 371 | ||
373 | #endif /* CONFIG_PCI */ | 372 | #endif /* CONFIG_PCI */ |
374 | 373 | ||
375 | #ifndef CONFIG_NET_MULTI | 374 | #ifndef CONFIG_NET_MULTI |
376 | #define CONFIG_NET_MULTI 1 | 375 | #define CONFIG_NET_MULTI 1 |
377 | #endif | 376 | #endif |
378 | 377 | ||
379 | #if defined(CONFIG_TSEC_ENET) | 378 | #if defined(CONFIG_TSEC_ENET) |
380 | 379 | ||
381 | #define CONFIG_MII 1 /* MII PHY management */ | 380 | #define CONFIG_MII 1 /* MII PHY management */ |
382 | #define CONFIG_TSEC1 1 | 381 | #define CONFIG_TSEC1 1 |
383 | #define CONFIG_TSEC1_NAME "eTSEC0" | 382 | #define CONFIG_TSEC1_NAME "eTSEC0" |
384 | #define CONFIG_TSEC2 1 | 383 | #define CONFIG_TSEC2 1 |
385 | #define CONFIG_TSEC2_NAME "eTSEC1" | 384 | #define CONFIG_TSEC2_NAME "eTSEC1" |
386 | 385 | ||
387 | #define TSEC1_PHY_ADDR 2 | 386 | #define TSEC1_PHY_ADDR 2 |
388 | #define TSEC2_PHY_ADDR 3 | 387 | #define TSEC2_PHY_ADDR 3 |
389 | 388 | ||
390 | #define TSEC1_PHYIDX 0 | 389 | #define TSEC1_PHYIDX 0 |
391 | #define TSEC2_PHYIDX 0 | 390 | #define TSEC2_PHYIDX 0 |
392 | 391 | ||
393 | #define TSEC1_FLAGS TSEC_GIGABIT | 392 | #define TSEC1_FLAGS TSEC_GIGABIT |
394 | #define TSEC2_FLAGS TSEC_GIGABIT | 393 | #define TSEC2_FLAGS TSEC_GIGABIT |
395 | 394 | ||
396 | /* Options are: eTSEC[0-1] */ | 395 | /* Options are: eTSEC[0-1] */ |
397 | #define CONFIG_ETHPRIME "eTSEC0" | 396 | #define CONFIG_ETHPRIME "eTSEC0" |
398 | 397 | ||
399 | #endif /* CONFIG_TSEC_ENET */ | 398 | #endif /* CONFIG_TSEC_ENET */ |
400 | 399 | ||
401 | /* | 400 | /* |
402 | * Environment | 401 | * Environment |
403 | */ | 402 | */ |
404 | #define CONFIG_ENV_IS_IN_FLASH 1 | 403 | #define CONFIG_ENV_IS_IN_FLASH 1 |
405 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + 0x40000) | 404 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + 0x40000) |
406 | #define CONFIG_ENV_SECT_SIZE 0x40000 /* 256K(one sector) for env */ | 405 | #define CONFIG_ENV_SECT_SIZE 0x40000 /* 256K(one sector) for env */ |
407 | #define CONFIG_ENV_SIZE 0x2000 | 406 | #define CONFIG_ENV_SIZE 0x2000 |
408 | 407 | ||
409 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ | 408 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
410 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ | 409 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
411 | 410 | ||
412 | 411 | ||
413 | /* | 412 | /* |
414 | * BOOTP options | 413 | * BOOTP options |
415 | */ | 414 | */ |
416 | #define CONFIG_BOOTP_BOOTFILESIZE | 415 | #define CONFIG_BOOTP_BOOTFILESIZE |
417 | #define CONFIG_BOOTP_BOOTPATH | 416 | #define CONFIG_BOOTP_BOOTPATH |
418 | #define CONFIG_BOOTP_GATEWAY | 417 | #define CONFIG_BOOTP_GATEWAY |
419 | #define CONFIG_BOOTP_HOSTNAME | 418 | #define CONFIG_BOOTP_HOSTNAME |
420 | 419 | ||
421 | 420 | ||
422 | /* | 421 | /* |
423 | * Command line configuration. | 422 | * Command line configuration. |
424 | */ | 423 | */ |
425 | #include <config_cmd_default.h> | 424 | #include <config_cmd_default.h> |
426 | 425 | ||
427 | #define CONFIG_CMD_PING | 426 | #define CONFIG_CMD_PING |
428 | #define CONFIG_CMD_I2C | 427 | #define CONFIG_CMD_I2C |
429 | #define CONFIG_CMD_MII | 428 | #define CONFIG_CMD_MII |
430 | #define CONFIG_CMD_ELF | 429 | #define CONFIG_CMD_ELF |
431 | #define CONFIG_CMD_IRQ | 430 | #define CONFIG_CMD_IRQ |
432 | #define CONFIG_CMD_SETEXPR | 431 | #define CONFIG_CMD_SETEXPR |
433 | 432 | ||
434 | #if defined(CONFIG_PCI) | 433 | #if defined(CONFIG_PCI) |
435 | #define CONFIG_CMD_PCI | 434 | #define CONFIG_CMD_PCI |
436 | #endif | 435 | #endif |
437 | 436 | ||
438 | 437 | ||
439 | #undef CONFIG_WATCHDOG /* watchdog disabled */ | 438 | #undef CONFIG_WATCHDOG /* watchdog disabled */ |
440 | 439 | ||
441 | /* | 440 | /* |
442 | * Miscellaneous configurable options | 441 | * Miscellaneous configurable options |
443 | */ | 442 | */ |
444 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 443 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
445 | #define CONFIG_CMDLINE_EDITING /* Command-line editing */ | 444 | #define CONFIG_CMDLINE_EDITING /* Command-line editing */ |
446 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ | 445 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ |
447 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | 446 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
448 | #if defined(CONFIG_CMD_KGDB) | 447 | #if defined(CONFIG_CMD_KGDB) |
449 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ | 448 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
450 | #else | 449 | #else |
451 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | 450 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
452 | #endif | 451 | #endif |
453 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ | 452 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
454 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 453 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
455 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | 454 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
456 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ | 455 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ |
457 | 456 | ||
458 | /* | 457 | /* |
459 | * For booting Linux, the board info and command line data | 458 | * For booting Linux, the board info and command line data |
460 | * have to be in the first 8 MB of memory, since this is | 459 | * have to be in the first 8 MB of memory, since this is |
461 | * the maximum mapped by the Linux kernel during initialization. | 460 | * the maximum mapped by the Linux kernel during initialization. |
462 | */ | 461 | */ |
463 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ | 462 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ |
464 | 463 | ||
465 | /* | 464 | /* |
466 | * Internal Definitions | 465 | * Internal Definitions |
467 | * | 466 | * |
468 | * Boot Flags | 467 | * Boot Flags |
469 | */ | 468 | */ |
470 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 469 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
471 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 470 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
472 | 471 | ||
473 | #if defined(CONFIG_CMD_KGDB) | 472 | #if defined(CONFIG_CMD_KGDB) |
474 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ | 473 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ |
475 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ | 474 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ |
476 | #endif | 475 | #endif |
477 | 476 | ||
478 | /* | 477 | /* |
479 | * Environment Configuration | 478 | * Environment Configuration |
480 | */ | 479 | */ |
481 | 480 | ||
482 | /* The mac addresses for all ethernet interface */ | 481 | /* The mac addresses for all ethernet interface */ |
483 | #if defined(CONFIG_TSEC_ENET) || defined(CONFIG_UEC_ETH) | 482 | #if defined(CONFIG_TSEC_ENET) || defined(CONFIG_UEC_ETH) |
484 | #define CONFIG_HAS_ETH0 | 483 | #define CONFIG_HAS_ETH0 |
485 | #define CONFIG_ETHADDR 00:E0:0C:00:00:FD | 484 | #define CONFIG_ETHADDR 00:E0:0C:00:00:FD |
486 | #define CONFIG_HAS_ETH1 | 485 | #define CONFIG_HAS_ETH1 |
487 | #define CONFIG_ETH1ADDR 00:E0:0C:00:01:FD | 486 | #define CONFIG_ETH1ADDR 00:E0:0C:00:01:FD |
488 | #define CONFIG_HAS_ETH2 | 487 | #define CONFIG_HAS_ETH2 |
489 | #define CONFIG_ETH2ADDR 00:E0:0C:00:02:FD | 488 | #define CONFIG_ETH2ADDR 00:E0:0C:00:02:FD |
490 | #define CONFIG_HAS_ETH3 | 489 | #define CONFIG_HAS_ETH3 |
491 | #define CONFIG_ETH3ADDR 00:E0:0C:00:03:FD | 490 | #define CONFIG_ETH3ADDR 00:E0:0C:00:03:FD |
492 | #endif | 491 | #endif |
493 | 492 | ||
494 | #define CONFIG_IPADDR 192.168.1.253 | 493 | #define CONFIG_IPADDR 192.168.1.253 |
495 | 494 | ||
496 | #define CONFIG_HOSTNAME unknown | 495 | #define CONFIG_HOSTNAME unknown |
497 | #define CONFIG_ROOTPATH /nfsroot | 496 | #define CONFIG_ROOTPATH /nfsroot |
498 | #define CONFIG_BOOTFILE your.uImage | 497 | #define CONFIG_BOOTFILE your.uImage |
499 | 498 | ||
500 | #define CONFIG_SERVERIP 192.168.1.1 | 499 | #define CONFIG_SERVERIP 192.168.1.1 |
501 | #define CONFIG_GATEWAYIP 192.168.1.1 | 500 | #define CONFIG_GATEWAYIP 192.168.1.1 |
502 | #define CONFIG_NETMASK 255.255.255.0 | 501 | #define CONFIG_NETMASK 255.255.255.0 |
503 | 502 | ||
504 | #define CONFIG_LOADADDR 200000 /*default location for tftp and bootm*/ | 503 | #define CONFIG_LOADADDR 200000 /*default location for tftp and bootm*/ |
505 | 504 | ||
506 | #define CONFIG_BOOTDELAY 10 /* -1 disables auto-boot */ | 505 | #define CONFIG_BOOTDELAY 10 /* -1 disables auto-boot */ |
507 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs*/ | 506 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs*/ |
508 | 507 | ||
509 | #define CONFIG_BAUDRATE 115200 | 508 | #define CONFIG_BAUDRATE 115200 |
510 | 509 | ||
511 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 510 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
512 | "netdev=eth0\0" \ | 511 | "netdev=eth0\0" \ |
513 | "consoledev=ttyS0\0" \ | 512 | "consoledev=ttyS0\0" \ |
514 | "ramdiskaddr=600000\0" \ | 513 | "ramdiskaddr=600000\0" \ |
515 | "ramdiskfile=your.ramdisk.u-boot\0" \ | 514 | "ramdiskfile=your.ramdisk.u-boot\0" \ |
516 | "fdtaddr=400000\0" \ | 515 | "fdtaddr=400000\0" \ |
517 | "fdtfile=your.fdt.dtb\0" \ | 516 | "fdtfile=your.fdt.dtb\0" \ |
518 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ | 517 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
519 | "nfsroot=$serverip:$rootpath " \ | 518 | "nfsroot=$serverip:$rootpath " \ |
520 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ | 519 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ |
521 | "console=$consoledev,$baudrate $othbootargs\0" \ | 520 | "console=$consoledev,$baudrate $othbootargs\0" \ |
522 | "ramargs=setenv bootargs root=/dev/ram rw " \ | 521 | "ramargs=setenv bootargs root=/dev/ram rw " \ |
523 | "console=$consoledev,$baudrate $othbootargs\0" \ | 522 | "console=$consoledev,$baudrate $othbootargs\0" \ |
524 | 523 | ||
525 | 524 | ||
526 | #define CONFIG_NFSBOOTCOMMAND \ | 525 | #define CONFIG_NFSBOOTCOMMAND \ |
527 | "run nfsargs;" \ | 526 | "run nfsargs;" \ |
528 | "tftp $loadaddr $bootfile;" \ | 527 | "tftp $loadaddr $bootfile;" \ |
529 | "tftp $fdtaddr $fdtfile;" \ | 528 | "tftp $fdtaddr $fdtfile;" \ |
530 | "bootm $loadaddr - $fdtaddr" | 529 | "bootm $loadaddr - $fdtaddr" |
531 | 530 | ||
532 | 531 | ||
533 | #define CONFIG_RAMBOOTCOMMAND \ | 532 | #define CONFIG_RAMBOOTCOMMAND \ |
534 | "run ramargs;" \ | 533 | "run ramargs;" \ |
535 | "tftp $ramdiskaddr $ramdiskfile;" \ | 534 | "tftp $ramdiskaddr $ramdiskfile;" \ |
536 | "tftp $loadaddr $bootfile;" \ | 535 | "tftp $loadaddr $bootfile;" \ |
537 | "bootm $loadaddr $ramdiskaddr" | 536 | "bootm $loadaddr $ramdiskaddr" |
538 | 537 | ||
539 | #define CONFIG_BOOTCOMMAND CONFIG_NFSBOOTCOMMAND | 538 | #define CONFIG_BOOTCOMMAND CONFIG_NFSBOOTCOMMAND |
540 | 539 | ||
541 | #endif /* __CONFIG_H */ | 540 | #endif /* __CONFIG_H */ |
542 | 541 |
include/configs/MPC8569MDS.h
1 | /* | 1 | /* |
2 | * Copyright (C) 2009 Freescale Semiconductor, Inc. All rights reserved. | 2 | * Copyright (C) 2009 Freescale Semiconductor, Inc. All rights reserved. |
3 | * | 3 | * |
4 | * See file CREDITS for list of people who contributed to this | 4 | * See file CREDITS for list of people who contributed to this |
5 | * project. | 5 | * project. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License as | 8 | * modify it under the terms of the GNU General Public License as |
9 | * published by the Free Software Foundation; either version 2 of | 9 | * published by the Free Software Foundation; either version 2 of |
10 | * the License, or (at your option) any later version. | 10 | * the License, or (at your option) any later version. |
11 | * | 11 | * |
12 | * This program is distributed in the hope that it will be useful, | 12 | * This program is distributed in the hope that it will be useful, |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
16 | * | 16 | * |
17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License |
18 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
20 | * MA 02111-1307 USA | 20 | * MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | 22 | ||
23 | /* | 23 | /* |
24 | * mpc8569mds board configuration file | 24 | * mpc8569mds board configuration file |
25 | */ | 25 | */ |
26 | #ifndef __CONFIG_H | 26 | #ifndef __CONFIG_H |
27 | #define __CONFIG_H | 27 | #define __CONFIG_H |
28 | 28 | ||
29 | /* High Level Configuration Options */ | 29 | /* High Level Configuration Options */ |
30 | #define CONFIG_BOOKE 1 /* BOOKE */ | 30 | #define CONFIG_BOOKE 1 /* BOOKE */ |
31 | #define CONFIG_E500 1 /* BOOKE e500 family */ | 31 | #define CONFIG_E500 1 /* BOOKE e500 family */ |
32 | #define CONFIG_MPC85xx 1 /* MPC8540/60/55/41/48/68 */ | 32 | #define CONFIG_MPC85xx 1 /* MPC8540/60/55/41/48/68 */ |
33 | #define CONFIG_MPC8569 1 /* MPC8569 specific */ | 33 | #define CONFIG_MPC8569 1 /* MPC8569 specific */ |
34 | #define CONFIG_MPC8569MDS 1 /* MPC8569MDS board specific */ | 34 | #define CONFIG_MPC8569MDS 1 /* MPC8569MDS board specific */ |
35 | 35 | ||
36 | #define CONFIG_FSL_ELBC 1 /* Has Enhance localbus controller */ | 36 | #define CONFIG_FSL_ELBC 1 /* Has Enhance localbus controller */ |
37 | 37 | ||
38 | #define CONFIG_PCI 1 /* Disable PCI/PCIE */ | 38 | #define CONFIG_PCI 1 /* Disable PCI/PCIE */ |
39 | #define CONFIG_PCIE1 1 /* PCIE controller */ | 39 | #define CONFIG_PCIE1 1 /* PCIE controller */ |
40 | #define CONFIG_FSL_PCI_INIT 1 /* use common fsl pci init code */ | 40 | #define CONFIG_FSL_PCI_INIT 1 /* use common fsl pci init code */ |
41 | #define CONFIG_FSL_PCIE_RESET 1 /* need PCIe reset errata */ | 41 | #define CONFIG_FSL_PCIE_RESET 1 /* need PCIe reset errata */ |
42 | #define CONFIG_SYS_PCI_64BIT 1 /* enable 64-bit PCI resources */ | 42 | #define CONFIG_SYS_PCI_64BIT 1 /* enable 64-bit PCI resources */ |
43 | #define CONFIG_QE /* Enable QE */ | 43 | #define CONFIG_QE /* Enable QE */ |
44 | #define CONFIG_ENV_OVERWRITE | 44 | #define CONFIG_ENV_OVERWRITE |
45 | #define CONFIG_FSL_LAW 1 /* Use common FSL init code */ | 45 | #define CONFIG_FSL_LAW 1 /* Use common FSL init code */ |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * When initializing flash, if we cannot find the manufacturer ID, | 48 | * When initializing flash, if we cannot find the manufacturer ID, |
49 | * assume this is the AMD flash associated with the MDS board. | 49 | * assume this is the AMD flash associated with the MDS board. |
50 | * This allows booting from a promjet. | 50 | * This allows booting from a promjet. |
51 | */ | 51 | */ |
52 | #define CONFIG_ASSUME_AMD_FLASH | 52 | #define CONFIG_ASSUME_AMD_FLASH |
53 | 53 | ||
54 | #ifndef __ASSEMBLY__ | 54 | #ifndef __ASSEMBLY__ |
55 | extern unsigned long get_clock_freq(void); | 55 | extern unsigned long get_clock_freq(void); |
56 | #endif | 56 | #endif |
57 | /* Replace a call to get_clock_freq (after it is implemented)*/ | 57 | /* Replace a call to get_clock_freq (after it is implemented)*/ |
58 | #define CONFIG_SYS_CLK_FREQ 66666666 | 58 | #define CONFIG_SYS_CLK_FREQ 66666666 |
59 | #define CONFIG_DDR_CLK_FREQ CONFIG_SYS_CLK_FREQ | 59 | #define CONFIG_DDR_CLK_FREQ CONFIG_SYS_CLK_FREQ |
60 | 60 | ||
61 | /* | 61 | /* |
62 | * These can be toggled for performance analysis, otherwise use default. | 62 | * These can be toggled for performance analysis, otherwise use default. |
63 | */ | 63 | */ |
64 | #define CONFIG_L2_CACHE /* toggle L2 cache */ | 64 | #define CONFIG_L2_CACHE /* toggle L2 cache */ |
65 | #define CONFIG_BTB /* toggle branch predition */ | 65 | #define CONFIG_BTB /* toggle branch predition */ |
66 | 66 | ||
67 | /* | 67 | /* |
68 | * Only possible on E500 Version 2 or newer cores. | 68 | * Only possible on E500 Version 2 or newer cores. |
69 | */ | 69 | */ |
70 | #define CONFIG_ENABLE_36BIT_PHYS 1 | 70 | #define CONFIG_ENABLE_36BIT_PHYS 1 |
71 | 71 | ||
72 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_pre_init */ | 72 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_pre_init */ |
73 | 73 | ||
74 | #define CONFIG_SYS_MEMTEST_START 0x00200000 /* memtest works on */ | 74 | #define CONFIG_SYS_MEMTEST_START 0x00200000 /* memtest works on */ |
75 | #define CONFIG_SYS_MEMTEST_END 0x00400000 | 75 | #define CONFIG_SYS_MEMTEST_END 0x00400000 |
76 | 76 | ||
77 | /* | 77 | /* |
78 | * Base addresses -- Note these are effective addresses where the | 78 | * Base addresses -- Note these are effective addresses where the |
79 | * actual resources get mapped (not physical addresses) | 79 | * actual resources get mapped (not physical addresses) |
80 | */ | 80 | */ |
81 | #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff700000 /* CCSRBAR Default */ | 81 | #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff700000 /* CCSRBAR Default */ |
82 | #define CONFIG_SYS_CCSRBAR 0xe0000000 /* relocated CCSRBAR */ | 82 | #define CONFIG_SYS_CCSRBAR 0xe0000000 /* relocated CCSRBAR */ |
83 | #define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR | 83 | #define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR |
84 | /* physical addr of CCSRBAR */ | 84 | /* physical addr of CCSRBAR */ |
85 | #define CONFIG_SYS_IMMR CONFIG_SYS_CCSRBAR | 85 | #define CONFIG_SYS_IMMR CONFIG_SYS_CCSRBAR |
86 | /* PQII uses CONFIG_SYS_IMMR */ | 86 | /* PQII uses CONFIG_SYS_IMMR */ |
87 | 87 | ||
88 | #define CONFIG_SYS_PCI1_ADDR (CONFIG_SYS_CCSRBAR+0x8000) | 88 | #define CONFIG_SYS_PCI1_ADDR (CONFIG_SYS_CCSRBAR+0x8000) |
89 | #define CONFIG_SYS_PCIE1_ADDR (CONFIG_SYS_CCSRBAR+0xa000) | 89 | #define CONFIG_SYS_PCIE1_ADDR (CONFIG_SYS_CCSRBAR+0xa000) |
90 | 90 | ||
91 | /* DDR Setup */ | 91 | /* DDR Setup */ |
92 | #define CONFIG_FSL_DDR3 | 92 | #define CONFIG_FSL_DDR3 |
93 | #undef CONFIG_FSL_DDR_INTERACTIVE | 93 | #undef CONFIG_FSL_DDR_INTERACTIVE |
94 | #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup*/ | 94 | #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup*/ |
95 | #define CONFIG_DDR_SPD | 95 | #define CONFIG_DDR_SPD |
96 | #define CONFIG_DDR_DLL /* possible DLL fix needed */ | 96 | #define CONFIG_DDR_DLL /* possible DLL fix needed */ |
97 | #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER /* DDR controller or DMA? */ | 97 | #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER /* DDR controller or DMA? */ |
98 | 98 | ||
99 | #define CONFIG_MEM_INIT_VALUE 0xDeadBeef | 99 | #define CONFIG_MEM_INIT_VALUE 0xDeadBeef |
100 | 100 | ||
101 | #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 | 101 | #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 |
102 | /* DDR is system memory*/ | 102 | /* DDR is system memory*/ |
103 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE | 103 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE |
104 | 104 | ||
105 | #define CONFIG_NUM_DDR_CONTROLLERS 1 | 105 | #define CONFIG_NUM_DDR_CONTROLLERS 1 |
106 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 | 106 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 |
107 | #define CONFIG_CHIP_SELECTS_PER_CTRL (2 * CONFIG_DIMM_SLOTS_PER_CTLR) | 107 | #define CONFIG_CHIP_SELECTS_PER_CTRL (2 * CONFIG_DIMM_SLOTS_PER_CTLR) |
108 | 108 | ||
109 | /* I2C addresses of SPD EEPROMs */ | 109 | /* I2C addresses of SPD EEPROMs */ |
110 | #define SPD_EEPROM_ADDRESS1 0x51 /* CTLR 0 DIMM 0 */ | 110 | #define SPD_EEPROM_ADDRESS1 0x51 /* CTLR 0 DIMM 0 */ |
111 | #define SPD_EEPROM_ADDRESS2 0x52 /* CTLR 1 DIMM 0 */ | 111 | #define SPD_EEPROM_ADDRESS2 0x52 /* CTLR 1 DIMM 0 */ |
112 | 112 | ||
113 | /* These are used when DDR doesn't use SPD. */ | 113 | /* These are used when DDR doesn't use SPD. */ |
114 | #define CONFIG_SYS_SDRAM_SIZE 1024 /* DDR is 1024MB */ | 114 | #define CONFIG_SYS_SDRAM_SIZE 1024 /* DDR is 1024MB */ |
115 | #define CONFIG_SYS_DDR_CS0_BNDS 0x0000003F | 115 | #define CONFIG_SYS_DDR_CS0_BNDS 0x0000003F |
116 | #define CONFIG_SYS_DDR_CS0_CONFIG 0x80014202 | 116 | #define CONFIG_SYS_DDR_CS0_CONFIG 0x80014202 |
117 | #define CONFIG_SYS_DDR_TIMING_3 0x00020000 | 117 | #define CONFIG_SYS_DDR_TIMING_3 0x00020000 |
118 | #define CONFIG_SYS_DDR_TIMING_0 0x00330004 | 118 | #define CONFIG_SYS_DDR_TIMING_0 0x00330004 |
119 | #define CONFIG_SYS_DDR_TIMING_1 0x6F6B4644 | 119 | #define CONFIG_SYS_DDR_TIMING_1 0x6F6B4644 |
120 | #define CONFIG_SYS_DDR_TIMING_2 0x002888D0 | 120 | #define CONFIG_SYS_DDR_TIMING_2 0x002888D0 |
121 | #define CONFIG_SYS_DDR_SDRAM_CFG 0x47000000 | 121 | #define CONFIG_SYS_DDR_SDRAM_CFG 0x47000000 |
122 | #define CONFIG_SYS_DDR_SDRAM_CFG_2 0x04401040 | 122 | #define CONFIG_SYS_DDR_SDRAM_CFG_2 0x04401040 |
123 | #define CONFIG_SYS_DDR_SDRAM_MODE 0x40401521 | 123 | #define CONFIG_SYS_DDR_SDRAM_MODE 0x40401521 |
124 | #define CONFIG_SYS_DDR_SDRAM_MODE_2 0x8000C000 | 124 | #define CONFIG_SYS_DDR_SDRAM_MODE_2 0x8000C000 |
125 | #define CONFIG_SYS_DDR_SDRAM_INTERVAL 0x03E00000 | 125 | #define CONFIG_SYS_DDR_SDRAM_INTERVAL 0x03E00000 |
126 | #define CONFIG_SYS_DDR_DATA_INIT 0xdeadbeef | 126 | #define CONFIG_SYS_DDR_DATA_INIT 0xdeadbeef |
127 | #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL 0x01000000 | 127 | #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL 0x01000000 |
128 | #define CONFIG_SYS_DDR_TIMING_4 0x00220001 | 128 | #define CONFIG_SYS_DDR_TIMING_4 0x00220001 |
129 | #define CONFIG_SYS_DDR_TIMING_5 0x03402400 | 129 | #define CONFIG_SYS_DDR_TIMING_5 0x03402400 |
130 | #define CONFIG_SYS_DDR_ZQ_CNTL 0x89080600 | 130 | #define CONFIG_SYS_DDR_ZQ_CNTL 0x89080600 |
131 | #define CONFIG_SYS_DDR_WRLVL_CNTL 0x0655A604 | 131 | #define CONFIG_SYS_DDR_WRLVL_CNTL 0x0655A604 |
132 | #define CONFIG_SYS_DDR_CDR_1 0x80040000 | 132 | #define CONFIG_SYS_DDR_CDR_1 0x80040000 |
133 | #define CONFIG_SYS_DDR_CDR_2 0x00000000 | 133 | #define CONFIG_SYS_DDR_CDR_2 0x00000000 |
134 | #define CONFIG_SYS_DDR_OCD_CTRL 0x00000000 | 134 | #define CONFIG_SYS_DDR_OCD_CTRL 0x00000000 |
135 | #define CONFIG_SYS_DDR_OCD_STATUS 0x00000000 | 135 | #define CONFIG_SYS_DDR_OCD_STATUS 0x00000000 |
136 | #define CONFIG_SYS_DDR_CONTROL 0xc7000000 /* Type = DDR3 */ | 136 | #define CONFIG_SYS_DDR_CONTROL 0xc7000000 /* Type = DDR3 */ |
137 | #define CONFIG_SYS_DDR_CONTROL2 0x24400000 | 137 | #define CONFIG_SYS_DDR_CONTROL2 0x24400000 |
138 | 138 | ||
139 | #define CONFIG_SYS_DDR_ERR_INT_EN 0x0000000d | 139 | #define CONFIG_SYS_DDR_ERR_INT_EN 0x0000000d |
140 | #define CONFIG_SYS_DDR_ERR_DIS 0x00000000 | 140 | #define CONFIG_SYS_DDR_ERR_DIS 0x00000000 |
141 | #define CONFIG_SYS_DDR_SBE 0x00010000 | 141 | #define CONFIG_SYS_DDR_SBE 0x00010000 |
142 | 142 | ||
143 | #undef CONFIG_CLOCKS_IN_MHZ | 143 | #undef CONFIG_CLOCKS_IN_MHZ |
144 | 144 | ||
145 | /* | 145 | /* |
146 | * Local Bus Definitions | 146 | * Local Bus Definitions |
147 | */ | 147 | */ |
148 | 148 | ||
149 | #define CONFIG_SYS_FLASH_BASE 0xfe000000 /* start of FLASH 32M */ | 149 | #define CONFIG_SYS_FLASH_BASE 0xfe000000 /* start of FLASH 32M */ |
150 | #define CONFIG_SYS_FLASH_BASE_PHYS CONFIG_SYS_FLASH_BASE | 150 | #define CONFIG_SYS_FLASH_BASE_PHYS CONFIG_SYS_FLASH_BASE |
151 | 151 | ||
152 | #define CONFIG_SYS_BCSR_BASE 0xf8000000 | 152 | #define CONFIG_SYS_BCSR_BASE 0xf8000000 |
153 | #define CONFIG_SYS_BCSR_BASE_PHYS CONFIG_SYS_BCSR_BASE | 153 | #define CONFIG_SYS_BCSR_BASE_PHYS CONFIG_SYS_BCSR_BASE |
154 | 154 | ||
155 | /*Chip select 0 - Flash*/ | 155 | /*Chip select 0 - Flash*/ |
156 | #define CONFIG_SYS_BR0_PRELIM 0xfe000801 | 156 | #define CONFIG_SYS_BR0_PRELIM 0xfe000801 |
157 | #define CONFIG_SYS_OR0_PRELIM 0xfe000ff7 | 157 | #define CONFIG_SYS_OR0_PRELIM 0xfe000ff7 |
158 | 158 | ||
159 | /*Chip select 1 - BCSR*/ | 159 | /*Chip select 1 - BCSR*/ |
160 | #define CONFIG_SYS_BR1_PRELIM 0xf8000801 | 160 | #define CONFIG_SYS_BR1_PRELIM 0xf8000801 |
161 | #define CONFIG_SYS_OR1_PRELIM 0xffffe9f7 | 161 | #define CONFIG_SYS_OR1_PRELIM 0xffffe9f7 |
162 | 162 | ||
163 | /*Chip select 4 - PIB*/ | 163 | /*Chip select 4 - PIB*/ |
164 | #define CONFIG_SYS_BR4_PRELIM 0xf8008801 | 164 | #define CONFIG_SYS_BR4_PRELIM 0xf8008801 |
165 | #define CONFIG_SYS_OR4_PRELIM 0xffffe9f7 | 165 | #define CONFIG_SYS_OR4_PRELIM 0xffffe9f7 |
166 | 166 | ||
167 | /*Chip select 5 - PIB*/ | 167 | /*Chip select 5 - PIB*/ |
168 | #define CONFIG_SYS_BR5_PRELIM 0xf8010801 | 168 | #define CONFIG_SYS_BR5_PRELIM 0xf8010801 |
169 | #define CONFIG_SYS_OR5_PRELIM 0xffffe9f7 | 169 | #define CONFIG_SYS_OR5_PRELIM 0xffffe9f7 |
170 | 170 | ||
171 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ | 171 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ |
172 | #define CONFIG_SYS_MAX_FLASH_SECT 512 /* sectors per device */ | 172 | #define CONFIG_SYS_MAX_FLASH_SECT 512 /* sectors per device */ |
173 | #undef CONFIG_SYS_FLASH_CHECKSUM | 173 | #undef CONFIG_SYS_FLASH_CHECKSUM |
174 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ | 174 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ |
175 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ | 175 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ |
176 | 176 | ||
177 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ | 177 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ |
178 | 178 | ||
179 | #define CONFIG_FLASH_CFI_DRIVER | 179 | #define CONFIG_FLASH_CFI_DRIVER |
180 | #define CONFIG_SYS_FLASH_CFI | 180 | #define CONFIG_SYS_FLASH_CFI |
181 | #define CONFIG_SYS_FLASH_EMPTY_INFO | 181 | #define CONFIG_SYS_FLASH_EMPTY_INFO |
182 | 182 | ||
183 | 183 | ||
184 | /* | 184 | /* |
185 | * SDRAM on the LocalBus | 185 | * SDRAM on the LocalBus |
186 | */ | 186 | */ |
187 | #define CONFIG_SYS_LBC_SDRAM_BASE 0xf0000000 /* Localbus SDRAM */ | 187 | #define CONFIG_SYS_LBC_SDRAM_BASE 0xf0000000 /* Localbus SDRAM */ |
188 | #define CONFIG_SYS_LBC_SDRAM_SIZE 64 /* LBC SDRAM is 64MB */ | 188 | #define CONFIG_SYS_LBC_SDRAM_SIZE 64 /* LBC SDRAM is 64MB */ |
189 | 189 | ||
190 | #define CONFIG_SYS_LBC_LCRR 0x00000004 /* LB clock ratio reg */ | 190 | #define CONFIG_SYS_LBC_LCRR 0x00000004 /* LB clock ratio reg */ |
191 | #define CONFIG_SYS_LBC_LBCR 0x00040000 /* LB config reg */ | 191 | #define CONFIG_SYS_LBC_LBCR 0x00040000 /* LB config reg */ |
192 | #define CONFIG_SYS_LBC_LSRT 0x20000000 /* LB sdram refresh timer */ | 192 | #define CONFIG_SYS_LBC_LSRT 0x20000000 /* LB sdram refresh timer */ |
193 | #define CONFIG_SYS_LBC_MRTPR 0x00000000 /* LB refresh timer prescal*/ | 193 | #define CONFIG_SYS_LBC_MRTPR 0x00000000 /* LB refresh timer prescal*/ |
194 | 194 | ||
195 | #define CONFIG_SYS_INIT_RAM_LOCK 1 | 195 | #define CONFIG_SYS_INIT_RAM_LOCK 1 |
196 | #define CONFIG_SYS_INIT_RAM_ADDR 0xe4010000 /* Initial RAM address */ | 196 | #define CONFIG_SYS_INIT_RAM_ADDR 0xe4010000 /* Initial RAM address */ |
197 | #define CONFIG_SYS_INIT_RAM_END 0x4000 /* End of used area in RAM */ | 197 | #define CONFIG_SYS_INIT_RAM_END 0x4000 /* End of used area in RAM */ |
198 | 198 | ||
199 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data */ | 199 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data */ |
200 | #define CONFIG_SYS_GBL_DATA_OFFSET \ | 200 | #define CONFIG_SYS_GBL_DATA_OFFSET \ |
201 | (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 201 | (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
202 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET | 202 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
203 | 203 | ||
204 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ | 204 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ |
205 | #define CONFIG_SYS_MALLOC_LEN (512 * 1024) /* Reserved for malloc */ | 205 | #define CONFIG_SYS_MALLOC_LEN (512 * 1024) /* Reserved for malloc */ |
206 | 206 | ||
207 | /* Serial Port */ | 207 | /* Serial Port */ |
208 | #define CONFIG_CONS_INDEX 1 | 208 | #define CONFIG_CONS_INDEX 1 |
209 | #undef CONFIG_SERIAL_SOFTWARE_FIFO | 209 | #undef CONFIG_SERIAL_SOFTWARE_FIFO |
210 | #define CONFIG_SYS_NS16550 | 210 | #define CONFIG_SYS_NS16550 |
211 | #define CONFIG_SYS_NS16550_SERIAL | 211 | #define CONFIG_SYS_NS16550_SERIAL |
212 | #define CONFIG_SYS_NS16550_REG_SIZE 1 | 212 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
213 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) | 213 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) |
214 | 214 | ||
215 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 215 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
216 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} | 216 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} |
217 | 217 | ||
218 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) | 218 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) |
219 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) | 219 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) |
220 | 220 | ||
221 | /* Use the HUSH parser*/ | 221 | /* Use the HUSH parser*/ |
222 | #define CONFIG_SYS_HUSH_PARSER | 222 | #define CONFIG_SYS_HUSH_PARSER |
223 | #ifdef CONFIG_SYS_HUSH_PARSER | 223 | #ifdef CONFIG_SYS_HUSH_PARSER |
224 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | 224 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
225 | #endif | 225 | #endif |
226 | 226 | ||
227 | /* pass open firmware flat tree */ | 227 | /* pass open firmware flat tree */ |
228 | #define CONFIG_OF_LIBFDT 1 | 228 | #define CONFIG_OF_LIBFDT 1 |
229 | #define CONFIG_OF_BOARD_SETUP 1 | 229 | #define CONFIG_OF_BOARD_SETUP 1 |
230 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 | 230 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 |
231 | 231 | ||
232 | #define CONFIG_SYS_64BIT_VSPRINTF 1 | 232 | #define CONFIG_SYS_64BIT_VSPRINTF 1 |
233 | #define CONFIG_SYS_64BIT_STRTOUL 1 | 233 | #define CONFIG_SYS_64BIT_STRTOUL 1 |
234 | 234 | ||
235 | /* | 235 | /* |
236 | * I2C | 236 | * I2C |
237 | */ | 237 | */ |
238 | #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ | 238 | #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ |
239 | #define CONFIG_HARD_I2C /* I2C with hardware support*/ | 239 | #define CONFIG_HARD_I2C /* I2C with hardware support*/ |
240 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ | 240 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ |
241 | #define CONFIG_I2C_MULTI_BUS | 241 | #define CONFIG_I2C_MULTI_BUS |
242 | #define CONFIG_I2C_CMD_TREE | ||
243 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ | 242 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ |
244 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 243 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
245 | #define CONFIG_SYS_I2C_NOPROBES {{0,0x69}} /* Don't probe these addrs */ | 244 | #define CONFIG_SYS_I2C_NOPROBES {{0,0x69}} /* Don't probe these addrs */ |
246 | #define CONFIG_SYS_I2C_OFFSET 0x3000 | 245 | #define CONFIG_SYS_I2C_OFFSET 0x3000 |
247 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 | 246 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 |
248 | 247 | ||
249 | /* | 248 | /* |
250 | * I2C2 EEPROM | 249 | * I2C2 EEPROM |
251 | */ | 250 | */ |
252 | #define CONFIG_ID_EEPROM | 251 | #define CONFIG_ID_EEPROM |
253 | #ifdef CONFIG_ID_EEPROM | 252 | #ifdef CONFIG_ID_EEPROM |
254 | #define CONFIG_SYS_I2C_EEPROM_NXID | 253 | #define CONFIG_SYS_I2C_EEPROM_NXID |
255 | #endif | 254 | #endif |
256 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x52 | 255 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x52 |
257 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 | 256 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 |
258 | #define CONFIG_SYS_EEPROM_BUS_NUM 1 | 257 | #define CONFIG_SYS_EEPROM_BUS_NUM 1 |
259 | 258 | ||
260 | #define PLPPAR1_I2C_BIT_MASK 0x0000000F | 259 | #define PLPPAR1_I2C_BIT_MASK 0x0000000F |
261 | #define PLPPAR1_I2C2_VAL 0x00000000 | 260 | #define PLPPAR1_I2C2_VAL 0x00000000 |
262 | #define PLPDIR1_I2C_BIT_MASK 0x0000000F | 261 | #define PLPDIR1_I2C_BIT_MASK 0x0000000F |
263 | #define PLPDIR1_I2C2_VAL 0x0000000F | 262 | #define PLPDIR1_I2C2_VAL 0x0000000F |
264 | 263 | ||
265 | /* | 264 | /* |
266 | * General PCI | 265 | * General PCI |
267 | * Memory Addresses are mapped 1-1. I/O is mapped from 0 | 266 | * Memory Addresses are mapped 1-1. I/O is mapped from 0 |
268 | */ | 267 | */ |
269 | #define CONFIG_SYS_PCIE1_MEM_VIRT 0xa0000000 | 268 | #define CONFIG_SYS_PCIE1_MEM_VIRT 0xa0000000 |
270 | #define CONFIG_SYS_PCIE1_MEM_BUS 0xa0000000 | 269 | #define CONFIG_SYS_PCIE1_MEM_BUS 0xa0000000 |
271 | #define CONFIG_SYS_PCIE1_MEM_PHYS 0xa0000000 | 270 | #define CONFIG_SYS_PCIE1_MEM_PHYS 0xa0000000 |
272 | #define CONFIG_SYS_PCIE1_MEM_SIZE 0x20000000 /* 512M */ | 271 | #define CONFIG_SYS_PCIE1_MEM_SIZE 0x20000000 /* 512M */ |
273 | #define CONFIG_SYS_PCIE1_IO_VIRT 0xe2800000 | 272 | #define CONFIG_SYS_PCIE1_IO_VIRT 0xe2800000 |
274 | #define CONFIG_SYS_PCIE1_IO_BUS 0x00000000 | 273 | #define CONFIG_SYS_PCIE1_IO_BUS 0x00000000 |
275 | #define CONFIG_SYS_PCIE1_IO_PHYS 0xe2800000 | 274 | #define CONFIG_SYS_PCIE1_IO_PHYS 0xe2800000 |
276 | #define CONFIG_SYS_PCIE1_IO_SIZE 0x00800000 /* 8M */ | 275 | #define CONFIG_SYS_PCIE1_IO_SIZE 0x00800000 /* 8M */ |
277 | 276 | ||
278 | #define CONFIG_SYS_SRIO_MEM_VIRT 0xc0000000 | 277 | #define CONFIG_SYS_SRIO_MEM_VIRT 0xc0000000 |
279 | #define CONFIG_SYS_SRIO_MEM_BUS 0xc0000000 | 278 | #define CONFIG_SYS_SRIO_MEM_BUS 0xc0000000 |
280 | #define CONFIG_SYS_SRIO_MEM_PHYS 0xc0000000 | 279 | #define CONFIG_SYS_SRIO_MEM_PHYS 0xc0000000 |
281 | 280 | ||
282 | #ifdef CONFIG_QE | 281 | #ifdef CONFIG_QE |
283 | /* | 282 | /* |
284 | * QE UEC ethernet configuration | 283 | * QE UEC ethernet configuration |
285 | */ | 284 | */ |
286 | 285 | ||
287 | #define CONFIG_MIIM_ADDRESS (CONFIG_SYS_CCSRBAR + 0x82120) | 286 | #define CONFIG_MIIM_ADDRESS (CONFIG_SYS_CCSRBAR + 0x82120) |
288 | #define CONFIG_UEC_ETH | 287 | #define CONFIG_UEC_ETH |
289 | #define CONFIG_ETHPRIME "FSL UEC0" | 288 | #define CONFIG_ETHPRIME "FSL UEC0" |
290 | #define CONFIG_PHY_MODE_NEED_CHANGE | 289 | #define CONFIG_PHY_MODE_NEED_CHANGE |
291 | 290 | ||
292 | #define CONFIG_UEC_ETH1 /* GETH1 */ | 291 | #define CONFIG_UEC_ETH1 /* GETH1 */ |
293 | #define CONFIG_HAS_ETH0 | 292 | #define CONFIG_HAS_ETH0 |
294 | 293 | ||
295 | #ifdef CONFIG_UEC_ETH1 | 294 | #ifdef CONFIG_UEC_ETH1 |
296 | #define CONFIG_SYS_UEC1_UCC_NUM 0 /* UCC1 */ | 295 | #define CONFIG_SYS_UEC1_UCC_NUM 0 /* UCC1 */ |
297 | #define CONFIG_SYS_UEC1_RX_CLK QE_CLK_NONE | 296 | #define CONFIG_SYS_UEC1_RX_CLK QE_CLK_NONE |
298 | #define CONFIG_SYS_UEC1_TX_CLK QE_CLK12 | 297 | #define CONFIG_SYS_UEC1_TX_CLK QE_CLK12 |
299 | #define CONFIG_SYS_UEC1_ETH_TYPE GIGA_ETH | 298 | #define CONFIG_SYS_UEC1_ETH_TYPE GIGA_ETH |
300 | #define CONFIG_SYS_UEC1_PHY_ADDR 7 | 299 | #define CONFIG_SYS_UEC1_PHY_ADDR 7 |
301 | #define CONFIG_SYS_UEC1_INTERFACE_MODE ENET_1000_RGMII_ID | 300 | #define CONFIG_SYS_UEC1_INTERFACE_MODE ENET_1000_RGMII_ID |
302 | #endif | 301 | #endif |
303 | 302 | ||
304 | #define CONFIG_UEC_ETH2 /* GETH2 */ | 303 | #define CONFIG_UEC_ETH2 /* GETH2 */ |
305 | #define CONFIG_HAS_ETH1 | 304 | #define CONFIG_HAS_ETH1 |
306 | 305 | ||
307 | #ifdef CONFIG_UEC_ETH2 | 306 | #ifdef CONFIG_UEC_ETH2 |
308 | #define CONFIG_SYS_UEC2_UCC_NUM 1 /* UCC2 */ | 307 | #define CONFIG_SYS_UEC2_UCC_NUM 1 /* UCC2 */ |
309 | #define CONFIG_SYS_UEC2_RX_CLK QE_CLK_NONE | 308 | #define CONFIG_SYS_UEC2_RX_CLK QE_CLK_NONE |
310 | #define CONFIG_SYS_UEC2_TX_CLK QE_CLK17 | 309 | #define CONFIG_SYS_UEC2_TX_CLK QE_CLK17 |
311 | #define CONFIG_SYS_UEC2_ETH_TYPE GIGA_ETH | 310 | #define CONFIG_SYS_UEC2_ETH_TYPE GIGA_ETH |
312 | #define CONFIG_SYS_UEC2_PHY_ADDR 1 | 311 | #define CONFIG_SYS_UEC2_PHY_ADDR 1 |
313 | #define CONFIG_SYS_UEC2_INTERFACE_MODE ENET_1000_RGMII_ID | 312 | #define CONFIG_SYS_UEC2_INTERFACE_MODE ENET_1000_RGMII_ID |
314 | #endif | 313 | #endif |
315 | 314 | ||
316 | #endif /* CONFIG_QE */ | 315 | #endif /* CONFIG_QE */ |
317 | 316 | ||
318 | #if defined(CONFIG_PCI) | 317 | #if defined(CONFIG_PCI) |
319 | 318 | ||
320 | #define CONFIG_NET_MULTI | 319 | #define CONFIG_NET_MULTI |
321 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ | 320 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ |
322 | 321 | ||
323 | #undef CONFIG_EEPRO100 | 322 | #undef CONFIG_EEPRO100 |
324 | #undef CONFIG_TULIP | 323 | #undef CONFIG_TULIP |
325 | 324 | ||
326 | #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ | 325 | #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ |
327 | 326 | ||
328 | #endif /* CONFIG_PCI */ | 327 | #endif /* CONFIG_PCI */ |
329 | 328 | ||
330 | #ifndef CONFIG_NET_MULTI | 329 | #ifndef CONFIG_NET_MULTI |
331 | #define CONFIG_NET_MULTI 1 | 330 | #define CONFIG_NET_MULTI 1 |
332 | #endif | 331 | #endif |
333 | 332 | ||
334 | /* | 333 | /* |
335 | * Environment | 334 | * Environment |
336 | */ | 335 | */ |
337 | #define CONFIG_ENV_IS_IN_FLASH 1 | 336 | #define CONFIG_ENV_IS_IN_FLASH 1 |
338 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE) | 337 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE) |
339 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 256K(one sector) for env */ | 338 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 256K(one sector) for env */ |
340 | #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE | 339 | #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE |
341 | 340 | ||
342 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ | 341 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
343 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ | 342 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
344 | 343 | ||
345 | /* QE microcode/firmware address */ | 344 | /* QE microcode/firmware address */ |
346 | #define CONFIG_SYS_QE_FW_ADDR 0xfff00000 | 345 | #define CONFIG_SYS_QE_FW_ADDR 0xfff00000 |
347 | 346 | ||
348 | /* | 347 | /* |
349 | * BOOTP options | 348 | * BOOTP options |
350 | */ | 349 | */ |
351 | #define CONFIG_BOOTP_BOOTFILESIZE | 350 | #define CONFIG_BOOTP_BOOTFILESIZE |
352 | #define CONFIG_BOOTP_BOOTPATH | 351 | #define CONFIG_BOOTP_BOOTPATH |
353 | #define CONFIG_BOOTP_GATEWAY | 352 | #define CONFIG_BOOTP_GATEWAY |
354 | #define CONFIG_BOOTP_HOSTNAME | 353 | #define CONFIG_BOOTP_HOSTNAME |
355 | 354 | ||
356 | 355 | ||
357 | /* | 356 | /* |
358 | * Command line configuration. | 357 | * Command line configuration. |
359 | */ | 358 | */ |
360 | #include <config_cmd_default.h> | 359 | #include <config_cmd_default.h> |
361 | 360 | ||
362 | #define CONFIG_CMD_PING | 361 | #define CONFIG_CMD_PING |
363 | #define CONFIG_CMD_I2C | 362 | #define CONFIG_CMD_I2C |
364 | #define CONFIG_CMD_MII | 363 | #define CONFIG_CMD_MII |
365 | #define CONFIG_CMD_ELF | 364 | #define CONFIG_CMD_ELF |
366 | #define CONFIG_CMD_IRQ | 365 | #define CONFIG_CMD_IRQ |
367 | #define CONFIG_CMD_SETEXPR | 366 | #define CONFIG_CMD_SETEXPR |
368 | 367 | ||
369 | #if defined(CONFIG_PCI) | 368 | #if defined(CONFIG_PCI) |
370 | #define CONFIG_CMD_PCI | 369 | #define CONFIG_CMD_PCI |
371 | #endif | 370 | #endif |
372 | 371 | ||
373 | 372 | ||
374 | #undef CONFIG_WATCHDOG /* watchdog disabled */ | 373 | #undef CONFIG_WATCHDOG /* watchdog disabled */ |
375 | 374 | ||
376 | /* | 375 | /* |
377 | * Miscellaneous configurable options | 376 | * Miscellaneous configurable options |
378 | */ | 377 | */ |
379 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 378 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
380 | #define CONFIG_CMDLINE_EDITING /* Command-line editing */ | 379 | #define CONFIG_CMDLINE_EDITING /* Command-line editing */ |
381 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ | 380 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ |
382 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | 381 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
383 | #if defined(CONFIG_CMD_KGDB) | 382 | #if defined(CONFIG_CMD_KGDB) |
384 | #define CONFIG_SYS_CBSIZE 2048 /* Console I/O Buffer Size */ | 383 | #define CONFIG_SYS_CBSIZE 2048 /* Console I/O Buffer Size */ |
385 | #else | 384 | #else |
386 | #define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ | 385 | #define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ |
387 | #endif | 386 | #endif |
388 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) | 387 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) |
389 | /* Print Buffer Size */ | 388 | /* Print Buffer Size */ |
390 | #define CONFIG_SYS_MAXARGS 32 /* max number of command args */ | 389 | #define CONFIG_SYS_MAXARGS 32 /* max number of command args */ |
391 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE | 390 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
392 | /* Boot Argument Buffer Size */ | 391 | /* Boot Argument Buffer Size */ |
393 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ | 392 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ |
394 | 393 | ||
395 | /* | 394 | /* |
396 | * For booting Linux, the board info and command line data | 395 | * For booting Linux, the board info and command line data |
397 | * have to be in the first 8 MB of memory, since this is | 396 | * have to be in the first 8 MB of memory, since this is |
398 | * the maximum mapped by the Linux kernel during initialization. | 397 | * the maximum mapped by the Linux kernel during initialization. |
399 | */ | 398 | */ |
400 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) | 399 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) |
401 | /* Initial Memory map for Linux*/ | 400 | /* Initial Memory map for Linux*/ |
402 | 401 | ||
403 | /* | 402 | /* |
404 | * Internal Definitions | 403 | * Internal Definitions |
405 | * | 404 | * |
406 | * Boot Flags | 405 | * Boot Flags |
407 | */ | 406 | */ |
408 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 407 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
409 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 408 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
410 | 409 | ||
411 | #if defined(CONFIG_CMD_KGDB) | 410 | #if defined(CONFIG_CMD_KGDB) |
412 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ | 411 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ |
413 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ | 412 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ |
414 | #endif | 413 | #endif |
415 | 414 | ||
416 | /* | 415 | /* |
417 | * Environment Configuration | 416 | * Environment Configuration |
418 | */ | 417 | */ |
419 | #define CONFIG_HOSTNAME mpc8569mds | 418 | #define CONFIG_HOSTNAME mpc8569mds |
420 | #define CONFIG_ROOTPATH /nfsroot | 419 | #define CONFIG_ROOTPATH /nfsroot |
421 | #define CONFIG_BOOTFILE your.uImage | 420 | #define CONFIG_BOOTFILE your.uImage |
422 | 421 | ||
423 | #define CONFIG_SERVERIP 192.168.1.1 | 422 | #define CONFIG_SERVERIP 192.168.1.1 |
424 | #define CONFIG_GATEWAYIP 192.168.1.1 | 423 | #define CONFIG_GATEWAYIP 192.168.1.1 |
425 | #define CONFIG_NETMASK 255.255.255.0 | 424 | #define CONFIG_NETMASK 255.255.255.0 |
426 | 425 | ||
427 | #define CONFIG_LOADADDR 200000 /*default location for tftp and bootm*/ | 426 | #define CONFIG_LOADADDR 200000 /*default location for tftp and bootm*/ |
428 | 427 | ||
429 | #define CONFIG_BOOTDELAY 10 /* -1 disables auto-boot */ | 428 | #define CONFIG_BOOTDELAY 10 /* -1 disables auto-boot */ |
430 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs*/ | 429 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs*/ |
431 | 430 | ||
432 | #define CONFIG_BAUDRATE 115200 | 431 | #define CONFIG_BAUDRATE 115200 |
433 | 432 | ||
434 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 433 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
435 | "netdev=eth0\0" \ | 434 | "netdev=eth0\0" \ |
436 | "consoledev=ttyS0\0" \ | 435 | "consoledev=ttyS0\0" \ |
437 | "ramdiskaddr=600000\0" \ | 436 | "ramdiskaddr=600000\0" \ |
438 | "ramdiskfile=your.ramdisk.u-boot\0" \ | 437 | "ramdiskfile=your.ramdisk.u-boot\0" \ |
439 | "fdtaddr=400000\0" \ | 438 | "fdtaddr=400000\0" \ |
440 | "fdtfile=your.fdt.dtb\0" \ | 439 | "fdtfile=your.fdt.dtb\0" \ |
441 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ | 440 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
442 | "nfsroot=$serverip:$rootpath " \ | 441 | "nfsroot=$serverip:$rootpath " \ |
443 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ | 442 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ |
444 | "console=$consoledev,$baudrate $othbootargs\0" \ | 443 | "console=$consoledev,$baudrate $othbootargs\0" \ |
445 | "ramargs=setenv bootargs root=/dev/ram rw " \ | 444 | "ramargs=setenv bootargs root=/dev/ram rw " \ |
446 | "console=$consoledev,$baudrate $othbootargs\0" \ | 445 | "console=$consoledev,$baudrate $othbootargs\0" \ |
447 | 446 | ||
448 | #define CONFIG_NFSBOOTCOMMAND \ | 447 | #define CONFIG_NFSBOOTCOMMAND \ |
449 | "run nfsargs;" \ | 448 | "run nfsargs;" \ |
450 | "tftp $loadaddr $bootfile;" \ | 449 | "tftp $loadaddr $bootfile;" \ |
451 | "tftp $fdtaddr $fdtfile;" \ | 450 | "tftp $fdtaddr $fdtfile;" \ |
452 | "bootm $loadaddr - $fdtaddr" | 451 | "bootm $loadaddr - $fdtaddr" |
453 | 452 | ||
454 | #define CONFIG_RAMBOOTCOMMAND \ | 453 | #define CONFIG_RAMBOOTCOMMAND \ |
455 | "run ramargs;" \ | 454 | "run ramargs;" \ |
456 | "tftp $ramdiskaddr $ramdiskfile;" \ | 455 | "tftp $ramdiskaddr $ramdiskfile;" \ |
457 | "tftp $loadaddr $bootfile;" \ | 456 | "tftp $loadaddr $bootfile;" \ |
458 | "bootm $loadaddr $ramdiskaddr" | 457 | "bootm $loadaddr $ramdiskaddr" |
459 | 458 | ||
460 | #define CONFIG_BOOTCOMMAND CONFIG_NFSBOOTCOMMAND | 459 | #define CONFIG_BOOTCOMMAND CONFIG_NFSBOOTCOMMAND |
461 | 460 | ||
462 | #endif /* __CONFIG_H */ | 461 | #endif /* __CONFIG_H */ |
463 | 462 |
include/configs/MPC8572DS.h
1 | /* | 1 | /* |
2 | * Copyright 2007-2008 Freescale Semiconductor, Inc. | 2 | * Copyright 2007-2008 Freescale Semiconductor, Inc. |
3 | * | 3 | * |
4 | * See file CREDITS for list of people who contributed to this | 4 | * See file CREDITS for list of people who contributed to this |
5 | * project. | 5 | * project. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License as | 8 | * modify it under the terms of the GNU General Public License as |
9 | * published by the Free Software Foundation; either version 2 of | 9 | * published by the Free Software Foundation; either version 2 of |
10 | * the License, or (at your option) any later version. | 10 | * the License, or (at your option) any later version. |
11 | * | 11 | * |
12 | * This program is distributed in the hope that it will be useful, | 12 | * This program is distributed in the hope that it will be useful, |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
16 | * | 16 | * |
17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License |
18 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
20 | * MA 02111-1307 USA | 20 | * MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | 22 | ||
23 | /* | 23 | /* |
24 | * mpc8572ds board configuration file | 24 | * mpc8572ds board configuration file |
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | #ifndef __CONFIG_H | 27 | #ifndef __CONFIG_H |
28 | #define __CONFIG_H | 28 | #define __CONFIG_H |
29 | 29 | ||
30 | /* High Level Configuration Options */ | 30 | /* High Level Configuration Options */ |
31 | #define CONFIG_BOOKE 1 /* BOOKE */ | 31 | #define CONFIG_BOOKE 1 /* BOOKE */ |
32 | #define CONFIG_E500 1 /* BOOKE e500 family */ | 32 | #define CONFIG_E500 1 /* BOOKE e500 family */ |
33 | #define CONFIG_MPC85xx 1 /* MPC8540/60/55/41/48 */ | 33 | #define CONFIG_MPC85xx 1 /* MPC8540/60/55/41/48 */ |
34 | #define CONFIG_MPC8572 1 | 34 | #define CONFIG_MPC8572 1 |
35 | #define CONFIG_MPC8572DS 1 | 35 | #define CONFIG_MPC8572DS 1 |
36 | #define CONFIG_MP 1 /* support multiple processors */ | 36 | #define CONFIG_MP 1 /* support multiple processors */ |
37 | #define CONFIG_NUM_CPUS 2 /* Number of CPUs in the system */ | 37 | #define CONFIG_NUM_CPUS 2 /* Number of CPUs in the system */ |
38 | 38 | ||
39 | #define CONFIG_FSL_ELBC 1 /* Has Enhanced localbus controller */ | 39 | #define CONFIG_FSL_ELBC 1 /* Has Enhanced localbus controller */ |
40 | #define CONFIG_PCI 1 /* Enable PCI/PCIE */ | 40 | #define CONFIG_PCI 1 /* Enable PCI/PCIE */ |
41 | #define CONFIG_PCIE1 1 /* PCIE controler 1 (slot 1) */ | 41 | #define CONFIG_PCIE1 1 /* PCIE controler 1 (slot 1) */ |
42 | #define CONFIG_PCIE2 1 /* PCIE controler 2 (slot 2) */ | 42 | #define CONFIG_PCIE2 1 /* PCIE controler 2 (slot 2) */ |
43 | #define CONFIG_PCIE3 1 /* PCIE controler 3 (ULI bridge) */ | 43 | #define CONFIG_PCIE3 1 /* PCIE controler 3 (ULI bridge) */ |
44 | #define CONFIG_FSL_PCI_INIT 1 /* Use common FSL init code */ | 44 | #define CONFIG_FSL_PCI_INIT 1 /* Use common FSL init code */ |
45 | #define CONFIG_FSL_PCIE_RESET 1 /* need PCIe reset errata */ | 45 | #define CONFIG_FSL_PCIE_RESET 1 /* need PCIe reset errata */ |
46 | #define CONFIG_SYS_PCI_64BIT 1 /* enable 64-bit PCI resources */ | 46 | #define CONFIG_SYS_PCI_64BIT 1 /* enable 64-bit PCI resources */ |
47 | 47 | ||
48 | #define CONFIG_FSL_LAW 1 /* Use common FSL init code */ | 48 | #define CONFIG_FSL_LAW 1 /* Use common FSL init code */ |
49 | 49 | ||
50 | #define CONFIG_TSEC_ENET /* tsec ethernet support */ | 50 | #define CONFIG_TSEC_ENET /* tsec ethernet support */ |
51 | #define CONFIG_ENV_OVERWRITE | 51 | #define CONFIG_ENV_OVERWRITE |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * When initializing flash, if we cannot find the manufacturer ID, | 54 | * When initializing flash, if we cannot find the manufacturer ID, |
55 | * assume this is the AMD flash associated with the CDS board. | 55 | * assume this is the AMD flash associated with the CDS board. |
56 | * This allows booting from a promjet. | 56 | * This allows booting from a promjet. |
57 | */ | 57 | */ |
58 | #define CONFIG_ASSUME_AMD_FLASH | 58 | #define CONFIG_ASSUME_AMD_FLASH |
59 | 59 | ||
60 | #ifndef __ASSEMBLY__ | 60 | #ifndef __ASSEMBLY__ |
61 | extern unsigned long get_board_sys_clk(unsigned long dummy); | 61 | extern unsigned long get_board_sys_clk(unsigned long dummy); |
62 | extern unsigned long get_board_ddr_clk(unsigned long dummy); | 62 | extern unsigned long get_board_ddr_clk(unsigned long dummy); |
63 | #endif | 63 | #endif |
64 | #define CONFIG_SYS_CLK_FREQ get_board_sys_clk(0) /* sysclk for MPC85xx */ | 64 | #define CONFIG_SYS_CLK_FREQ get_board_sys_clk(0) /* sysclk for MPC85xx */ |
65 | #define CONFIG_DDR_CLK_FREQ get_board_ddr_clk(0) /* ddrclk for MPC85xx */ | 65 | #define CONFIG_DDR_CLK_FREQ get_board_ddr_clk(0) /* ddrclk for MPC85xx */ |
66 | #define CONFIG_ICS307_REFCLK_HZ 33333000 /* ICS307 clock chip ref freq */ | 66 | #define CONFIG_ICS307_REFCLK_HZ 33333000 /* ICS307 clock chip ref freq */ |
67 | #define CONFIG_GET_CLK_FROM_ICS307 /* decode sysclk and ddrclk freq | 67 | #define CONFIG_GET_CLK_FROM_ICS307 /* decode sysclk and ddrclk freq |
68 | from ICS307 instead of switches */ | 68 | from ICS307 instead of switches */ |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * These can be toggled for performance analysis, otherwise use default. | 71 | * These can be toggled for performance analysis, otherwise use default. |
72 | */ | 72 | */ |
73 | #define CONFIG_L2_CACHE /* toggle L2 cache */ | 73 | #define CONFIG_L2_CACHE /* toggle L2 cache */ |
74 | #define CONFIG_BTB /* toggle branch predition */ | 74 | #define CONFIG_BTB /* toggle branch predition */ |
75 | 75 | ||
76 | #define CONFIG_ENABLE_36BIT_PHYS 1 | 76 | #define CONFIG_ENABLE_36BIT_PHYS 1 |
77 | 77 | ||
78 | #ifdef CONFIG_PHYS_64BIT | 78 | #ifdef CONFIG_PHYS_64BIT |
79 | #define CONFIG_ADDR_MAP 1 | 79 | #define CONFIG_ADDR_MAP 1 |
80 | #define CONFIG_SYS_NUM_ADDR_MAP 16 /* number of TLB1 entries */ | 80 | #define CONFIG_SYS_NUM_ADDR_MAP 16 /* number of TLB1 entries */ |
81 | #endif | 81 | #endif |
82 | 82 | ||
83 | #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest works on */ | 83 | #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest works on */ |
84 | #define CONFIG_SYS_MEMTEST_END 0x7fffffff | 84 | #define CONFIG_SYS_MEMTEST_END 0x7fffffff |
85 | #define CONFIG_PANIC_HANG /* do not reset board on panic */ | 85 | #define CONFIG_PANIC_HANG /* do not reset board on panic */ |
86 | 86 | ||
87 | /* | 87 | /* |
88 | * Base addresses -- Note these are effective addresses where the | 88 | * Base addresses -- Note these are effective addresses where the |
89 | * actual resources get mapped (not physical addresses) | 89 | * actual resources get mapped (not physical addresses) |
90 | */ | 90 | */ |
91 | #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff700000 /* CCSRBAR Default */ | 91 | #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff700000 /* CCSRBAR Default */ |
92 | #define CONFIG_SYS_CCSRBAR 0xffe00000 /* relocated CCSRBAR */ | 92 | #define CONFIG_SYS_CCSRBAR 0xffe00000 /* relocated CCSRBAR */ |
93 | #ifdef CONFIG_PHYS_64BIT | 93 | #ifdef CONFIG_PHYS_64BIT |
94 | #define CONFIG_SYS_CCSRBAR_PHYS 0xfffe00000ull /* physical addr of CCSRBAR */ | 94 | #define CONFIG_SYS_CCSRBAR_PHYS 0xfffe00000ull /* physical addr of CCSRBAR */ |
95 | #else | 95 | #else |
96 | #define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR /* physical addr of CCSRBAR */ | 96 | #define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR /* physical addr of CCSRBAR */ |
97 | #endif | 97 | #endif |
98 | #define CONFIG_SYS_IMMR CONFIG_SYS_CCSRBAR /* PQII uses CONFIG_SYS_IMMR */ | 98 | #define CONFIG_SYS_IMMR CONFIG_SYS_CCSRBAR /* PQII uses CONFIG_SYS_IMMR */ |
99 | 99 | ||
100 | #define CONFIG_SYS_PCIE3_ADDR (CONFIG_SYS_CCSRBAR+0x8000) | 100 | #define CONFIG_SYS_PCIE3_ADDR (CONFIG_SYS_CCSRBAR+0x8000) |
101 | #define CONFIG_SYS_PCIE2_ADDR (CONFIG_SYS_CCSRBAR+0x9000) | 101 | #define CONFIG_SYS_PCIE2_ADDR (CONFIG_SYS_CCSRBAR+0x9000) |
102 | #define CONFIG_SYS_PCIE1_ADDR (CONFIG_SYS_CCSRBAR+0xa000) | 102 | #define CONFIG_SYS_PCIE1_ADDR (CONFIG_SYS_CCSRBAR+0xa000) |
103 | 103 | ||
104 | /* DDR Setup */ | 104 | /* DDR Setup */ |
105 | #define CONFIG_SYS_DDR_TLB_START 9 | 105 | #define CONFIG_SYS_DDR_TLB_START 9 |
106 | #define CONFIG_VERY_BIG_RAM | 106 | #define CONFIG_VERY_BIG_RAM |
107 | #define CONFIG_FSL_DDR2 | 107 | #define CONFIG_FSL_DDR2 |
108 | #undef CONFIG_FSL_DDR_INTERACTIVE | 108 | #undef CONFIG_FSL_DDR_INTERACTIVE |
109 | #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup */ | 109 | #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup */ |
110 | #define CONFIG_DDR_SPD | 110 | #define CONFIG_DDR_SPD |
111 | #undef CONFIG_DDR_DLL | 111 | #undef CONFIG_DDR_DLL |
112 | 112 | ||
113 | #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER | 113 | #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER |
114 | #define CONFIG_MEM_INIT_VALUE 0xDeadBeef | 114 | #define CONFIG_MEM_INIT_VALUE 0xDeadBeef |
115 | 115 | ||
116 | #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 | 116 | #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 |
117 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE | 117 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE |
118 | 118 | ||
119 | #define CONFIG_NUM_DDR_CONTROLLERS 2 | 119 | #define CONFIG_NUM_DDR_CONTROLLERS 2 |
120 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 | 120 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 |
121 | #define CONFIG_CHIP_SELECTS_PER_CTRL 2 | 121 | #define CONFIG_CHIP_SELECTS_PER_CTRL 2 |
122 | 122 | ||
123 | /* I2C addresses of SPD EEPROMs */ | 123 | /* I2C addresses of SPD EEPROMs */ |
124 | #define CONFIG_SYS_SPD_BUS_NUM 1 /* SPD EEPROMS locate on I2C bus 1 */ | 124 | #define CONFIG_SYS_SPD_BUS_NUM 1 /* SPD EEPROMS locate on I2C bus 1 */ |
125 | #define SPD_EEPROM_ADDRESS1 0x51 /* CTLR 0 DIMM 0 */ | 125 | #define SPD_EEPROM_ADDRESS1 0x51 /* CTLR 0 DIMM 0 */ |
126 | #define SPD_EEPROM_ADDRESS2 0x52 /* CTLR 1 DIMM 0 */ | 126 | #define SPD_EEPROM_ADDRESS2 0x52 /* CTLR 1 DIMM 0 */ |
127 | 127 | ||
128 | /* These are used when DDR doesn't use SPD. */ | 128 | /* These are used when DDR doesn't use SPD. */ |
129 | #define CONFIG_SYS_SDRAM_SIZE 512 /* DDR is 512MB */ | 129 | #define CONFIG_SYS_SDRAM_SIZE 512 /* DDR is 512MB */ |
130 | #define CONFIG_SYS_DDR_CS0_BNDS 0x0000001F | 130 | #define CONFIG_SYS_DDR_CS0_BNDS 0x0000001F |
131 | #define CONFIG_SYS_DDR_CS0_CONFIG 0x80010202 /* Enable, no interleaving */ | 131 | #define CONFIG_SYS_DDR_CS0_CONFIG 0x80010202 /* Enable, no interleaving */ |
132 | #define CONFIG_SYS_DDR_TIMING_3 0x00020000 | 132 | #define CONFIG_SYS_DDR_TIMING_3 0x00020000 |
133 | #define CONFIG_SYS_DDR_TIMING_0 0x00260802 | 133 | #define CONFIG_SYS_DDR_TIMING_0 0x00260802 |
134 | #define CONFIG_SYS_DDR_TIMING_1 0x626b2634 | 134 | #define CONFIG_SYS_DDR_TIMING_1 0x626b2634 |
135 | #define CONFIG_SYS_DDR_TIMING_2 0x062874cf | 135 | #define CONFIG_SYS_DDR_TIMING_2 0x062874cf |
136 | #define CONFIG_SYS_DDR_MODE_1 0x00440462 | 136 | #define CONFIG_SYS_DDR_MODE_1 0x00440462 |
137 | #define CONFIG_SYS_DDR_MODE_2 0x00000000 | 137 | #define CONFIG_SYS_DDR_MODE_2 0x00000000 |
138 | #define CONFIG_SYS_DDR_INTERVAL 0x0c300100 | 138 | #define CONFIG_SYS_DDR_INTERVAL 0x0c300100 |
139 | #define CONFIG_SYS_DDR_DATA_INIT 0xdeadbeef | 139 | #define CONFIG_SYS_DDR_DATA_INIT 0xdeadbeef |
140 | #define CONFIG_SYS_DDR_CLK_CTRL 0x00800000 | 140 | #define CONFIG_SYS_DDR_CLK_CTRL 0x00800000 |
141 | #define CONFIG_SYS_DDR_OCD_CTRL 0x00000000 | 141 | #define CONFIG_SYS_DDR_OCD_CTRL 0x00000000 |
142 | #define CONFIG_SYS_DDR_OCD_STATUS 0x00000000 | 142 | #define CONFIG_SYS_DDR_OCD_STATUS 0x00000000 |
143 | #define CONFIG_SYS_DDR_CONTROL 0xc3000008 /* Type = DDR2 */ | 143 | #define CONFIG_SYS_DDR_CONTROL 0xc3000008 /* Type = DDR2 */ |
144 | #define CONFIG_SYS_DDR_CONTROL2 0x24400000 | 144 | #define CONFIG_SYS_DDR_CONTROL2 0x24400000 |
145 | 145 | ||
146 | #define CONFIG_SYS_DDR_ERR_INT_EN 0x0000000d | 146 | #define CONFIG_SYS_DDR_ERR_INT_EN 0x0000000d |
147 | #define CONFIG_SYS_DDR_ERR_DIS 0x00000000 | 147 | #define CONFIG_SYS_DDR_ERR_DIS 0x00000000 |
148 | #define CONFIG_SYS_DDR_SBE 0x00010000 | 148 | #define CONFIG_SYS_DDR_SBE 0x00010000 |
149 | 149 | ||
150 | /* | 150 | /* |
151 | * Make sure required options are set | 151 | * Make sure required options are set |
152 | */ | 152 | */ |
153 | #ifndef CONFIG_SPD_EEPROM | 153 | #ifndef CONFIG_SPD_EEPROM |
154 | #error ("CONFIG_SPD_EEPROM is required") | 154 | #error ("CONFIG_SPD_EEPROM is required") |
155 | #endif | 155 | #endif |
156 | 156 | ||
157 | #undef CONFIG_CLOCKS_IN_MHZ | 157 | #undef CONFIG_CLOCKS_IN_MHZ |
158 | 158 | ||
159 | /* | 159 | /* |
160 | * Memory map | 160 | * Memory map |
161 | * | 161 | * |
162 | * 0x0000_0000 0x7fff_ffff DDR 2G Cacheable | 162 | * 0x0000_0000 0x7fff_ffff DDR 2G Cacheable |
163 | * 0x8000_0000 0xbfff_ffff PCI Express Mem 1G non-cacheable | 163 | * 0x8000_0000 0xbfff_ffff PCI Express Mem 1G non-cacheable |
164 | * 0xc000_0000 0xdfff_ffff PCI 512M non-cacheable | 164 | * 0xc000_0000 0xdfff_ffff PCI 512M non-cacheable |
165 | * 0xe100_0000 0xe3ff_ffff PCI IO range 4M non-cacheable | 165 | * 0xe100_0000 0xe3ff_ffff PCI IO range 4M non-cacheable |
166 | * | 166 | * |
167 | * Localbus cacheable (TBD) | 167 | * Localbus cacheable (TBD) |
168 | * 0xXXXX_XXXX 0xXXXX_XXXX SRAM YZ M Cacheable | 168 | * 0xXXXX_XXXX 0xXXXX_XXXX SRAM YZ M Cacheable |
169 | * | 169 | * |
170 | * Localbus non-cacheable | 170 | * Localbus non-cacheable |
171 | * 0xe000_0000 0xe80f_ffff Promjet/free 128M non-cacheable | 171 | * 0xe000_0000 0xe80f_ffff Promjet/free 128M non-cacheable |
172 | * 0xe800_0000 0xefff_ffff FLASH 128M non-cacheable | 172 | * 0xe800_0000 0xefff_ffff FLASH 128M non-cacheable |
173 | * 0xffa0_0000 0xffaf_ffff NAND 1M non-cacheable | 173 | * 0xffa0_0000 0xffaf_ffff NAND 1M non-cacheable |
174 | * 0xffdf_0000 0xffdf_7fff PIXIS 32K non-cacheable TLB0 | 174 | * 0xffdf_0000 0xffdf_7fff PIXIS 32K non-cacheable TLB0 |
175 | * 0xffd0_0000 0xffd0_3fff L1 for stack 16K Cacheable TLB0 | 175 | * 0xffd0_0000 0xffd0_3fff L1 for stack 16K Cacheable TLB0 |
176 | * 0xffe0_0000 0xffef_ffff CCSR 1M non-cacheable | 176 | * 0xffe0_0000 0xffef_ffff CCSR 1M non-cacheable |
177 | */ | 177 | */ |
178 | 178 | ||
179 | /* | 179 | /* |
180 | * Local Bus Definitions | 180 | * Local Bus Definitions |
181 | */ | 181 | */ |
182 | #define CONFIG_SYS_FLASH_BASE 0xe0000000 /* start of FLASH 128M */ | 182 | #define CONFIG_SYS_FLASH_BASE 0xe0000000 /* start of FLASH 128M */ |
183 | #ifdef CONFIG_PHYS_64BIT | 183 | #ifdef CONFIG_PHYS_64BIT |
184 | #define CONFIG_SYS_FLASH_BASE_PHYS 0xfe0000000ull | 184 | #define CONFIG_SYS_FLASH_BASE_PHYS 0xfe0000000ull |
185 | #else | 185 | #else |
186 | #define CONFIG_SYS_FLASH_BASE_PHYS CONFIG_SYS_FLASH_BASE | 186 | #define CONFIG_SYS_FLASH_BASE_PHYS CONFIG_SYS_FLASH_BASE |
187 | #endif | 187 | #endif |
188 | 188 | ||
189 | #define CONFIG_SYS_BR0_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_FLASH_BASE_PHYS + 0x8000000)) | BR_PS_16 | BR_V) | 189 | #define CONFIG_SYS_BR0_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_FLASH_BASE_PHYS + 0x8000000)) | BR_PS_16 | BR_V) |
190 | #define CONFIG_SYS_OR0_PRELIM 0xf8000ff7 | 190 | #define CONFIG_SYS_OR0_PRELIM 0xf8000ff7 |
191 | 191 | ||
192 | #define CONFIG_SYS_BR1_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | BR_PS_16 | BR_V) | 192 | #define CONFIG_SYS_BR1_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | BR_PS_16 | BR_V) |
193 | #define CONFIG_SYS_OR1_PRELIM 0xf8000ff7 | 193 | #define CONFIG_SYS_OR1_PRELIM 0xf8000ff7 |
194 | 194 | ||
195 | #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE_PHYS + 0x8000000, CONFIG_SYS_FLASH_BASE_PHYS} | 195 | #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE_PHYS + 0x8000000, CONFIG_SYS_FLASH_BASE_PHYS} |
196 | #define CONFIG_SYS_FLASH_QUIET_TEST | 196 | #define CONFIG_SYS_FLASH_QUIET_TEST |
197 | #define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */ | 197 | #define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */ |
198 | 198 | ||
199 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */ | 199 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */ |
200 | #define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */ | 200 | #define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */ |
201 | #undef CONFIG_SYS_FLASH_CHECKSUM | 201 | #undef CONFIG_SYS_FLASH_CHECKSUM |
202 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ | 202 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ |
203 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ | 203 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ |
204 | 204 | ||
205 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ | 205 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ |
206 | 206 | ||
207 | #define CONFIG_FLASH_CFI_DRIVER | 207 | #define CONFIG_FLASH_CFI_DRIVER |
208 | #define CONFIG_SYS_FLASH_CFI | 208 | #define CONFIG_SYS_FLASH_CFI |
209 | #define CONFIG_SYS_FLASH_EMPTY_INFO | 209 | #define CONFIG_SYS_FLASH_EMPTY_INFO |
210 | #define CONFIG_SYS_FLASH_AMD_CHECK_DQ7 | 210 | #define CONFIG_SYS_FLASH_AMD_CHECK_DQ7 |
211 | 211 | ||
212 | #define CONFIG_BOARD_EARLY_INIT_R /* call board_early_init_r function */ | 212 | #define CONFIG_BOARD_EARLY_INIT_R /* call board_early_init_r function */ |
213 | 213 | ||
214 | #define CONFIG_FSL_PIXIS 1 /* use common PIXIS code */ | 214 | #define CONFIG_FSL_PIXIS 1 /* use common PIXIS code */ |
215 | #define PIXIS_BASE 0xffdf0000 /* PIXIS registers */ | 215 | #define PIXIS_BASE 0xffdf0000 /* PIXIS registers */ |
216 | #ifdef CONFIG_PHYS_64BIT | 216 | #ifdef CONFIG_PHYS_64BIT |
217 | #define PIXIS_BASE_PHYS 0xfffdf0000ull | 217 | #define PIXIS_BASE_PHYS 0xfffdf0000ull |
218 | #else | 218 | #else |
219 | #define PIXIS_BASE_PHYS PIXIS_BASE | 219 | #define PIXIS_BASE_PHYS PIXIS_BASE |
220 | #endif | 220 | #endif |
221 | 221 | ||
222 | #define CONFIG_SYS_BR3_PRELIM (BR_PHYS_ADDR(PIXIS_BASE_PHYS) | BR_PS_8 | BR_V) | 222 | #define CONFIG_SYS_BR3_PRELIM (BR_PHYS_ADDR(PIXIS_BASE_PHYS) | BR_PS_8 | BR_V) |
223 | #define CONFIG_SYS_OR3_PRELIM 0xffffeff7 /* 32KB but only 4k mapped */ | 223 | #define CONFIG_SYS_OR3_PRELIM 0xffffeff7 /* 32KB but only 4k mapped */ |
224 | 224 | ||
225 | #define PIXIS_ID 0x0 /* Board ID at offset 0 */ | 225 | #define PIXIS_ID 0x0 /* Board ID at offset 0 */ |
226 | #define PIXIS_VER 0x1 /* Board version at offset 1 */ | 226 | #define PIXIS_VER 0x1 /* Board version at offset 1 */ |
227 | #define PIXIS_PVER 0x2 /* PIXIS FPGA version at offset 2 */ | 227 | #define PIXIS_PVER 0x2 /* PIXIS FPGA version at offset 2 */ |
228 | #define PIXIS_CSR 0x3 /* PIXIS General control/status register */ | 228 | #define PIXIS_CSR 0x3 /* PIXIS General control/status register */ |
229 | #define PIXIS_RST 0x4 /* PIXIS Reset Control register */ | 229 | #define PIXIS_RST 0x4 /* PIXIS Reset Control register */ |
230 | #define PIXIS_PWR 0x5 /* PIXIS Power status register */ | 230 | #define PIXIS_PWR 0x5 /* PIXIS Power status register */ |
231 | #define PIXIS_AUX 0x6 /* Auxiliary 1 register */ | 231 | #define PIXIS_AUX 0x6 /* Auxiliary 1 register */ |
232 | #define PIXIS_SPD 0x7 /* Register for SYSCLK speed */ | 232 | #define PIXIS_SPD 0x7 /* Register for SYSCLK speed */ |
233 | #define PIXIS_AUX2 0x8 /* Auxiliary 2 register */ | 233 | #define PIXIS_AUX2 0x8 /* Auxiliary 2 register */ |
234 | #define PIXIS_VCTL 0x10 /* VELA Control Register */ | 234 | #define PIXIS_VCTL 0x10 /* VELA Control Register */ |
235 | #define PIXIS_VSTAT 0x11 /* VELA Status Register */ | 235 | #define PIXIS_VSTAT 0x11 /* VELA Status Register */ |
236 | #define PIXIS_VCFGEN0 0x12 /* VELA Config Enable 0 */ | 236 | #define PIXIS_VCFGEN0 0x12 /* VELA Config Enable 0 */ |
237 | #define PIXIS_VCFGEN1 0x13 /* VELA Config Enable 1 */ | 237 | #define PIXIS_VCFGEN1 0x13 /* VELA Config Enable 1 */ |
238 | #define PIXIS_VCORE0 0x14 /* VELA VCORE0 Register */ | 238 | #define PIXIS_VCORE0 0x14 /* VELA VCORE0 Register */ |
239 | #define PIXIS_VBOOT 0x16 /* VELA VBOOT Register */ | 239 | #define PIXIS_VBOOT 0x16 /* VELA VBOOT Register */ |
240 | #define PIXIS_VSPEED0 0x17 /* VELA VSpeed 0 */ | 240 | #define PIXIS_VSPEED0 0x17 /* VELA VSpeed 0 */ |
241 | #define PIXIS_VSPEED1 0x18 /* VELA VSpeed 1 */ | 241 | #define PIXIS_VSPEED1 0x18 /* VELA VSpeed 1 */ |
242 | #define PIXIS_VSPEED2 0x19 /* VELA VSpeed 2 */ | 242 | #define PIXIS_VSPEED2 0x19 /* VELA VSpeed 2 */ |
243 | #define PIXIS_VSYSCLK0 0x1C /* VELA SYSCLK0 Register */ | 243 | #define PIXIS_VSYSCLK0 0x1C /* VELA SYSCLK0 Register */ |
244 | #define PIXIS_VSYSCLK1 0x1D /* VELA SYSCLK1 Register */ | 244 | #define PIXIS_VSYSCLK1 0x1D /* VELA SYSCLK1 Register */ |
245 | #define PIXIS_VSYSCLK2 0x1E /* VELA SYSCLK2 Register */ | 245 | #define PIXIS_VSYSCLK2 0x1E /* VELA SYSCLK2 Register */ |
246 | #define PIXIS_VDDRCLK0 0x1F /* VELA DDRCLK0 Register */ | 246 | #define PIXIS_VDDRCLK0 0x1F /* VELA DDRCLK0 Register */ |
247 | #define PIXIS_VDDRCLK1 0x20 /* VELA DDRCLK1 Register */ | 247 | #define PIXIS_VDDRCLK1 0x20 /* VELA DDRCLK1 Register */ |
248 | #define PIXIS_VDDRCLK2 0x21 /* VELA DDRCLK2 Register */ | 248 | #define PIXIS_VDDRCLK2 0x21 /* VELA DDRCLK2 Register */ |
249 | #define PIXIS_VWATCH 0x24 /* Watchdog Register */ | 249 | #define PIXIS_VWATCH 0x24 /* Watchdog Register */ |
250 | #define PIXIS_LED 0x25 /* LED Register */ | 250 | #define PIXIS_LED 0x25 /* LED Register */ |
251 | 251 | ||
252 | /* old pixis referenced names */ | 252 | /* old pixis referenced names */ |
253 | #define PIXIS_VCLKH 0x19 /* VELA VCLKH register */ | 253 | #define PIXIS_VCLKH 0x19 /* VELA VCLKH register */ |
254 | #define PIXIS_VCLKL 0x1A /* VELA VCLKL register */ | 254 | #define PIXIS_VCLKL 0x1A /* VELA VCLKL register */ |
255 | #define CONFIG_SYS_PIXIS_VBOOT_MASK 0xc0 | 255 | #define CONFIG_SYS_PIXIS_VBOOT_MASK 0xc0 |
256 | #define PIXIS_VSPEED2_TSEC1SER 0x8 | 256 | #define PIXIS_VSPEED2_TSEC1SER 0x8 |
257 | #define PIXIS_VSPEED2_TSEC2SER 0x4 | 257 | #define PIXIS_VSPEED2_TSEC2SER 0x4 |
258 | #define PIXIS_VSPEED2_TSEC3SER 0x2 | 258 | #define PIXIS_VSPEED2_TSEC3SER 0x2 |
259 | #define PIXIS_VSPEED2_TSEC4SER 0x1 | 259 | #define PIXIS_VSPEED2_TSEC4SER 0x1 |
260 | #define PIXIS_VCFGEN1_TSEC1SER 0x20 | 260 | #define PIXIS_VCFGEN1_TSEC1SER 0x20 |
261 | #define PIXIS_VCFGEN1_TSEC2SER 0x20 | 261 | #define PIXIS_VCFGEN1_TSEC2SER 0x20 |
262 | #define PIXIS_VCFGEN1_TSEC3SER 0x20 | 262 | #define PIXIS_VCFGEN1_TSEC3SER 0x20 |
263 | #define PIXIS_VCFGEN1_TSEC4SER 0x20 | 263 | #define PIXIS_VCFGEN1_TSEC4SER 0x20 |
264 | #define PIXIS_VSPEED2_MASK (PIXIS_VSPEED2_TSEC1SER \ | 264 | #define PIXIS_VSPEED2_MASK (PIXIS_VSPEED2_TSEC1SER \ |
265 | | PIXIS_VSPEED2_TSEC2SER \ | 265 | | PIXIS_VSPEED2_TSEC2SER \ |
266 | | PIXIS_VSPEED2_TSEC3SER \ | 266 | | PIXIS_VSPEED2_TSEC3SER \ |
267 | | PIXIS_VSPEED2_TSEC4SER) | 267 | | PIXIS_VSPEED2_TSEC4SER) |
268 | #define PIXIS_VCFGEN1_MASK (PIXIS_VCFGEN1_TSEC1SER \ | 268 | #define PIXIS_VCFGEN1_MASK (PIXIS_VCFGEN1_TSEC1SER \ |
269 | | PIXIS_VCFGEN1_TSEC2SER \ | 269 | | PIXIS_VCFGEN1_TSEC2SER \ |
270 | | PIXIS_VCFGEN1_TSEC3SER \ | 270 | | PIXIS_VCFGEN1_TSEC3SER \ |
271 | | PIXIS_VCFGEN1_TSEC4SER) | 271 | | PIXIS_VCFGEN1_TSEC4SER) |
272 | 272 | ||
273 | #define CONFIG_SYS_INIT_RAM_LOCK 1 | 273 | #define CONFIG_SYS_INIT_RAM_LOCK 1 |
274 | #define CONFIG_SYS_INIT_RAM_ADDR 0xffd00000 /* Initial L1 address */ | 274 | #define CONFIG_SYS_INIT_RAM_ADDR 0xffd00000 /* Initial L1 address */ |
275 | #define CONFIG_SYS_INIT_RAM_END 0x00004000 /* End of used area in RAM */ | 275 | #define CONFIG_SYS_INIT_RAM_END 0x00004000 /* End of used area in RAM */ |
276 | 276 | ||
277 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data */ | 277 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data */ |
278 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 278 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
279 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET | 279 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
280 | 280 | ||
281 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ | 281 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ |
282 | #define CONFIG_SYS_MALLOC_LEN (1024 * 1024) /* Reserved for malloc */ | 282 | #define CONFIG_SYS_MALLOC_LEN (1024 * 1024) /* Reserved for malloc */ |
283 | 283 | ||
284 | #define CONFIG_SYS_NAND_BASE 0xffa00000 | 284 | #define CONFIG_SYS_NAND_BASE 0xffa00000 |
285 | #ifdef CONFIG_PHYS_64BIT | 285 | #ifdef CONFIG_PHYS_64BIT |
286 | #define CONFIG_SYS_NAND_BASE_PHYS 0xfffa00000ull | 286 | #define CONFIG_SYS_NAND_BASE_PHYS 0xfffa00000ull |
287 | #else | 287 | #else |
288 | #define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE | 288 | #define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE |
289 | #endif | 289 | #endif |
290 | #define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE,\ | 290 | #define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE,\ |
291 | CONFIG_SYS_NAND_BASE + 0x40000, \ | 291 | CONFIG_SYS_NAND_BASE + 0x40000, \ |
292 | CONFIG_SYS_NAND_BASE + 0x80000,\ | 292 | CONFIG_SYS_NAND_BASE + 0x80000,\ |
293 | CONFIG_SYS_NAND_BASE + 0xC0000} | 293 | CONFIG_SYS_NAND_BASE + 0xC0000} |
294 | #define CONFIG_SYS_MAX_NAND_DEVICE 4 | 294 | #define CONFIG_SYS_MAX_NAND_DEVICE 4 |
295 | #define CONFIG_MTD_NAND_VERIFY_WRITE | 295 | #define CONFIG_MTD_NAND_VERIFY_WRITE |
296 | #define CONFIG_CMD_NAND 1 | 296 | #define CONFIG_CMD_NAND 1 |
297 | #define CONFIG_NAND_FSL_ELBC 1 | 297 | #define CONFIG_NAND_FSL_ELBC 1 |
298 | #define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024) | 298 | #define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024) |
299 | 299 | ||
300 | /* NAND flash config */ | 300 | /* NAND flash config */ |
301 | #define CONFIG_NAND_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \ | 301 | #define CONFIG_NAND_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \ |
302 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ | 302 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ |
303 | | BR_PS_8 /* Port Size = 8 bit */ \ | 303 | | BR_PS_8 /* Port Size = 8 bit */ \ |
304 | | BR_MS_FCM /* MSEL = FCM */ \ | 304 | | BR_MS_FCM /* MSEL = FCM */ \ |
305 | | BR_V) /* valid */ | 305 | | BR_V) /* valid */ |
306 | #define CONFIG_NAND_OR_PRELIM (0xFFFC0000 /* length 256K */ \ | 306 | #define CONFIG_NAND_OR_PRELIM (0xFFFC0000 /* length 256K */ \ |
307 | | OR_FCM_PGS /* Large Page*/ \ | 307 | | OR_FCM_PGS /* Large Page*/ \ |
308 | | OR_FCM_CSCT \ | 308 | | OR_FCM_CSCT \ |
309 | | OR_FCM_CST \ | 309 | | OR_FCM_CST \ |
310 | | OR_FCM_CHT \ | 310 | | OR_FCM_CHT \ |
311 | | OR_FCM_SCY_1 \ | 311 | | OR_FCM_SCY_1 \ |
312 | | OR_FCM_TRLX \ | 312 | | OR_FCM_TRLX \ |
313 | | OR_FCM_EHTR) | 313 | | OR_FCM_EHTR) |
314 | 314 | ||
315 | #define CONFIG_SYS_BR2_PRELIM CONFIG_NAND_BR_PRELIM /* NAND Base Address */ | 315 | #define CONFIG_SYS_BR2_PRELIM CONFIG_NAND_BR_PRELIM /* NAND Base Address */ |
316 | #define CONFIG_SYS_OR2_PRELIM CONFIG_NAND_OR_PRELIM /* NAND Options */ | 316 | #define CONFIG_SYS_OR2_PRELIM CONFIG_NAND_OR_PRELIM /* NAND Options */ |
317 | 317 | ||
318 | #define CONFIG_SYS_BR4_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_NAND_BASE_PHYS + 0x40000))\ | 318 | #define CONFIG_SYS_BR4_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_NAND_BASE_PHYS + 0x40000))\ |
319 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ | 319 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ |
320 | | BR_PS_8 /* Port Size = 8 bit */ \ | 320 | | BR_PS_8 /* Port Size = 8 bit */ \ |
321 | | BR_MS_FCM /* MSEL = FCM */ \ | 321 | | BR_MS_FCM /* MSEL = FCM */ \ |
322 | | BR_V) /* valid */ | 322 | | BR_V) /* valid */ |
323 | #define CONFIG_SYS_OR4_PRELIM CONFIG_NAND_OR_PRELIM /* NAND Options */ | 323 | #define CONFIG_SYS_OR4_PRELIM CONFIG_NAND_OR_PRELIM /* NAND Options */ |
324 | #define CONFIG_SYS_BR5_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_NAND_BASE_PHYS + 0x80000))\ | 324 | #define CONFIG_SYS_BR5_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_NAND_BASE_PHYS + 0x80000))\ |
325 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ | 325 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ |
326 | | BR_PS_8 /* Port Size = 8 bit */ \ | 326 | | BR_PS_8 /* Port Size = 8 bit */ \ |
327 | | BR_MS_FCM /* MSEL = FCM */ \ | 327 | | BR_MS_FCM /* MSEL = FCM */ \ |
328 | | BR_V) /* valid */ | 328 | | BR_V) /* valid */ |
329 | #define CONFIG_SYS_OR5_PRELIM CONFIG_NAND_OR_PRELIM /* NAND Options */ | 329 | #define CONFIG_SYS_OR5_PRELIM CONFIG_NAND_OR_PRELIM /* NAND Options */ |
330 | 330 | ||
331 | #define CONFIG_SYS_BR6_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_NAND_BASE_PHYS + 0xc0000))\ | 331 | #define CONFIG_SYS_BR6_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_NAND_BASE_PHYS + 0xc0000))\ |
332 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ | 332 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ |
333 | | BR_PS_8 /* Port Size = 8 bit */ \ | 333 | | BR_PS_8 /* Port Size = 8 bit */ \ |
334 | | BR_MS_FCM /* MSEL = FCM */ \ | 334 | | BR_MS_FCM /* MSEL = FCM */ \ |
335 | | BR_V) /* valid */ | 335 | | BR_V) /* valid */ |
336 | #define CONFIG_SYS_OR6_PRELIM CONFIG_NAND_OR_PRELIM /* NAND Options */ | 336 | #define CONFIG_SYS_OR6_PRELIM CONFIG_NAND_OR_PRELIM /* NAND Options */ |
337 | 337 | ||
338 | 338 | ||
339 | /* Serial Port - controlled on board with jumper J8 | 339 | /* Serial Port - controlled on board with jumper J8 |
340 | * open - index 2 | 340 | * open - index 2 |
341 | * shorted - index 1 | 341 | * shorted - index 1 |
342 | */ | 342 | */ |
343 | #define CONFIG_CONS_INDEX 1 | 343 | #define CONFIG_CONS_INDEX 1 |
344 | #undef CONFIG_SERIAL_SOFTWARE_FIFO | 344 | #undef CONFIG_SERIAL_SOFTWARE_FIFO |
345 | #define CONFIG_SYS_NS16550 | 345 | #define CONFIG_SYS_NS16550 |
346 | #define CONFIG_SYS_NS16550_SERIAL | 346 | #define CONFIG_SYS_NS16550_SERIAL |
347 | #define CONFIG_SYS_NS16550_REG_SIZE 1 | 347 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
348 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) | 348 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) |
349 | 349 | ||
350 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 350 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
351 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} | 351 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} |
352 | 352 | ||
353 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) | 353 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) |
354 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) | 354 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) |
355 | 355 | ||
356 | /* Use the HUSH parser */ | 356 | /* Use the HUSH parser */ |
357 | #define CONFIG_SYS_HUSH_PARSER | 357 | #define CONFIG_SYS_HUSH_PARSER |
358 | #ifdef CONFIG_SYS_HUSH_PARSER | 358 | #ifdef CONFIG_SYS_HUSH_PARSER |
359 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | 359 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
360 | #endif | 360 | #endif |
361 | 361 | ||
362 | /* | 362 | /* |
363 | * Pass open firmware flat tree | 363 | * Pass open firmware flat tree |
364 | */ | 364 | */ |
365 | #define CONFIG_OF_LIBFDT 1 | 365 | #define CONFIG_OF_LIBFDT 1 |
366 | #define CONFIG_OF_BOARD_SETUP 1 | 366 | #define CONFIG_OF_BOARD_SETUP 1 |
367 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 | 367 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 |
368 | 368 | ||
369 | #define CONFIG_SYS_64BIT_VSPRINTF 1 | 369 | #define CONFIG_SYS_64BIT_VSPRINTF 1 |
370 | #define CONFIG_SYS_64BIT_STRTOUL 1 | 370 | #define CONFIG_SYS_64BIT_STRTOUL 1 |
371 | 371 | ||
372 | /* new uImage format support */ | 372 | /* new uImage format support */ |
373 | #define CONFIG_FIT 1 | 373 | #define CONFIG_FIT 1 |
374 | #define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ | 374 | #define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ |
375 | 375 | ||
376 | /* I2C */ | 376 | /* I2C */ |
377 | #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ | 377 | #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ |
378 | #define CONFIG_HARD_I2C /* I2C with hardware support */ | 378 | #define CONFIG_HARD_I2C /* I2C with hardware support */ |
379 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ | 379 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ |
380 | #define CONFIG_I2C_MULTI_BUS | 380 | #define CONFIG_I2C_MULTI_BUS |
381 | #define CONFIG_I2C_CMD_TREE | ||
382 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ | 381 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ |
383 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 | 382 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 |
384 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 383 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
385 | #define CONFIG_SYS_I2C_NOPROBES {{0,0x29}}/* Don't probe these addrs */ | 384 | #define CONFIG_SYS_I2C_NOPROBES {{0,0x29}}/* Don't probe these addrs */ |
386 | #define CONFIG_SYS_I2C_OFFSET 0x3000 | 385 | #define CONFIG_SYS_I2C_OFFSET 0x3000 |
387 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 | 386 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 |
388 | 387 | ||
389 | /* | 388 | /* |
390 | * I2C2 EEPROM | 389 | * I2C2 EEPROM |
391 | */ | 390 | */ |
392 | #define CONFIG_ID_EEPROM | 391 | #define CONFIG_ID_EEPROM |
393 | #ifdef CONFIG_ID_EEPROM | 392 | #ifdef CONFIG_ID_EEPROM |
394 | #define CONFIG_SYS_I2C_EEPROM_NXID | 393 | #define CONFIG_SYS_I2C_EEPROM_NXID |
395 | #endif | 394 | #endif |
396 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 | 395 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 |
397 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 | 396 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 |
398 | #define CONFIG_SYS_EEPROM_BUS_NUM 1 | 397 | #define CONFIG_SYS_EEPROM_BUS_NUM 1 |
399 | 398 | ||
400 | /* | 399 | /* |
401 | * General PCI | 400 | * General PCI |
402 | * Memory space is mapped 1-1, but I/O space must start from 0. | 401 | * Memory space is mapped 1-1, but I/O space must start from 0. |
403 | */ | 402 | */ |
404 | 403 | ||
405 | /* controller 3, direct to uli, tgtid 3, Base address 8000 */ | 404 | /* controller 3, direct to uli, tgtid 3, Base address 8000 */ |
406 | #define CONFIG_SYS_PCIE3_MEM_VIRT 0x80000000 | 405 | #define CONFIG_SYS_PCIE3_MEM_VIRT 0x80000000 |
407 | #ifdef CONFIG_PHYS_64BIT | 406 | #ifdef CONFIG_PHYS_64BIT |
408 | #define CONFIG_SYS_PCIE3_MEM_BUS 0xc0000000 | 407 | #define CONFIG_SYS_PCIE3_MEM_BUS 0xc0000000 |
409 | #define CONFIG_SYS_PCIE3_MEM_PHYS 0xc00000000ull | 408 | #define CONFIG_SYS_PCIE3_MEM_PHYS 0xc00000000ull |
410 | #else | 409 | #else |
411 | #define CONFIG_SYS_PCIE3_MEM_BUS 0x80000000 | 410 | #define CONFIG_SYS_PCIE3_MEM_BUS 0x80000000 |
412 | #define CONFIG_SYS_PCIE3_MEM_PHYS 0x80000000 | 411 | #define CONFIG_SYS_PCIE3_MEM_PHYS 0x80000000 |
413 | #endif | 412 | #endif |
414 | #define CONFIG_SYS_PCIE3_MEM_SIZE 0x20000000 /* 512M */ | 413 | #define CONFIG_SYS_PCIE3_MEM_SIZE 0x20000000 /* 512M */ |
415 | #define CONFIG_SYS_PCIE3_IO_VIRT 0xffc00000 | 414 | #define CONFIG_SYS_PCIE3_IO_VIRT 0xffc00000 |
416 | #define CONFIG_SYS_PCIE3_IO_BUS 0x00000000 | 415 | #define CONFIG_SYS_PCIE3_IO_BUS 0x00000000 |
417 | #ifdef CONFIG_PHYS_64BIT | 416 | #ifdef CONFIG_PHYS_64BIT |
418 | #define CONFIG_SYS_PCIE3_IO_PHYS 0xfffc00000ull | 417 | #define CONFIG_SYS_PCIE3_IO_PHYS 0xfffc00000ull |
419 | #else | 418 | #else |
420 | #define CONFIG_SYS_PCIE3_IO_PHYS 0xffc00000 | 419 | #define CONFIG_SYS_PCIE3_IO_PHYS 0xffc00000 |
421 | #endif | 420 | #endif |
422 | #define CONFIG_SYS_PCIE3_IO_SIZE 0x00010000 /* 64k */ | 421 | #define CONFIG_SYS_PCIE3_IO_SIZE 0x00010000 /* 64k */ |
423 | 422 | ||
424 | /* controller 2, Slot 2, tgtid 2, Base address 9000 */ | 423 | /* controller 2, Slot 2, tgtid 2, Base address 9000 */ |
425 | #define CONFIG_SYS_PCIE2_MEM_VIRT 0xa0000000 | 424 | #define CONFIG_SYS_PCIE2_MEM_VIRT 0xa0000000 |
426 | #ifdef CONFIG_PHYS_64BIT | 425 | #ifdef CONFIG_PHYS_64BIT |
427 | #define CONFIG_SYS_PCIE2_MEM_BUS 0xc0000000 | 426 | #define CONFIG_SYS_PCIE2_MEM_BUS 0xc0000000 |
428 | #define CONFIG_SYS_PCIE2_MEM_PHYS 0xc20000000ull | 427 | #define CONFIG_SYS_PCIE2_MEM_PHYS 0xc20000000ull |
429 | #else | 428 | #else |
430 | #define CONFIG_SYS_PCIE2_MEM_BUS 0xa0000000 | 429 | #define CONFIG_SYS_PCIE2_MEM_BUS 0xa0000000 |
431 | #define CONFIG_SYS_PCIE2_MEM_PHYS 0xa0000000 | 430 | #define CONFIG_SYS_PCIE2_MEM_PHYS 0xa0000000 |
432 | #endif | 431 | #endif |
433 | #define CONFIG_SYS_PCIE2_MEM_SIZE 0x20000000 /* 512M */ | 432 | #define CONFIG_SYS_PCIE2_MEM_SIZE 0x20000000 /* 512M */ |
434 | #define CONFIG_SYS_PCIE2_IO_VIRT 0xffc10000 | 433 | #define CONFIG_SYS_PCIE2_IO_VIRT 0xffc10000 |
435 | #define CONFIG_SYS_PCIE2_IO_BUS 0x00000000 | 434 | #define CONFIG_SYS_PCIE2_IO_BUS 0x00000000 |
436 | #ifdef CONFIG_PHYS_64BIT | 435 | #ifdef CONFIG_PHYS_64BIT |
437 | #define CONFIG_SYS_PCIE2_IO_PHYS 0xfffc10000ull | 436 | #define CONFIG_SYS_PCIE2_IO_PHYS 0xfffc10000ull |
438 | #else | 437 | #else |
439 | #define CONFIG_SYS_PCIE2_IO_PHYS 0xffc10000 | 438 | #define CONFIG_SYS_PCIE2_IO_PHYS 0xffc10000 |
440 | #endif | 439 | #endif |
441 | #define CONFIG_SYS_PCIE2_IO_SIZE 0x00010000 /* 64k */ | 440 | #define CONFIG_SYS_PCIE2_IO_SIZE 0x00010000 /* 64k */ |
442 | 441 | ||
443 | /* controller 1, Slot 1, tgtid 1, Base address a000 */ | 442 | /* controller 1, Slot 1, tgtid 1, Base address a000 */ |
444 | #define CONFIG_SYS_PCIE1_MEM_VIRT 0xc0000000 | 443 | #define CONFIG_SYS_PCIE1_MEM_VIRT 0xc0000000 |
445 | #ifdef CONFIG_PHYS_64BIT | 444 | #ifdef CONFIG_PHYS_64BIT |
446 | #define CONFIG_SYS_PCIE1_MEM_BUS 0xc0000000 | 445 | #define CONFIG_SYS_PCIE1_MEM_BUS 0xc0000000 |
447 | #define CONFIG_SYS_PCIE1_MEM_PHYS 0xc40000000ull | 446 | #define CONFIG_SYS_PCIE1_MEM_PHYS 0xc40000000ull |
448 | #else | 447 | #else |
449 | #define CONFIG_SYS_PCIE1_MEM_BUS 0xc0000000 | 448 | #define CONFIG_SYS_PCIE1_MEM_BUS 0xc0000000 |
450 | #define CONFIG_SYS_PCIE1_MEM_PHYS 0xc0000000 | 449 | #define CONFIG_SYS_PCIE1_MEM_PHYS 0xc0000000 |
451 | #endif | 450 | #endif |
452 | #define CONFIG_SYS_PCIE1_MEM_SIZE 0x20000000 /* 512M */ | 451 | #define CONFIG_SYS_PCIE1_MEM_SIZE 0x20000000 /* 512M */ |
453 | #define CONFIG_SYS_PCIE1_IO_VIRT 0xffc20000 | 452 | #define CONFIG_SYS_PCIE1_IO_VIRT 0xffc20000 |
454 | #define CONFIG_SYS_PCIE1_IO_BUS 0x00000000 | 453 | #define CONFIG_SYS_PCIE1_IO_BUS 0x00000000 |
455 | #ifdef CONFIG_PHYS_64BIT | 454 | #ifdef CONFIG_PHYS_64BIT |
456 | #define CONFIG_SYS_PCIE1_IO_PHYS 0xfffc20000ull | 455 | #define CONFIG_SYS_PCIE1_IO_PHYS 0xfffc20000ull |
457 | #else | 456 | #else |
458 | #define CONFIG_SYS_PCIE1_IO_PHYS 0xffc20000 | 457 | #define CONFIG_SYS_PCIE1_IO_PHYS 0xffc20000 |
459 | #endif | 458 | #endif |
460 | #define CONFIG_SYS_PCIE1_IO_SIZE 0x00010000 /* 64k */ | 459 | #define CONFIG_SYS_PCIE1_IO_SIZE 0x00010000 /* 64k */ |
461 | 460 | ||
462 | #if defined(CONFIG_PCI) | 461 | #if defined(CONFIG_PCI) |
463 | 462 | ||
464 | /*PCIE video card used*/ | 463 | /*PCIE video card used*/ |
465 | #define VIDEO_IO_OFFSET CONFIG_SYS_PCIE1_IO_VIRT | 464 | #define VIDEO_IO_OFFSET CONFIG_SYS_PCIE1_IO_VIRT |
466 | 465 | ||
467 | /* video */ | 466 | /* video */ |
468 | #define CONFIG_VIDEO | 467 | #define CONFIG_VIDEO |
469 | 468 | ||
470 | #if defined(CONFIG_VIDEO) | 469 | #if defined(CONFIG_VIDEO) |
471 | #define CONFIG_BIOSEMU | 470 | #define CONFIG_BIOSEMU |
472 | #define CONFIG_CFB_CONSOLE | 471 | #define CONFIG_CFB_CONSOLE |
473 | #define CONFIG_VIDEO_SW_CURSOR | 472 | #define CONFIG_VIDEO_SW_CURSOR |
474 | #define CONFIG_VGA_AS_SINGLE_DEVICE | 473 | #define CONFIG_VGA_AS_SINGLE_DEVICE |
475 | #define CONFIG_ATI_RADEON_FB | 474 | #define CONFIG_ATI_RADEON_FB |
476 | #define CONFIG_VIDEO_LOGO | 475 | #define CONFIG_VIDEO_LOGO |
477 | /*#define CONFIG_CONSOLE_CURSOR*/ | 476 | /*#define CONFIG_CONSOLE_CURSOR*/ |
478 | #define CONFIG_SYS_ISA_IO_BASE_ADDRESS VIDEO_IO_OFFSET | 477 | #define CONFIG_SYS_ISA_IO_BASE_ADDRESS VIDEO_IO_OFFSET |
479 | #endif | 478 | #endif |
480 | 479 | ||
481 | #define CONFIG_NET_MULTI | 480 | #define CONFIG_NET_MULTI |
482 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ | 481 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ |
483 | 482 | ||
484 | #undef CONFIG_EEPRO100 | 483 | #undef CONFIG_EEPRO100 |
485 | #undef CONFIG_TULIP | 484 | #undef CONFIG_TULIP |
486 | #undef CONFIG_RTL8139 | 485 | #undef CONFIG_RTL8139 |
487 | 486 | ||
488 | #ifdef CONFIG_RTL8139 | 487 | #ifdef CONFIG_RTL8139 |
489 | /* This macro is used by RTL8139 but not defined in PPC architecture */ | 488 | /* This macro is used by RTL8139 but not defined in PPC architecture */ |
490 | #define KSEG1ADDR(x) (x) | 489 | #define KSEG1ADDR(x) (x) |
491 | #define _IO_BASE 0x00000000 | 490 | #define _IO_BASE 0x00000000 |
492 | #endif | 491 | #endif |
493 | 492 | ||
494 | #ifndef CONFIG_PCI_PNP | 493 | #ifndef CONFIG_PCI_PNP |
495 | #define PCI_ENET0_IOADDR CONFIG_SYS_PCIE3_IO_BUS | 494 | #define PCI_ENET0_IOADDR CONFIG_SYS_PCIE3_IO_BUS |
496 | #define PCI_ENET0_MEMADDR CONFIG_SYS_PCIE3_IO_BUS | 495 | #define PCI_ENET0_MEMADDR CONFIG_SYS_PCIE3_IO_BUS |
497 | #define PCI_IDSEL_NUMBER 0x11 /* IDSEL = AD11 */ | 496 | #define PCI_IDSEL_NUMBER 0x11 /* IDSEL = AD11 */ |
498 | #endif | 497 | #endif |
499 | 498 | ||
500 | #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ | 499 | #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ |
501 | #define CONFIG_DOS_PARTITION | 500 | #define CONFIG_DOS_PARTITION |
502 | #define CONFIG_SCSI_AHCI | 501 | #define CONFIG_SCSI_AHCI |
503 | 502 | ||
504 | #ifdef CONFIG_SCSI_AHCI | 503 | #ifdef CONFIG_SCSI_AHCI |
505 | #define CONFIG_SATA_ULI5288 | 504 | #define CONFIG_SATA_ULI5288 |
506 | #define CONFIG_SYS_SCSI_MAX_SCSI_ID 4 | 505 | #define CONFIG_SYS_SCSI_MAX_SCSI_ID 4 |
507 | #define CONFIG_SYS_SCSI_MAX_LUN 1 | 506 | #define CONFIG_SYS_SCSI_MAX_LUN 1 |
508 | #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * CONFIG_SYS_SCSI_MAX_LUN) | 507 | #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * CONFIG_SYS_SCSI_MAX_LUN) |
509 | #define CONFIG_SYS_SCSI_MAXDEVICE CONFIG_SYS_SCSI_MAX_DEVICE | 508 | #define CONFIG_SYS_SCSI_MAXDEVICE CONFIG_SYS_SCSI_MAX_DEVICE |
510 | #endif /* SCSI */ | 509 | #endif /* SCSI */ |
511 | 510 | ||
512 | #endif /* CONFIG_PCI */ | 511 | #endif /* CONFIG_PCI */ |
513 | 512 | ||
514 | 513 | ||
515 | #if defined(CONFIG_TSEC_ENET) | 514 | #if defined(CONFIG_TSEC_ENET) |
516 | 515 | ||
517 | #ifndef CONFIG_NET_MULTI | 516 | #ifndef CONFIG_NET_MULTI |
518 | #define CONFIG_NET_MULTI 1 | 517 | #define CONFIG_NET_MULTI 1 |
519 | #endif | 518 | #endif |
520 | 519 | ||
521 | #define CONFIG_MII 1 /* MII PHY management */ | 520 | #define CONFIG_MII 1 /* MII PHY management */ |
522 | #define CONFIG_MII_DEFAULT_TSEC 1 /* Allow unregistered phys */ | 521 | #define CONFIG_MII_DEFAULT_TSEC 1 /* Allow unregistered phys */ |
523 | #define CONFIG_TSEC1 1 | 522 | #define CONFIG_TSEC1 1 |
524 | #define CONFIG_TSEC1_NAME "eTSEC1" | 523 | #define CONFIG_TSEC1_NAME "eTSEC1" |
525 | #define CONFIG_TSEC2 1 | 524 | #define CONFIG_TSEC2 1 |
526 | #define CONFIG_TSEC2_NAME "eTSEC2" | 525 | #define CONFIG_TSEC2_NAME "eTSEC2" |
527 | #define CONFIG_TSEC3 1 | 526 | #define CONFIG_TSEC3 1 |
528 | #define CONFIG_TSEC3_NAME "eTSEC3" | 527 | #define CONFIG_TSEC3_NAME "eTSEC3" |
529 | #define CONFIG_TSEC4 1 | 528 | #define CONFIG_TSEC4 1 |
530 | #define CONFIG_TSEC4_NAME "eTSEC4" | 529 | #define CONFIG_TSEC4_NAME "eTSEC4" |
531 | 530 | ||
532 | #define CONFIG_PIXIS_SGMII_CMD | 531 | #define CONFIG_PIXIS_SGMII_CMD |
533 | #define CONFIG_FSL_SGMII_RISER 1 | 532 | #define CONFIG_FSL_SGMII_RISER 1 |
534 | #define SGMII_RISER_PHY_OFFSET 0x1c | 533 | #define SGMII_RISER_PHY_OFFSET 0x1c |
535 | 534 | ||
536 | #ifdef CONFIG_FSL_SGMII_RISER | 535 | #ifdef CONFIG_FSL_SGMII_RISER |
537 | #define CONFIG_SYS_TBIPA_VALUE 0x10 /* avoid conflict with eTSEC4 paddr */ | 536 | #define CONFIG_SYS_TBIPA_VALUE 0x10 /* avoid conflict with eTSEC4 paddr */ |
538 | #endif | 537 | #endif |
539 | 538 | ||
540 | #define TSEC1_PHY_ADDR 0 | 539 | #define TSEC1_PHY_ADDR 0 |
541 | #define TSEC2_PHY_ADDR 1 | 540 | #define TSEC2_PHY_ADDR 1 |
542 | #define TSEC3_PHY_ADDR 2 | 541 | #define TSEC3_PHY_ADDR 2 |
543 | #define TSEC4_PHY_ADDR 3 | 542 | #define TSEC4_PHY_ADDR 3 |
544 | 543 | ||
545 | #define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) | 544 | #define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) |
546 | #define TSEC2_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) | 545 | #define TSEC2_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) |
547 | #define TSEC3_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) | 546 | #define TSEC3_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) |
548 | #define TSEC4_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) | 547 | #define TSEC4_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) |
549 | 548 | ||
550 | #define TSEC1_PHYIDX 0 | 549 | #define TSEC1_PHYIDX 0 |
551 | #define TSEC2_PHYIDX 0 | 550 | #define TSEC2_PHYIDX 0 |
552 | #define TSEC3_PHYIDX 0 | 551 | #define TSEC3_PHYIDX 0 |
553 | #define TSEC4_PHYIDX 0 | 552 | #define TSEC4_PHYIDX 0 |
554 | 553 | ||
555 | #define CONFIG_ETHPRIME "eTSEC1" | 554 | #define CONFIG_ETHPRIME "eTSEC1" |
556 | 555 | ||
557 | #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */ | 556 | #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */ |
558 | #endif /* CONFIG_TSEC_ENET */ | 557 | #endif /* CONFIG_TSEC_ENET */ |
559 | 558 | ||
560 | /* | 559 | /* |
561 | * Environment | 560 | * Environment |
562 | */ | 561 | */ |
563 | #define CONFIG_ENV_IS_IN_FLASH 1 | 562 | #define CONFIG_ENV_IS_IN_FLASH 1 |
564 | #if CONFIG_SYS_MONITOR_BASE > 0xfff80000 | 563 | #if CONFIG_SYS_MONITOR_BASE > 0xfff80000 |
565 | #define CONFIG_ENV_ADDR 0xfff80000 | 564 | #define CONFIG_ENV_ADDR 0xfff80000 |
566 | #else | 565 | #else |
567 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE) | 566 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE) |
568 | #endif | 567 | #endif |
569 | #define CONFIG_ENV_SIZE 0x2000 | 568 | #define CONFIG_ENV_SIZE 0x2000 |
570 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K (one sector) */ | 569 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K (one sector) */ |
571 | 570 | ||
572 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ | 571 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
573 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ | 572 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
574 | 573 | ||
575 | /* | 574 | /* |
576 | * Command line configuration. | 575 | * Command line configuration. |
577 | */ | 576 | */ |
578 | #include <config_cmd_default.h> | 577 | #include <config_cmd_default.h> |
579 | 578 | ||
580 | #define CONFIG_CMD_IRQ | 579 | #define CONFIG_CMD_IRQ |
581 | #define CONFIG_CMD_PING | 580 | #define CONFIG_CMD_PING |
582 | #define CONFIG_CMD_I2C | 581 | #define CONFIG_CMD_I2C |
583 | #define CONFIG_CMD_MII | 582 | #define CONFIG_CMD_MII |
584 | #define CONFIG_CMD_ELF | 583 | #define CONFIG_CMD_ELF |
585 | #define CONFIG_CMD_IRQ | 584 | #define CONFIG_CMD_IRQ |
586 | #define CONFIG_CMD_SETEXPR | 585 | #define CONFIG_CMD_SETEXPR |
587 | 586 | ||
588 | #if defined(CONFIG_PCI) | 587 | #if defined(CONFIG_PCI) |
589 | #define CONFIG_CMD_PCI | 588 | #define CONFIG_CMD_PCI |
590 | #define CONFIG_CMD_BEDBUG | 589 | #define CONFIG_CMD_BEDBUG |
591 | #define CONFIG_CMD_NET | 590 | #define CONFIG_CMD_NET |
592 | #define CONFIG_CMD_SCSI | 591 | #define CONFIG_CMD_SCSI |
593 | #define CONFIG_CMD_EXT2 | 592 | #define CONFIG_CMD_EXT2 |
594 | #endif | 593 | #endif |
595 | 594 | ||
596 | #undef CONFIG_WATCHDOG /* watchdog disabled */ | 595 | #undef CONFIG_WATCHDOG /* watchdog disabled */ |
597 | 596 | ||
598 | /* | 597 | /* |
599 | * Miscellaneous configurable options | 598 | * Miscellaneous configurable options |
600 | */ | 599 | */ |
601 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 600 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
602 | #define CONFIG_CMDLINE_EDITING /* Command-line editing */ | 601 | #define CONFIG_CMDLINE_EDITING /* Command-line editing */ |
603 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ | 602 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ |
604 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | 603 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
605 | #if defined(CONFIG_CMD_KGDB) | 604 | #if defined(CONFIG_CMD_KGDB) |
606 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ | 605 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
607 | #else | 606 | #else |
608 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | 607 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
609 | #endif | 608 | #endif |
610 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ | 609 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
611 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 610 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
612 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | 611 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
613 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ | 612 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ |
614 | 613 | ||
615 | /* | 614 | /* |
616 | * For booting Linux, the board info and command line data | 615 | * For booting Linux, the board info and command line data |
617 | * have to be in the first 8 MB of memory, since this is | 616 | * have to be in the first 8 MB of memory, since this is |
618 | * the maximum mapped by the Linux kernel during initialization. | 617 | * the maximum mapped by the Linux kernel during initialization. |
619 | */ | 618 | */ |
620 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ | 619 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ |
621 | 620 | ||
622 | /* | 621 | /* |
623 | * Internal Definitions | 622 | * Internal Definitions |
624 | * | 623 | * |
625 | * Boot Flags | 624 | * Boot Flags |
626 | */ | 625 | */ |
627 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 626 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
628 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 627 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
629 | 628 | ||
630 | #if defined(CONFIG_CMD_KGDB) | 629 | #if defined(CONFIG_CMD_KGDB) |
631 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ | 630 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ |
632 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ | 631 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ |
633 | #endif | 632 | #endif |
634 | 633 | ||
635 | /* | 634 | /* |
636 | * Environment Configuration | 635 | * Environment Configuration |
637 | */ | 636 | */ |
638 | 637 | ||
639 | /* The mac addresses for all ethernet interface */ | 638 | /* The mac addresses for all ethernet interface */ |
640 | #if defined(CONFIG_TSEC_ENET) | 639 | #if defined(CONFIG_TSEC_ENET) |
641 | #define CONFIG_HAS_ETH0 | 640 | #define CONFIG_HAS_ETH0 |
642 | #define CONFIG_ETHADDR 00:E0:0C:02:00:FD | 641 | #define CONFIG_ETHADDR 00:E0:0C:02:00:FD |
643 | #define CONFIG_HAS_ETH1 | 642 | #define CONFIG_HAS_ETH1 |
644 | #define CONFIG_ETH1ADDR 00:E0:0C:02:01:FD | 643 | #define CONFIG_ETH1ADDR 00:E0:0C:02:01:FD |
645 | #define CONFIG_HAS_ETH2 | 644 | #define CONFIG_HAS_ETH2 |
646 | #define CONFIG_ETH2ADDR 00:E0:0C:02:02:FD | 645 | #define CONFIG_ETH2ADDR 00:E0:0C:02:02:FD |
647 | #define CONFIG_HAS_ETH3 | 646 | #define CONFIG_HAS_ETH3 |
648 | #define CONFIG_ETH3ADDR 00:E0:0C:02:03:FD | 647 | #define CONFIG_ETH3ADDR 00:E0:0C:02:03:FD |
649 | #endif | 648 | #endif |
650 | 649 | ||
651 | #define CONFIG_IPADDR 192.168.1.254 | 650 | #define CONFIG_IPADDR 192.168.1.254 |
652 | 651 | ||
653 | #define CONFIG_HOSTNAME unknown | 652 | #define CONFIG_HOSTNAME unknown |
654 | #define CONFIG_ROOTPATH /opt/nfsroot | 653 | #define CONFIG_ROOTPATH /opt/nfsroot |
655 | #define CONFIG_BOOTFILE uImage | 654 | #define CONFIG_BOOTFILE uImage |
656 | #define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */ | 655 | #define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */ |
657 | 656 | ||
658 | #define CONFIG_SERVERIP 192.168.1.1 | 657 | #define CONFIG_SERVERIP 192.168.1.1 |
659 | #define CONFIG_GATEWAYIP 192.168.1.1 | 658 | #define CONFIG_GATEWAYIP 192.168.1.1 |
660 | #define CONFIG_NETMASK 255.255.255.0 | 659 | #define CONFIG_NETMASK 255.255.255.0 |
661 | 660 | ||
662 | /* default location for tftp and bootm */ | 661 | /* default location for tftp and bootm */ |
663 | #define CONFIG_LOADADDR 1000000 | 662 | #define CONFIG_LOADADDR 1000000 |
664 | 663 | ||
665 | #define CONFIG_BOOTDELAY 10 /* -1 disables auto-boot */ | 664 | #define CONFIG_BOOTDELAY 10 /* -1 disables auto-boot */ |
666 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs */ | 665 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs */ |
667 | 666 | ||
668 | #define CONFIG_BAUDRATE 115200 | 667 | #define CONFIG_BAUDRATE 115200 |
669 | 668 | ||
670 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 669 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
671 | "memctl_intlv_ctl=2\0" \ | 670 | "memctl_intlv_ctl=2\0" \ |
672 | "netdev=eth0\0" \ | 671 | "netdev=eth0\0" \ |
673 | "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \ | 672 | "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \ |
674 | "tftpflash=tftpboot $loadaddr $uboot; " \ | 673 | "tftpflash=tftpboot $loadaddr $uboot; " \ |
675 | "protect off " MK_STR(TEXT_BASE) " +$filesize; " \ | 674 | "protect off " MK_STR(TEXT_BASE) " +$filesize; " \ |
676 | "erase " MK_STR(TEXT_BASE) " +$filesize; " \ | 675 | "erase " MK_STR(TEXT_BASE) " +$filesize; " \ |
677 | "cp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize; " \ | 676 | "cp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize; " \ |
678 | "protect on " MK_STR(TEXT_BASE) " +$filesize; " \ | 677 | "protect on " MK_STR(TEXT_BASE) " +$filesize; " \ |
679 | "cmp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize\0" \ | 678 | "cmp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize\0" \ |
680 | "consoledev=ttyS0\0" \ | 679 | "consoledev=ttyS0\0" \ |
681 | "ramdiskaddr=2000000\0" \ | 680 | "ramdiskaddr=2000000\0" \ |
682 | "ramdiskfile=8572ds/ramdisk.uboot\0" \ | 681 | "ramdiskfile=8572ds/ramdisk.uboot\0" \ |
683 | "fdtaddr=c00000\0" \ | 682 | "fdtaddr=c00000\0" \ |
684 | "fdtfile=8572ds/mpc8572ds.dtb\0" \ | 683 | "fdtfile=8572ds/mpc8572ds.dtb\0" \ |
685 | "bdev=sda3\0" | 684 | "bdev=sda3\0" |
686 | 685 | ||
687 | #define CONFIG_HDBOOT \ | 686 | #define CONFIG_HDBOOT \ |
688 | "setenv bootargs root=/dev/$bdev rw " \ | 687 | "setenv bootargs root=/dev/$bdev rw " \ |
689 | "console=$consoledev,$baudrate $othbootargs;" \ | 688 | "console=$consoledev,$baudrate $othbootargs;" \ |
690 | "tftp $loadaddr $bootfile;" \ | 689 | "tftp $loadaddr $bootfile;" \ |
691 | "tftp $fdtaddr $fdtfile;" \ | 690 | "tftp $fdtaddr $fdtfile;" \ |
692 | "bootm $loadaddr - $fdtaddr" | 691 | "bootm $loadaddr - $fdtaddr" |
693 | 692 | ||
694 | #define CONFIG_NFSBOOTCOMMAND \ | 693 | #define CONFIG_NFSBOOTCOMMAND \ |
695 | "setenv bootargs root=/dev/nfs rw " \ | 694 | "setenv bootargs root=/dev/nfs rw " \ |
696 | "nfsroot=$serverip:$rootpath " \ | 695 | "nfsroot=$serverip:$rootpath " \ |
697 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ | 696 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ |
698 | "console=$consoledev,$baudrate $othbootargs;" \ | 697 | "console=$consoledev,$baudrate $othbootargs;" \ |
699 | "tftp $loadaddr $bootfile;" \ | 698 | "tftp $loadaddr $bootfile;" \ |
700 | "tftp $fdtaddr $fdtfile;" \ | 699 | "tftp $fdtaddr $fdtfile;" \ |
701 | "bootm $loadaddr - $fdtaddr" | 700 | "bootm $loadaddr - $fdtaddr" |
702 | 701 | ||
703 | #define CONFIG_RAMBOOTCOMMAND \ | 702 | #define CONFIG_RAMBOOTCOMMAND \ |
704 | "setenv bootargs root=/dev/ram rw " \ | 703 | "setenv bootargs root=/dev/ram rw " \ |
705 | "console=$consoledev,$baudrate $othbootargs;" \ | 704 | "console=$consoledev,$baudrate $othbootargs;" \ |
706 | "tftp $ramdiskaddr $ramdiskfile;" \ | 705 | "tftp $ramdiskaddr $ramdiskfile;" \ |
707 | "tftp $loadaddr $bootfile;" \ | 706 | "tftp $loadaddr $bootfile;" \ |
708 | "tftp $fdtaddr $fdtfile;" \ | 707 | "tftp $fdtaddr $fdtfile;" \ |
709 | "bootm $loadaddr $ramdiskaddr $fdtaddr" | 708 | "bootm $loadaddr $ramdiskaddr $fdtaddr" |
710 | 709 | ||
711 | #define CONFIG_BOOTCOMMAND CONFIG_HDBOOT | 710 | #define CONFIG_BOOTCOMMAND CONFIG_HDBOOT |
712 | 711 | ||
713 | #endif /* __CONFIG_H */ | 712 | #endif /* __CONFIG_H */ |
714 | 713 |
include/configs/MVBLM7.h
1 | /* | 1 | /* |
2 | * Copyright (C) Matrix Vision GmbH 2008 | 2 | * Copyright (C) Matrix Vision GmbH 2008 |
3 | * | 3 | * |
4 | * Matrix Vision mvBlueLYNX-M7 configuration file | 4 | * Matrix Vision mvBlueLYNX-M7 configuration file |
5 | * based on Freescale's MPC8349ITX. | 5 | * based on Freescale's MPC8349ITX. |
6 | * | 6 | * |
7 | * See file CREDITS for list of people who contributed to this | 7 | * See file CREDITS for list of people who contributed to this |
8 | * project. | 8 | * project. |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or | 10 | * This program is free software; you can redistribute it and/or |
11 | * modify it under the terms of the GNU General Public License as | 11 | * modify it under the terms of the GNU General Public License as |
12 | * published by the Free Software Foundation; either version 2 of | 12 | * published by the Free Software Foundation; either version 2 of |
13 | * the License, or (at your option) any later version. | 13 | * the License, or (at your option) any later version. |
14 | * | 14 | * |
15 | * This program is distributed in the hope that it will be useful, | 15 | * This program is distributed in the hope that it will be useful, |
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 | * GNU General Public License for more details. | 18 | * GNU General Public License for more details. |
19 | * | 19 | * |
20 | * You should have received a copy of the GNU General Public License | 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 | 21 | * along with this program; if not, write to the Free Software |
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
23 | * MA 02111-1307 USA | 23 | * MA 02111-1307 USA |
24 | */ | 24 | */ |
25 | 25 | ||
26 | 26 | ||
27 | #ifndef __CONFIG_H | 27 | #ifndef __CONFIG_H |
28 | #define __CONFIG_H | 28 | #define __CONFIG_H |
29 | 29 | ||
30 | #include <version.h> | 30 | #include <version.h> |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * High Level Configuration Options | 33 | * High Level Configuration Options |
34 | */ | 34 | */ |
35 | #define CONFIG_E300 1 | 35 | #define CONFIG_E300 1 |
36 | #define CONFIG_MPC83XX 1 | 36 | #define CONFIG_MPC83XX 1 |
37 | #define CONFIG_MPC834X 1 | 37 | #define CONFIG_MPC834X 1 |
38 | #define CONFIG_MPC8343 1 | 38 | #define CONFIG_MPC8343 1 |
39 | 39 | ||
40 | #define CONFIG_SYS_IMMR 0xE0000000 | 40 | #define CONFIG_SYS_IMMR 0xE0000000 |
41 | 41 | ||
42 | #define CONFIG_PCI | 42 | #define CONFIG_PCI |
43 | #define CONFIG_83XX_GENERIC_PCI | 43 | #define CONFIG_83XX_GENERIC_PCI |
44 | #define CONFIG_PCI_SKIP_HOST_BRIDGE | 44 | #define CONFIG_PCI_SKIP_HOST_BRIDGE |
45 | #define CONFIG_HARD_I2C | 45 | #define CONFIG_HARD_I2C |
46 | #define CONFIG_TSEC_ENET | 46 | #define CONFIG_TSEC_ENET |
47 | #define CONFIG_MPC8XXX_SPI | 47 | #define CONFIG_MPC8XXX_SPI |
48 | #define CONFIG_HARD_SPI | 48 | #define CONFIG_HARD_SPI |
49 | #define MVBLM7_MMC_CS 0x04000000 | 49 | #define MVBLM7_MMC_CS 0x04000000 |
50 | 50 | ||
51 | /* I2C */ | 51 | /* I2C */ |
52 | #undef CONFIG_SOFT_I2C | 52 | #undef CONFIG_SOFT_I2C |
53 | 53 | ||
54 | #define CONFIG_FSL_I2C | 54 | #define CONFIG_FSL_I2C |
55 | #define CONFIG_I2C_MULTI_BUS | 55 | #define CONFIG_I2C_MULTI_BUS |
56 | #define CONFIG_I2C_CMD_TREE | ||
57 | #define CONFIG_SYS_I2C_OFFSET 0x3000 | 56 | #define CONFIG_SYS_I2C_OFFSET 0x3000 |
58 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 | 57 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 |
59 | 58 | ||
60 | #define CONFIG_SYS_I2C_SPEED 100000 | 59 | #define CONFIG_SYS_I2C_SPEED 100000 |
61 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 60 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
62 | 61 | ||
63 | /* | 62 | /* |
64 | * DDR Setup | 63 | * DDR Setup |
65 | */ | 64 | */ |
66 | #define CONFIG_SYS_DDR_BASE 0x00000000 | 65 | #define CONFIG_SYS_DDR_BASE 0x00000000 |
67 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE | 66 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE |
68 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE | 67 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE |
69 | #define CONFIG_SYS_83XX_DDR_USES_CS0 1 | 68 | #define CONFIG_SYS_83XX_DDR_USES_CS0 1 |
70 | #define CONFIG_SYS_MEMTEST_START (60<<20) | 69 | #define CONFIG_SYS_MEMTEST_START (60<<20) |
71 | #define CONFIG_SYS_MEMTEST_END (70<<20) | 70 | #define CONFIG_SYS_MEMTEST_END (70<<20) |
72 | 71 | ||
73 | #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \ | 72 | #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \ |
74 | DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05 | 73 | DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05 |
75 | 74 | ||
76 | #define CONFIG_SYS_DDR_SIZE 256 | 75 | #define CONFIG_SYS_DDR_SIZE 256 |
77 | 76 | ||
78 | /* HC, 75Ohm, DDR-II, DRQ */ | 77 | /* HC, 75Ohm, DDR-II, DRQ */ |
79 | #define CONFIG_SYS_DDRCDR 0x80000001 | 78 | #define CONFIG_SYS_DDRCDR 0x80000001 |
80 | /* EN, ODT_WR, 3BA, 14row, 10col */ | 79 | /* EN, ODT_WR, 3BA, 14row, 10col */ |
81 | #define CONFIG_SYS_DDR_CS0_CONFIG 0x80014102 | 80 | #define CONFIG_SYS_DDR_CS0_CONFIG 0x80014102 |
82 | #define CONFIG_SYS_DDR_CS1_CONFIG 0x0 | 81 | #define CONFIG_SYS_DDR_CS1_CONFIG 0x0 |
83 | #define CONFIG_SYS_DDR_CS2_CONFIG 0x0 | 82 | #define CONFIG_SYS_DDR_CS2_CONFIG 0x0 |
84 | #define CONFIG_SYS_DDR_CS3_CONFIG 0x0 | 83 | #define CONFIG_SYS_DDR_CS3_CONFIG 0x0 |
85 | 84 | ||
86 | #define CONFIG_SYS_DDR_CS0_BNDS 0x0000000f | 85 | #define CONFIG_SYS_DDR_CS0_BNDS 0x0000000f |
87 | #define CONFIG_SYS_DDR_CS1_BNDS 0x0 | 86 | #define CONFIG_SYS_DDR_CS1_BNDS 0x0 |
88 | #define CONFIG_SYS_DDR_CS2_BNDS 0x0 | 87 | #define CONFIG_SYS_DDR_CS2_BNDS 0x0 |
89 | #define CONFIG_SYS_DDR_CS3_BNDS 0x0 | 88 | #define CONFIG_SYS_DDR_CS3_BNDS 0x0 |
90 | 89 | ||
91 | #define CONFIG_SYS_DDR_CLK_CNTL 0x02000000 | 90 | #define CONFIG_SYS_DDR_CLK_CNTL 0x02000000 |
92 | 91 | ||
93 | #define CONFIG_SYS_DDR_TIMING_0 0x00260802 | 92 | #define CONFIG_SYS_DDR_TIMING_0 0x00260802 |
94 | #define CONFIG_SYS_DDR_TIMING_1 0x2625b221 | 93 | #define CONFIG_SYS_DDR_TIMING_1 0x2625b221 |
95 | #define CONFIG_SYS_DDR_TIMING_2 0x1f9820c7 | 94 | #define CONFIG_SYS_DDR_TIMING_2 0x1f9820c7 |
96 | #define CONFIG_SYS_DDR_TIMING_3 0x00000000 | 95 | #define CONFIG_SYS_DDR_TIMING_3 0x00000000 |
97 | 96 | ||
98 | /* ~MEM_EN, SREN, DDR-II, 32_BE */ | 97 | /* ~MEM_EN, SREN, DDR-II, 32_BE */ |
99 | #define CONFIG_SYS_DDR_SDRAM_CFG 0x43080000 | 98 | #define CONFIG_SYS_DDR_SDRAM_CFG 0x43080000 |
100 | #define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000 | 99 | #define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000 |
101 | #define CONFIG_SYS_DDR_INTERVAL 0x04060100 | 100 | #define CONFIG_SYS_DDR_INTERVAL 0x04060100 |
102 | 101 | ||
103 | #define CONFIG_SYS_DDR_MODE 0x078e0232 | 102 | #define CONFIG_SYS_DDR_MODE 0x078e0232 |
104 | 103 | ||
105 | /* Flash */ | 104 | /* Flash */ |
106 | #define CONFIG_SYS_FLASH_CFI | 105 | #define CONFIG_SYS_FLASH_CFI |
107 | #define CONFIG_FLASH_CFI_DRIVER | 106 | #define CONFIG_FLASH_CFI_DRIVER |
108 | #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT | 107 | #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT |
109 | 108 | ||
110 | #define CONFIG_SYS_FLASH_BASE 0xFF800000 | 109 | #define CONFIG_SYS_FLASH_BASE 0xFF800000 |
111 | #define CONFIG_SYS_FLASH_SIZE 8 | 110 | #define CONFIG_SYS_FLASH_SIZE 8 |
112 | #define CONFIG_SYS_FLASH_SIZE_SHIFT 3 | 111 | #define CONFIG_SYS_FLASH_SIZE_SHIFT 3 |
113 | #define CONFIG_SYS_FLASH_EMPTY_INFO | 112 | #define CONFIG_SYS_FLASH_EMPTY_INFO |
114 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 | 113 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 |
115 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 | 114 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 |
116 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 | 115 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 |
117 | #define CONFIG_SYS_MAX_FLASH_SECT 256 | 116 | #define CONFIG_SYS_MAX_FLASH_SECT 256 |
118 | 117 | ||
119 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | BR_PS_16 | BR_V) | 118 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | BR_PS_16 | BR_V) |
120 | #define CONFIG_SYS_OR0_PRELIM ((~(CONFIG_SYS_FLASH_SIZE - 1) << 20) | OR_UPM_XAM | \ | 119 | #define CONFIG_SYS_OR0_PRELIM ((~(CONFIG_SYS_FLASH_SIZE - 1) << 20) | OR_UPM_XAM | \ |
121 | OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | OR_GPCM_XACS|\ | 120 | OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | OR_GPCM_XACS|\ |
122 | OR_GPCM_SCY_15 | OR_GPCM_TRLX | OR_GPCM_EHTR | \ | 121 | OR_GPCM_SCY_15 | OR_GPCM_TRLX | OR_GPCM_EHTR | \ |
123 | OR_GPCM_EAD) | 122 | OR_GPCM_EAD) |
124 | #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE | 123 | #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE |
125 | #define CONFIG_SYS_LBLAWAR0_PRELIM (LBLAWAR_EN | (0x13 + CONFIG_SYS_FLASH_SIZE_SHIFT)) | 124 | #define CONFIG_SYS_LBLAWAR0_PRELIM (LBLAWAR_EN | (0x13 + CONFIG_SYS_FLASH_SIZE_SHIFT)) |
126 | 125 | ||
127 | /* | 126 | /* |
128 | * U-Boot memory configuration | 127 | * U-Boot memory configuration |
129 | */ | 128 | */ |
130 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE | 129 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE |
131 | #undef CONFIG_SYS_RAMBOOT | 130 | #undef CONFIG_SYS_RAMBOOT |
132 | 131 | ||
133 | #define CONFIG_SYS_INIT_RAM_LOCK | 132 | #define CONFIG_SYS_INIT_RAM_LOCK |
134 | #define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 /* Initial RAM address */ | 133 | #define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 /* Initial RAM address */ |
135 | #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM*/ | 134 | #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM*/ |
136 | 135 | ||
137 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ | 136 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ |
138 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 137 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
139 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET | 138 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
140 | 139 | ||
141 | /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */ | 140 | /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */ |
142 | #define CONFIG_SYS_MONITOR_LEN (512 * 1024) | 141 | #define CONFIG_SYS_MONITOR_LEN (512 * 1024) |
143 | #define CONFIG_SYS_MALLOC_LEN (512 * 1024) | 142 | #define CONFIG_SYS_MALLOC_LEN (512 * 1024) |
144 | 143 | ||
145 | /* | 144 | /* |
146 | * Local Bus LCRR and LBCR regs | 145 | * Local Bus LCRR and LBCR regs |
147 | * LCRR: DLL bypass, Clock divider is 4 | 146 | * LCRR: DLL bypass, Clock divider is 4 |
148 | * External Local Bus rate is | 147 | * External Local Bus rate is |
149 | * CLKIN * HRCWL_CSB_TO_CLKIN / HRCWL_LCL_BUS_TO_SCB_CLK / LCRR_CLKDIV | 148 | * CLKIN * HRCWL_CSB_TO_CLKIN / HRCWL_LCL_BUS_TO_SCB_CLK / LCRR_CLKDIV |
150 | */ | 149 | */ |
151 | #define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_CLKDIV_4) | 150 | #define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_CLKDIV_4) |
152 | #define CONFIG_SYS_LBC_LBCR 0x00000000 | 151 | #define CONFIG_SYS_LBC_LBCR 0x00000000 |
153 | 152 | ||
154 | /* LB sdram refresh timer, about 6us */ | 153 | /* LB sdram refresh timer, about 6us */ |
155 | #define CONFIG_SYS_LBC_LSRT 0x32000000 | 154 | #define CONFIG_SYS_LBC_LSRT 0x32000000 |
156 | /* LB refresh timer prescal, 266MHz/32*/ | 155 | /* LB refresh timer prescal, 266MHz/32*/ |
157 | #define CONFIG_SYS_LBC_MRTPR 0x20000000 | 156 | #define CONFIG_SYS_LBC_MRTPR 0x20000000 |
158 | 157 | ||
159 | /* | 158 | /* |
160 | * Serial Port | 159 | * Serial Port |
161 | */ | 160 | */ |
162 | #define CONFIG_CONS_INDEX 1 | 161 | #define CONFIG_CONS_INDEX 1 |
163 | #undef CONFIG_SERIAL_SOFTWARE_FIFO | 162 | #undef CONFIG_SERIAL_SOFTWARE_FIFO |
164 | #define CONFIG_SYS_NS16550 | 163 | #define CONFIG_SYS_NS16550 |
165 | #define CONFIG_SYS_NS16550_SERIAL | 164 | #define CONFIG_SYS_NS16550_SERIAL |
166 | #define CONFIG_SYS_NS16550_REG_SIZE 1 | 165 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
167 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) | 166 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) |
168 | 167 | ||
169 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 168 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
170 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200} | 169 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200} |
171 | 170 | ||
172 | #define CONFIG_CONSOLE ttyS0 | 171 | #define CONFIG_CONSOLE ttyS0 |
173 | #define CONFIG_BAUDRATE 115200 | 172 | #define CONFIG_BAUDRATE 115200 |
174 | 173 | ||
175 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR + 0x4500) | 174 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR + 0x4500) |
176 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR + 0x4600) | 175 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR + 0x4600) |
177 | 176 | ||
178 | /* pass open firmware flat tree */ | 177 | /* pass open firmware flat tree */ |
179 | #define CONFIG_OF_LIBFDT 1 | 178 | #define CONFIG_OF_LIBFDT 1 |
180 | #define CONFIG_OF_BOARD_SETUP 1 | 179 | #define CONFIG_OF_BOARD_SETUP 1 |
181 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 | 180 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 |
182 | #define MV_DTB_NAME "mvblm7.dtb" | 181 | #define MV_DTB_NAME "mvblm7.dtb" |
183 | 182 | ||
184 | /* | 183 | /* |
185 | * PCI | 184 | * PCI |
186 | */ | 185 | */ |
187 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 | 186 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 |
188 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE | 187 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE |
189 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 | 188 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 |
190 | #define CONFIG_SYS_PCI1_MMIO_BASE (CONFIG_SYS_PCI1_MEM_BASE + CONFIG_SYS_PCI1_MEM_SIZE) | 189 | #define CONFIG_SYS_PCI1_MMIO_BASE (CONFIG_SYS_PCI1_MEM_BASE + CONFIG_SYS_PCI1_MEM_SIZE) |
191 | #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE | 190 | #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE |
192 | #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 | 191 | #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 |
193 | #define CONFIG_SYS_PCI1_IO_BASE 0x00000000 | 192 | #define CONFIG_SYS_PCI1_IO_BASE 0x00000000 |
194 | #define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000 | 193 | #define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000 |
195 | #define CONFIG_SYS_PCI1_IO_SIZE 0x01000000 | 194 | #define CONFIG_SYS_PCI1_IO_SIZE 0x01000000 |
196 | 195 | ||
197 | #define _IO_BASE 0x00000000 | 196 | #define _IO_BASE 0x00000000 |
198 | 197 | ||
199 | #define CONFIG_NET_MULTI 1 | 198 | #define CONFIG_NET_MULTI 1 |
200 | #define CONFIG_NET_RETRY_COUNT 3 | 199 | #define CONFIG_NET_RETRY_COUNT 3 |
201 | 200 | ||
202 | #define PCI_66M | 201 | #define PCI_66M |
203 | #define CONFIG_83XX_CLKIN 66666667 | 202 | #define CONFIG_83XX_CLKIN 66666667 |
204 | #define CONFIG_PCI_PNP | 203 | #define CONFIG_PCI_PNP |
205 | #define CONFIG_PCI_SCAN_SHOW | 204 | #define CONFIG_PCI_SCAN_SHOW |
206 | 205 | ||
207 | /* TSEC */ | 206 | /* TSEC */ |
208 | #define CONFIG_GMII | 207 | #define CONFIG_GMII |
209 | #define CONFIG_SYS_VSC8601_SKEWFIX | 208 | #define CONFIG_SYS_VSC8601_SKEWFIX |
210 | #define CONFIG_SYS_VSC8601_SKEW_TX 3 | 209 | #define CONFIG_SYS_VSC8601_SKEW_TX 3 |
211 | #define CONFIG_SYS_VSC8601_SKEW_RX 3 | 210 | #define CONFIG_SYS_VSC8601_SKEW_RX 3 |
212 | 211 | ||
213 | #define CONFIG_TSEC1 | 212 | #define CONFIG_TSEC1 |
214 | #define CONFIG_TSEC2 | 213 | #define CONFIG_TSEC2 |
215 | 214 | ||
216 | #define CONFIG_HAS_ETH0 | 215 | #define CONFIG_HAS_ETH0 |
217 | #define CONFIG_TSEC1_NAME "TSEC0" | 216 | #define CONFIG_TSEC1_NAME "TSEC0" |
218 | #define CONFIG_FEC1_PHY_NORXERR | 217 | #define CONFIG_FEC1_PHY_NORXERR |
219 | #define CONFIG_SYS_TSEC1_OFFSET 0x24000 | 218 | #define CONFIG_SYS_TSEC1_OFFSET 0x24000 |
220 | #define CONFIG_SYS_TSEC1 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC1_OFFSET) | 219 | #define CONFIG_SYS_TSEC1 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC1_OFFSET) |
221 | #define TSEC1_PHY_ADDR 0x10 | 220 | #define TSEC1_PHY_ADDR 0x10 |
222 | #define TSEC1_PHYIDX 0 | 221 | #define TSEC1_PHYIDX 0 |
223 | #define TSEC1_FLAGS (TSEC_GIGABIT|TSEC_REDUCED) | 222 | #define TSEC1_FLAGS (TSEC_GIGABIT|TSEC_REDUCED) |
224 | 223 | ||
225 | #define CONFIG_HAS_ETH1 | 224 | #define CONFIG_HAS_ETH1 |
226 | #define CONFIG_TSEC2_NAME "TSEC1" | 225 | #define CONFIG_TSEC2_NAME "TSEC1" |
227 | #define CONFIG_FEC2_PHY_NORXERR | 226 | #define CONFIG_FEC2_PHY_NORXERR |
228 | #define CONFIG_SYS_TSEC2_OFFSET 0x25000 | 227 | #define CONFIG_SYS_TSEC2_OFFSET 0x25000 |
229 | #define CONFIG_SYS_TSEC2 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC2_OFFSET) | 228 | #define CONFIG_SYS_TSEC2 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC2_OFFSET) |
230 | #define TSEC2_PHY_ADDR 0x11 | 229 | #define TSEC2_PHY_ADDR 0x11 |
231 | #define TSEC2_PHYIDX 0 | 230 | #define TSEC2_PHYIDX 0 |
232 | #define TSEC2_FLAGS (TSEC_GIGABIT|TSEC_REDUCED) | 231 | #define TSEC2_FLAGS (TSEC_GIGABIT|TSEC_REDUCED) |
233 | 232 | ||
234 | #define CONFIG_ETHPRIME "TSEC0" | 233 | #define CONFIG_ETHPRIME "TSEC0" |
235 | 234 | ||
236 | #define CONFIG_BOOTP_VENDOREX | 235 | #define CONFIG_BOOTP_VENDOREX |
237 | #define CONFIG_BOOTP_SUBNETMASK | 236 | #define CONFIG_BOOTP_SUBNETMASK |
238 | #define CONFIG_BOOTP_GATEWAY | 237 | #define CONFIG_BOOTP_GATEWAY |
239 | #define CONFIG_BOOTP_DNS | 238 | #define CONFIG_BOOTP_DNS |
240 | #define CONFIG_BOOTP_DNS2 | 239 | #define CONFIG_BOOTP_DNS2 |
241 | #define CONFIG_BOOTP_HOSTNAME | 240 | #define CONFIG_BOOTP_HOSTNAME |
242 | #define CONFIG_BOOTP_BOOTFILESIZE | 241 | #define CONFIG_BOOTP_BOOTFILESIZE |
243 | #define CONFIG_BOOTP_BOOTPATH | 242 | #define CONFIG_BOOTP_BOOTPATH |
244 | #define CONFIG_BOOTP_NTPSERVER | 243 | #define CONFIG_BOOTP_NTPSERVER |
245 | #define CONFIG_BOOTP_RANDOM_DELAY | 244 | #define CONFIG_BOOTP_RANDOM_DELAY |
246 | #define CONFIG_BOOTP_SEND_HOSTNAME | 245 | #define CONFIG_BOOTP_SEND_HOSTNAME |
247 | 246 | ||
248 | /* USB */ | 247 | /* USB */ |
249 | #define CONFIG_HAS_FSL_DR_USB | 248 | #define CONFIG_HAS_FSL_DR_USB |
250 | 249 | ||
251 | /* | 250 | /* |
252 | * Environment | 251 | * Environment |
253 | */ | 252 | */ |
254 | #undef CONFIG_SYS_FLASH_PROTECTION | 253 | #undef CONFIG_SYS_FLASH_PROTECTION |
255 | #define CONFIG_ENV_OVERWRITE | 254 | #define CONFIG_ENV_OVERWRITE |
256 | 255 | ||
257 | #define CONFIG_ENV_IS_IN_FLASH 1 | 256 | #define CONFIG_ENV_IS_IN_FLASH 1 |
258 | #define CONFIG_ENV_ADDR 0xFF800000 | 257 | #define CONFIG_ENV_ADDR 0xFF800000 |
259 | #define CONFIG_ENV_SIZE 0x2000 | 258 | #define CONFIG_ENV_SIZE 0x2000 |
260 | #define CONFIG_ENV_SECT_SIZE 0x2000 | 259 | #define CONFIG_ENV_SECT_SIZE 0x2000 |
261 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE) | 260 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR+CONFIG_ENV_SIZE) |
262 | #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE | 261 | #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE |
263 | 262 | ||
264 | #define CONFIG_LOADS_ECHO | 263 | #define CONFIG_LOADS_ECHO |
265 | #define CONFIG_SYS_LOADS_BAUD_CHANGE | 264 | #define CONFIG_SYS_LOADS_BAUD_CHANGE |
266 | 265 | ||
267 | /* | 266 | /* |
268 | * Command line configuration. | 267 | * Command line configuration. |
269 | */ | 268 | */ |
270 | #include <config_cmd_default.h> | 269 | #include <config_cmd_default.h> |
271 | 270 | ||
272 | #define CONFIG_CMD_CACHE | 271 | #define CONFIG_CMD_CACHE |
273 | #define CONFIG_CMD_IRQ | 272 | #define CONFIG_CMD_IRQ |
274 | #define CONFIG_CMD_NET | 273 | #define CONFIG_CMD_NET |
275 | #define CONFIG_CMD_MII | 274 | #define CONFIG_CMD_MII |
276 | #define CONFIG_CMD_PING | 275 | #define CONFIG_CMD_PING |
277 | #define CONFIG_CMD_DHCP | 276 | #define CONFIG_CMD_DHCP |
278 | #define CONFIG_CMD_SDRAM | 277 | #define CONFIG_CMD_SDRAM |
279 | #define CONFIG_CMD_PCI | 278 | #define CONFIG_CMD_PCI |
280 | #define CONFIG_CMD_I2C | 279 | #define CONFIG_CMD_I2C |
281 | #define CONFIG_CMD_FPGA | 280 | #define CONFIG_CMD_FPGA |
282 | 281 | ||
283 | #undef CONFIG_WATCHDOG | 282 | #undef CONFIG_WATCHDOG |
284 | 283 | ||
285 | /* | 284 | /* |
286 | * Miscellaneous configurable options | 285 | * Miscellaneous configurable options |
287 | */ | 286 | */ |
288 | #define CONFIG_SYS_LONGHELP | 287 | #define CONFIG_SYS_LONGHELP |
289 | #define CONFIG_CMDLINE_EDITING | 288 | #define CONFIG_CMDLINE_EDITING |
290 | #define CONFIG_SYS_HUSH_PARSER | 289 | #define CONFIG_SYS_HUSH_PARSER |
291 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | 290 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
292 | 291 | ||
293 | /* default load address */ | 292 | /* default load address */ |
294 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 | 293 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 |
295 | /* default location for tftp and bootm */ | 294 | /* default location for tftp and bootm */ |
296 | #define CONFIG_LOADADDR 0x200000 | 295 | #define CONFIG_LOADADDR 0x200000 |
297 | 296 | ||
298 | #define CONFIG_SYS_PROMPT "mvBL-M7> " | 297 | #define CONFIG_SYS_PROMPT "mvBL-M7> " |
299 | #define CONFIG_SYS_CBSIZE 256 | 298 | #define CONFIG_SYS_CBSIZE 256 |
300 | 299 | ||
301 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) | 300 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) |
302 | #define CONFIG_SYS_MAXARGS 16 | 301 | #define CONFIG_SYS_MAXARGS 16 |
303 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE | 302 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE |
304 | #define CONFIG_SYS_HZ 1000 | 303 | #define CONFIG_SYS_HZ 1000 |
305 | 304 | ||
306 | /* | 305 | /* |
307 | * For booting Linux, the board info and command line data | 306 | * For booting Linux, the board info and command line data |
308 | * have to be in the first 8 MB of memory, since this is | 307 | * have to be in the first 8 MB of memory, since this is |
309 | * the maximum mapped by the Linux kernel during initialization. | 308 | * the maximum mapped by the Linux kernel during initialization. |
310 | */ | 309 | */ |
311 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ | 310 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ |
312 | 311 | ||
313 | #define CONFIG_SYS_HRCW_LOW 0x0 | 312 | #define CONFIG_SYS_HRCW_LOW 0x0 |
314 | #define CONFIG_SYS_HRCW_HIGH 0x0 | 313 | #define CONFIG_SYS_HRCW_HIGH 0x0 |
315 | 314 | ||
316 | /* | 315 | /* |
317 | * System performance | 316 | * System performance |
318 | */ | 317 | */ |
319 | #define CONFIG_SYS_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */ | 318 | #define CONFIG_SYS_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */ |
320 | #define CONFIG_SYS_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */ | 319 | #define CONFIG_SYS_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */ |
321 | #define CONFIG_SYS_SPCR_TSEC1EP 3 /* TSEC1 emergency priority (0-3) */ | 320 | #define CONFIG_SYS_SPCR_TSEC1EP 3 /* TSEC1 emergency priority (0-3) */ |
322 | #define CONFIG_SYS_SPCR_TSEC2EP 3 /* TSEC2 emergency priority (0-3) */ | 321 | #define CONFIG_SYS_SPCR_TSEC2EP 3 /* TSEC2 emergency priority (0-3) */ |
323 | 322 | ||
324 | /* clocking */ | 323 | /* clocking */ |
325 | #define CONFIG_SYS_SCCR_ENCCM 0 | 324 | #define CONFIG_SYS_SCCR_ENCCM 0 |
326 | #define CONFIG_SYS_SCCR_USBMPHCM 0 | 325 | #define CONFIG_SYS_SCCR_USBMPHCM 0 |
327 | #define CONFIG_SYS_SCCR_USBDRCM 2 | 326 | #define CONFIG_SYS_SCCR_USBDRCM 2 |
328 | #define CONFIG_SYS_SCCR_TSEC1CM 1 | 327 | #define CONFIG_SYS_SCCR_TSEC1CM 1 |
329 | #define CONFIG_SYS_SCCR_TSEC2CM 1 | 328 | #define CONFIG_SYS_SCCR_TSEC2CM 1 |
330 | 329 | ||
331 | #define CONFIG_SYS_SICRH 0x1fff8003 | 330 | #define CONFIG_SYS_SICRH 0x1fff8003 |
332 | #define CONFIG_SYS_SICRL (SICRL_LDP_A | SICRL_USB1 | SICRL_USB0) | 331 | #define CONFIG_SYS_SICRL (SICRL_LDP_A | SICRL_USB1 | SICRL_USB0) |
333 | 332 | ||
334 | #define CONFIG_SYS_HID0_INIT 0x000000000 | 333 | #define CONFIG_SYS_HID0_INIT 0x000000000 |
335 | #define CONFIG_SYS_HID0_FINAL CONFIG_SYS_HID0_INIT | 334 | #define CONFIG_SYS_HID0_FINAL CONFIG_SYS_HID0_INIT |
336 | 335 | ||
337 | #define CONFIG_SYS_HID2 HID2_HBE | 336 | #define CONFIG_SYS_HID2 HID2_HBE |
338 | #define CONFIG_HIGH_BATS 1 | 337 | #define CONFIG_HIGH_BATS 1 |
339 | 338 | ||
340 | /* DDR */ | 339 | /* DDR */ |
341 | #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) | 340 | #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) |
342 | #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 341 | #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
343 | 342 | ||
344 | /* PCI */ | 343 | /* PCI */ |
345 | #define CONFIG_SYS_IBAT1L (CONFIG_SYS_PCI1_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) | 344 | #define CONFIG_SYS_IBAT1L (CONFIG_SYS_PCI1_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) |
346 | #define CONFIG_SYS_IBAT1U (CONFIG_SYS_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 345 | #define CONFIG_SYS_IBAT1U (CONFIG_SYS_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
347 | #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT |\ | 346 | #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT |\ |
348 | BATL_GUARDEDSTORAGE) | 347 | BATL_GUARDEDSTORAGE) |
349 | #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 348 | #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
350 | 349 | ||
351 | /* no PCI2 */ | 350 | /* no PCI2 */ |
352 | #define CONFIG_SYS_IBAT3L 0 | 351 | #define CONFIG_SYS_IBAT3L 0 |
353 | #define CONFIG_SYS_IBAT3U 0 | 352 | #define CONFIG_SYS_IBAT3U 0 |
354 | #define CONFIG_SYS_IBAT4L 0 | 353 | #define CONFIG_SYS_IBAT4L 0 |
355 | #define CONFIG_SYS_IBAT4U 0 | 354 | #define CONFIG_SYS_IBAT4U 0 |
356 | 355 | ||
357 | /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 & BCSR @ 0xE2400000 */ | 356 | /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 & BCSR @ 0xE2400000 */ |
358 | #define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT | \ | 357 | #define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT | \ |
359 | BATL_GUARDEDSTORAGE) | 358 | BATL_GUARDEDSTORAGE) |
360 | #define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR | BATU_BL_256M | BATU_VS | BATU_VP) | 359 | #define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR | BATU_BL_256M | BATU_VS | BATU_VP) |
361 | 360 | ||
362 | /* stack in DCACHE 0xFDF00000 & FLASH @ 0xFF800000 */ | 361 | /* stack in DCACHE 0xFDF00000 & FLASH @ 0xFF800000 */ |
363 | #define CONFIG_SYS_IBAT6L (0xF0000000 | BATL_PP_10 | BATL_MEMCOHERENCE | \ | 362 | #define CONFIG_SYS_IBAT6L (0xF0000000 | BATL_PP_10 | BATL_MEMCOHERENCE | \ |
364 | BATL_GUARDEDSTORAGE) | 363 | BATL_GUARDEDSTORAGE) |
365 | #define CONFIG_SYS_IBAT6U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP) | 364 | #define CONFIG_SYS_IBAT6U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP) |
366 | #define CONFIG_SYS_IBAT7L 0 | 365 | #define CONFIG_SYS_IBAT7L 0 |
367 | #define CONFIG_SYS_IBAT7U 0 | 366 | #define CONFIG_SYS_IBAT7U 0 |
368 | 367 | ||
369 | #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L | 368 | #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L |
370 | #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U | 369 | #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U |
371 | #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L | 370 | #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L |
372 | #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U | 371 | #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U |
373 | #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L | 372 | #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L |
374 | #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U | 373 | #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U |
375 | #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L | 374 | #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L |
376 | #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U | 375 | #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U |
377 | #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L | 376 | #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L |
378 | #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U | 377 | #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U |
379 | #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L | 378 | #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L |
380 | #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U | 379 | #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U |
381 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L | 380 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L |
382 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U | 381 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U |
383 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L | 382 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L |
384 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U | 383 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U |
385 | 384 | ||
386 | /* | 385 | /* |
387 | * Internal Definitions | 386 | * Internal Definitions |
388 | * | 387 | * |
389 | * Boot Flags | 388 | * Boot Flags |
390 | */ | 389 | */ |
391 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 390 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
392 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 391 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
393 | 392 | ||
394 | 393 | ||
395 | /* | 394 | /* |
396 | * Environment Configuration | 395 | * Environment Configuration |
397 | */ | 396 | */ |
398 | #define CONFIG_ENV_OVERWRITE | 397 | #define CONFIG_ENV_OVERWRITE |
399 | 398 | ||
400 | #define CONFIG_NETDEV eth0 | 399 | #define CONFIG_NETDEV eth0 |
401 | 400 | ||
402 | /* Default path and filenames */ | 401 | /* Default path and filenames */ |
403 | #define CONFIG_BOOTDELAY 5 | 402 | #define CONFIG_BOOTDELAY 5 |
404 | #define CONFIG_AUTOBOOT_KEYED | 403 | #define CONFIG_AUTOBOOT_KEYED |
405 | #define CONFIG_AUTOBOOT_STOP_STR "s" | 404 | #define CONFIG_AUTOBOOT_STOP_STR "s" |
406 | #define CONFIG_ZERO_BOOTDELAY_CHECK | 405 | #define CONFIG_ZERO_BOOTDELAY_CHECK |
407 | #define CONFIG_RESET_TO_RETRY 1000 | 406 | #define CONFIG_RESET_TO_RETRY 1000 |
408 | 407 | ||
409 | #define MV_CI mvBL-M7 | 408 | #define MV_CI mvBL-M7 |
410 | #define MV_VCI mvBL-M7 | 409 | #define MV_VCI mvBL-M7 |
411 | #define MV_FPGA_DATA 0xfff80000 | 410 | #define MV_FPGA_DATA 0xfff80000 |
412 | #define MV_FPGA_SIZE 0x00076ca2 | 411 | #define MV_FPGA_SIZE 0x00076ca2 |
413 | #define MV_KERNEL_ADDR 0xff810000 | 412 | #define MV_KERNEL_ADDR 0xff810000 |
414 | #define MV_INITRD_ADDR 0xffb00000 | 413 | #define MV_INITRD_ADDR 0xffb00000 |
415 | #define MV_SOURCE_ADDR 0xff804000 | 414 | #define MV_SOURCE_ADDR 0xff804000 |
416 | #define MV_SOURCE_ADDR2 0xff806000 | 415 | #define MV_SOURCE_ADDR2 0xff806000 |
417 | #define MV_DTB_ADDR 0xff808000 | 416 | #define MV_DTB_ADDR 0xff808000 |
418 | #define MV_INITRD_LENGTH 0x00400000 | 417 | #define MV_INITRD_LENGTH 0x00400000 |
419 | 418 | ||
420 | #define CONFIG_SHOW_BOOT_PROGRESS 1 | 419 | #define CONFIG_SHOW_BOOT_PROGRESS 1 |
421 | 420 | ||
422 | #define MV_KERNEL_ADDR_RAM 0x00100000 | 421 | #define MV_KERNEL_ADDR_RAM 0x00100000 |
423 | #define MV_DTB_ADDR_RAM 0x00600000 | 422 | #define MV_DTB_ADDR_RAM 0x00600000 |
424 | #define MV_INITRD_ADDR_RAM 0x01000000 | 423 | #define MV_INITRD_ADDR_RAM 0x01000000 |
425 | 424 | ||
426 | #define CONFIG_BOOTCOMMAND "if imi ${autoscr_addr}; \ | 425 | #define CONFIG_BOOTCOMMAND "if imi ${autoscr_addr}; \ |
427 | then source ${autoscr_addr}; \ | 426 | then source ${autoscr_addr}; \ |
428 | else source ${autoscr_addr2}; \ | 427 | else source ${autoscr_addr2}; \ |
429 | fi;" | 428 | fi;" |
430 | #define CONFIG_BOOTARGS "root=/dev/ram ro rootfstype=squashfs" | 429 | #define CONFIG_BOOTARGS "root=/dev/ram ro rootfstype=squashfs" |
431 | 430 | ||
432 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 431 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
433 | "console_nr=0\0" \ | 432 | "console_nr=0\0" \ |
434 | "baudrate=" MK_STR(CONFIG_BAUDRATE) "\0" \ | 433 | "baudrate=" MK_STR(CONFIG_BAUDRATE) "\0" \ |
435 | "stdin=serial\0" \ | 434 | "stdin=serial\0" \ |
436 | "stdout=serial\0" \ | 435 | "stdout=serial\0" \ |
437 | "stderr=serial\0" \ | 436 | "stderr=serial\0" \ |
438 | "fpga=0\0" \ | 437 | "fpga=0\0" \ |
439 | "fpgadata=" MK_STR(MV_FPGA_DATA) "\0" \ | 438 | "fpgadata=" MK_STR(MV_FPGA_DATA) "\0" \ |
440 | "fpgadatasize=" MK_STR(MV_FPGA_SIZE) "\0" \ | 439 | "fpgadatasize=" MK_STR(MV_FPGA_SIZE) "\0" \ |
441 | "autoscr_addr=" MK_STR(MV_SOURCE_ADDR) "\0" \ | 440 | "autoscr_addr=" MK_STR(MV_SOURCE_ADDR) "\0" \ |
442 | "autoscr_addr2=" MK_STR(MV_SOURCE_ADDR2) "\0" \ | 441 | "autoscr_addr2=" MK_STR(MV_SOURCE_ADDR2) "\0" \ |
443 | "mv_kernel_addr=" MK_STR(MV_KERNEL_ADDR) "\0" \ | 442 | "mv_kernel_addr=" MK_STR(MV_KERNEL_ADDR) "\0" \ |
444 | "mv_kernel_addr_ram=" MK_STR(MV_KERNEL_ADDR_RAM) "\0" \ | 443 | "mv_kernel_addr_ram=" MK_STR(MV_KERNEL_ADDR_RAM) "\0" \ |
445 | "mv_initrd_addr=" MK_STR(MV_INITRD_ADDR) "\0" \ | 444 | "mv_initrd_addr=" MK_STR(MV_INITRD_ADDR) "\0" \ |
446 | "mv_initrd_addr_ram=" MK_STR(MV_INITRD_ADDR_RAM) "\0" \ | 445 | "mv_initrd_addr_ram=" MK_STR(MV_INITRD_ADDR_RAM) "\0" \ |
447 | "mv_initrd_length=" MK_STR(MV_INITRD_LENGTH) "\0" \ | 446 | "mv_initrd_length=" MK_STR(MV_INITRD_LENGTH) "\0" \ |
448 | "mv_dtb_addr=" MK_STR(MV_DTB_ADDR) "\0" \ | 447 | "mv_dtb_addr=" MK_STR(MV_DTB_ADDR) "\0" \ |
449 | "mv_dtb_addr_ram=" MK_STR(MV_DTB_ADDR_RAM) "\0" \ | 448 | "mv_dtb_addr_ram=" MK_STR(MV_DTB_ADDR_RAM) "\0" \ |
450 | "dtb_name=" MK_STR(MV_DTB_NAME) "\0" \ | 449 | "dtb_name=" MK_STR(MV_DTB_NAME) "\0" \ |
451 | "mv_version=" U_BOOT_VERSION "\0" \ | 450 | "mv_version=" U_BOOT_VERSION "\0" \ |
452 | "dhcp_client_id=" MK_STR(MV_CI) "\0" \ | 451 | "dhcp_client_id=" MK_STR(MV_CI) "\0" \ |
453 | "dhcp_vendor-class-identifier=" MK_STR(MV_VCI) "\0" \ | 452 | "dhcp_vendor-class-identifier=" MK_STR(MV_VCI) "\0" \ |
454 | "netretry=no\0" \ | 453 | "netretry=no\0" \ |
455 | "use_static_ipaddr=no\0" \ | 454 | "use_static_ipaddr=no\0" \ |
456 | "static_ipaddr=192.168.90.10\0" \ | 455 | "static_ipaddr=192.168.90.10\0" \ |
457 | "static_netmask=255.255.255.0\0" \ | 456 | "static_netmask=255.255.255.0\0" \ |
458 | "static_gateway=0.0.0.0\0" \ | 457 | "static_gateway=0.0.0.0\0" \ |
459 | "initrd_name=uInitrd.mvblm7-xenorfs\0" \ | 458 | "initrd_name=uInitrd.mvblm7-xenorfs\0" \ |
460 | "zcip=no\0" \ | 459 | "zcip=no\0" \ |
461 | "netboot=yes\0" \ | 460 | "netboot=yes\0" \ |
462 | "mvtest=Ff\0" \ | 461 | "mvtest=Ff\0" \ |
463 | "tried_bootfromflash=no\0" \ | 462 | "tried_bootfromflash=no\0" \ |
464 | "tried_bootfromnet=no\0" \ | 463 | "tried_bootfromnet=no\0" \ |
465 | "bootfile=mvblm72625.boot\0" \ | 464 | "bootfile=mvblm72625.boot\0" \ |
466 | "use_dhcp=yes\0" \ | 465 | "use_dhcp=yes\0" \ |
467 | "gev_start=yes\0" \ | 466 | "gev_start=yes\0" \ |
468 | "mvbcdma_debug=0\0" \ | 467 | "mvbcdma_debug=0\0" \ |
469 | "mvbcia_debug=0\0" \ | 468 | "mvbcia_debug=0\0" \ |
470 | "propdev_debug=0\0" \ | 469 | "propdev_debug=0\0" \ |
471 | "gevss_debug=0\0" \ | 470 | "gevss_debug=0\0" \ |
472 | "watchdog=0\0" \ | 471 | "watchdog=0\0" \ |
473 | "usb_dr_mode=host\0" \ | 472 | "usb_dr_mode=host\0" \ |
474 | "sensor_cnt=2\0" \ | 473 | "sensor_cnt=2\0" \ |
475 | "" | 474 | "" |
476 | 475 | ||
477 | #define CONFIG_FPGA_COUNT 1 | 476 | #define CONFIG_FPGA_COUNT 1 |
478 | #define CONFIG_FPGA CONFIG_SYS_ALTERA_CYCLON2 | 477 | #define CONFIG_FPGA CONFIG_SYS_ALTERA_CYCLON2 |
479 | #define CONFIG_FPGA_ALTERA | 478 | #define CONFIG_FPGA_ALTERA |
480 | #define CONFIG_FPGA_CYCLON2 | 479 | #define CONFIG_FPGA_CYCLON2 |
481 | 480 | ||
482 | #endif | 481 | #endif |
483 | 482 |
include/configs/PMC440.h
1 | /* | 1 | /* |
2 | * (C) Copyright 2007-2008 | 2 | * (C) Copyright 2007-2008 |
3 | * Matthias Fuchs, esd gmbh, matthias.fuchs@esd-electronics.com. | 3 | * Matthias Fuchs, esd gmbh, matthias.fuchs@esd-electronics.com. |
4 | * Based on the sequoia configuration file. | 4 | * Based on the sequoia configuration file. |
5 | * | 5 | * |
6 | * (C) Copyright 2006-2007 | 6 | * (C) Copyright 2006-2007 |
7 | * Stefan Roese, DENX Software Engineering, sr@denx.de. | 7 | * Stefan Roese, DENX Software Engineering, sr@denx.de. |
8 | * | 8 | * |
9 | * (C) Copyright 2006 | 9 | * (C) Copyright 2006 |
10 | * Jacqueline Pira-Ferriol, AMCC/IBM, jpira-ferriol@fr.ibm.com | 10 | * Jacqueline Pira-Ferriol, AMCC/IBM, jpira-ferriol@fr.ibm.com |
11 | * Alain Saurel, AMCC/IBM, alain.saurel@fr.ibm.com | 11 | * Alain Saurel, AMCC/IBM, alain.saurel@fr.ibm.com |
12 | * | 12 | * |
13 | * This program is free software; you can redistribute it and/or | 13 | * This program is free software; you can redistribute it and/or |
14 | * modify it under the terms of the GNU General Public License as | 14 | * modify it under the terms of the GNU General Public License as |
15 | * published by the Free Software Foundation; either version 2 of | 15 | * published by the Free Software Foundation; either version 2 of |
16 | * the License, or (at your option) any later version. | 16 | * the License, or (at your option) any later version. |
17 | * | 17 | * |
18 | * This program is distributed in the hope that it will be useful, | 18 | * This program is distributed in the hope that it will be useful, |
19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
21 | * GNU General Public License for more details. | 21 | * GNU General Public License for more details. |
22 | * | 22 | * |
23 | * You should have received a copy of the GNU General Public License | 23 | * You should have received a copy of the GNU General Public License |
24 | * along with this program; if not, write to the Free Software | 24 | * along with this program; if not, write to the Free Software |
25 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 25 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
26 | * MA 02111-1307 USA | 26 | * MA 02111-1307 USA |
27 | */ | 27 | */ |
28 | 28 | ||
29 | /************************************************************************ | 29 | /************************************************************************ |
30 | * PMC440.h - configuration for esd PMC440 boards | 30 | * PMC440.h - configuration for esd PMC440 boards |
31 | ***********************************************************************/ | 31 | ***********************************************************************/ |
32 | #ifndef __CONFIG_H | 32 | #ifndef __CONFIG_H |
33 | #define __CONFIG_H | 33 | #define __CONFIG_H |
34 | 34 | ||
35 | /*----------------------------------------------------------------------- | 35 | /*----------------------------------------------------------------------- |
36 | * High Level Configuration Options | 36 | * High Level Configuration Options |
37 | *----------------------------------------------------------------------*/ | 37 | *----------------------------------------------------------------------*/ |
38 | #define CONFIG_440EPX 1 /* Specific PPC440EPx */ | 38 | #define CONFIG_440EPX 1 /* Specific PPC440EPx */ |
39 | #define CONFIG_440 1 /* ... PPC440 family */ | 39 | #define CONFIG_440 1 /* ... PPC440 family */ |
40 | #define CONFIG_4xx 1 /* ... PPC4xx family */ | 40 | #define CONFIG_4xx 1 /* ... PPC4xx family */ |
41 | 41 | ||
42 | #define CONFIG_SYS_CLK_FREQ 33333400 | 42 | #define CONFIG_SYS_CLK_FREQ 33333400 |
43 | 43 | ||
44 | #if 0 /* temporary disabled because OS/9 does not like dcache on startup */ | 44 | #if 0 /* temporary disabled because OS/9 does not like dcache on startup */ |
45 | #define CONFIG_4xx_DCACHE /* enable dcache */ | 45 | #define CONFIG_4xx_DCACHE /* enable dcache */ |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */ | 48 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */ |
49 | #define CONFIG_MISC_INIT_F 1 | 49 | #define CONFIG_MISC_INIT_F 1 |
50 | #define CONFIG_MISC_INIT_R 1 /* Call misc_init_r */ | 50 | #define CONFIG_MISC_INIT_R 1 /* Call misc_init_r */ |
51 | #define CONFIG_BOARD_TYPES 1 /* support board types */ | 51 | #define CONFIG_BOARD_TYPES 1 /* support board types */ |
52 | /*----------------------------------------------------------------------- | 52 | /*----------------------------------------------------------------------- |
53 | * Base addresses -- Note these are effective addresses where the | 53 | * Base addresses -- Note these are effective addresses where the |
54 | * actual resources get mapped (not physical addresses) | 54 | * actual resources get mapped (not physical addresses) |
55 | *----------------------------------------------------------------------*/ | 55 | *----------------------------------------------------------------------*/ |
56 | #define CONFIG_SYS_MONITOR_LEN (384 * 1024) /* Reserve 384 kB for Monitor */ | 56 | #define CONFIG_SYS_MONITOR_LEN (384 * 1024) /* Reserve 384 kB for Monitor */ |
57 | #define CONFIG_SYS_MALLOC_LEN (1024 * 1024) /* Reserve 256 kB for malloc() */ | 57 | #define CONFIG_SYS_MALLOC_LEN (1024 * 1024) /* Reserve 256 kB for malloc() */ |
58 | 58 | ||
59 | #define CONFIG_PRAM 0 /* use pram variable to overwrite */ | 59 | #define CONFIG_PRAM 0 /* use pram variable to overwrite */ |
60 | 60 | ||
61 | #define CONFIG_SYS_BOOT_BASE_ADDR 0xf0000000 | 61 | #define CONFIG_SYS_BOOT_BASE_ADDR 0xf0000000 |
62 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 /* _must_ be 0 */ | 62 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 /* _must_ be 0 */ |
63 | #define CONFIG_SYS_FLASH_BASE 0xfc000000 /* start of FLASH */ | 63 | #define CONFIG_SYS_FLASH_BASE 0xfc000000 /* start of FLASH */ |
64 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE | 64 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE |
65 | #define CONFIG_SYS_NAND_ADDR 0xd0000000 /* NAND Flash */ | 65 | #define CONFIG_SYS_NAND_ADDR 0xd0000000 /* NAND Flash */ |
66 | #define CONFIG_SYS_OCM_BASE 0xe0010000 /* ocm */ | 66 | #define CONFIG_SYS_OCM_BASE 0xe0010000 /* ocm */ |
67 | #define CONFIG_SYS_OCM_DATA_ADDR CONFIG_SYS_OCM_BASE | 67 | #define CONFIG_SYS_OCM_DATA_ADDR CONFIG_SYS_OCM_BASE |
68 | #define CONFIG_SYS_PCI_BASE 0xe0000000 /* Internal PCI regs */ | 68 | #define CONFIG_SYS_PCI_BASE 0xe0000000 /* Internal PCI regs */ |
69 | #define CONFIG_SYS_PCI_MEMBASE 0x80000000 /* mapped pci memory */ | 69 | #define CONFIG_SYS_PCI_MEMBASE 0x80000000 /* mapped pci memory */ |
70 | #define CONFIG_SYS_PCI_MEMBASE1 CONFIG_SYS_PCI_MEMBASE + 0x10000000 | 70 | #define CONFIG_SYS_PCI_MEMBASE1 CONFIG_SYS_PCI_MEMBASE + 0x10000000 |
71 | #define CONFIG_SYS_PCI_MEMBASE2 CONFIG_SYS_PCI_MEMBASE1 + 0x10000000 | 71 | #define CONFIG_SYS_PCI_MEMBASE2 CONFIG_SYS_PCI_MEMBASE1 + 0x10000000 |
72 | #define CONFIG_SYS_PCI_MEMBASE3 CONFIG_SYS_PCI_MEMBASE2 + 0x10000000 | 72 | #define CONFIG_SYS_PCI_MEMBASE3 CONFIG_SYS_PCI_MEMBASE2 + 0x10000000 |
73 | #define CONFIG_SYS_PCI_MEMSIZE 0x80000000 /* 2GB! */ | 73 | #define CONFIG_SYS_PCI_MEMSIZE 0x80000000 /* 2GB! */ |
74 | 74 | ||
75 | /* Don't change either of these */ | 75 | /* Don't change either of these */ |
76 | #define CONFIG_SYS_PERIPHERAL_BASE 0xef600000 /* internal peripherals */ | 76 | #define CONFIG_SYS_PERIPHERAL_BASE 0xef600000 /* internal peripherals */ |
77 | 77 | ||
78 | #define CONFIG_SYS_USB2D0_BASE 0xe0000100 | 78 | #define CONFIG_SYS_USB2D0_BASE 0xe0000100 |
79 | #define CONFIG_SYS_USB_DEVICE 0xe0000000 | 79 | #define CONFIG_SYS_USB_DEVICE 0xe0000000 |
80 | #define CONFIG_SYS_USB_HOST 0xe0000400 | 80 | #define CONFIG_SYS_USB_HOST 0xe0000400 |
81 | #define CONFIG_SYS_FPGA_BASE0 0xef000000 /* 32 bit */ | 81 | #define CONFIG_SYS_FPGA_BASE0 0xef000000 /* 32 bit */ |
82 | #define CONFIG_SYS_FPGA_BASE1 0xef100000 /* 16 bit */ | 82 | #define CONFIG_SYS_FPGA_BASE1 0xef100000 /* 16 bit */ |
83 | #define CONFIG_SYS_RESET_BASE 0xef200000 | 83 | #define CONFIG_SYS_RESET_BASE 0xef200000 |
84 | 84 | ||
85 | /*----------------------------------------------------------------------- | 85 | /*----------------------------------------------------------------------- |
86 | * Initial RAM & stack pointer | 86 | * Initial RAM & stack pointer |
87 | *----------------------------------------------------------------------*/ | 87 | *----------------------------------------------------------------------*/ |
88 | /* 440EPx/440GRx have 16KB of internal SRAM, so no need for D-Cache */ | 88 | /* 440EPx/440GRx have 16KB of internal SRAM, so no need for D-Cache */ |
89 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_OCM_BASE /* OCM */ | 89 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_OCM_BASE /* OCM */ |
90 | #define CONFIG_SYS_INIT_RAM_END (4 << 10) | 90 | #define CONFIG_SYS_INIT_RAM_END (4 << 10) |
91 | #define CONFIG_SYS_GBL_DATA_SIZE 256 /* num bytes initial data */ | 91 | #define CONFIG_SYS_GBL_DATA_SIZE 256 /* num bytes initial data */ |
92 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 92 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
93 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_POST_WORD_ADDR | 93 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_POST_WORD_ADDR |
94 | 94 | ||
95 | /*----------------------------------------------------------------------- | 95 | /*----------------------------------------------------------------------- |
96 | * Serial Port | 96 | * Serial Port |
97 | *----------------------------------------------------------------------*/ | 97 | *----------------------------------------------------------------------*/ |
98 | #undef CONFIG_SYS_EXT_SERIAL_CLOCK | 98 | #undef CONFIG_SYS_EXT_SERIAL_CLOCK |
99 | #define CONFIG_BAUDRATE 115200 | 99 | #define CONFIG_BAUDRATE 115200 |
100 | #define CONFIG_SERIAL_MULTI 1 | 100 | #define CONFIG_SERIAL_MULTI 1 |
101 | #undef CONFIG_UART1_CONSOLE /* console on front panel */ | 101 | #undef CONFIG_UART1_CONSOLE /* console on front panel */ |
102 | 102 | ||
103 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 103 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
104 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200} | 104 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200} |
105 | 105 | ||
106 | /*----------------------------------------------------------------------- | 106 | /*----------------------------------------------------------------------- |
107 | * Environment | 107 | * Environment |
108 | *----------------------------------------------------------------------*/ | 108 | *----------------------------------------------------------------------*/ |
109 | #if !defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL) | 109 | #if !defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL) |
110 | #define CONFIG_ENV_IS_IN_EEPROM 1 /* use FLASH for environment vars */ | 110 | #define CONFIG_ENV_IS_IN_EEPROM 1 /* use FLASH for environment vars */ |
111 | #else | 111 | #else |
112 | #define CONFIG_ENV_IS_IN_NAND 1 /* use NAND for environment vars */ | 112 | #define CONFIG_ENV_IS_IN_NAND 1 /* use NAND for environment vars */ |
113 | #define CONFIG_ENV_IS_EMBEDDED 1 /* use embedded environment */ | 113 | #define CONFIG_ENV_IS_EMBEDDED 1 /* use embedded environment */ |
114 | #endif | 114 | #endif |
115 | 115 | ||
116 | /*----------------------------------------------------------------------- | 116 | /*----------------------------------------------------------------------- |
117 | * RTC | 117 | * RTC |
118 | *----------------------------------------------------------------------*/ | 118 | *----------------------------------------------------------------------*/ |
119 | #define CONFIG_RTC_RX8025 | 119 | #define CONFIG_RTC_RX8025 |
120 | 120 | ||
121 | /*----------------------------------------------------------------------- | 121 | /*----------------------------------------------------------------------- |
122 | * FLASH related | 122 | * FLASH related |
123 | *----------------------------------------------------------------------*/ | 123 | *----------------------------------------------------------------------*/ |
124 | #define CONFIG_SYS_FLASH_CFI /* The flash is CFI compatible */ | 124 | #define CONFIG_SYS_FLASH_CFI /* The flash is CFI compatible */ |
125 | #define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver */ | 125 | #define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver */ |
126 | 126 | ||
127 | #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE } | 127 | #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE } |
128 | 128 | ||
129 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ | 129 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ |
130 | #define CONFIG_SYS_MAX_FLASH_SECT 512 /* max number of sectors on one chip */ | 130 | #define CONFIG_SYS_MAX_FLASH_SECT 512 /* max number of sectors on one chip */ |
131 | 131 | ||
132 | #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ | 132 | #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ |
133 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ | 133 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ |
134 | 134 | ||
135 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */ | 135 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */ |
136 | #define CONFIG_SYS_FLASH_PROTECTION 1 /* use hardware flash protection */ | 136 | #define CONFIG_SYS_FLASH_PROTECTION 1 /* use hardware flash protection */ |
137 | 137 | ||
138 | #define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */ | 138 | #define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */ |
139 | #define CONFIG_SYS_FLASH_QUIET_TEST 1 /* don't warn upon unknown flash */ | 139 | #define CONFIG_SYS_FLASH_QUIET_TEST 1 /* don't warn upon unknown flash */ |
140 | 140 | ||
141 | #ifdef CONFIG_ENV_IS_IN_FLASH | 141 | #ifdef CONFIG_ENV_IS_IN_FLASH |
142 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* size of one complete sector */ | 142 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* size of one complete sector */ |
143 | #define CONFIG_ENV_ADDR ((-CONFIG_SYS_MONITOR_LEN)-CONFIG_ENV_SECT_SIZE) | 143 | #define CONFIG_ENV_ADDR ((-CONFIG_SYS_MONITOR_LEN)-CONFIG_ENV_SECT_SIZE) |
144 | #define CONFIG_ENV_SIZE 0x2000 /* Total Size of Environment Sector */ | 144 | #define CONFIG_ENV_SIZE 0x2000 /* Total Size of Environment Sector */ |
145 | 145 | ||
146 | /* Address and size of Redundant Environment Sector */ | 146 | /* Address and size of Redundant Environment Sector */ |
147 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR-CONFIG_ENV_SECT_SIZE) | 147 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR-CONFIG_ENV_SECT_SIZE) |
148 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) | 148 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) |
149 | #endif | 149 | #endif |
150 | 150 | ||
151 | #ifdef CONFIG_ENV_IS_IN_EEPROM | 151 | #ifdef CONFIG_ENV_IS_IN_EEPROM |
152 | #define CONFIG_ENV_OFFSET 0 /* environment starts at the beginning of the EEPROM */ | 152 | #define CONFIG_ENV_OFFSET 0 /* environment starts at the beginning of the EEPROM */ |
153 | #define CONFIG_ENV_SIZE 0x1000 /* 4096 bytes may be used for env vars */ | 153 | #define CONFIG_ENV_SIZE 0x1000 /* 4096 bytes may be used for env vars */ |
154 | #endif | 154 | #endif |
155 | 155 | ||
156 | /* | 156 | /* |
157 | * IPL (Initial Program Loader, integrated inside CPU) | 157 | * IPL (Initial Program Loader, integrated inside CPU) |
158 | * Will load first 4k from NAND (SPL) into cache and execute it from there. | 158 | * Will load first 4k from NAND (SPL) into cache and execute it from there. |
159 | * | 159 | * |
160 | * SPL (Secondary Program Loader) | 160 | * SPL (Secondary Program Loader) |
161 | * Will load special U-Boot version (NUB) from NAND and execute it. This SPL | 161 | * Will load special U-Boot version (NUB) from NAND and execute it. This SPL |
162 | * has to fit into 4kByte. It sets up the CPU and configures the SDRAM | 162 | * has to fit into 4kByte. It sets up the CPU and configures the SDRAM |
163 | * controller and the NAND controller so that the special U-Boot image can be | 163 | * controller and the NAND controller so that the special U-Boot image can be |
164 | * loaded from NAND to SDRAM. | 164 | * loaded from NAND to SDRAM. |
165 | * | 165 | * |
166 | * NUB (NAND U-Boot) | 166 | * NUB (NAND U-Boot) |
167 | * This NAND U-Boot (NUB) is a special U-Boot version which can be started | 167 | * This NAND U-Boot (NUB) is a special U-Boot version which can be started |
168 | * from RAM. Therefore it mustn't (re-)configure the SDRAM controller. | 168 | * from RAM. Therefore it mustn't (re-)configure the SDRAM controller. |
169 | * | 169 | * |
170 | * On 440EPx the SPL is copied to SDRAM before the NAND controller is | 170 | * On 440EPx the SPL is copied to SDRAM before the NAND controller is |
171 | * set up. While still running from cache, I experienced problems accessing | 171 | * set up. While still running from cache, I experienced problems accessing |
172 | * the NAND controller. sr - 2006-08-25 | 172 | * the NAND controller. sr - 2006-08-25 |
173 | */ | 173 | */ |
174 | #if defined (CONFIG_NAND_U_BOOT) | 174 | #if defined (CONFIG_NAND_U_BOOT) |
175 | #define CONFIG_SYS_NAND_BOOT_SPL_SRC 0xfffff000 /* SPL location */ | 175 | #define CONFIG_SYS_NAND_BOOT_SPL_SRC 0xfffff000 /* SPL location */ |
176 | #define CONFIG_SYS_NAND_BOOT_SPL_SIZE (4 << 10) /* SPL size */ | 176 | #define CONFIG_SYS_NAND_BOOT_SPL_SIZE (4 << 10) /* SPL size */ |
177 | #define CONFIG_SYS_NAND_BOOT_SPL_DST (CONFIG_SYS_OCM_BASE + (12 << 10)) /* Copy SPL here */ | 177 | #define CONFIG_SYS_NAND_BOOT_SPL_DST (CONFIG_SYS_OCM_BASE + (12 << 10)) /* Copy SPL here */ |
178 | #define CONFIG_SYS_NAND_U_BOOT_DST 0x01000000 /* Load NUB to this addr */ | 178 | #define CONFIG_SYS_NAND_U_BOOT_DST 0x01000000 /* Load NUB to this addr */ |
179 | #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_NAND_U_BOOT_DST /* Start NUB from this addr */ | 179 | #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_NAND_U_BOOT_DST /* Start NUB from this addr */ |
180 | #define CONFIG_SYS_NAND_BOOT_SPL_DELTA (CONFIG_SYS_NAND_BOOT_SPL_SRC - CONFIG_SYS_NAND_BOOT_SPL_DST) | 180 | #define CONFIG_SYS_NAND_BOOT_SPL_DELTA (CONFIG_SYS_NAND_BOOT_SPL_SRC - CONFIG_SYS_NAND_BOOT_SPL_DST) |
181 | 181 | ||
182 | /* | 182 | /* |
183 | * Define the partitioning of the NAND chip (only RAM U-Boot is needed here) | 183 | * Define the partitioning of the NAND chip (only RAM U-Boot is needed here) |
184 | */ | 184 | */ |
185 | #define CONFIG_SYS_NAND_U_BOOT_OFFS (16 << 10) /* Offset to RAM U-Boot image */ | 185 | #define CONFIG_SYS_NAND_U_BOOT_OFFS (16 << 10) /* Offset to RAM U-Boot image */ |
186 | #define CONFIG_SYS_NAND_U_BOOT_SIZE (384 << 10) /* Size of RAM U-Boot image */ | 186 | #define CONFIG_SYS_NAND_U_BOOT_SIZE (384 << 10) /* Size of RAM U-Boot image */ |
187 | 187 | ||
188 | /* | 188 | /* |
189 | * Now the NAND chip has to be defined (no autodetection used!) | 189 | * Now the NAND chip has to be defined (no autodetection used!) |
190 | */ | 190 | */ |
191 | #define CONFIG_SYS_NAND_PAGE_SIZE 512 /* NAND chip page size */ | 191 | #define CONFIG_SYS_NAND_PAGE_SIZE 512 /* NAND chip page size */ |
192 | #define CONFIG_SYS_NAND_BLOCK_SIZE (16 << 10) /* NAND chip block size */ | 192 | #define CONFIG_SYS_NAND_BLOCK_SIZE (16 << 10) /* NAND chip block size */ |
193 | #define CONFIG_SYS_NAND_PAGE_COUNT 32 /* NAND chip page count */ | 193 | #define CONFIG_SYS_NAND_PAGE_COUNT 32 /* NAND chip page count */ |
194 | #define CONFIG_SYS_NAND_BAD_BLOCK_POS 5 /* Location of bad block marker */ | 194 | #define CONFIG_SYS_NAND_BAD_BLOCK_POS 5 /* Location of bad block marker */ |
195 | #undef CONFIG_SYS_NAND_4_ADDR_CYCLE /* No fourth addr used (<=32MB) */ | 195 | #undef CONFIG_SYS_NAND_4_ADDR_CYCLE /* No fourth addr used (<=32MB) */ |
196 | 196 | ||
197 | #define CONFIG_SYS_NAND_ECCSIZE 256 | 197 | #define CONFIG_SYS_NAND_ECCSIZE 256 |
198 | #define CONFIG_SYS_NAND_ECCBYTES 3 | 198 | #define CONFIG_SYS_NAND_ECCBYTES 3 |
199 | #define CONFIG_SYS_NAND_ECCSTEPS (CONFIG_SYS_NAND_PAGE_SIZE / CONFIG_SYS_NAND_ECCSIZE) | 199 | #define CONFIG_SYS_NAND_ECCSTEPS (CONFIG_SYS_NAND_PAGE_SIZE / CONFIG_SYS_NAND_ECCSIZE) |
200 | #define CONFIG_SYS_NAND_OOBSIZE 16 | 200 | #define CONFIG_SYS_NAND_OOBSIZE 16 |
201 | #define CONFIG_SYS_NAND_ECCTOTAL (CONFIG_SYS_NAND_ECCBYTES * CONFIG_SYS_NAND_ECCSTEPS) | 201 | #define CONFIG_SYS_NAND_ECCTOTAL (CONFIG_SYS_NAND_ECCBYTES * CONFIG_SYS_NAND_ECCSTEPS) |
202 | #define CONFIG_SYS_NAND_ECCPOS {0, 1, 2, 3, 6, 7} | 202 | #define CONFIG_SYS_NAND_ECCPOS {0, 1, 2, 3, 6, 7} |
203 | #endif | 203 | #endif |
204 | 204 | ||
205 | #ifdef CONFIG_ENV_IS_IN_NAND | 205 | #ifdef CONFIG_ENV_IS_IN_NAND |
206 | /* | 206 | /* |
207 | * For NAND booting the environment is embedded in the U-Boot image. Please take | 207 | * For NAND booting the environment is embedded in the U-Boot image. Please take |
208 | * look at the file board/amcc/sequoia/u-boot-nand.lds for details. | 208 | * look at the file board/amcc/sequoia/u-boot-nand.lds for details. |
209 | */ | 209 | */ |
210 | #define CONFIG_ENV_SIZE CONFIG_SYS_NAND_BLOCK_SIZE | 210 | #define CONFIG_ENV_SIZE CONFIG_SYS_NAND_BLOCK_SIZE |
211 | #define CONFIG_ENV_OFFSET (CONFIG_SYS_NAND_U_BOOT_OFFS + CONFIG_ENV_SIZE) | 211 | #define CONFIG_ENV_OFFSET (CONFIG_SYS_NAND_U_BOOT_OFFS + CONFIG_ENV_SIZE) |
212 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) | 212 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) |
213 | #endif | 213 | #endif |
214 | 214 | ||
215 | /*----------------------------------------------------------------------- | 215 | /*----------------------------------------------------------------------- |
216 | * DDR SDRAM | 216 | * DDR SDRAM |
217 | *----------------------------------------------------------------------*/ | 217 | *----------------------------------------------------------------------*/ |
218 | #define CONFIG_SYS_MBYTES_SDRAM (256) /* 256MB */ | 218 | #define CONFIG_SYS_MBYTES_SDRAM (256) /* 256MB */ |
219 | #if !defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL) | 219 | #if !defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL) |
220 | #define CONFIG_DDR_DATA_EYE /* use DDR2 optimization */ | 220 | #define CONFIG_DDR_DATA_EYE /* use DDR2 optimization */ |
221 | #endif | 221 | #endif |
222 | #define CONFIG_SYS_MEM_TOP_HIDE (4 << 10) /* don't use last 4kbytes */ | 222 | #define CONFIG_SYS_MEM_TOP_HIDE (4 << 10) /* don't use last 4kbytes */ |
223 | /* 440EPx errata CHIP 11 */ | 223 | /* 440EPx errata CHIP 11 */ |
224 | 224 | ||
225 | /*----------------------------------------------------------------------- | 225 | /*----------------------------------------------------------------------- |
226 | * I2C | 226 | * I2C |
227 | *----------------------------------------------------------------------*/ | 227 | *----------------------------------------------------------------------*/ |
228 | #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ | 228 | #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ |
229 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ | 229 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ |
230 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ | 230 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ |
231 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 231 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
232 | 232 | ||
233 | #define CONFIG_I2C_CMD_TREE 1 | ||
234 | #define CONFIG_I2C_MULTI_BUS 1 | 233 | #define CONFIG_I2C_MULTI_BUS 1 |
235 | 234 | ||
236 | #define CONFIG_SYS_I2C_MULTI_EEPROMS | 235 | #define CONFIG_SYS_I2C_MULTI_EEPROMS |
237 | 236 | ||
238 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x54 | 237 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x54 |
239 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 | 238 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 |
240 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5 | 239 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5 |
241 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 | 240 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 |
242 | #define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW 0x01 | 241 | #define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW 0x01 |
243 | 242 | ||
244 | #define CONFIG_SYS_EEPROM_WREN 1 | 243 | #define CONFIG_SYS_EEPROM_WREN 1 |
245 | #define CONFIG_SYS_I2C_BOOT_EEPROM_ADDR 0x52 | 244 | #define CONFIG_SYS_I2C_BOOT_EEPROM_ADDR 0x52 |
246 | 245 | ||
247 | /* | 246 | /* |
248 | * standard dtt sensor configuration - bottom bit will determine local or | 247 | * standard dtt sensor configuration - bottom bit will determine local or |
249 | * remote sensor of the TMP401 | 248 | * remote sensor of the TMP401 |
250 | */ | 249 | */ |
251 | #define CONFIG_DTT_SENSORS { 0, 1 } | 250 | #define CONFIG_DTT_SENSORS { 0, 1 } |
252 | 251 | ||
253 | /* | 252 | /* |
254 | * The PMC440 uses a TI TMP401 temperature sensor. This part | 253 | * The PMC440 uses a TI TMP401 temperature sensor. This part |
255 | * is basically compatible to the ADM1021 that is supported | 254 | * is basically compatible to the ADM1021 that is supported |
256 | * by U-Boot. | 255 | * by U-Boot. |
257 | * | 256 | * |
258 | * - i2c addr 0x4c | 257 | * - i2c addr 0x4c |
259 | * - conversion rate 0x02 = 0.25 conversions/second | 258 | * - conversion rate 0x02 = 0.25 conversions/second |
260 | * - ALERT ouput disabled | 259 | * - ALERT ouput disabled |
261 | * - local temp sensor enabled, min set to 0 deg, max set to 70 deg | 260 | * - local temp sensor enabled, min set to 0 deg, max set to 70 deg |
262 | * - remote temp sensor enabled, min set to 0 deg, max set to 70 deg | 261 | * - remote temp sensor enabled, min set to 0 deg, max set to 70 deg |
263 | */ | 262 | */ |
264 | #define CONFIG_DTT_ADM1021 | 263 | #define CONFIG_DTT_ADM1021 |
265 | #define CONFIG_SYS_DTT_ADM1021 { { 0x4c, 0x02, 0, 1, 70, 0, 1, 70, 0} } | 264 | #define CONFIG_SYS_DTT_ADM1021 { { 0x4c, 0x02, 0, 1, 70, 0, 1, 70, 0} } |
266 | 265 | ||
267 | #define CONFIG_PREBOOT "echo Add \\\"run fpga\\\" and " \ | 266 | #define CONFIG_PREBOOT "echo Add \\\"run fpga\\\" and " \ |
268 | "\\\"painit\\\" to preboot command" | 267 | "\\\"painit\\\" to preboot command" |
269 | 268 | ||
270 | #undef CONFIG_BOOTARGS | 269 | #undef CONFIG_BOOTARGS |
271 | 270 | ||
272 | /* Setup some board specific values for the default environment variables */ | 271 | /* Setup some board specific values for the default environment variables */ |
273 | #define CONFIG_HOSTNAME pmc440 | 272 | #define CONFIG_HOSTNAME pmc440 |
274 | #define CONFIG_SYS_BOOTFILE "bootfile=/tftpboot/pmc440/uImage\0" | 273 | #define CONFIG_SYS_BOOTFILE "bootfile=/tftpboot/pmc440/uImage\0" |
275 | #define CONFIG_SYS_ROOTPATH "rootpath=/opt/eldk/ppc_4xxFP\0" | 274 | #define CONFIG_SYS_ROOTPATH "rootpath=/opt/eldk/ppc_4xxFP\0" |
276 | 275 | ||
277 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 276 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
278 | CONFIG_SYS_BOOTFILE \ | 277 | CONFIG_SYS_BOOTFILE \ |
279 | CONFIG_SYS_ROOTPATH \ | 278 | CONFIG_SYS_ROOTPATH \ |
280 | "fdt_file=/tftpboot/pmc440/pmc440.dtb\0" \ | 279 | "fdt_file=/tftpboot/pmc440/pmc440.dtb\0" \ |
281 | "netdev=eth0\0" \ | 280 | "netdev=eth0\0" \ |
282 | "ethrotate=no\0" \ | 281 | "ethrotate=no\0" \ |
283 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ | 282 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
284 | "nfsroot=${serverip}:${rootpath}\0" \ | 283 | "nfsroot=${serverip}:${rootpath}\0" \ |
285 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ | 284 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ |
286 | "addip=setenv bootargs ${bootargs} " \ | 285 | "addip=setenv bootargs ${bootargs} " \ |
287 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ | 286 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ |
288 | ":${hostname}:${netdev}:off panic=1\0" \ | 287 | ":${hostname}:${netdev}:off panic=1\0" \ |
289 | "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0" \ | 288 | "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0" \ |
290 | "addmisc=setenv bootargs ${bootargs} mem=${mem}\0" \ | 289 | "addmisc=setenv bootargs ${bootargs} mem=${mem}\0" \ |
291 | "nandargs=setenv bootargs root=/dev/mtdblock6 rootfstype=jffs2 rw\0" \ | 290 | "nandargs=setenv bootargs root=/dev/mtdblock6 rootfstype=jffs2 rw\0" \ |
292 | "nand_boot=run nandargs addip addtty addmisc;bootm ${kernel_addr}\0" \ | 291 | "nand_boot=run nandargs addip addtty addmisc;bootm ${kernel_addr}\0" \ |
293 | "nand_boot_fdt=run nandargs addip addtty addmisc;" \ | 292 | "nand_boot_fdt=run nandargs addip addtty addmisc;" \ |
294 | "bootm ${kernel_addr} - ${fdt_addr}\0" \ | 293 | "bootm ${kernel_addr} - ${fdt_addr}\0" \ |
295 | "net_nfs=tftp ${kernel_addr_r} ${bootfile};" \ | 294 | "net_nfs=tftp ${kernel_addr_r} ${bootfile};" \ |
296 | "run nfsargs addip addtty addmisc;" \ | 295 | "run nfsargs addip addtty addmisc;" \ |
297 | "bootm\0" \ | 296 | "bootm\0" \ |
298 | "net_nfs_fdt=tftp ${kernel_addr_r} ${bootfile};" \ | 297 | "net_nfs_fdt=tftp ${kernel_addr_r} ${bootfile};" \ |
299 | "tftp ${fdt_addr_r} ${fdt_file};" \ | 298 | "tftp ${fdt_addr_r} ${fdt_file};" \ |
300 | "run nfsargs addip addtty addmisc;" \ | 299 | "run nfsargs addip addtty addmisc;" \ |
301 | "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ | 300 | "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ |
302 | "kernel_addr=ffc00000\0" \ | 301 | "kernel_addr=ffc00000\0" \ |
303 | "kernel_addr_r=200000\0" \ | 302 | "kernel_addr_r=200000\0" \ |
304 | "fpga_addr=fff00000\0" \ | 303 | "fpga_addr=fff00000\0" \ |
305 | "fdt_addr=fff80000\0" \ | 304 | "fdt_addr=fff80000\0" \ |
306 | "fdt_addr_r=800000\0" \ | 305 | "fdt_addr_r=800000\0" \ |
307 | "fpga=fpga loadb 0 ${fpga_addr}\0" \ | 306 | "fpga=fpga loadb 0 ${fpga_addr}\0" \ |
308 | "load=tftp 200000 /tftpboot/pmc440/u-boot.bin\0" \ | 307 | "load=tftp 200000 /tftpboot/pmc440/u-boot.bin\0" \ |
309 | "update=protect off fffa0000 ffffffff;era fffa0000 ffffffff;" \ | 308 | "update=protect off fffa0000 ffffffff;era fffa0000 ffffffff;" \ |
310 | "cp.b 200000 fffa0000 60000\0" \ | 309 | "cp.b 200000 fffa0000 60000\0" \ |
311 | "" | 310 | "" |
312 | 311 | ||
313 | #define CONFIG_BOOTDELAY 3 /* autoboot after 3 seconds */ | 312 | #define CONFIG_BOOTDELAY 3 /* autoboot after 3 seconds */ |
314 | 313 | ||
315 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ | 314 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
316 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ | 315 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
317 | 316 | ||
318 | #define CONFIG_PPC4xx_EMAC | 317 | #define CONFIG_PPC4xx_EMAC |
319 | #define CONFIG_IBM_EMAC4_V4 1 | 318 | #define CONFIG_IBM_EMAC4_V4 1 |
320 | #define CONFIG_MII 1 /* MII PHY management */ | 319 | #define CONFIG_MII 1 /* MII PHY management */ |
321 | #define CONFIG_PHY_ADDR 0 /* PHY address, See schematics */ | 320 | #define CONFIG_PHY_ADDR 0 /* PHY address, See schematics */ |
322 | 321 | ||
323 | #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */ | 322 | #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */ |
324 | 323 | ||
325 | #define CONFIG_HAS_ETH0 | 324 | #define CONFIG_HAS_ETH0 |
326 | #define CONFIG_SYS_RX_ETH_BUFFER 32 /* Number of ethernet rx buffers & descriptors */ | 325 | #define CONFIG_SYS_RX_ETH_BUFFER 32 /* Number of ethernet rx buffers & descriptors */ |
327 | 326 | ||
328 | #define CONFIG_NET_MULTI 1 | 327 | #define CONFIG_NET_MULTI 1 |
329 | #define CONFIG_HAS_ETH1 1 /* add support for "eth1addr" */ | 328 | #define CONFIG_HAS_ETH1 1 /* add support for "eth1addr" */ |
330 | #define CONFIG_PHY1_ADDR 1 | 329 | #define CONFIG_PHY1_ADDR 1 |
331 | #define CONFIG_RESET_PHY_R 1 | 330 | #define CONFIG_RESET_PHY_R 1 |
332 | 331 | ||
333 | /* USB */ | 332 | /* USB */ |
334 | #define CONFIG_USB_OHCI_NEW | 333 | #define CONFIG_USB_OHCI_NEW |
335 | #define CONFIG_USB_STORAGE | 334 | #define CONFIG_USB_STORAGE |
336 | #define CONFIG_SYS_OHCI_BE_CONTROLLER | 335 | #define CONFIG_SYS_OHCI_BE_CONTROLLER |
337 | 336 | ||
338 | #define CONFIG_SYS_USB_OHCI_BOARD_INIT 1 | 337 | #define CONFIG_SYS_USB_OHCI_BOARD_INIT 1 |
339 | #define CONFIG_SYS_USB_OHCI_CPU_INIT 1 | 338 | #define CONFIG_SYS_USB_OHCI_CPU_INIT 1 |
340 | #define CONFIG_SYS_USB_OHCI_REGS_BASE CONFIG_SYS_USB_HOST | 339 | #define CONFIG_SYS_USB_OHCI_REGS_BASE CONFIG_SYS_USB_HOST |
341 | #define CONFIG_SYS_USB_OHCI_SLOT_NAME "ppc440" | 340 | #define CONFIG_SYS_USB_OHCI_SLOT_NAME "ppc440" |
342 | #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15 | 341 | #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15 |
343 | 342 | ||
344 | /* Comment this out to enable USB 1.1 device */ | 343 | /* Comment this out to enable USB 1.1 device */ |
345 | #define USB_2_0_DEVICE | 344 | #define USB_2_0_DEVICE |
346 | 345 | ||
347 | /* Partitions */ | 346 | /* Partitions */ |
348 | #define CONFIG_MAC_PARTITION | 347 | #define CONFIG_MAC_PARTITION |
349 | #define CONFIG_DOS_PARTITION | 348 | #define CONFIG_DOS_PARTITION |
350 | #define CONFIG_ISO_PARTITION | 349 | #define CONFIG_ISO_PARTITION |
351 | 350 | ||
352 | #include <config_cmd_default.h> | 351 | #include <config_cmd_default.h> |
353 | 352 | ||
354 | #define CONFIG_CMD_BSP | 353 | #define CONFIG_CMD_BSP |
355 | #define CONFIG_CMD_DATE | 354 | #define CONFIG_CMD_DATE |
356 | #define CONFIG_CMD_ASKENV | 355 | #define CONFIG_CMD_ASKENV |
357 | #define CONFIG_CMD_DHCP | 356 | #define CONFIG_CMD_DHCP |
358 | #define CONFIG_CMD_DTT | 357 | #define CONFIG_CMD_DTT |
359 | #define CONFIG_CMD_DIAG | 358 | #define CONFIG_CMD_DIAG |
360 | #define CONFIG_CMD_EEPROM | 359 | #define CONFIG_CMD_EEPROM |
361 | #define CONFIG_CMD_ELF | 360 | #define CONFIG_CMD_ELF |
362 | #define CONFIG_CMD_FAT | 361 | #define CONFIG_CMD_FAT |
363 | #define CONFIG_CMD_I2C | 362 | #define CONFIG_CMD_I2C |
364 | #define CONFIG_CMD_IRQ | 363 | #define CONFIG_CMD_IRQ |
365 | #define CONFIG_CMD_MII | 364 | #define CONFIG_CMD_MII |
366 | #define CONFIG_CMD_NAND | 365 | #define CONFIG_CMD_NAND |
367 | #define CONFIG_CMD_NET | 366 | #define CONFIG_CMD_NET |
368 | #define CONFIG_CMD_NFS | 367 | #define CONFIG_CMD_NFS |
369 | #define CONFIG_CMD_PCI | 368 | #define CONFIG_CMD_PCI |
370 | #define CONFIG_CMD_PING | 369 | #define CONFIG_CMD_PING |
371 | #define CONFIG_CMD_USB | 370 | #define CONFIG_CMD_USB |
372 | #define CONFIG_CMD_REGINFO | 371 | #define CONFIG_CMD_REGINFO |
373 | #define CONFIG_CMD_SDRAM | 372 | #define CONFIG_CMD_SDRAM |
374 | 373 | ||
375 | /* POST support */ | 374 | /* POST support */ |
376 | #define CONFIG_POST (CONFIG_SYS_POST_MEMORY | \ | 375 | #define CONFIG_POST (CONFIG_SYS_POST_MEMORY | \ |
377 | CONFIG_SYS_POST_CPU | \ | 376 | CONFIG_SYS_POST_CPU | \ |
378 | CONFIG_SYS_POST_UART | \ | 377 | CONFIG_SYS_POST_UART | \ |
379 | CONFIG_SYS_POST_I2C | \ | 378 | CONFIG_SYS_POST_I2C | \ |
380 | CONFIG_SYS_POST_CACHE | \ | 379 | CONFIG_SYS_POST_CACHE | \ |
381 | CONFIG_SYS_POST_FPU | \ | 380 | CONFIG_SYS_POST_FPU | \ |
382 | CONFIG_SYS_POST_ETHER | \ | 381 | CONFIG_SYS_POST_ETHER | \ |
383 | CONFIG_SYS_POST_SPR) | 382 | CONFIG_SYS_POST_SPR) |
384 | 383 | ||
385 | #define CONFIG_SYS_POST_WORD_ADDR (CONFIG_SYS_GBL_DATA_OFFSET - 0x4) | 384 | #define CONFIG_SYS_POST_WORD_ADDR (CONFIG_SYS_GBL_DATA_OFFSET - 0x4) |
386 | #define CONFIG_LOGBUFFER | 385 | #define CONFIG_LOGBUFFER |
387 | #define CONFIG_SYS_POST_CACHE_ADDR 0x7fff0000 /* free virtual address */ | 386 | #define CONFIG_SYS_POST_CACHE_ADDR 0x7fff0000 /* free virtual address */ |
388 | 387 | ||
389 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV /* Otherwise it catches logbuffer as output */ | 388 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV /* Otherwise it catches logbuffer as output */ |
390 | 389 | ||
391 | #define CONFIG_SUPPORT_VFAT | 390 | #define CONFIG_SUPPORT_VFAT |
392 | 391 | ||
393 | /*----------------------------------------------------------------------- | 392 | /*----------------------------------------------------------------------- |
394 | * Miscellaneous configurable options | 393 | * Miscellaneous configurable options |
395 | *----------------------------------------------------------------------*/ | 394 | *----------------------------------------------------------------------*/ |
396 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 395 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
397 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | 396 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
398 | #if defined(CONFIG_CMD_KGDB) | 397 | #if defined(CONFIG_CMD_KGDB) |
399 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ | 398 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
400 | #else | 399 | #else |
401 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | 400 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
402 | #endif | 401 | #endif |
403 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) | 402 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) |
404 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 403 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
405 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | 404 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
406 | 405 | ||
407 | #define CONFIG_SYS_MEMTEST_START 0x0400000 /* memtest works on */ | 406 | #define CONFIG_SYS_MEMTEST_START 0x0400000 /* memtest works on */ |
408 | #define CONFIG_SYS_MEMTEST_END 0x0C00000 /* 4 ... 12 MB in DRAM */ | 407 | #define CONFIG_SYS_MEMTEST_END 0x0C00000 /* 4 ... 12 MB in DRAM */ |
409 | 408 | ||
410 | #define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */ | 409 | #define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */ |
411 | #define CONFIG_SYS_EXTBDINFO 1 /* To use extended board_into (bd_t) */ | 410 | #define CONFIG_SYS_EXTBDINFO 1 /* To use extended board_into (bd_t) */ |
412 | 411 | ||
413 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ | 412 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ |
414 | 413 | ||
415 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ | 414 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ |
416 | #define CONFIG_LOOPW 1 /* enable loopw command */ | 415 | #define CONFIG_LOOPW 1 /* enable loopw command */ |
417 | #define CONFIG_MX_CYCLIC 1 /* enable mdc/mwc commands */ | 416 | #define CONFIG_MX_CYCLIC 1 /* enable mdc/mwc commands */ |
418 | #define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */ | 417 | #define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */ |
419 | #define CONFIG_VERSION_VARIABLE 1 /* include version env variable */ | 418 | #define CONFIG_VERSION_VARIABLE 1 /* include version env variable */ |
420 | 419 | ||
421 | #define CONFIG_AUTOBOOT_KEYED 1 | 420 | #define CONFIG_AUTOBOOT_KEYED 1 |
422 | #define CONFIG_AUTOBOOT_PROMPT \ | 421 | #define CONFIG_AUTOBOOT_PROMPT \ |
423 | "Press SPACE to abort autoboot in %d seconds\n", bootdelay | 422 | "Press SPACE to abort autoboot in %d seconds\n", bootdelay |
424 | #undef CONFIG_AUTOBOOT_DELAY_STR | 423 | #undef CONFIG_AUTOBOOT_DELAY_STR |
425 | #define CONFIG_AUTOBOOT_STOP_STR " " | 424 | #define CONFIG_AUTOBOOT_STOP_STR " " |
426 | 425 | ||
427 | /*----------------------------------------------------------------------- | 426 | /*----------------------------------------------------------------------- |
428 | * PCI stuff | 427 | * PCI stuff |
429 | *----------------------------------------------------------------------*/ | 428 | *----------------------------------------------------------------------*/ |
430 | /* General PCI */ | 429 | /* General PCI */ |
431 | #define CONFIG_PCI /* include pci support */ | 430 | #define CONFIG_PCI /* include pci support */ |
432 | #define CONFIG_PCI_PNP /* do (not) pci plug-and-play */ | 431 | #define CONFIG_PCI_PNP /* do (not) pci plug-and-play */ |
433 | #define CONFIG_SYS_PCI_CACHE_LINE_SIZE 0 /* to avoid problems with PNP */ | 432 | #define CONFIG_SYS_PCI_CACHE_LINE_SIZE 0 /* to avoid problems with PNP */ |
434 | #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ | 433 | #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ |
435 | #define CONFIG_SYS_PCI_TARGBASE 0x80000000 /* PCIaddr mapped to CONFIG_SYS_PCI_MEMBASE */ | 434 | #define CONFIG_SYS_PCI_TARGBASE 0x80000000 /* PCIaddr mapped to CONFIG_SYS_PCI_MEMBASE */ |
436 | 435 | ||
437 | /* Board-specific PCI */ | 436 | /* Board-specific PCI */ |
438 | #define CONFIG_SYS_PCI_TARGET_INIT | 437 | #define CONFIG_SYS_PCI_TARGET_INIT |
439 | #define CONFIG_SYS_PCI_MASTER_INIT | 438 | #define CONFIG_SYS_PCI_MASTER_INIT |
440 | 439 | ||
441 | /* PCI identification */ | 440 | /* PCI identification */ |
442 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x12FE /* PCI Vendor ID: esd gmbh */ | 441 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x12FE /* PCI Vendor ID: esd gmbh */ |
443 | #define CONFIG_SYS_PCI_SUBSYS_ID_NONMONARCH 0x0441 /* PCI Device ID: Non-Monarch */ | 442 | #define CONFIG_SYS_PCI_SUBSYS_ID_NONMONARCH 0x0441 /* PCI Device ID: Non-Monarch */ |
444 | #define CONFIG_SYS_PCI_SUBSYS_ID_MONARCH 0x0440 /* PCI Device ID: Monarch */ | 443 | #define CONFIG_SYS_PCI_SUBSYS_ID_MONARCH 0x0440 /* PCI Device ID: Monarch */ |
445 | #define CONFIG_SYS_PCI_CLASSCODE_NONMONARCH PCI_CLASS_PROCESSOR_POWERPC | 444 | #define CONFIG_SYS_PCI_CLASSCODE_NONMONARCH PCI_CLASS_PROCESSOR_POWERPC |
446 | #define CONFIG_SYS_PCI_CLASSCODE_MONARCH PCI_CLASS_BRIDGE_HOST | 445 | #define CONFIG_SYS_PCI_CLASSCODE_MONARCH PCI_CLASS_BRIDGE_HOST |
447 | 446 | ||
448 | /* | 447 | /* |
449 | * For booting Linux, the board info and command line data | 448 | * For booting Linux, the board info and command line data |
450 | * have to be in the first 8 MB of memory, since this is | 449 | * have to be in the first 8 MB of memory, since this is |
451 | * the maximum mapped by the Linux kernel during initialization. | 450 | * the maximum mapped by the Linux kernel during initialization. |
452 | */ | 451 | */ |
453 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ | 452 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ |
454 | 453 | ||
455 | /*----------------------------------------------------------------------- | 454 | /*----------------------------------------------------------------------- |
456 | * FPGA stuff | 455 | * FPGA stuff |
457 | *----------------------------------------------------------------------*/ | 456 | *----------------------------------------------------------------------*/ |
458 | #define CONFIG_FPGA | 457 | #define CONFIG_FPGA |
459 | #define CONFIG_FPGA_XILINX | 458 | #define CONFIG_FPGA_XILINX |
460 | #define CONFIG_FPGA_SPARTAN2 | 459 | #define CONFIG_FPGA_SPARTAN2 |
461 | #define CONFIG_FPGA_SPARTAN3 | 460 | #define CONFIG_FPGA_SPARTAN3 |
462 | 461 | ||
463 | #define CONFIG_FPGA_COUNT 2 | 462 | #define CONFIG_FPGA_COUNT 2 |
464 | /*----------------------------------------------------------------------- | 463 | /*----------------------------------------------------------------------- |
465 | * External Bus Controller (EBC) Setup | 464 | * External Bus Controller (EBC) Setup |
466 | *----------------------------------------------------------------------*/ | 465 | *----------------------------------------------------------------------*/ |
467 | 466 | ||
468 | /* | 467 | /* |
469 | * On Sequoia CS0 and CS3 are switched when configuring for NAND booting | 468 | * On Sequoia CS0 and CS3 are switched when configuring for NAND booting |
470 | */ | 469 | */ |
471 | #if !defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL) | 470 | #if !defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL) |
472 | #define CONFIG_SYS_NAND_CS 2 /* NAND chip connected to CSx */ | 471 | #define CONFIG_SYS_NAND_CS 2 /* NAND chip connected to CSx */ |
473 | 472 | ||
474 | /* Memory Bank 0 (NOR-FLASH) initialization */ | 473 | /* Memory Bank 0 (NOR-FLASH) initialization */ |
475 | #define CONFIG_SYS_EBC_PB0AP 0x03017200 | 474 | #define CONFIG_SYS_EBC_PB0AP 0x03017200 |
476 | #define CONFIG_SYS_EBC_PB0CR (CONFIG_SYS_FLASH_BASE | 0xda000) | 475 | #define CONFIG_SYS_EBC_PB0CR (CONFIG_SYS_FLASH_BASE | 0xda000) |
477 | 476 | ||
478 | /* Memory Bank 2 (NAND-FLASH) initialization */ | 477 | /* Memory Bank 2 (NAND-FLASH) initialization */ |
479 | #define CONFIG_SYS_EBC_PB2AP 0x018003c0 | 478 | #define CONFIG_SYS_EBC_PB2AP 0x018003c0 |
480 | #define CONFIG_SYS_EBC_PB2CR (CONFIG_SYS_NAND_ADDR | 0x1c000) | 479 | #define CONFIG_SYS_EBC_PB2CR (CONFIG_SYS_NAND_ADDR | 0x1c000) |
481 | #else | 480 | #else |
482 | #define CONFIG_SYS_NAND_CS 0 /* NAND chip connected to CSx */ | 481 | #define CONFIG_SYS_NAND_CS 0 /* NAND chip connected to CSx */ |
483 | /* Memory Bank 2 (NOR-FLASH) initialization */ | 482 | /* Memory Bank 2 (NOR-FLASH) initialization */ |
484 | #define CONFIG_SYS_EBC_PB2AP 0x03017200 | 483 | #define CONFIG_SYS_EBC_PB2AP 0x03017200 |
485 | #define CONFIG_SYS_EBC_PB2CR (CONFIG_SYS_FLASH_BASE | 0xda000) | 484 | #define CONFIG_SYS_EBC_PB2CR (CONFIG_SYS_FLASH_BASE | 0xda000) |
486 | 485 | ||
487 | /* Memory Bank 0 (NAND-FLASH) initialization */ | 486 | /* Memory Bank 0 (NAND-FLASH) initialization */ |
488 | #define CONFIG_SYS_EBC_PB0AP 0x018003c0 | 487 | #define CONFIG_SYS_EBC_PB0AP 0x018003c0 |
489 | #define CONFIG_SYS_EBC_PB0CR (CONFIG_SYS_NAND_ADDR | 0x1c000) | 488 | #define CONFIG_SYS_EBC_PB0CR (CONFIG_SYS_NAND_ADDR | 0x1c000) |
490 | #endif | 489 | #endif |
491 | 490 | ||
492 | /* Memory Bank 1 (RESET) initialization */ | 491 | /* Memory Bank 1 (RESET) initialization */ |
493 | #define CONFIG_SYS_EBC_PB1AP 0x7f817200 /* 0x03017200 */ | 492 | #define CONFIG_SYS_EBC_PB1AP 0x7f817200 /* 0x03017200 */ |
494 | #define CONFIG_SYS_EBC_PB1CR (CONFIG_SYS_RESET_BASE | 0x1c000) | 493 | #define CONFIG_SYS_EBC_PB1CR (CONFIG_SYS_RESET_BASE | 0x1c000) |
495 | 494 | ||
496 | /* Memory Bank 4 (FPGA / 32Bit) initialization */ | 495 | /* Memory Bank 4 (FPGA / 32Bit) initialization */ |
497 | #define CONFIG_SYS_EBC_PB4AP 0x03840f40 /* BME=0,TWT=7,CSN=1,TH=7,RE=1,SOR=0,BEM=1 */ | 496 | #define CONFIG_SYS_EBC_PB4AP 0x03840f40 /* BME=0,TWT=7,CSN=1,TH=7,RE=1,SOR=0,BEM=1 */ |
498 | #define CONFIG_SYS_EBC_PB4CR (CONFIG_SYS_FPGA_BASE0 | 0x1c000) /* BS=1M,BU=R/W,BW=32bit */ | 497 | #define CONFIG_SYS_EBC_PB4CR (CONFIG_SYS_FPGA_BASE0 | 0x1c000) /* BS=1M,BU=R/W,BW=32bit */ |
499 | 498 | ||
500 | /* Memory Bank 5 (FPGA / 16Bit) initialization */ | 499 | /* Memory Bank 5 (FPGA / 16Bit) initialization */ |
501 | #define CONFIG_SYS_EBC_PB5AP 0x03840f40 /* BME=0,TWT=3,CSN=1,TH=0,RE=1,SOR=0,BEM=1 */ | 500 | #define CONFIG_SYS_EBC_PB5AP 0x03840f40 /* BME=0,TWT=3,CSN=1,TH=0,RE=1,SOR=0,BEM=1 */ |
502 | #define CONFIG_SYS_EBC_PB5CR (CONFIG_SYS_FPGA_BASE1 | 0x1a000) /* BS=1M,BU=R/W,BW=16bit */ | 501 | #define CONFIG_SYS_EBC_PB5CR (CONFIG_SYS_FPGA_BASE1 | 0x1a000) /* BS=1M,BU=R/W,BW=16bit */ |
503 | 502 | ||
504 | /*----------------------------------------------------------------------- | 503 | /*----------------------------------------------------------------------- |
505 | * NAND FLASH | 504 | * NAND FLASH |
506 | *----------------------------------------------------------------------*/ | 505 | *----------------------------------------------------------------------*/ |
507 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 | 506 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
508 | #define CONFIG_SYS_NAND_BASE (CONFIG_SYS_NAND_ADDR + CONFIG_SYS_NAND_CS) | 507 | #define CONFIG_SYS_NAND_BASE (CONFIG_SYS_NAND_ADDR + CONFIG_SYS_NAND_CS) |
509 | #define CONFIG_SYS_NAND_SELECT_DEVICE 1 /* nand driver supports mutipl. chips */ | 508 | #define CONFIG_SYS_NAND_SELECT_DEVICE 1 /* nand driver supports mutipl. chips */ |
510 | #define CONFIG_SYS_NAND_QUIET_TEST 1 | 509 | #define CONFIG_SYS_NAND_QUIET_TEST 1 |
511 | 510 | ||
512 | /* | 511 | /* |
513 | * Internal Definitions | 512 | * Internal Definitions |
514 | * | 513 | * |
515 | * Boot Flags | 514 | * Boot Flags |
516 | */ | 515 | */ |
517 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 516 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
518 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 517 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
519 | 518 | ||
520 | #if defined(CONFIG_CMD_KGDB) | 519 | #if defined(CONFIG_CMD_KGDB) |
521 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ | 520 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ |
522 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ | 521 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ |
523 | #endif | 522 | #endif |
524 | 523 | ||
525 | /* pass open firmware flat tree */ | 524 | /* pass open firmware flat tree */ |
526 | #define CONFIG_OF_LIBFDT 1 | 525 | #define CONFIG_OF_LIBFDT 1 |
527 | #define CONFIG_OF_BOARD_SETUP 1 | 526 | #define CONFIG_OF_BOARD_SETUP 1 |
528 | 527 | ||
529 | #define CONFIG_API 1 | 528 | #define CONFIG_API 1 |
530 | 529 | ||
531 | #endif /* __CONFIG_H */ | 530 | #endif /* __CONFIG_H */ |
532 | 531 |
include/configs/SIMPC8313.h
1 | /* | 1 | /* |
2 | * Copyright (C) Sheldon Instruments, Inc. 2008 | 2 | * Copyright (C) Sheldon Instruments, Inc. 2008 |
3 | * | 3 | * |
4 | * See file CREDITS for list of people who contributed to this | 4 | * See file CREDITS for list of people who contributed to this |
5 | * project. | 5 | * project. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License as | 8 | * modify it under the terms of the GNU General Public License as |
9 | * published by the Free Software Foundation; either version 2 of | 9 | * published by the Free Software Foundation; either version 2 of |
10 | * the License, or (at your option) any later version. | 10 | * the License, or (at your option) any later version. |
11 | * | 11 | * |
12 | * This program is distributed in the hope that it will be useful, | 12 | * This program is distributed in the hope that it will be useful, |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
16 | * | 16 | * |
17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License |
18 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
20 | * MA 02111-1307 USA | 20 | * MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | /* | 22 | /* |
23 | * simpc8313 board configuration file | 23 | * simpc8313 board configuration file |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #ifndef __CONFIG_H | 26 | #ifndef __CONFIG_H |
27 | #define __CONFIG_H | 27 | #define __CONFIG_H |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * High Level Configuration Options | 30 | * High Level Configuration Options |
31 | */ | 31 | */ |
32 | #define CONFIG_NAND_U_BOOT | 32 | #define CONFIG_NAND_U_BOOT |
33 | 33 | ||
34 | #define CONFIG_E300 1 | 34 | #define CONFIG_E300 1 |
35 | #define CONFIG_MPC83XX 1 | 35 | #define CONFIG_MPC83XX 1 |
36 | #define CONFIG_MPC831X 1 | 36 | #define CONFIG_MPC831X 1 |
37 | #define CONFIG_MPC8313 1 | 37 | #define CONFIG_MPC8313 1 |
38 | 38 | ||
39 | #define CONFIG_PCI | 39 | #define CONFIG_PCI |
40 | #define CONFIG_83XX_GENERIC_PCI | 40 | #define CONFIG_83XX_GENERIC_PCI |
41 | 41 | ||
42 | #define CONFIG_MISC_INIT_R | 42 | #define CONFIG_MISC_INIT_R |
43 | 43 | ||
44 | /* | 44 | /* |
45 | * On-board devices | 45 | * On-board devices |
46 | * | 46 | * |
47 | * TSEC1 is Marvell PHY 88E1118 | 47 | * TSEC1 is Marvell PHY 88E1118 |
48 | */ | 48 | */ |
49 | 49 | ||
50 | #define CONFIG_SYS_33MHZ | 50 | #define CONFIG_SYS_33MHZ |
51 | 51 | ||
52 | #define CONFIG_83XX_CLKIN 33333333 /* in Hz */ | 52 | #define CONFIG_83XX_CLKIN 33333333 /* in Hz */ |
53 | 53 | ||
54 | #define CONFIG_SYS_CLK_FREQ CONFIG_83XX_CLKIN | 54 | #define CONFIG_SYS_CLK_FREQ CONFIG_83XX_CLKIN |
55 | 55 | ||
56 | #define CONFIG_SYS_IMMR 0xE0000000 | 56 | #define CONFIG_SYS_IMMR 0xE0000000 |
57 | 57 | ||
58 | #if defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL) | 58 | #if defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL) |
59 | #define CONFIG_DEFAULT_IMMR CONFIG_SYS_IMMR | 59 | #define CONFIG_DEFAULT_IMMR CONFIG_SYS_IMMR |
60 | #endif | 60 | #endif |
61 | 61 | ||
62 | #define CONFIG_SYS_MEMTEST_START 0x00001000 | 62 | #define CONFIG_SYS_MEMTEST_START 0x00001000 |
63 | #define CONFIG_SYS_MEMTEST_END 0x07f00000 | 63 | #define CONFIG_SYS_MEMTEST_END 0x07f00000 |
64 | 64 | ||
65 | #define CONFIG_SYS_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */ | 65 | #define CONFIG_SYS_ACR_PIPE_DEP 3 /* Arbiter pipeline depth (0-3) */ |
66 | #define CONFIG_SYS_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */ | 66 | #define CONFIG_SYS_ACR_RPTCNT 3 /* Arbiter repeat count (0-7) */ |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * Device configurations | 69 | * Device configurations |
70 | */ | 70 | */ |
71 | #define CONFIG_TSEC1 | 71 | #define CONFIG_TSEC1 |
72 | 72 | ||
73 | /* | 73 | /* |
74 | * DDR Setup | 74 | * DDR Setup |
75 | */ | 75 | */ |
76 | #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory*/ | 76 | #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory*/ |
77 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE | 77 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE |
78 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE | 78 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE |
79 | 79 | ||
80 | #define CONFIG_VERY_BIG_RAM | 80 | #define CONFIG_VERY_BIG_RAM |
81 | #define CONFIG_MAX_MEM_MAPPED (512 << 20) | 81 | #define CONFIG_MAX_MEM_MAPPED (512 << 20) |
82 | 82 | ||
83 | #define CONFIG_SYS_DDRCDR ( DDRCDR_EN \ | 83 | #define CONFIG_SYS_DDRCDR ( DDRCDR_EN \ |
84 | | DDRCDR_PZ_NOMZ \ | 84 | | DDRCDR_PZ_NOMZ \ |
85 | | DDRCDR_NZ_NOMZ \ | 85 | | DDRCDR_NZ_NOMZ \ |
86 | | DDRCDR_M_ODR ) | 86 | | DDRCDR_M_ODR ) |
87 | /* 0x73000002 TODO ODR & DRN ? */ | 87 | /* 0x73000002 TODO ODR & DRN ? */ |
88 | 88 | ||
89 | /* | 89 | /* |
90 | * FLASH on the Local Bus | 90 | * FLASH on the Local Bus |
91 | */ | 91 | */ |
92 | #define CONFIG_SYS_NO_FLASH | 92 | #define CONFIG_SYS_NO_FLASH |
93 | 93 | ||
94 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ | 94 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ |
95 | 95 | ||
96 | #if !defined(CONFIG_NAND_SPL) | 96 | #if !defined(CONFIG_NAND_SPL) |
97 | #define CONFIG_SYS_RAMBOOT | 97 | #define CONFIG_SYS_RAMBOOT |
98 | #endif | 98 | #endif |
99 | 99 | ||
100 | #define CONFIG_SYS_INIT_RAM_LOCK 1 | 100 | #define CONFIG_SYS_INIT_RAM_LOCK 1 |
101 | #define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 /* Initial RAM address */ | 101 | #define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 /* Initial RAM address */ |
102 | #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM*/ | 102 | #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM*/ |
103 | 103 | ||
104 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ | 104 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ |
105 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 105 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
106 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET | 106 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
107 | 107 | ||
108 | /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */ | 108 | /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */ |
109 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ | 109 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ |
110 | #define CONFIG_SYS_MALLOC_LEN (512 * 1024) /* Reserved for malloc */ | 110 | #define CONFIG_SYS_MALLOC_LEN (512 * 1024) /* Reserved for malloc */ |
111 | 111 | ||
112 | /* | 112 | /* |
113 | * Local Bus LCRR and LBCR regs | 113 | * Local Bus LCRR and LBCR regs |
114 | */ | 114 | */ |
115 | #define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_EADC_1 | LCRR_CLKDIV_2) | 115 | #define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_EADC_1 | LCRR_CLKDIV_2) |
116 | #define CONFIG_SYS_LBC_LBCR (0x00040000 /* TODO */ \ | 116 | #define CONFIG_SYS_LBC_LBCR (0x00040000 /* TODO */ \ |
117 | | (0xFF << LBCR_BMT_SHIFT) \ | 117 | | (0xFF << LBCR_BMT_SHIFT) \ |
118 | | 0xF ) /* 0x0004ff0f */ | 118 | | 0xF ) /* 0x0004ff0f */ |
119 | 119 | ||
120 | #define CONFIG_SYS_LBC_MRTPR 0x20000000 /* LB refresh timer prescal, 266MHz/32 */ | 120 | #define CONFIG_SYS_LBC_MRTPR 0x20000000 /* LB refresh timer prescal, 266MHz/32 */ |
121 | 121 | ||
122 | /* drivers/mtd/nand/nand.c */ | 122 | /* drivers/mtd/nand/nand.c */ |
123 | #ifdef CONFIG_NAND_SPL | 123 | #ifdef CONFIG_NAND_SPL |
124 | #define CONFIG_SYS_NAND_BASE 0xFFF00000 | 124 | #define CONFIG_SYS_NAND_BASE 0xFFF00000 |
125 | #else | 125 | #else |
126 | #define CONFIG_SYS_NAND_BASE 0xE2800000 | 126 | #define CONFIG_SYS_NAND_BASE 0xE2800000 |
127 | #endif | 127 | #endif |
128 | 128 | ||
129 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 | 129 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
130 | #define NAND_MAX_CHIPS 1 | 130 | #define NAND_MAX_CHIPS 1 |
131 | #define CONFIG_MTD_NAND_VERIFY_WRITE | 131 | #define CONFIG_MTD_NAND_VERIFY_WRITE |
132 | #define CONFIG_CMD_NAND 1 | 132 | #define CONFIG_CMD_NAND 1 |
133 | #define CONFIG_NAND_FSL_ELBC 1 | 133 | #define CONFIG_NAND_FSL_ELBC 1 |
134 | 134 | ||
135 | #define CONFIG_SYS_NAND_U_BOOT_SIZE (512 << 10) | 135 | #define CONFIG_SYS_NAND_U_BOOT_SIZE (512 << 10) |
136 | #define CONFIG_SYS_NAND_U_BOOT_DST 0x00100000 | 136 | #define CONFIG_SYS_NAND_U_BOOT_DST 0x00100000 |
137 | #define CONFIG_SYS_NAND_U_BOOT_START 0x00100100 | 137 | #define CONFIG_SYS_NAND_U_BOOT_START 0x00100100 |
138 | #define CONFIG_SYS_NAND_U_BOOT_RELOC 0x00010000 | 138 | #define CONFIG_SYS_NAND_U_BOOT_RELOC 0x00010000 |
139 | 139 | ||
140 | #define CONFIG_SYS_NAND_BR_PRELIM ( CONFIG_SYS_NAND_BASE \ | 140 | #define CONFIG_SYS_NAND_BR_PRELIM ( CONFIG_SYS_NAND_BASE \ |
141 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ | 141 | | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \ |
142 | | BR_PS_8 /* Port Size = 8 bit */ \ | 142 | | BR_PS_8 /* Port Size = 8 bit */ \ |
143 | | BR_MS_FCM /* MSEL = FCM */ \ | 143 | | BR_MS_FCM /* MSEL = FCM */ \ |
144 | | BR_V ) /* valid */ | 144 | | BR_V ) /* valid */ |
145 | 145 | ||
146 | #ifdef CONFIG_NAND_SP | 146 | #ifdef CONFIG_NAND_SP |
147 | #define CONFIG_SYS_NAND_OR_PRELIM ( 0xFFFF8000 /* length 32K */ \ | 147 | #define CONFIG_SYS_NAND_OR_PRELIM ( 0xFFFF8000 /* length 32K */ \ |
148 | | OR_FCM_CSCT \ | 148 | | OR_FCM_CSCT \ |
149 | | OR_FCM_CST \ | 149 | | OR_FCM_CST \ |
150 | | OR_FCM_CHT \ | 150 | | OR_FCM_CHT \ |
151 | | OR_FCM_SCY_1 \ | 151 | | OR_FCM_SCY_1 \ |
152 | | OR_FCM_TRLX \ | 152 | | OR_FCM_TRLX \ |
153 | | OR_FCM_EHTR ) | 153 | | OR_FCM_EHTR ) |
154 | #define CONFIG_SYS_LBLAWAR0_PRELIM 0x8000000E /* 32KB */ | 154 | #define CONFIG_SYS_LBLAWAR0_PRELIM 0x8000000E /* 32KB */ |
155 | #define CONFIG_SYS_NAND_PAGE_SIZE (512) /* NAND chip page size */ | 155 | #define CONFIG_SYS_NAND_PAGE_SIZE (512) /* NAND chip page size */ |
156 | #define CONFIG_SYS_NAND_BLOCK_SIZE (16 << 10) /* NAND chip block size */ | 156 | #define CONFIG_SYS_NAND_BLOCK_SIZE (16 << 10) /* NAND chip block size */ |
157 | #define NAND_CACHE_PAGES 32 | 157 | #define NAND_CACHE_PAGES 32 |
158 | #elif defined(CONFIG_NAND_LP) | 158 | #elif defined(CONFIG_NAND_LP) |
159 | #define CONFIG_SYS_NAND_OR_PRELIM ( 0xFFFC0000 /* length 256K */ \ | 159 | #define CONFIG_SYS_NAND_OR_PRELIM ( 0xFFFC0000 /* length 256K */ \ |
160 | | OR_FCM_PGS \ | 160 | | OR_FCM_PGS \ |
161 | | OR_FCM_CSCT \ | 161 | | OR_FCM_CSCT \ |
162 | | OR_FCM_CST \ | 162 | | OR_FCM_CST \ |
163 | | OR_FCM_CHT \ | 163 | | OR_FCM_CHT \ |
164 | | OR_FCM_SCY_1 \ | 164 | | OR_FCM_SCY_1 \ |
165 | | OR_FCM_TRLX \ | 165 | | OR_FCM_TRLX \ |
166 | | OR_FCM_EHTR ) | 166 | | OR_FCM_EHTR ) |
167 | #define CONFIG_SYS_LBLAWAR0_PRELIM 0x80000011 /* 256KB */ | 167 | #define CONFIG_SYS_LBLAWAR0_PRELIM 0x80000011 /* 256KB */ |
168 | #define CONFIG_SYS_NAND_PAGE_SIZE (2048) /* NAND chip page size */ | 168 | #define CONFIG_SYS_NAND_PAGE_SIZE (2048) /* NAND chip page size */ |
169 | #define CONFIG_SYS_NAND_BLOCK_SIZE (128 << 10) /* NAND chip block size */ | 169 | #define CONFIG_SYS_NAND_BLOCK_SIZE (128 << 10) /* NAND chip block size */ |
170 | #define NAND_CACHE_PAGES 64 | 170 | #define NAND_CACHE_PAGES 64 |
171 | #else | 171 | #else |
172 | #error Page size of NAND not defined. | 172 | #error Page size of NAND not defined. |
173 | #endif /* CONFIG_NAND_SP */ | 173 | #endif /* CONFIG_NAND_SP */ |
174 | 174 | ||
175 | #define CONFIG_SYS_NAND_U_BOOT_OFFS CONFIG_SYS_NAND_BLOCK_SIZE | 175 | #define CONFIG_SYS_NAND_U_BOOT_OFFS CONFIG_SYS_NAND_BLOCK_SIZE |
176 | 176 | ||
177 | #define CONFIG_SYS_BR0_PRELIM CONFIG_SYS_NAND_BR_PRELIM | 177 | #define CONFIG_SYS_BR0_PRELIM CONFIG_SYS_NAND_BR_PRELIM |
178 | #define CONFIG_SYS_OR0_PRELIM CONFIG_SYS_NAND_OR_PRELIM | 178 | #define CONFIG_SYS_OR0_PRELIM CONFIG_SYS_NAND_OR_PRELIM |
179 | 179 | ||
180 | #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_NAND_BASE | 180 | #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_NAND_BASE |
181 | 181 | ||
182 | #define CONFIG_SYS_NAND_LBLAWBAR_PRELIM CONFIG_SYS_LBLAWBAR0_PRELIM | 182 | #define CONFIG_SYS_NAND_LBLAWBAR_PRELIM CONFIG_SYS_LBLAWBAR0_PRELIM |
183 | #define CONFIG_SYS_NAND_LBLAWAR_PRELIM CONFIG_SYS_LBLAWAR0_PRELIM | 183 | #define CONFIG_SYS_NAND_LBLAWAR_PRELIM CONFIG_SYS_LBLAWAR0_PRELIM |
184 | 184 | ||
185 | /* | 185 | /* |
186 | * JFFS2 configuration | 186 | * JFFS2 configuration |
187 | */ | 187 | */ |
188 | #define CONFIG_JFFS2_NAND | 188 | #define CONFIG_JFFS2_NAND |
189 | #define CONFIG_JFFS2_DEV "nand0" | 189 | #define CONFIG_JFFS2_DEV "nand0" |
190 | 190 | ||
191 | /* mtdparts command line support */ | 191 | /* mtdparts command line support */ |
192 | #define CONFIG_CMD_MTDPARTS | 192 | #define CONFIG_CMD_MTDPARTS |
193 | #define MTDIDS_DEFAULT "nand0=nand0" | 193 | #define MTDIDS_DEFAULT "nand0=nand0" |
194 | #define MTDPARTS_DEFAULT "mtdparts=nand0:2M(u-boot),6M(kernel),-(jffs2)" | 194 | #define MTDPARTS_DEFAULT "mtdparts=nand0:2M(u-boot),6M(kernel),-(jffs2)" |
195 | 195 | ||
196 | /* pass open firmware flat tree */ | 196 | /* pass open firmware flat tree */ |
197 | #define CONFIG_OF_LIBFDT 1 | 197 | #define CONFIG_OF_LIBFDT 1 |
198 | #define CONFIG_OF_BOARD_SETUP 1 | 198 | #define CONFIG_OF_BOARD_SETUP 1 |
199 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 | 199 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 |
200 | 200 | ||
201 | /* | 201 | /* |
202 | * Serial Port | 202 | * Serial Port |
203 | */ | 203 | */ |
204 | #define CONFIG_CONS_INDEX 1 | 204 | #define CONFIG_CONS_INDEX 1 |
205 | #define CONFIG_SYS_NS16550 | 205 | #define CONFIG_SYS_NS16550 |
206 | #define CONFIG_SYS_NS16550_SERIAL | 206 | #define CONFIG_SYS_NS16550_SERIAL |
207 | #define CONFIG_SYS_NS16550_REG_SIZE 1 | 207 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
208 | #ifdef CONFIG_NAND_SPL | 208 | #ifdef CONFIG_NAND_SPL |
209 | #define CONFIG_NS16550_MIN_FUNCTIONS | 209 | #define CONFIG_NS16550_MIN_FUNCTIONS |
210 | #endif | 210 | #endif |
211 | 211 | ||
212 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 212 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
213 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200} | 213 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200} |
214 | 214 | ||
215 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500) | 215 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500) |
216 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600) | 216 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600) |
217 | 217 | ||
218 | /* Use the HUSH parser */ | 218 | /* Use the HUSH parser */ |
219 | #define CONFIG_SYS_HUSH_PARSER | 219 | #define CONFIG_SYS_HUSH_PARSER |
220 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | 220 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
221 | 221 | ||
222 | /* I2C */ | 222 | /* I2C */ |
223 | #define CONFIG_HARD_I2C /* I2C with hardware support*/ | 223 | #define CONFIG_HARD_I2C /* I2C with hardware support*/ |
224 | #define CONFIG_FSL_I2C | 224 | #define CONFIG_FSL_I2C |
225 | #define CONFIG_I2C_MULTI_BUS | 225 | #define CONFIG_I2C_MULTI_BUS |
226 | #define CONFIG_I2C_CMD_TREE | ||
227 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ | 226 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ |
228 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 227 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
229 | #define CONFIG_SYS_I2C_NOPROBES {{0,0x69}} /* Don't probe these addrs */ | 228 | #define CONFIG_SYS_I2C_NOPROBES {{0,0x69}} /* Don't probe these addrs */ |
230 | #define CONFIG_SYS_I2C_OFFSET 0x3000 | 229 | #define CONFIG_SYS_I2C_OFFSET 0x3000 |
231 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 | 230 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 |
232 | 231 | ||
233 | /* | 232 | /* |
234 | * General PCI | 233 | * General PCI |
235 | * Addresses are mapped 1-1. | 234 | * Addresses are mapped 1-1. |
236 | */ | 235 | */ |
237 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 | 236 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 |
238 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE | 237 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE |
239 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */ | 238 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */ |
240 | #define CONFIG_SYS_PCI1_MMIO_BASE 0x90000000 | 239 | #define CONFIG_SYS_PCI1_MMIO_BASE 0x90000000 |
241 | #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE | 240 | #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE |
242 | #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */ | 241 | #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */ |
243 | #define CONFIG_SYS_PCI1_IO_BASE 0x00000000 | 242 | #define CONFIG_SYS_PCI1_IO_BASE 0x00000000 |
244 | #define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000 | 243 | #define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000 |
245 | #define CONFIG_SYS_PCI1_IO_SIZE 0x00100000 /* 1M */ | 244 | #define CONFIG_SYS_PCI1_IO_SIZE 0x00100000 /* 1M */ |
246 | 245 | ||
247 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ | 246 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ |
248 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1057 /* Motorola */ | 247 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1057 /* Motorola */ |
249 | 248 | ||
250 | /* | 249 | /* |
251 | * TSEC | 250 | * TSEC |
252 | */ | 251 | */ |
253 | #define CONFIG_TSEC_ENET /* TSEC ethernet support */ | 252 | #define CONFIG_TSEC_ENET /* TSEC ethernet support */ |
254 | 253 | ||
255 | #define CONFIG_NET_MULTI | 254 | #define CONFIG_NET_MULTI |
256 | #define CONFIG_GMII /* MII PHY management */ | 255 | #define CONFIG_GMII /* MII PHY management */ |
257 | 256 | ||
258 | #ifdef CONFIG_TSEC1 | 257 | #ifdef CONFIG_TSEC1 |
259 | #define CONFIG_HAS_ETH0 | 258 | #define CONFIG_HAS_ETH0 |
260 | #define CONFIG_TSEC1_NAME "TSEC0" | 259 | #define CONFIG_TSEC1_NAME "TSEC0" |
261 | #define CONFIG_SYS_TSEC1_OFFSET 0x24000 | 260 | #define CONFIG_SYS_TSEC1_OFFSET 0x24000 |
262 | #define TSEC1_PHY_ADDR 0x0 | 261 | #define TSEC1_PHY_ADDR 0x0 |
263 | #define TSEC1_FLAGS TSEC_GIGABIT | 262 | #define TSEC1_FLAGS TSEC_GIGABIT |
264 | #define TSEC1_PHYIDX 0 | 263 | #define TSEC1_PHYIDX 0 |
265 | #endif | 264 | #endif |
266 | 265 | ||
267 | #ifdef CONFIG_TSEC2 | 266 | #ifdef CONFIG_TSEC2 |
268 | #define CONFIG_HAS_ETH1 | 267 | #define CONFIG_HAS_ETH1 |
269 | #define CONFIG_TSEC2_NAME "TSEC1" | 268 | #define CONFIG_TSEC2_NAME "TSEC1" |
270 | #define CONFIG_SYS_TSEC2_OFFSET 0x25000 | 269 | #define CONFIG_SYS_TSEC2_OFFSET 0x25000 |
271 | #define TSEC2_PHY_ADDR 4 | 270 | #define TSEC2_PHY_ADDR 4 |
272 | #define TSEC2_FLAGS TSEC_GIGABIT | 271 | #define TSEC2_FLAGS TSEC_GIGABIT |
273 | #define TSEC2_PHYIDX 0 | 272 | #define TSEC2_PHYIDX 0 |
274 | #endif | 273 | #endif |
275 | 274 | ||
276 | 275 | ||
277 | /* Options are: TSEC[0-1] */ | 276 | /* Options are: TSEC[0-1] */ |
278 | #define CONFIG_ETHPRIME "TSEC1" | 277 | #define CONFIG_ETHPRIME "TSEC1" |
279 | 278 | ||
280 | /* | 279 | /* |
281 | * Configure on-board RTC | 280 | * Configure on-board RTC |
282 | */ | 281 | */ |
283 | #define CONFIG_RTC_DS1337 | 282 | #define CONFIG_RTC_DS1337 |
284 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 | 283 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 |
285 | 284 | ||
286 | /* | 285 | /* |
287 | * Environment | 286 | * Environment |
288 | */ | 287 | */ |
289 | #if defined(CONFIG_NAND_U_BOOT) | 288 | #if defined(CONFIG_NAND_U_BOOT) |
290 | #define CONFIG_ENV_IS_IN_NAND 1 | 289 | #define CONFIG_ENV_IS_IN_NAND 1 |
291 | #define CONFIG_ENV_OFFSET (768 * 1024) | 290 | #define CONFIG_ENV_OFFSET (768 * 1024) |
292 | #define CONFIG_ENV_SECT_SIZE CONFIG_SYS_NAND_BLOCK_SIZE | 291 | #define CONFIG_ENV_SECT_SIZE CONFIG_SYS_NAND_BLOCK_SIZE |
293 | #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE | 292 | #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE |
294 | #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE | 293 | #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE |
295 | #define CONFIG_ENV_RANGE (CONFIG_ENV_SECT_SIZE * 4) | 294 | #define CONFIG_ENV_RANGE (CONFIG_ENV_SECT_SIZE * 4) |
296 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE) | 295 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE) |
297 | #elif !defined(CONFIG_SYS_RAMBOOT) | 296 | #elif !defined(CONFIG_SYS_RAMBOOT) |
298 | #define CONFIG_ENV_IS_IN_FLASH 1 | 297 | #define CONFIG_ENV_IS_IN_FLASH 1 |
299 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) | 298 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) |
300 | #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64K(one sector) for env */ | 299 | #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64K(one sector) for env */ |
301 | #define CONFIG_ENV_SIZE 0x2000 | 300 | #define CONFIG_ENV_SIZE 0x2000 |
302 | 301 | ||
303 | /* Address and size of Redundant Environment Sector */ | 302 | /* Address and size of Redundant Environment Sector */ |
304 | #else | 303 | #else |
305 | #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */ | 304 | #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */ |
306 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000) | 305 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000) |
307 | #define CONFIG_ENV_SIZE 0x2000 | 306 | #define CONFIG_ENV_SIZE 0x2000 |
308 | #endif | 307 | #endif |
309 | 308 | ||
310 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ | 309 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
311 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ | 310 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
312 | 311 | ||
313 | /* | 312 | /* |
314 | * BOOTP options | 313 | * BOOTP options |
315 | */ | 314 | */ |
316 | #define CONFIG_BOOTP_BOOTFILESIZE | 315 | #define CONFIG_BOOTP_BOOTFILESIZE |
317 | #define CONFIG_BOOTP_BOOTPATH | 316 | #define CONFIG_BOOTP_BOOTPATH |
318 | #define CONFIG_BOOTP_GATEWAY | 317 | #define CONFIG_BOOTP_GATEWAY |
319 | #define CONFIG_BOOTP_HOSTNAME | 318 | #define CONFIG_BOOTP_HOSTNAME |
320 | 319 | ||
321 | 320 | ||
322 | /* | 321 | /* |
323 | * Command line configuration. | 322 | * Command line configuration. |
324 | */ | 323 | */ |
325 | #include <config_cmd_default.h> | 324 | #include <config_cmd_default.h> |
326 | #undef CONFIG_CMD_IMLS | 325 | #undef CONFIG_CMD_IMLS |
327 | #undef CONFIG_CMD_FLASH | 326 | #undef CONFIG_CMD_FLASH |
328 | 327 | ||
329 | #define CONFIG_CMD_PING | 328 | #define CONFIG_CMD_PING |
330 | #define CONFIG_CMD_DHCP | 329 | #define CONFIG_CMD_DHCP |
331 | #define CONFIG_CMD_I2C | 330 | #define CONFIG_CMD_I2C |
332 | #define CONFIG_CMD_MII | 331 | #define CONFIG_CMD_MII |
333 | #define CONFIG_CMD_DATE | 332 | #define CONFIG_CMD_DATE |
334 | #define CONFIG_CMD_PCI | 333 | #define CONFIG_CMD_PCI |
335 | #define CONFIG_CMD_JFFS2 | 334 | #define CONFIG_CMD_JFFS2 |
336 | 335 | ||
337 | #if defined(CONFIG_SYS_RAMBOOT) && !defined(CONFIG_NAND_U_BOOT) | 336 | #if defined(CONFIG_SYS_RAMBOOT) && !defined(CONFIG_NAND_U_BOOT) |
338 | #undef CONFIG_CMD_SAVEENV | 337 | #undef CONFIG_CMD_SAVEENV |
339 | #undef CONFIG_CMD_LOADS | 338 | #undef CONFIG_CMD_LOADS |
340 | #endif | 339 | #endif |
341 | 340 | ||
342 | #define CONFIG_CMDLINE_EDITING 1 | 341 | #define CONFIG_CMDLINE_EDITING 1 |
343 | 342 | ||
344 | 343 | ||
345 | /* | 344 | /* |
346 | * Miscellaneous configurable options | 345 | * Miscellaneous configurable options |
347 | */ | 346 | */ |
348 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 347 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
349 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ | 348 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ |
350 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | 349 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
351 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ | 350 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
352 | 351 | ||
353 | #define CONFIG_SYS_PBSIZE ( CONFIG_SYS_CBSIZE \ | 352 | #define CONFIG_SYS_PBSIZE ( CONFIG_SYS_CBSIZE \ |
354 | + sizeof(CONFIG_SYS_PROMPT) \ | 353 | + sizeof(CONFIG_SYS_PROMPT) \ |
355 | + 16 ) /* Print Buffer Size */ | 354 | + 16 ) /* Print Buffer Size */ |
356 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 355 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
357 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | 356 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
358 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ | 357 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ |
359 | 358 | ||
360 | /* | 359 | /* |
361 | * For booting Linux, the board info and command line data | 360 | * For booting Linux, the board info and command line data |
362 | * have to be in the first 8 MB of memory, since this is | 361 | * have to be in the first 8 MB of memory, since this is |
363 | * the maximum mapped by the Linux kernel during initialization. | 362 | * the maximum mapped by the Linux kernel during initialization. |
364 | */ | 363 | */ |
365 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ | 364 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ |
366 | 365 | ||
367 | #define CONFIG_SYS_RCWH_PCIHOST 0x80000000 /* PCIHOST */ | 366 | #define CONFIG_SYS_RCWH_PCIHOST 0x80000000 /* PCIHOST */ |
368 | 367 | ||
369 | #define CONFIG_SYS_HRCW_LOW ( HRCWL_LCL_BUS_TO_SCB_CLK_1X1 \ | 368 | #define CONFIG_SYS_HRCW_LOW ( HRCWL_LCL_BUS_TO_SCB_CLK_1X1 \ |
370 | | 0x20000000 /* reserved */ \ | 369 | | 0x20000000 /* reserved */ \ |
371 | | HRCWL_DDR_TO_SCB_CLK_2X1 \ | 370 | | HRCWL_DDR_TO_SCB_CLK_2X1 \ |
372 | | HRCWL_CSB_TO_CLKIN_4X1 \ | 371 | | HRCWL_CSB_TO_CLKIN_4X1 \ |
373 | | HRCWL_CORE_TO_CSB_2_5X1 ) | 372 | | HRCWL_CORE_TO_CSB_2_5X1 ) |
374 | 373 | ||
375 | #define CONFIG_SYS_NS16550_CLK (CONFIG_83XX_CLKIN * 4) | 374 | #define CONFIG_SYS_NS16550_CLK (CONFIG_83XX_CLKIN * 4) |
376 | 375 | ||
377 | #define CONFIG_SYS_HRCW_HIGH_BASE ( HRCWH_PCI_HOST \ | 376 | #define CONFIG_SYS_HRCW_HIGH_BASE ( HRCWH_PCI_HOST \ |
378 | | HRCWH_PCI1_ARBITER_ENABLE \ | 377 | | HRCWH_PCI1_ARBITER_ENABLE \ |
379 | | HRCWH_CORE_ENABLE \ | 378 | | HRCWH_CORE_ENABLE \ |
380 | | HRCWH_BOOTSEQ_DISABLE \ | 379 | | HRCWH_BOOTSEQ_DISABLE \ |
381 | | HRCWH_SW_WATCHDOG_DISABLE \ | 380 | | HRCWH_SW_WATCHDOG_DISABLE \ |
382 | | HRCWH_TSEC1M_IN_RGMII \ | 381 | | HRCWH_TSEC1M_IN_RGMII \ |
383 | | HRCWH_TSEC2M_IN_RGMII \ | 382 | | HRCWH_TSEC2M_IN_RGMII \ |
384 | | HRCWH_BIG_ENDIAN \ | 383 | | HRCWH_BIG_ENDIAN \ |
385 | | HRCWH_LALE_NORMAL ) | 384 | | HRCWH_LALE_NORMAL ) |
386 | 385 | ||
387 | #ifdef CONFIG_NAND_LP | 386 | #ifdef CONFIG_NAND_LP |
388 | #define CONFIG_SYS_HRCW_HIGH ( CONFIG_SYS_HRCW_HIGH_BASE \ | 387 | #define CONFIG_SYS_HRCW_HIGH ( CONFIG_SYS_HRCW_HIGH_BASE \ |
389 | | HRCWH_FROM_0XFFF00100 \ | 388 | | HRCWH_FROM_0XFFF00100 \ |
390 | | HRCWH_ROM_LOC_NAND_LP_8BIT \ | 389 | | HRCWH_ROM_LOC_NAND_LP_8BIT \ |
391 | | HRCWH_RL_EXT_NAND) | 390 | | HRCWH_RL_EXT_NAND) |
392 | #else | 391 | #else |
393 | #define CONFIG_SYS_HRCW_HIGH ( CONFIG_SYS_HRCW_HIGH_BASE \ | 392 | #define CONFIG_SYS_HRCW_HIGH ( CONFIG_SYS_HRCW_HIGH_BASE \ |
394 | | HRCWH_FROM_0XFFF00100 \ | 393 | | HRCWH_FROM_0XFFF00100 \ |
395 | | HRCWH_ROM_LOC_NAND_SP_8BIT \ | 394 | | HRCWH_ROM_LOC_NAND_SP_8BIT \ |
396 | | HRCWH_RL_EXT_NAND ) | 395 | | HRCWH_RL_EXT_NAND ) |
397 | #endif | 396 | #endif |
398 | 397 | ||
399 | /* System IO Config */ | 398 | /* System IO Config */ |
400 | #define CONFIG_SYS_SICRH ( SICRH_ETSEC2_B \ | 399 | #define CONFIG_SYS_SICRH ( SICRH_ETSEC2_B \ |
401 | | SICRH_ETSEC2_C \ | 400 | | SICRH_ETSEC2_C \ |
402 | | SICRH_ETSEC2_D \ | 401 | | SICRH_ETSEC2_D \ |
403 | | SICRH_ETSEC2_E \ | 402 | | SICRH_ETSEC2_E \ |
404 | | SICRH_ETSEC2_F \ | 403 | | SICRH_ETSEC2_F \ |
405 | | SICRH_ETSEC2_G \ | 404 | | SICRH_ETSEC2_G \ |
406 | | SICRH_TSOBI1 \ | 405 | | SICRH_TSOBI1 \ |
407 | | SICRH_TSOBI2 ) | 406 | | SICRH_TSOBI2 ) |
408 | #define CONFIG_SYS_SICRL (SICRL_USBDR \ | 407 | #define CONFIG_SYS_SICRL (SICRL_USBDR \ |
409 | | SICRL_ETSEC2_A ) | 408 | | SICRL_ETSEC2_A ) |
410 | 409 | ||
411 | #define CONFIG_SYS_HID0_INIT 0x000000000 | 410 | #define CONFIG_SYS_HID0_INIT 0x000000000 |
412 | #define CONFIG_SYS_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK \ | 411 | #define CONFIG_SYS_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK \ |
413 | | HID0_ENABLE_DYNAMIC_POWER_MANAGMENT ) | 412 | | HID0_ENABLE_DYNAMIC_POWER_MANAGMENT ) |
414 | 413 | ||
415 | #define CONFIG_SYS_HID2 HID2_HBE | 414 | #define CONFIG_SYS_HID2 HID2_HBE |
416 | 415 | ||
417 | #define CONFIG_HIGH_BATS 1 /* High BATs supported */ | 416 | #define CONFIG_HIGH_BATS 1 /* High BATs supported */ |
418 | 417 | ||
419 | /* DDR @ 0x00000000 */ | 418 | /* DDR @ 0x00000000 */ |
420 | #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10) | 419 | #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10) |
421 | #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 420 | #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
422 | #define CONFIG_SYS_IBAT1L ((CONFIG_SYS_SDRAM_BASE + 0x10000000) | BATL_PP_10) | 421 | #define CONFIG_SYS_IBAT1L ((CONFIG_SYS_SDRAM_BASE + 0x10000000) | BATL_PP_10) |
423 | #define CONFIG_SYS_IBAT1U ((CONFIG_SYS_SDRAM_BASE + 0x10000000) | BATU_BL_256M | BATU_VS | BATU_VP) | 422 | #define CONFIG_SYS_IBAT1U ((CONFIG_SYS_SDRAM_BASE + 0x10000000) | BATU_BL_256M | BATU_VS | BATU_VP) |
424 | 423 | ||
425 | /* PCI @ 0x80000000 */ | 424 | /* PCI @ 0x80000000 */ |
426 | #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MEM_BASE | BATL_PP_10) | 425 | #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MEM_BASE | BATL_PP_10) |
427 | #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 426 | #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
428 | #define CONFIG_SYS_IBAT3L (CONFIG_SYS_PCI1_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 427 | #define CONFIG_SYS_IBAT3L (CONFIG_SYS_PCI1_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
429 | #define CONFIG_SYS_IBAT3U (CONFIG_SYS_PCI1_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 428 | #define CONFIG_SYS_IBAT3U (CONFIG_SYS_PCI1_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
430 | 429 | ||
431 | /* PCI2 not supported on 8313 */ | 430 | /* PCI2 not supported on 8313 */ |
432 | #define CONFIG_SYS_IBAT4L (0) | 431 | #define CONFIG_SYS_IBAT4L (0) |
433 | #define CONFIG_SYS_IBAT4U (0) | 432 | #define CONFIG_SYS_IBAT4U (0) |
434 | 433 | ||
435 | /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 */ | 434 | /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 */ |
436 | #define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 435 | #define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
437 | #define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR | BATU_BL_256M | BATU_VS | BATU_VP) | 436 | #define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR | BATU_BL_256M | BATU_VS | BATU_VP) |
438 | 437 | ||
439 | /* SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */ | 438 | /* SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */ |
440 | #define CONFIG_SYS_IBAT6L (0xF0000000 | BATL_PP_10 | BATL_GUARDEDSTORAGE) | 439 | #define CONFIG_SYS_IBAT6L (0xF0000000 | BATL_PP_10 | BATL_GUARDEDSTORAGE) |
441 | #define CONFIG_SYS_IBAT6U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP) | 440 | #define CONFIG_SYS_IBAT6U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP) |
442 | 441 | ||
443 | #define CONFIG_SYS_IBAT7L (0) | 442 | #define CONFIG_SYS_IBAT7L (0) |
444 | #define CONFIG_SYS_IBAT7U (0) | 443 | #define CONFIG_SYS_IBAT7U (0) |
445 | 444 | ||
446 | #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L | 445 | #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L |
447 | #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U | 446 | #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U |
448 | #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L | 447 | #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L |
449 | #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U | 448 | #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U |
450 | #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L | 449 | #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L |
451 | #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U | 450 | #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U |
452 | #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L | 451 | #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L |
453 | #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U | 452 | #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U |
454 | #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L | 453 | #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L |
455 | #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U | 454 | #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U |
456 | #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L | 455 | #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L |
457 | #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U | 456 | #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U |
458 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L | 457 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L |
459 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U | 458 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U |
460 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L | 459 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L |
461 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U | 460 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U |
462 | 461 | ||
463 | /* | 462 | /* |
464 | * Internal Definitions | 463 | * Internal Definitions |
465 | * | 464 | * |
466 | * Boot Flags | 465 | * Boot Flags |
467 | */ | 466 | */ |
468 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 467 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
469 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 468 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
470 | 469 | ||
471 | /* | 470 | /* |
472 | * Environment Configuration | 471 | * Environment Configuration |
473 | */ | 472 | */ |
474 | #define CONFIG_ENV_OVERWRITE | 473 | #define CONFIG_ENV_OVERWRITE |
475 | 474 | ||
476 | #define CONFIG_NETDEV eth1 | 475 | #define CONFIG_NETDEV eth1 |
477 | 476 | ||
478 | #define CONFIG_HOSTNAME simpc8313 | 477 | #define CONFIG_HOSTNAME simpc8313 |
479 | #define CONFIG_ROOTPATH /tftpboot/ | 478 | #define CONFIG_ROOTPATH /tftpboot/ |
480 | #define CONFIG_BOOTFILE /tftpboot/uImage | 479 | #define CONFIG_BOOTFILE /tftpboot/uImage |
481 | #define CONFIG_UBOOTPATH u-boot-nand.bin /* U-Boot image on TFTP server */ | 480 | #define CONFIG_UBOOTPATH u-boot-nand.bin /* U-Boot image on TFTP server */ |
482 | #define CONFIG_FDTFILE simpc8313.dtb | 481 | #define CONFIG_FDTFILE simpc8313.dtb |
483 | 482 | ||
484 | #define CONFIG_LOADADDR 500000 /* default location for tftp and bootm */ | 483 | #define CONFIG_LOADADDR 500000 /* default location for tftp and bootm */ |
485 | #define CONFIG_BOOTDELAY 5 /* 5 second delay */ | 484 | #define CONFIG_BOOTDELAY 5 /* 5 second delay */ |
486 | #define CONFIG_BAUDRATE 115200 | 485 | #define CONFIG_BAUDRATE 115200 |
487 | 486 | ||
488 | #define CONFIG_BOOTCOMMAND "nand read $loadaddr kernel 600000;bootm $loadaddr - $fdtaddr" | 487 | #define CONFIG_BOOTCOMMAND "nand read $loadaddr kernel 600000;bootm $loadaddr - $fdtaddr" |
489 | 488 | ||
490 | #define XMK_STR(x) #x | 489 | #define XMK_STR(x) #x |
491 | #define MK_STR(x) XMK_STR(x) | 490 | #define MK_STR(x) XMK_STR(x) |
492 | 491 | ||
493 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 492 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
494 | "netdev=" MK_STR(CONFIG_NETDEV) "\0" \ | 493 | "netdev=" MK_STR(CONFIG_NETDEV) "\0" \ |
495 | "ethprime=TSEC1\0" \ | 494 | "ethprime=TSEC1\0" \ |
496 | "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \ | 495 | "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \ |
497 | "tftpflash=tftpboot $loadaddr $uboot; " \ | 496 | "tftpflash=tftpboot $loadaddr $uboot; " \ |
498 | "protect off " MK_STR(TEXT_BASE) " +$filesize; " \ | 497 | "protect off " MK_STR(TEXT_BASE) " +$filesize; " \ |
499 | "erase " MK_STR(TEXT_BASE) " +$filesize; " \ | 498 | "erase " MK_STR(TEXT_BASE) " +$filesize; " \ |
500 | "cp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize; " \ | 499 | "cp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize; " \ |
501 | "protect on " MK_STR(TEXT_BASE) " +$filesize; " \ | 500 | "protect on " MK_STR(TEXT_BASE) " +$filesize; " \ |
502 | "cmp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize\0" \ | 501 | "cmp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize\0" \ |
503 | "fdtaddr=ae0000\0" \ | 502 | "fdtaddr=ae0000\0" \ |
504 | "fdtfile=" MK_STR(CONFIG_FDTFILE) "\0" \ | 503 | "fdtfile=" MK_STR(CONFIG_FDTFILE) "\0" \ |
505 | "console=ttyS0\0" \ | 504 | "console=ttyS0\0" \ |
506 | "setbootargs=setenv bootargs " \ | 505 | "setbootargs=setenv bootargs " \ |
507 | "root=$rootdev rw console=$console,$baudrate $othbootargs\0" \ | 506 | "root=$rootdev rw console=$console,$baudrate $othbootargs\0" \ |
508 | "setipargs=setenv bootargs nfsroot=$serverip:$rootpath " \ | 507 | "setipargs=setenv bootargs nfsroot=$serverip:$rootpath " \ |
509 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ | 508 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ |
510 | "root=$rootdev rw console=$console,$baudrate $othbootargs\0" \ | 509 | "root=$rootdev rw console=$console,$baudrate $othbootargs\0" \ |
511 | "load_uboot=tftp 100000 u-boot-nand.bin\0" \ | 510 | "load_uboot=tftp 100000 u-boot-nand.bin\0" \ |
512 | "burn_uboot=nand erase u-boot 80000; " \ | 511 | "burn_uboot=nand erase u-boot 80000; " \ |
513 | "nand write 100000 u-boot $filesize\0" \ | 512 | "nand write 100000 u-boot $filesize\0" \ |
514 | "update_uboot=run load_uboot;run burn_uboot\0" \ | 513 | "update_uboot=run load_uboot;run burn_uboot\0" \ |
515 | "mtdids=nand0=nand0\0" \ | 514 | "mtdids=nand0=nand0\0" \ |
516 | "mtdparts=mtdparts=nand0:2M(u-boot),6M(kernel),-(jffs2)\0" \ | 515 | "mtdparts=mtdparts=nand0:2M(u-boot),6M(kernel),-(jffs2)\0" \ |
517 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ | 516 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
518 | "nfsroot=${serverip}:${rootpath}\0" \ | 517 | "nfsroot=${serverip}:${rootpath}\0" \ |
519 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ | 518 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ |
520 | "addip=setenv bootargs ${bootargs} " \ | 519 | "addip=setenv bootargs ${bootargs} " \ |
521 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ | 520 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ |
522 | ":${hostname}:${netdev}:off panic=1\0" \ | 521 | ":${hostname}:${netdev}:off panic=1\0" \ |
523 | "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0" \ | 522 | "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0" \ |
524 | "bootargs=root=/dev/mtdblock2 rootfstype=jffs2 rw " \ | 523 | "bootargs=root=/dev/mtdblock2 rootfstype=jffs2 rw " \ |
525 | "console=ttyS0,115200\0" \ | 524 | "console=ttyS0,115200\0" \ |
526 | "" | 525 | "" |
527 | 526 | ||
528 | #define CONFIG_NFSBOOTCOMMAND \ | 527 | #define CONFIG_NFSBOOTCOMMAND \ |
529 | "setenv rootdev /dev/nfs;" \ | 528 | "setenv rootdev /dev/nfs;" \ |
530 | "run setbootargs;" \ | 529 | "run setbootargs;" \ |
531 | "run setipargs;" \ | 530 | "run setipargs;" \ |
532 | "tftp $loadaddr $bootfile;" \ | 531 | "tftp $loadaddr $bootfile;" \ |
533 | "tftp $fdtaddr $fdtfile;" \ | 532 | "tftp $fdtaddr $fdtfile;" \ |
534 | "bootm $loadaddr - $fdtaddr" | 533 | "bootm $loadaddr - $fdtaddr" |
535 | 534 | ||
536 | #define CONFIG_RAMBOOTCOMMAND \ | 535 | #define CONFIG_RAMBOOTCOMMAND \ |
537 | "setenv rootdev /dev/ram;" \ | 536 | "setenv rootdev /dev/ram;" \ |
538 | "run setbootargs;" \ | 537 | "run setbootargs;" \ |
539 | "tftp $ramdiskaddr $ramdiskfile;" \ | 538 | "tftp $ramdiskaddr $ramdiskfile;" \ |
540 | "tftp $loadaddr $bootfile;" \ | 539 | "tftp $loadaddr $bootfile;" \ |
541 | "tftp $fdtaddr $fdtfile;" \ | 540 | "tftp $fdtaddr $fdtfile;" \ |
542 | "bootm $loadaddr $ramdiskaddr $fdtaddr" | 541 | "bootm $loadaddr $ramdiskaddr $fdtaddr" |
543 | 542 | ||
544 | #undef MK_STR | 543 | #undef MK_STR |
545 | #undef XMK_STR | 544 | #undef XMK_STR |
546 | 545 | ||
547 | #endif /* __CONFIG_H */ | 546 | #endif /* __CONFIG_H */ |
548 | 547 |
include/configs/XPEDITE5200.h
1 | /* | 1 | /* |
2 | * Copyright 2008 Extreme Engineering Solutions, Inc. | 2 | * Copyright 2008 Extreme Engineering Solutions, Inc. |
3 | * Copyright 2004-2008 Freescale Semiconductor, Inc. | 3 | * Copyright 2004-2008 Freescale Semiconductor, Inc. |
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 | * xpedite5200 board configuration file | 25 | * xpedite5200 board configuration file |
26 | */ | 26 | */ |
27 | #ifndef __CONFIG_H | 27 | #ifndef __CONFIG_H |
28 | #define __CONFIG_H | 28 | #define __CONFIG_H |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * High Level Configuration Options | 31 | * High Level Configuration Options |
32 | */ | 32 | */ |
33 | #define CONFIG_BOOKE 1 /* BOOKE */ | 33 | #define CONFIG_BOOKE 1 /* BOOKE */ |
34 | #define CONFIG_E500 1 /* BOOKE e500 family */ | 34 | #define CONFIG_E500 1 /* BOOKE e500 family */ |
35 | #define CONFIG_MPC85xx 1 /* MPC8540/60/55/41/48 */ | 35 | #define CONFIG_MPC85xx 1 /* MPC8540/60/55/41/48 */ |
36 | #define CONFIG_MPC8548 1 | 36 | #define CONFIG_MPC8548 1 |
37 | #define CONFIG_XPEDITE5200 1 | 37 | #define CONFIG_XPEDITE5200 1 |
38 | #define CONFIG_SYS_BOARD_NAME "XPedite5200" | 38 | #define CONFIG_SYS_BOARD_NAME "XPedite5200" |
39 | #define CONFIG_BOARD_EARLY_INIT_R /* Call board_pre_init */ | 39 | #define CONFIG_BOARD_EARLY_INIT_R /* Call board_pre_init */ |
40 | #define CONFIG_RELOC_FIXUP_WORKS /* Fully relocate to SDRAM */ | 40 | #define CONFIG_RELOC_FIXUP_WORKS /* Fully relocate to SDRAM */ |
41 | 41 | ||
42 | #define CONFIG_PCI 1 /* Enable PCI/PCIE */ | 42 | #define CONFIG_PCI 1 /* Enable PCI/PCIE */ |
43 | #define CONFIG_PCI_PNP 1 /* do pci plug-and-play */ | 43 | #define CONFIG_PCI_PNP 1 /* do pci plug-and-play */ |
44 | #define CONFIG_PCI_SCAN_SHOW 1 /* show pci devices on startup */ | 44 | #define CONFIG_PCI_SCAN_SHOW 1 /* show pci devices on startup */ |
45 | #define CONFIG_PCI1 1 /* PCI controller 1 */ | 45 | #define CONFIG_PCI1 1 /* PCI controller 1 */ |
46 | #define CONFIG_FSL_PCI_INIT 1 /* Use common FSL init code */ | 46 | #define CONFIG_FSL_PCI_INIT 1 /* Use common FSL init code */ |
47 | #define CONFIG_SYS_PCI_64BIT 1 /* enable 64-bit PCI resources */ | 47 | #define CONFIG_SYS_PCI_64BIT 1 /* enable 64-bit PCI resources */ |
48 | #define CONFIG_FSL_LAW 1 /* Use common FSL init code */ | 48 | #define CONFIG_FSL_LAW 1 /* Use common FSL init code */ |
49 | 49 | ||
50 | /* | 50 | /* |
51 | * DDR config | 51 | * DDR config |
52 | */ | 52 | */ |
53 | #define CONFIG_FSL_DDR2 | 53 | #define CONFIG_FSL_DDR2 |
54 | #undef CONFIG_FSL_DDR_INTERACTIVE | 54 | #undef CONFIG_FSL_DDR_INTERACTIVE |
55 | #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup */ | 55 | #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup */ |
56 | #define CONFIG_DDR_SPD | 56 | #define CONFIG_DDR_SPD |
57 | #define CONFIG_MEM_INIT_VALUE 0xdeadbeef | 57 | #define CONFIG_MEM_INIT_VALUE 0xdeadbeef |
58 | #define SPD_EEPROM_ADDRESS 0x54 | 58 | #define SPD_EEPROM_ADDRESS 0x54 |
59 | #define CONFIG_NUM_DDR_CONTROLLERS 1 | 59 | #define CONFIG_NUM_DDR_CONTROLLERS 1 |
60 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 | 60 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 |
61 | #define CONFIG_CHIP_SELECTS_PER_CTRL 2 | 61 | #define CONFIG_CHIP_SELECTS_PER_CTRL 2 |
62 | #define CONFIG_DDR_ECC | 62 | #define CONFIG_DDR_ECC |
63 | #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER | 63 | #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER |
64 | #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 | 64 | #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 |
65 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE | 65 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE |
66 | #define CONFIG_VERY_BIG_RAM | 66 | #define CONFIG_VERY_BIG_RAM |
67 | 67 | ||
68 | #define CONFIG_SYS_CLK_FREQ 66666666 | 68 | #define CONFIG_SYS_CLK_FREQ 66666666 |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * These can be toggled for performance analysis, otherwise use default. | 71 | * These can be toggled for performance analysis, otherwise use default. |
72 | */ | 72 | */ |
73 | #define CONFIG_L2_CACHE /* toggle L2 cache */ | 73 | #define CONFIG_L2_CACHE /* toggle L2 cache */ |
74 | #define CONFIG_BTB /* toggle branch predition */ | 74 | #define CONFIG_BTB /* toggle branch predition */ |
75 | #define CONFIG_ENABLE_36BIT_PHYS 1 | 75 | #define CONFIG_ENABLE_36BIT_PHYS 1 |
76 | 76 | ||
77 | /* | 77 | /* |
78 | * Base addresses -- Note these are effective addresses where the | 78 | * Base addresses -- Note these are effective addresses where the |
79 | * actual resources get mapped (not physical addresses) | 79 | * actual resources get mapped (not physical addresses) |
80 | */ | 80 | */ |
81 | #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff700000 /* CCSRBAR Default */ | 81 | #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff700000 /* CCSRBAR Default */ |
82 | #define CONFIG_SYS_CCSRBAR 0xef000000 /* relocated CCSRBAR */ | 82 | #define CONFIG_SYS_CCSRBAR 0xef000000 /* relocated CCSRBAR */ |
83 | #define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR /* physical addr of CCSRBAR */ | 83 | #define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR /* physical addr of CCSRBAR */ |
84 | #define CONFIG_SYS_IMMR CONFIG_SYS_CCSRBAR /* PQII uses CONFIG_SYS_IMMR */ | 84 | #define CONFIG_SYS_IMMR CONFIG_SYS_CCSRBAR /* PQII uses CONFIG_SYS_IMMR */ |
85 | #define CONFIG_SYS_PCI1_ADDR (CONFIG_SYS_CCSRBAR + 0x8000) | 85 | #define CONFIG_SYS_PCI1_ADDR (CONFIG_SYS_CCSRBAR + 0x8000) |
86 | 86 | ||
87 | /* | 87 | /* |
88 | * Diagnostics | 88 | * Diagnostics |
89 | */ | 89 | */ |
90 | #define CONFIG_SYS_ALT_MEMTEST | 90 | #define CONFIG_SYS_ALT_MEMTEST |
91 | #define CONFIG_SYS_MEMTEST_START 0x10000000 | 91 | #define CONFIG_SYS_MEMTEST_START 0x10000000 |
92 | #define CONFIG_SYS_MEMTEST_END 0x20000000 | 92 | #define CONFIG_SYS_MEMTEST_END 0x20000000 |
93 | 93 | ||
94 | /* | 94 | /* |
95 | * Memory map | 95 | * Memory map |
96 | * 0x0000_0000 0x7fff_ffff DDR 2G Cacheable | 96 | * 0x0000_0000 0x7fff_ffff DDR 2G Cacheable |
97 | * 0x8000_0000 0xbfff_ffff PCI1 Mem 1G non-cacheable | 97 | * 0x8000_0000 0xbfff_ffff PCI1 Mem 1G non-cacheable |
98 | * 0xe000_0000 0xe7ff_ffff SRAM/SSRAM/L1 Cache 128M non-cacheable | 98 | * 0xe000_0000 0xe7ff_ffff SRAM/SSRAM/L1 Cache 128M non-cacheable |
99 | * 0xe800_0000 0xe87f_ffff PCI1 IO 8M non-cacheable | 99 | * 0xe800_0000 0xe87f_ffff PCI1 IO 8M non-cacheable |
100 | * 0xef00_0000 0xef0f_ffff CCSR/IMMR 1M non-cacheable | 100 | * 0xef00_0000 0xef0f_ffff CCSR/IMMR 1M non-cacheable |
101 | * 0xef80_0000 0xef8f_ffff NAND Flash 1M non-cacheable | 101 | * 0xef80_0000 0xef8f_ffff NAND Flash 1M non-cacheable |
102 | * 0xf800_0000 0xfbff_ffff NOR Flash 2 64M non-cacheable | 102 | * 0xf800_0000 0xfbff_ffff NOR Flash 2 64M non-cacheable |
103 | * 0xfc00_0000 0xffff_ffff NOR Flash 1 64M non-cacheable | 103 | * 0xfc00_0000 0xffff_ffff NOR Flash 1 64M non-cacheable |
104 | */ | 104 | */ |
105 | 105 | ||
106 | #define CONFIG_SYS_LBC_LCRR (LCRR_CLKDIV_4 | LCRR_EADC_3) | 106 | #define CONFIG_SYS_LBC_LCRR (LCRR_CLKDIV_4 | LCRR_EADC_3) |
107 | 107 | ||
108 | /* | 108 | /* |
109 | * NAND flash configuration | 109 | * NAND flash configuration |
110 | */ | 110 | */ |
111 | #define CONFIG_SYS_NAND_BASE 0xef800000 | 111 | #define CONFIG_SYS_NAND_BASE 0xef800000 |
112 | #define CONFIG_SYS_NAND_BASE2 0xef840000 /* Unused at this time */ | 112 | #define CONFIG_SYS_NAND_BASE2 0xef840000 /* Unused at this time */ |
113 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 | 113 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
114 | #define CONFIG_NAND_ACTL | 114 | #define CONFIG_NAND_ACTL |
115 | #define CONFIG_SYS_NAND_ACTL_CLE (1 << 3) /* ADDR3 is CLE */ | 115 | #define CONFIG_SYS_NAND_ACTL_CLE (1 << 3) /* ADDR3 is CLE */ |
116 | #define CONFIG_SYS_NAND_ACTL_ALE (1 << 4) /* ADDR4 is ALE */ | 116 | #define CONFIG_SYS_NAND_ACTL_ALE (1 << 4) /* ADDR4 is ALE */ |
117 | #define CONFIG_SYS_NAND_ACTL_NCE (0) /* NCE not controlled by ADDR */ | 117 | #define CONFIG_SYS_NAND_ACTL_NCE (0) /* NCE not controlled by ADDR */ |
118 | #define CONFIG_SYS_NAND_ACTL_DELAY 25 | 118 | #define CONFIG_SYS_NAND_ACTL_DELAY 25 |
119 | 119 | ||
120 | /* | 120 | /* |
121 | * NOR flash configuration | 121 | * NOR flash configuration |
122 | */ | 122 | */ |
123 | #define CONFIG_SYS_FLASH_BASE 0xfc000000 | 123 | #define CONFIG_SYS_FLASH_BASE 0xfc000000 |
124 | #define CONFIG_SYS_FLASH_BASE2 0xf8000000 | 124 | #define CONFIG_SYS_FLASH_BASE2 0xf8000000 |
125 | #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE2} | 125 | #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE2} |
126 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */ | 126 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */ |
127 | #define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */ | 127 | #define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */ |
128 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ | 128 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ |
129 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ | 129 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ |
130 | #define CONFIG_FLASH_CFI_DRIVER | 130 | #define CONFIG_FLASH_CFI_DRIVER |
131 | #define CONFIG_SYS_FLASH_CFI | 131 | #define CONFIG_SYS_FLASH_CFI |
132 | #define CONFIG_SYS_FLASH_AUTOPROTECT_LIST { {0xfff40000, 0xc0000}, \ | 132 | #define CONFIG_SYS_FLASH_AUTOPROTECT_LIST { {0xfff40000, 0xc0000}, \ |
133 | {0xfbf40000, 0xc0000} } | 133 | {0xfbf40000, 0xc0000} } |
134 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ | 134 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ |
135 | 135 | ||
136 | /* | 136 | /* |
137 | * Chip select configuration | 137 | * Chip select configuration |
138 | */ | 138 | */ |
139 | /* NOR Flash 0 on CS0 */ | 139 | /* NOR Flash 0 on CS0 */ |
140 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | \ | 140 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | \ |
141 | BR_PS_16 | \ | 141 | BR_PS_16 | \ |
142 | BR_V) | 142 | BR_V) |
143 | #define CONFIG_SYS_OR0_PRELIM (OR_AM_64MB | \ | 143 | #define CONFIG_SYS_OR0_PRELIM (OR_AM_64MB | \ |
144 | OR_GPCM_ACS_DIV4 | \ | 144 | OR_GPCM_ACS_DIV4 | \ |
145 | OR_GPCM_SCY_8) | 145 | OR_GPCM_SCY_8) |
146 | 146 | ||
147 | /* NOR Flash 1 on CS1 */ | 147 | /* NOR Flash 1 on CS1 */ |
148 | #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_FLASH_BASE2 | \ | 148 | #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_FLASH_BASE2 | \ |
149 | BR_PS_16 | \ | 149 | BR_PS_16 | \ |
150 | BR_V) | 150 | BR_V) |
151 | #define CONFIG_SYS_OR1_PRELIM CONFIG_SYS_OR0_PRELIM | 151 | #define CONFIG_SYS_OR1_PRELIM CONFIG_SYS_OR0_PRELIM |
152 | 152 | ||
153 | /* NAND flash on CS2 */ | 153 | /* NAND flash on CS2 */ |
154 | #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_NAND_BASE | \ | 154 | #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_NAND_BASE | \ |
155 | BR_PS_8 | \ | 155 | BR_PS_8 | \ |
156 | BR_V) | 156 | BR_V) |
157 | 157 | ||
158 | /* NAND flash on CS2 */ | 158 | /* NAND flash on CS2 */ |
159 | #define CONFIG_SYS_OR2_PRELIM (OR_AM_256KB | \ | 159 | #define CONFIG_SYS_OR2_PRELIM (OR_AM_256KB | \ |
160 | OR_GPCM_BCTLD | \ | 160 | OR_GPCM_BCTLD | \ |
161 | OR_GPCM_CSNT | \ | 161 | OR_GPCM_CSNT | \ |
162 | OR_GPCM_ACS_DIV4 | \ | 162 | OR_GPCM_ACS_DIV4 | \ |
163 | OR_GPCM_SCY_4 | \ | 163 | OR_GPCM_SCY_4 | \ |
164 | OR_GPCM_TRLX | \ | 164 | OR_GPCM_TRLX | \ |
165 | OR_GPCM_EHTR) | 165 | OR_GPCM_EHTR) |
166 | 166 | ||
167 | /* NAND flash on CS3 */ | 167 | /* NAND flash on CS3 */ |
168 | #define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_NAND_BASE2 | \ | 168 | #define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_NAND_BASE2 | \ |
169 | BR_PS_8 | \ | 169 | BR_PS_8 | \ |
170 | BR_V) | 170 | BR_V) |
171 | #define CONFIG_SYS_OR3_PRELIM CONFIG_SYS_OR2_PRELIM | 171 | #define CONFIG_SYS_OR3_PRELIM CONFIG_SYS_OR2_PRELIM |
172 | 172 | ||
173 | /* | 173 | /* |
174 | * Use L1 as initial stack | 174 | * Use L1 as initial stack |
175 | */ | 175 | */ |
176 | #define CONFIG_SYS_INIT_RAM_LOCK 1 | 176 | #define CONFIG_SYS_INIT_RAM_LOCK 1 |
177 | #define CONFIG_SYS_INIT_RAM_ADDR 0xe0000000 | 177 | #define CONFIG_SYS_INIT_RAM_ADDR 0xe0000000 |
178 | #define CONFIG_SYS_INIT_RAM_END 0x4000 | 178 | #define CONFIG_SYS_INIT_RAM_END 0x4000 |
179 | 179 | ||
180 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data */ | 180 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data */ |
181 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 181 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
182 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET | 182 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
183 | 183 | ||
184 | #define CONFIG_SYS_MONITOR_LEN (512 * 1024) /* Reserve 512 KB for Mon */ | 184 | #define CONFIG_SYS_MONITOR_LEN (512 * 1024) /* Reserve 512 KB for Mon */ |
185 | #define CONFIG_SYS_MALLOC_LEN (1024 * 1024) /* Reserved for malloc */ | 185 | #define CONFIG_SYS_MALLOC_LEN (1024 * 1024) /* Reserved for malloc */ |
186 | 186 | ||
187 | /* | 187 | /* |
188 | * Serial Port | 188 | * Serial Port |
189 | */ | 189 | */ |
190 | #define CONFIG_CONS_INDEX 1 | 190 | #define CONFIG_CONS_INDEX 1 |
191 | #define CONFIG_SYS_NS16550 | 191 | #define CONFIG_SYS_NS16550 |
192 | #define CONFIG_SYS_NS16550_SERIAL | 192 | #define CONFIG_SYS_NS16550_SERIAL |
193 | #define CONFIG_SYS_NS16550_REG_SIZE 1 | 193 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
194 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) | 194 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) |
195 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) | 195 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) |
196 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) | 196 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) |
197 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 197 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
198 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200} | 198 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200} |
199 | #define CONFIG_BAUDRATE 115200 | 199 | #define CONFIG_BAUDRATE 115200 |
200 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ | 200 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
201 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ | 201 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
202 | 202 | ||
203 | /* | 203 | /* |
204 | * Use the HUSH parser | 204 | * Use the HUSH parser |
205 | */ | 205 | */ |
206 | #define CONFIG_SYS_HUSH_PARSER | 206 | #define CONFIG_SYS_HUSH_PARSER |
207 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | 207 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
208 | 208 | ||
209 | /* | 209 | /* |
210 | * Pass open firmware flat tree | 210 | * Pass open firmware flat tree |
211 | */ | 211 | */ |
212 | #define CONFIG_OF_LIBFDT 1 | 212 | #define CONFIG_OF_LIBFDT 1 |
213 | #define CONFIG_OF_BOARD_SETUP 1 | 213 | #define CONFIG_OF_BOARD_SETUP 1 |
214 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 | 214 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 |
215 | 215 | ||
216 | #define CONFIG_SYS_64BIT_VSPRINTF 1 | 216 | #define CONFIG_SYS_64BIT_VSPRINTF 1 |
217 | #define CONFIG_SYS_64BIT_STRTOUL 1 | 217 | #define CONFIG_SYS_64BIT_STRTOUL 1 |
218 | 218 | ||
219 | /* | 219 | /* |
220 | * I2C | 220 | * I2C |
221 | */ | 221 | */ |
222 | #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ | 222 | #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ |
223 | #define CONFIG_HARD_I2C /* I2C with hardware support */ | 223 | #define CONFIG_HARD_I2C /* I2C with hardware support */ |
224 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ | 224 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ |
225 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 225 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
226 | #define CONFIG_SYS_I2C_OFFSET 0x3000 | 226 | #define CONFIG_SYS_I2C_OFFSET 0x3000 |
227 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 | 227 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 |
228 | #define CONFIG_I2C_MULTI_BUS | 228 | #define CONFIG_I2C_MULTI_BUS |
229 | #define CONFIG_I2C_CMD_TREE | ||
230 | 229 | ||
231 | /* I2C EEPROM */ | 230 | /* I2C EEPROM */ |
232 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 | 231 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 |
233 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 | 232 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 |
234 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6 /* 64 byte pages */ | 233 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6 /* 64 byte pages */ |
235 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 /* take up to 10 msec */ | 234 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 /* take up to 10 msec */ |
236 | 235 | ||
237 | /* I2C RTC */ | 236 | /* I2C RTC */ |
238 | #define CONFIG_RTC_M41T11 1 | 237 | #define CONFIG_RTC_M41T11 1 |
239 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 | 238 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 |
240 | #define CONFIG_SYS_M41T11_BASE_YEAR 2000 | 239 | #define CONFIG_SYS_M41T11_BASE_YEAR 2000 |
241 | 240 | ||
242 | /* GPIO */ | 241 | /* GPIO */ |
243 | #define CONFIG_PCA953X | 242 | #define CONFIG_PCA953X |
244 | #define CONFIG_SYS_I2C_PCA953X_ADDR0 0x18 | 243 | #define CONFIG_SYS_I2C_PCA953X_ADDR0 0x18 |
245 | #define CONFIG_SYS_I2C_PCA953X_ADDR1 0x19 | 244 | #define CONFIG_SYS_I2C_PCA953X_ADDR1 0x19 |
246 | #define CONFIG_SYS_I2C_PCA953X_ADDR CONFIG_SYS_I2C_PCA953X_ADDR0 | 245 | #define CONFIG_SYS_I2C_PCA953X_ADDR CONFIG_SYS_I2C_PCA953X_ADDR0 |
247 | 246 | ||
248 | /* PCA957 @ 0x18 */ | 247 | /* PCA957 @ 0x18 */ |
249 | #define CONFIG_SYS_PCA953X_BRD_CFG0 0x01 | 248 | #define CONFIG_SYS_PCA953X_BRD_CFG0 0x01 |
250 | #define CONFIG_SYS_PCA953X_BRD_CFG1 0x02 | 249 | #define CONFIG_SYS_PCA953X_BRD_CFG1 0x02 |
251 | #define CONFIG_SYS_PCA953X_BRD_CFG2 0x04 | 250 | #define CONFIG_SYS_PCA953X_BRD_CFG2 0x04 |
252 | #define CONFIG_SYS_PCA953X_XMC_ROOT0 0x08 | 251 | #define CONFIG_SYS_PCA953X_XMC_ROOT0 0x08 |
253 | #define CONFIG_SYS_PCA953X_FLASH_PASS_CS 0x10 | 252 | #define CONFIG_SYS_PCA953X_FLASH_PASS_CS 0x10 |
254 | #define CONFIG_SYS_PCA953X_FLASH_WP 0x20 | 253 | #define CONFIG_SYS_PCA953X_FLASH_WP 0x20 |
255 | #define CONFIG_SYS_PCA953X_MONARCH 0x40 | 254 | #define CONFIG_SYS_PCA953X_MONARCH 0x40 |
256 | #define CONFIG_SYS_PCA953X_EREADY 0x80 | 255 | #define CONFIG_SYS_PCA953X_EREADY 0x80 |
257 | 256 | ||
258 | /* PCA957 @ 0x19 */ | 257 | /* PCA957 @ 0x19 */ |
259 | #define CONFIG_SYS_PCA953X_P14_IO0 0x01 | 258 | #define CONFIG_SYS_PCA953X_P14_IO0 0x01 |
260 | #define CONFIG_SYS_PCA953X_P14_IO1 0x02 | 259 | #define CONFIG_SYS_PCA953X_P14_IO1 0x02 |
261 | #define CONFIG_SYS_PCA953X_P14_IO2 0x04 | 260 | #define CONFIG_SYS_PCA953X_P14_IO2 0x04 |
262 | #define CONFIG_SYS_PCA953X_P14_IO3 0x08 | 261 | #define CONFIG_SYS_PCA953X_P14_IO3 0x08 |
263 | #define CONFIG_SYS_PCA953X_P14_IO4 0x10 | 262 | #define CONFIG_SYS_PCA953X_P14_IO4 0x10 |
264 | #define CONFIG_SYS_PCA953X_P14_IO5 0x20 | 263 | #define CONFIG_SYS_PCA953X_P14_IO5 0x20 |
265 | #define CONFIG_SYS_PCA953X_P14_IO6 0x40 | 264 | #define CONFIG_SYS_PCA953X_P14_IO6 0x40 |
266 | #define CONFIG_SYS_PCA953X_P14_IO7 0x80 | 265 | #define CONFIG_SYS_PCA953X_P14_IO7 0x80 |
267 | 266 | ||
268 | /* | 267 | /* |
269 | * General PCI | 268 | * General PCI |
270 | * Memory space is mapped 1-1, but I/O space must start from 0. | 269 | * Memory space is mapped 1-1, but I/O space must start from 0. |
271 | */ | 270 | */ |
272 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 | 271 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 |
273 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE | 272 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE |
274 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x40000000 /* 1G */ | 273 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x40000000 /* 1G */ |
275 | #define CONFIG_SYS_PCI1_IO_BASE 0x00000000 | 274 | #define CONFIG_SYS_PCI1_IO_BASE 0x00000000 |
276 | #define CONFIG_SYS_PCI1_IO_PHYS 0xe8000000 | 275 | #define CONFIG_SYS_PCI1_IO_PHYS 0xe8000000 |
277 | #define CONFIG_SYS_PCI1_IO_SIZE 0x00800000 /* 1M */ | 276 | #define CONFIG_SYS_PCI1_IO_SIZE 0x00800000 /* 1M */ |
278 | 277 | ||
279 | /* | 278 | /* |
280 | * Networking options | 279 | * Networking options |
281 | */ | 280 | */ |
282 | #define CONFIG_TSEC_ENET /* tsec ethernet support */ | 281 | #define CONFIG_TSEC_ENET /* tsec ethernet support */ |
283 | #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */ | 282 | #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */ |
284 | #define CONFIG_NET_MULTI 1 | 283 | #define CONFIG_NET_MULTI 1 |
285 | #define CONFIG_MII 1 /* MII PHY management */ | 284 | #define CONFIG_MII 1 /* MII PHY management */ |
286 | #define CONFIG_ETHPRIME "eTSEC1" | 285 | #define CONFIG_ETHPRIME "eTSEC1" |
287 | 286 | ||
288 | #define CONFIG_TSEC1 1 | 287 | #define CONFIG_TSEC1 1 |
289 | #define CONFIG_TSEC1_NAME "eTSEC1" | 288 | #define CONFIG_TSEC1_NAME "eTSEC1" |
290 | #define TSEC1_FLAGS TSEC_GIGABIT | 289 | #define TSEC1_FLAGS TSEC_GIGABIT |
291 | #define TSEC1_PHY_ADDR 1 | 290 | #define TSEC1_PHY_ADDR 1 |
292 | #define TSEC1_PHYIDX 0 | 291 | #define TSEC1_PHYIDX 0 |
293 | #define CONFIG_HAS_ETH0 | 292 | #define CONFIG_HAS_ETH0 |
294 | 293 | ||
295 | #define CONFIG_TSEC2 1 | 294 | #define CONFIG_TSEC2 1 |
296 | #define CONFIG_TSEC2_NAME "eTSEC2" | 295 | #define CONFIG_TSEC2_NAME "eTSEC2" |
297 | #define TSEC2_FLAGS TSEC_GIGABIT | 296 | #define TSEC2_FLAGS TSEC_GIGABIT |
298 | #define TSEC2_PHY_ADDR 2 | 297 | #define TSEC2_PHY_ADDR 2 |
299 | #define TSEC2_PHYIDX 0 | 298 | #define TSEC2_PHYIDX 0 |
300 | #define CONFIG_HAS_ETH1 | 299 | #define CONFIG_HAS_ETH1 |
301 | 300 | ||
302 | #define CONFIG_TSEC3 1 | 301 | #define CONFIG_TSEC3 1 |
303 | #define CONFIG_TSEC3_NAME "eTSEC3" | 302 | #define CONFIG_TSEC3_NAME "eTSEC3" |
304 | #define TSEC3_FLAGS TSEC_GIGABIT | 303 | #define TSEC3_FLAGS TSEC_GIGABIT |
305 | #define TSEC3_PHY_ADDR 3 | 304 | #define TSEC3_PHY_ADDR 3 |
306 | #define TSEC3_PHYIDX 0 | 305 | #define TSEC3_PHYIDX 0 |
307 | #define CONFIG_HAS_ETH2 | 306 | #define CONFIG_HAS_ETH2 |
308 | 307 | ||
309 | #define CONFIG_TSEC4 1 | 308 | #define CONFIG_TSEC4 1 |
310 | #define CONFIG_TSEC4_NAME "eTSEC4" | 309 | #define CONFIG_TSEC4_NAME "eTSEC4" |
311 | #define TSEC4_FLAGS TSEC_GIGABIT | 310 | #define TSEC4_FLAGS TSEC_GIGABIT |
312 | #define TSEC4_PHY_ADDR 4 | 311 | #define TSEC4_PHY_ADDR 4 |
313 | #define TSEC4_PHYIDX 0 | 312 | #define TSEC4_PHYIDX 0 |
314 | #define CONFIG_HAS_ETH3 | 313 | #define CONFIG_HAS_ETH3 |
315 | 314 | ||
316 | /* | 315 | /* |
317 | * BOOTP options | 316 | * BOOTP options |
318 | */ | 317 | */ |
319 | #define CONFIG_BOOTP_BOOTFILESIZE | 318 | #define CONFIG_BOOTP_BOOTFILESIZE |
320 | #define CONFIG_BOOTP_BOOTPATH | 319 | #define CONFIG_BOOTP_BOOTPATH |
321 | #define CONFIG_BOOTP_GATEWAY | 320 | #define CONFIG_BOOTP_GATEWAY |
322 | 321 | ||
323 | /* | 322 | /* |
324 | * Command configuration. | 323 | * Command configuration. |
325 | */ | 324 | */ |
326 | #include <config_cmd_default.h> | 325 | #include <config_cmd_default.h> |
327 | 326 | ||
328 | #define CONFIG_CMD_ASKENV | 327 | #define CONFIG_CMD_ASKENV |
329 | #define CONFIG_CMD_DATE | 328 | #define CONFIG_CMD_DATE |
330 | #define CONFIG_CMD_DHCP | 329 | #define CONFIG_CMD_DHCP |
331 | #define CONFIG_CMD_EEPROM | 330 | #define CONFIG_CMD_EEPROM |
332 | #define CONFIG_CMD_ELF | 331 | #define CONFIG_CMD_ELF |
333 | #define CONFIG_CMD_SAVEENV | 332 | #define CONFIG_CMD_SAVEENV |
334 | #define CONFIG_CMD_FLASH | 333 | #define CONFIG_CMD_FLASH |
335 | #define CONFIG_CMD_I2C | 334 | #define CONFIG_CMD_I2C |
336 | #define CONFIG_CMD_JFFS2 | 335 | #define CONFIG_CMD_JFFS2 |
337 | #define CONFIG_CMD_MII | 336 | #define CONFIG_CMD_MII |
338 | #define CONFIG_CMD_NAND | 337 | #define CONFIG_CMD_NAND |
339 | #define CONFIG_CMD_NET | 338 | #define CONFIG_CMD_NET |
340 | #define CONFIG_CMD_PCA953X | 339 | #define CONFIG_CMD_PCA953X |
341 | #define CONFIG_CMD_PCA953X_INFO | 340 | #define CONFIG_CMD_PCA953X_INFO |
342 | #define CONFIG_CMD_PCI | 341 | #define CONFIG_CMD_PCI |
343 | #define CONFIG_CMD_PING | 342 | #define CONFIG_CMD_PING |
344 | #define CONFIG_CMD_SNTP | 343 | #define CONFIG_CMD_SNTP |
345 | 344 | ||
346 | /* | 345 | /* |
347 | * Miscellaneous configurable options | 346 | * Miscellaneous configurable options |
348 | */ | 347 | */ |
349 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 348 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
350 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ | 349 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ |
351 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | 350 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
352 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | 351 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
353 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ | 352 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
354 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 353 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
355 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | 354 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
356 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ | 355 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ |
357 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ | 356 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ |
358 | #define CONFIG_LOADADDR 0x1000000 /* default location for tftp and bootm */ | 357 | #define CONFIG_LOADADDR 0x1000000 /* default location for tftp and bootm */ |
359 | #define CONFIG_BOOTDELAY 3 /* -1 disables auto-boot */ | 358 | #define CONFIG_BOOTDELAY 3 /* -1 disables auto-boot */ |
360 | #define CONFIG_PANIC_HANG /* do not reset board on panic */ | 359 | #define CONFIG_PANIC_HANG /* do not reset board on panic */ |
361 | #define CONFIG_PREBOOT /* enable preboot variable */ | 360 | #define CONFIG_PREBOOT /* enable preboot variable */ |
362 | #define CONFIG_FIT 1 | 361 | #define CONFIG_FIT 1 |
363 | #define CONFIG_FIT_VERBOSE 1 | 362 | #define CONFIG_FIT_VERBOSE 1 |
364 | #define CONFIG_INTEGRITY /* support booting INTEGRITY OS */ | 363 | #define CONFIG_INTEGRITY /* support booting INTEGRITY OS */ |
365 | #define CONFIG_INTERRUPTS /* enable pci, srio, ddr interrupts */ | 364 | #define CONFIG_INTERRUPTS /* enable pci, srio, ddr interrupts */ |
366 | 365 | ||
367 | /* | 366 | /* |
368 | * For booting Linux, the board info and command line data | 367 | * For booting Linux, the board info and command line data |
369 | * have to be in the first 16 MB of memory, since this is | 368 | * have to be in the first 16 MB of memory, since this is |
370 | * the maximum mapped by the Linux kernel during initialization. | 369 | * the maximum mapped by the Linux kernel during initialization. |
371 | */ | 370 | */ |
372 | #define CONFIG_SYS_BOOTMAPSZ (16 << 20) /* Initial Memory map for Linux*/ | 371 | #define CONFIG_SYS_BOOTMAPSZ (16 << 20) /* Initial Memory map for Linux*/ |
373 | 372 | ||
374 | /* | 373 | /* |
375 | * Boot Flags | 374 | * Boot Flags |
376 | */ | 375 | */ |
377 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 376 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
378 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 377 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
379 | 378 | ||
380 | /* | 379 | /* |
381 | * Environment Configuration | 380 | * Environment Configuration |
382 | */ | 381 | */ |
383 | #define CONFIG_ENV_IS_IN_FLASH 1 | 382 | #define CONFIG_ENV_IS_IN_FLASH 1 |
384 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128k (one sector) for env */ | 383 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128k (one sector) for env */ |
385 | #define CONFIG_ENV_SIZE 0x8000 | 384 | #define CONFIG_ENV_SIZE 0x8000 |
386 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - (256 * 1024)) | 385 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - (256 * 1024)) |
387 | 386 | ||
388 | /* | 387 | /* |
389 | * Flash memory map: | 388 | * Flash memory map: |
390 | * fff80000 - ffffffff Pri U-Boot (512 KB) | 389 | * fff80000 - ffffffff Pri U-Boot (512 KB) |
391 | * fff40000 - fff7ffff Pri U-Boot Environment (256 KB) | 390 | * fff40000 - fff7ffff Pri U-Boot Environment (256 KB) |
392 | * fff00000 - fff3ffff Pri FDT (256KB) | 391 | * fff00000 - fff3ffff Pri FDT (256KB) |
393 | * fef00000 - ffefffff Pri OS image (16MB) | 392 | * fef00000 - ffefffff Pri OS image (16MB) |
394 | * fc000000 - feefffff Pri OS Use/Filesystem (47MB) | 393 | * fc000000 - feefffff Pri OS Use/Filesystem (47MB) |
395 | * | 394 | * |
396 | * fbf80000 - fbffffff Sec U-Boot (512 KB) | 395 | * fbf80000 - fbffffff Sec U-Boot (512 KB) |
397 | * fbf40000 - fbf7ffff Sec U-Boot Environment (256 KB) | 396 | * fbf40000 - fbf7ffff Sec U-Boot Environment (256 KB) |
398 | * fbf00000 - fbf3ffff Sec FDT (256KB) | 397 | * fbf00000 - fbf3ffff Sec FDT (256KB) |
399 | * faf00000 - fbefffff Sec OS image (16MB) | 398 | * faf00000 - fbefffff Sec OS image (16MB) |
400 | * f8000000 - faefffff Sec OS Use/Filesystem (47MB) | 399 | * f8000000 - faefffff Sec OS Use/Filesystem (47MB) |
401 | */ | 400 | */ |
402 | #define CONFIG_UBOOT1_ENV_ADDR MK_STR(0xfff80000) | 401 | #define CONFIG_UBOOT1_ENV_ADDR MK_STR(0xfff80000) |
403 | #define CONFIG_UBOOT2_ENV_ADDR MK_STR(0xfbf80000) | 402 | #define CONFIG_UBOOT2_ENV_ADDR MK_STR(0xfbf80000) |
404 | #define CONFIG_FDT1_ENV_ADDR MK_STR(0xfff00000) | 403 | #define CONFIG_FDT1_ENV_ADDR MK_STR(0xfff00000) |
405 | #define CONFIG_FDT2_ENV_ADDR MK_STR(0xfbf00000) | 404 | #define CONFIG_FDT2_ENV_ADDR MK_STR(0xfbf00000) |
406 | #define CONFIG_OS1_ENV_ADDR MK_STR(0xfef00000) | 405 | #define CONFIG_OS1_ENV_ADDR MK_STR(0xfef00000) |
407 | #define CONFIG_OS2_ENV_ADDR MK_STR(0xfaf00000) | 406 | #define CONFIG_OS2_ENV_ADDR MK_STR(0xfaf00000) |
408 | 407 | ||
409 | #define CONFIG_PROG_UBOOT1 \ | 408 | #define CONFIG_PROG_UBOOT1 \ |
410 | "$download_cmd $loadaddr $ubootfile; " \ | 409 | "$download_cmd $loadaddr $ubootfile; " \ |
411 | "if test $? -eq 0; then " \ | 410 | "if test $? -eq 0; then " \ |
412 | "protect off "CONFIG_UBOOT1_ENV_ADDR" +80000; " \ | 411 | "protect off "CONFIG_UBOOT1_ENV_ADDR" +80000; " \ |
413 | "erase "CONFIG_UBOOT1_ENV_ADDR" +80000; " \ | 412 | "erase "CONFIG_UBOOT1_ENV_ADDR" +80000; " \ |
414 | "cp.w $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 40000; " \ | 413 | "cp.w $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 40000; " \ |
415 | "protect on "CONFIG_UBOOT1_ENV_ADDR" +80000; " \ | 414 | "protect on "CONFIG_UBOOT1_ENV_ADDR" +80000; " \ |
416 | "cmp.b $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 80000; " \ | 415 | "cmp.b $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 80000; " \ |
417 | "if test $? -ne 0; then " \ | 416 | "if test $? -ne 0; then " \ |
418 | "echo PROGRAM FAILED; " \ | 417 | "echo PROGRAM FAILED; " \ |
419 | "else; " \ | 418 | "else; " \ |
420 | "echo PROGRAM SUCCEEDED; " \ | 419 | "echo PROGRAM SUCCEEDED; " \ |
421 | "fi; " \ | 420 | "fi; " \ |
422 | "else; " \ | 421 | "else; " \ |
423 | "echo DOWNLOAD FAILED; " \ | 422 | "echo DOWNLOAD FAILED; " \ |
424 | "fi;" | 423 | "fi;" |
425 | 424 | ||
426 | #define CONFIG_PROG_UBOOT2 \ | 425 | #define CONFIG_PROG_UBOOT2 \ |
427 | "$download_cmd $loadaddr $ubootfile; " \ | 426 | "$download_cmd $loadaddr $ubootfile; " \ |
428 | "if test $? -eq 0; then " \ | 427 | "if test $? -eq 0; then " \ |
429 | "protect off "CONFIG_UBOOT2_ENV_ADDR" +80000; " \ | 428 | "protect off "CONFIG_UBOOT2_ENV_ADDR" +80000; " \ |
430 | "erase "CONFIG_UBOOT2_ENV_ADDR" +80000; " \ | 429 | "erase "CONFIG_UBOOT2_ENV_ADDR" +80000; " \ |
431 | "cp.w $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 40000; " \ | 430 | "cp.w $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 40000; " \ |
432 | "protect on "CONFIG_UBOOT2_ENV_ADDR" +80000; " \ | 431 | "protect on "CONFIG_UBOOT2_ENV_ADDR" +80000; " \ |
433 | "cmp.b $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 80000; " \ | 432 | "cmp.b $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 80000; " \ |
434 | "if test $? -ne 0; then " \ | 433 | "if test $? -ne 0; then " \ |
435 | "echo PROGRAM FAILED; " \ | 434 | "echo PROGRAM FAILED; " \ |
436 | "else; " \ | 435 | "else; " \ |
437 | "echo PROGRAM SUCCEEDED; " \ | 436 | "echo PROGRAM SUCCEEDED; " \ |
438 | "fi; " \ | 437 | "fi; " \ |
439 | "else; " \ | 438 | "else; " \ |
440 | "echo DOWNLOAD FAILED; " \ | 439 | "echo DOWNLOAD FAILED; " \ |
441 | "fi;" | 440 | "fi;" |
442 | 441 | ||
443 | #define CONFIG_BOOT_OS_NET \ | 442 | #define CONFIG_BOOT_OS_NET \ |
444 | "$download_cmd $osaddr $osfile; " \ | 443 | "$download_cmd $osaddr $osfile; " \ |
445 | "if test $? -eq 0; then " \ | 444 | "if test $? -eq 0; then " \ |
446 | "if test -n $fdtaddr; then " \ | 445 | "if test -n $fdtaddr; then " \ |
447 | "$download_cmd $fdtaddr $fdtfile; " \ | 446 | "$download_cmd $fdtaddr $fdtfile; " \ |
448 | "if test $? -eq 0; then " \ | 447 | "if test $? -eq 0; then " \ |
449 | "bootm $osaddr - $fdtaddr; " \ | 448 | "bootm $osaddr - $fdtaddr; " \ |
450 | "else; " \ | 449 | "else; " \ |
451 | "echo FDT DOWNLOAD FAILED; " \ | 450 | "echo FDT DOWNLOAD FAILED; " \ |
452 | "fi; " \ | 451 | "fi; " \ |
453 | "else; " \ | 452 | "else; " \ |
454 | "bootm $osaddr; " \ | 453 | "bootm $osaddr; " \ |
455 | "fi; " \ | 454 | "fi; " \ |
456 | "else; " \ | 455 | "else; " \ |
457 | "echo OS DOWNLOAD FAILED; " \ | 456 | "echo OS DOWNLOAD FAILED; " \ |
458 | "fi;" | 457 | "fi;" |
459 | 458 | ||
460 | #define CONFIG_PROG_OS1 \ | 459 | #define CONFIG_PROG_OS1 \ |
461 | "$download_cmd $osaddr $osfile; " \ | 460 | "$download_cmd $osaddr $osfile; " \ |
462 | "if test $? -eq 0; then " \ | 461 | "if test $? -eq 0; then " \ |
463 | "erase "CONFIG_OS1_ENV_ADDR" +$filesize; " \ | 462 | "erase "CONFIG_OS1_ENV_ADDR" +$filesize; " \ |
464 | "cp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; " \ | 463 | "cp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; " \ |
465 | "cmp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; " \ | 464 | "cmp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; " \ |
466 | "if test $? -ne 0; then " \ | 465 | "if test $? -ne 0; then " \ |
467 | "echo OS PROGRAM FAILED; " \ | 466 | "echo OS PROGRAM FAILED; " \ |
468 | "else; " \ | 467 | "else; " \ |
469 | "echo OS PROGRAM SUCCEEDED; " \ | 468 | "echo OS PROGRAM SUCCEEDED; " \ |
470 | "fi; " \ | 469 | "fi; " \ |
471 | "else; " \ | 470 | "else; " \ |
472 | "echo OS DOWNLOAD FAILED; " \ | 471 | "echo OS DOWNLOAD FAILED; " \ |
473 | "fi;" | 472 | "fi;" |
474 | 473 | ||
475 | #define CONFIG_PROG_OS2 \ | 474 | #define CONFIG_PROG_OS2 \ |
476 | "$download_cmd $osaddr $osfile; " \ | 475 | "$download_cmd $osaddr $osfile; " \ |
477 | "if test $? -eq 0; then " \ | 476 | "if test $? -eq 0; then " \ |
478 | "erase "CONFIG_OS2_ENV_ADDR" +$filesize; " \ | 477 | "erase "CONFIG_OS2_ENV_ADDR" +$filesize; " \ |
479 | "cp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; " \ | 478 | "cp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; " \ |
480 | "cmp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; " \ | 479 | "cmp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; " \ |
481 | "if test $? -ne 0; then " \ | 480 | "if test $? -ne 0; then " \ |
482 | "echo OS PROGRAM FAILED; " \ | 481 | "echo OS PROGRAM FAILED; " \ |
483 | "else; " \ | 482 | "else; " \ |
484 | "echo OS PROGRAM SUCCEEDED; " \ | 483 | "echo OS PROGRAM SUCCEEDED; " \ |
485 | "fi; " \ | 484 | "fi; " \ |
486 | "else; " \ | 485 | "else; " \ |
487 | "echo OS DOWNLOAD FAILED; " \ | 486 | "echo OS DOWNLOAD FAILED; " \ |
488 | "fi;" | 487 | "fi;" |
489 | 488 | ||
490 | #define CONFIG_PROG_FDT1 \ | 489 | #define CONFIG_PROG_FDT1 \ |
491 | "$download_cmd $fdtaddr $fdtfile; " \ | 490 | "$download_cmd $fdtaddr $fdtfile; " \ |
492 | "if test $? -eq 0; then " \ | 491 | "if test $? -eq 0; then " \ |
493 | "erase "CONFIG_FDT1_ENV_ADDR" +$filesize;" \ | 492 | "erase "CONFIG_FDT1_ENV_ADDR" +$filesize;" \ |
494 | "cp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; " \ | 493 | "cp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; " \ |
495 | "cmp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; " \ | 494 | "cmp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; " \ |
496 | "if test $? -ne 0; then " \ | 495 | "if test $? -ne 0; then " \ |
497 | "echo FDT PROGRAM FAILED; " \ | 496 | "echo FDT PROGRAM FAILED; " \ |
498 | "else; " \ | 497 | "else; " \ |
499 | "echo FDT PROGRAM SUCCEEDED; " \ | 498 | "echo FDT PROGRAM SUCCEEDED; " \ |
500 | "fi; " \ | 499 | "fi; " \ |
501 | "else; " \ | 500 | "else; " \ |
502 | "echo FDT DOWNLOAD FAILED; " \ | 501 | "echo FDT DOWNLOAD FAILED; " \ |
503 | "fi;" | 502 | "fi;" |
504 | 503 | ||
505 | #define CONFIG_PROG_FDT2 \ | 504 | #define CONFIG_PROG_FDT2 \ |
506 | "$download_cmd $fdtaddr $fdtfile; " \ | 505 | "$download_cmd $fdtaddr $fdtfile; " \ |
507 | "if test $? -eq 0; then " \ | 506 | "if test $? -eq 0; then " \ |
508 | "erase "CONFIG_FDT2_ENV_ADDR" +$filesize;" \ | 507 | "erase "CONFIG_FDT2_ENV_ADDR" +$filesize;" \ |
509 | "cp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; " \ | 508 | "cp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; " \ |
510 | "cmp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; " \ | 509 | "cmp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; " \ |
511 | "if test $? -ne 0; then " \ | 510 | "if test $? -ne 0; then " \ |
512 | "echo FDT PROGRAM FAILED; " \ | 511 | "echo FDT PROGRAM FAILED; " \ |
513 | "else; " \ | 512 | "else; " \ |
514 | "echo FDT PROGRAM SUCCEEDED; " \ | 513 | "echo FDT PROGRAM SUCCEEDED; " \ |
515 | "fi; " \ | 514 | "fi; " \ |
516 | "else; " \ | 515 | "else; " \ |
517 | "echo FDT DOWNLOAD FAILED; " \ | 516 | "echo FDT DOWNLOAD FAILED; " \ |
518 | "fi;" | 517 | "fi;" |
519 | 518 | ||
520 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 519 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
521 | "autoload=yes\0" \ | 520 | "autoload=yes\0" \ |
522 | "download_cmd=tftp\0" \ | 521 | "download_cmd=tftp\0" \ |
523 | "console_args=console=ttyS0,115200\0" \ | 522 | "console_args=console=ttyS0,115200\0" \ |
524 | "root_args=root=/dev/nfs rw\0" \ | 523 | "root_args=root=/dev/nfs rw\0" \ |
525 | "misc_args=ip=on\0" \ | 524 | "misc_args=ip=on\0" \ |
526 | "set_bootargs=setenv bootargs ${console_args} ${root_args} ${misc_args}\0" \ | 525 | "set_bootargs=setenv bootargs ${console_args} ${root_args} ${misc_args}\0" \ |
527 | "bootfile=/home/user/file\0" \ | 526 | "bootfile=/home/user/file\0" \ |
528 | "osfile=/home/user/uImage-XPedite5200\0" \ | 527 | "osfile=/home/user/uImage-XPedite5200\0" \ |
529 | "fdtfile=/home/user/xpedite5200.dtb\0" \ | 528 | "fdtfile=/home/user/xpedite5200.dtb\0" \ |
530 | "ubootfile=/home/user/u-boot.bin\0" \ | 529 | "ubootfile=/home/user/u-boot.bin\0" \ |
531 | "fdtaddr=c00000\0" \ | 530 | "fdtaddr=c00000\0" \ |
532 | "osaddr=0x1000000\0" \ | 531 | "osaddr=0x1000000\0" \ |
533 | "loadaddr=0x1000000\0" \ | 532 | "loadaddr=0x1000000\0" \ |
534 | "prog_uboot1="CONFIG_PROG_UBOOT1"\0" \ | 533 | "prog_uboot1="CONFIG_PROG_UBOOT1"\0" \ |
535 | "prog_uboot2="CONFIG_PROG_UBOOT2"\0" \ | 534 | "prog_uboot2="CONFIG_PROG_UBOOT2"\0" \ |
536 | "prog_os1="CONFIG_PROG_OS1"\0" \ | 535 | "prog_os1="CONFIG_PROG_OS1"\0" \ |
537 | "prog_os2="CONFIG_PROG_OS2"\0" \ | 536 | "prog_os2="CONFIG_PROG_OS2"\0" \ |
538 | "prog_fdt1="CONFIG_PROG_FDT1"\0" \ | 537 | "prog_fdt1="CONFIG_PROG_FDT1"\0" \ |
539 | "prog_fdt2="CONFIG_PROG_FDT2"\0" \ | 538 | "prog_fdt2="CONFIG_PROG_FDT2"\0" \ |
540 | "bootcmd_net=run set_bootargs; "CONFIG_BOOT_OS_NET"\0" \ | 539 | "bootcmd_net=run set_bootargs; "CONFIG_BOOT_OS_NET"\0" \ |
541 | "bootcmd_flash1=run set_bootargs; " \ | 540 | "bootcmd_flash1=run set_bootargs; " \ |
542 | "bootm "CONFIG_OS1_ENV_ADDR" - "CONFIG_FDT1_ENV_ADDR"\0"\ | 541 | "bootm "CONFIG_OS1_ENV_ADDR" - "CONFIG_FDT1_ENV_ADDR"\0"\ |
543 | "bootcmd_flash2=run set_bootargs; " \ | 542 | "bootcmd_flash2=run set_bootargs; " \ |
544 | "bootm "CONFIG_OS2_ENV_ADDR" - "CONFIG_FDT2_ENV_ADDR"\0"\ | 543 | "bootm "CONFIG_OS2_ENV_ADDR" - "CONFIG_FDT2_ENV_ADDR"\0"\ |
545 | "bootcmd=run bootcmd_flash1\0" | 544 | "bootcmd=run bootcmd_flash1\0" |
546 | #endif /* __CONFIG_H */ | 545 | #endif /* __CONFIG_H */ |
547 | 546 |
include/configs/XPEDITE5370.h
1 | /* | 1 | /* |
2 | * Copyright 2008 Extreme Engineering Solutions, Inc. | 2 | * Copyright 2008 Extreme Engineering Solutions, Inc. |
3 | * Copyright 2007-2008 Freescale Semiconductor, Inc. | 3 | * Copyright 2007-2008 Freescale Semiconductor, Inc. |
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 | * xpedite5370 board configuration file | 25 | * xpedite5370 board configuration file |
26 | */ | 26 | */ |
27 | #ifndef __CONFIG_H | 27 | #ifndef __CONFIG_H |
28 | #define __CONFIG_H | 28 | #define __CONFIG_H |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * High Level Configuration Options | 31 | * High Level Configuration Options |
32 | */ | 32 | */ |
33 | #define CONFIG_BOOKE 1 /* BOOKE */ | 33 | #define CONFIG_BOOKE 1 /* BOOKE */ |
34 | #define CONFIG_E500 1 /* BOOKE e500 family */ | 34 | #define CONFIG_E500 1 /* BOOKE e500 family */ |
35 | #define CONFIG_MPC85xx 1 /* MPC8540/60/55/41/48 */ | 35 | #define CONFIG_MPC85xx 1 /* MPC8540/60/55/41/48 */ |
36 | #define CONFIG_MPC8572 1 | 36 | #define CONFIG_MPC8572 1 |
37 | #define CONFIG_XPEDITE5370 1 | 37 | #define CONFIG_XPEDITE5370 1 |
38 | #define CONFIG_SYS_BOARD_NAME "XPedite5370" | 38 | #define CONFIG_SYS_BOARD_NAME "XPedite5370" |
39 | #define CONFIG_NUM_CPUS 2 /* 2 Cores */ | 39 | #define CONFIG_NUM_CPUS 2 /* 2 Cores */ |
40 | #define CONFIG_BOARD_EARLY_INIT_R /* Call board_pre_init */ | 40 | #define CONFIG_BOARD_EARLY_INIT_R /* Call board_pre_init */ |
41 | #define CONFIG_RELOC_FIXUP_WORKS /* Fully relocate to SDRAM */ | 41 | #define CONFIG_RELOC_FIXUP_WORKS /* Fully relocate to SDRAM */ |
42 | 42 | ||
43 | #define CONFIG_PCI 1 /* Enable PCI/PCIE */ | 43 | #define CONFIG_PCI 1 /* Enable PCI/PCIE */ |
44 | #define CONFIG_PCI_PNP 1 /* do pci plug-and-play */ | 44 | #define CONFIG_PCI_PNP 1 /* do pci plug-and-play */ |
45 | #define CONFIG_PCI_SCAN_SHOW 1 /* show pci devices on startup */ | 45 | #define CONFIG_PCI_SCAN_SHOW 1 /* show pci devices on startup */ |
46 | #define CONFIG_PCIE1 1 /* PCIE controler 1 */ | 46 | #define CONFIG_PCIE1 1 /* PCIE controler 1 */ |
47 | #define CONFIG_PCIE2 1 /* PCIE controler 2 */ | 47 | #define CONFIG_PCIE2 1 /* PCIE controler 2 */ |
48 | #define CONFIG_FSL_PCI_INIT 1 /* Use common FSL init code */ | 48 | #define CONFIG_FSL_PCI_INIT 1 /* Use common FSL init code */ |
49 | #define CONFIG_SYS_PCI_64BIT 1 /* enable 64-bit PCI resources */ | 49 | #define CONFIG_SYS_PCI_64BIT 1 /* enable 64-bit PCI resources */ |
50 | #define CONFIG_FSL_PCIE_RESET 1 /* need PCIe reset errata */ | 50 | #define CONFIG_FSL_PCIE_RESET 1 /* need PCIe reset errata */ |
51 | #define CONFIG_FSL_LAW 1 /* Use common FSL init code */ | 51 | #define CONFIG_FSL_LAW 1 /* Use common FSL init code */ |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * DDR config | 54 | * DDR config |
55 | */ | 55 | */ |
56 | #define CONFIG_FSL_DDR2 | 56 | #define CONFIG_FSL_DDR2 |
57 | #undef CONFIG_FSL_DDR_INTERACTIVE | 57 | #undef CONFIG_FSL_DDR_INTERACTIVE |
58 | #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup */ | 58 | #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup */ |
59 | #define CONFIG_DDR_SPD | 59 | #define CONFIG_DDR_SPD |
60 | #define CONFIG_MEM_INIT_VALUE 0xdeadbeef | 60 | #define CONFIG_MEM_INIT_VALUE 0xdeadbeef |
61 | #define SPD_EEPROM_ADDRESS1 0x54 /* Both channels use the */ | 61 | #define SPD_EEPROM_ADDRESS1 0x54 /* Both channels use the */ |
62 | #define SPD_EEPROM_ADDRESS2 0x54 /* same SPD data */ | 62 | #define SPD_EEPROM_ADDRESS2 0x54 /* same SPD data */ |
63 | #define SPD_EEPROM_OFFSET 0x200 /* OFFSET of SPD in EEPROM */ | 63 | #define SPD_EEPROM_OFFSET 0x200 /* OFFSET of SPD in EEPROM */ |
64 | #define CONFIG_NUM_DDR_CONTROLLERS 2 | 64 | #define CONFIG_NUM_DDR_CONTROLLERS 2 |
65 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 | 65 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 |
66 | #define CONFIG_CHIP_SELECTS_PER_CTRL 1 | 66 | #define CONFIG_CHIP_SELECTS_PER_CTRL 1 |
67 | #define CONFIG_DDR_ECC | 67 | #define CONFIG_DDR_ECC |
68 | #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER | 68 | #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER |
69 | #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 /* DDR is system memory*/ | 69 | #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 /* DDR is system memory*/ |
70 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE | 70 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE |
71 | #define CONFIG_VERY_BIG_RAM | 71 | #define CONFIG_VERY_BIG_RAM |
72 | 72 | ||
73 | #ifndef __ASSEMBLY__ | 73 | #ifndef __ASSEMBLY__ |
74 | extern unsigned long get_board_sys_clk(unsigned long dummy); | 74 | extern unsigned long get_board_sys_clk(unsigned long dummy); |
75 | extern unsigned long get_board_ddr_clk(unsigned long dummy); | 75 | extern unsigned long get_board_ddr_clk(unsigned long dummy); |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | #define CONFIG_SYS_CLK_FREQ get_board_sys_clk(0) /* sysclk for MPC85xx */ | 78 | #define CONFIG_SYS_CLK_FREQ get_board_sys_clk(0) /* sysclk for MPC85xx */ |
79 | #define CONFIG_DDR_CLK_FREQ get_board_ddr_clk(0) /* ddrclk for MPC85xx */ | 79 | #define CONFIG_DDR_CLK_FREQ get_board_ddr_clk(0) /* ddrclk for MPC85xx */ |
80 | 80 | ||
81 | /* | 81 | /* |
82 | * These can be toggled for performance analysis, otherwise use default. | 82 | * These can be toggled for performance analysis, otherwise use default. |
83 | */ | 83 | */ |
84 | #define CONFIG_L2_CACHE /* toggle L2 cache */ | 84 | #define CONFIG_L2_CACHE /* toggle L2 cache */ |
85 | #define CONFIG_BTB /* toggle branch predition */ | 85 | #define CONFIG_BTB /* toggle branch predition */ |
86 | #define CONFIG_ENABLE_36BIT_PHYS 1 | 86 | #define CONFIG_ENABLE_36BIT_PHYS 1 |
87 | 87 | ||
88 | /* | 88 | /* |
89 | * Base addresses -- Note these are effective addresses where the | 89 | * Base addresses -- Note these are effective addresses where the |
90 | * actual resources get mapped (not physical addresses) | 90 | * actual resources get mapped (not physical addresses) |
91 | */ | 91 | */ |
92 | #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff700000 /* CCSRBAR Default */ | 92 | #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff700000 /* CCSRBAR Default */ |
93 | #define CONFIG_SYS_CCSRBAR 0xef000000 /* relocated CCSRBAR */ | 93 | #define CONFIG_SYS_CCSRBAR 0xef000000 /* relocated CCSRBAR */ |
94 | #define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR /* physical addr of CCSRBAR */ | 94 | #define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR /* physical addr of CCSRBAR */ |
95 | #define CONFIG_SYS_IMMR CONFIG_SYS_CCSRBAR /* PQII uses CONFIG_SYS_IMMR */ | 95 | #define CONFIG_SYS_IMMR CONFIG_SYS_CCSRBAR /* PQII uses CONFIG_SYS_IMMR */ |
96 | #define CONFIG_SYS_PCIE1_ADDR (CONFIG_SYS_CCSRBAR + 0xa000) | 96 | #define CONFIG_SYS_PCIE1_ADDR (CONFIG_SYS_CCSRBAR + 0xa000) |
97 | #define CONFIG_SYS_PCIE2_ADDR (CONFIG_SYS_CCSRBAR + 0x9000) | 97 | #define CONFIG_SYS_PCIE2_ADDR (CONFIG_SYS_CCSRBAR + 0x9000) |
98 | 98 | ||
99 | /* | 99 | /* |
100 | * Diagnostics | 100 | * Diagnostics |
101 | */ | 101 | */ |
102 | #define CONFIG_SYS_ALT_MEMTEST | 102 | #define CONFIG_SYS_ALT_MEMTEST |
103 | #define CONFIG_SYS_MEMTEST_START 0x10000000 | 103 | #define CONFIG_SYS_MEMTEST_START 0x10000000 |
104 | #define CONFIG_SYS_MEMTEST_END 0x20000000 | 104 | #define CONFIG_SYS_MEMTEST_END 0x20000000 |
105 | 105 | ||
106 | /* | 106 | /* |
107 | * Memory map | 107 | * Memory map |
108 | * 0x0000_0000 0x7fff_ffff DDR 2G Cacheable | 108 | * 0x0000_0000 0x7fff_ffff DDR 2G Cacheable |
109 | * 0x8000_0000 0xbfff_ffff PCIe1 Mem 1G non-cacheable | 109 | * 0x8000_0000 0xbfff_ffff PCIe1 Mem 1G non-cacheable |
110 | * 0xc000_0000 0xcfff_ffff PCIe2 Mem 256M non-cacheable | 110 | * 0xc000_0000 0xcfff_ffff PCIe2 Mem 256M non-cacheable |
111 | * 0xe000_0000 0xe7ff_ffff SRAM/SSRAM/L1 Cache 128M non-cacheable | 111 | * 0xe000_0000 0xe7ff_ffff SRAM/SSRAM/L1 Cache 128M non-cacheable |
112 | * 0xe800_0000 0xe87f_ffff PCIe1 IO 8M non-cacheable | 112 | * 0xe800_0000 0xe87f_ffff PCIe1 IO 8M non-cacheable |
113 | * 0xe880_0000 0xe8ff_ffff PCIe2 IO 8M non-cacheable | 113 | * 0xe880_0000 0xe8ff_ffff PCIe2 IO 8M non-cacheable |
114 | * 0xef00_0000 0xef0f_ffff CCSR/IMMR 1M non-cacheable | 114 | * 0xef00_0000 0xef0f_ffff CCSR/IMMR 1M non-cacheable |
115 | * 0xef80_0000 0xef8f_ffff NAND Flash 1M non-cacheable | 115 | * 0xef80_0000 0xef8f_ffff NAND Flash 1M non-cacheable |
116 | * 0xf000_0000 0xf7ff_ffff NOR Flash 2 128M non-cacheable | 116 | * 0xf000_0000 0xf7ff_ffff NOR Flash 2 128M non-cacheable |
117 | * 0xf800_0000 0xffff_ffff NOR Flash 1 128M non-cacheable | 117 | * 0xf800_0000 0xffff_ffff NOR Flash 1 128M non-cacheable |
118 | */ | 118 | */ |
119 | 119 | ||
120 | #define CONFIG_SYS_LBC_LCRR (LCRR_CLKDIV_4 | LCRR_EADC_3) | 120 | #define CONFIG_SYS_LBC_LCRR (LCRR_CLKDIV_4 | LCRR_EADC_3) |
121 | 121 | ||
122 | /* | 122 | /* |
123 | * NAND flash configuration | 123 | * NAND flash configuration |
124 | */ | 124 | */ |
125 | #define CONFIG_SYS_NAND_BASE 0xef800000 | 125 | #define CONFIG_SYS_NAND_BASE 0xef800000 |
126 | #define CONFIG_SYS_NAND_BASE2 0xef840000 /* Unused at this time */ | 126 | #define CONFIG_SYS_NAND_BASE2 0xef840000 /* Unused at this time */ |
127 | 127 | ||
128 | /* | 128 | /* |
129 | * NOR flash configuration | 129 | * NOR flash configuration |
130 | */ | 130 | */ |
131 | #define CONFIG_SYS_FLASH_BASE 0xf8000000 | 131 | #define CONFIG_SYS_FLASH_BASE 0xf8000000 |
132 | #define CONFIG_SYS_FLASH_BASE2 0xf0000000 | 132 | #define CONFIG_SYS_FLASH_BASE2 0xf0000000 |
133 | #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE2} | 133 | #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE2} |
134 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */ | 134 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */ |
135 | #define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */ | 135 | #define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */ |
136 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ | 136 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ |
137 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ | 137 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ |
138 | #define CONFIG_FLASH_CFI_DRIVER | 138 | #define CONFIG_FLASH_CFI_DRIVER |
139 | #define CONFIG_SYS_FLASH_CFI | 139 | #define CONFIG_SYS_FLASH_CFI |
140 | #define CONFIG_SYS_FLASH_AUTOPROTECT_LIST { {0xfff40000, 0xc0000}, \ | 140 | #define CONFIG_SYS_FLASH_AUTOPROTECT_LIST { {0xfff40000, 0xc0000}, \ |
141 | {0xf7f40000, 0xc0000} } | 141 | {0xf7f40000, 0xc0000} } |
142 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ | 142 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ |
143 | 143 | ||
144 | /* | 144 | /* |
145 | * Chip select configuration | 145 | * Chip select configuration |
146 | */ | 146 | */ |
147 | /* NOR Flash 0 on CS0 */ | 147 | /* NOR Flash 0 on CS0 */ |
148 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | \ | 148 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | \ |
149 | BR_PS_16 | \ | 149 | BR_PS_16 | \ |
150 | BR_V) | 150 | BR_V) |
151 | #define CONFIG_SYS_OR0_PRELIM (OR_AM_128MB | \ | 151 | #define CONFIG_SYS_OR0_PRELIM (OR_AM_128MB | \ |
152 | OR_GPCM_CSNT | \ | 152 | OR_GPCM_CSNT | \ |
153 | OR_GPCM_XACS | \ | 153 | OR_GPCM_XACS | \ |
154 | OR_GPCM_ACS_DIV2 | \ | 154 | OR_GPCM_ACS_DIV2 | \ |
155 | OR_GPCM_SCY_8 | \ | 155 | OR_GPCM_SCY_8 | \ |
156 | OR_GPCM_TRLX | \ | 156 | OR_GPCM_TRLX | \ |
157 | OR_GPCM_EHTR | \ | 157 | OR_GPCM_EHTR | \ |
158 | OR_GPCM_EAD) | 158 | OR_GPCM_EAD) |
159 | 159 | ||
160 | /* NOR Flash 1 on CS1 */ | 160 | /* NOR Flash 1 on CS1 */ |
161 | #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_FLASH_BASE2 | \ | 161 | #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_FLASH_BASE2 | \ |
162 | BR_PS_16 | \ | 162 | BR_PS_16 | \ |
163 | BR_V) | 163 | BR_V) |
164 | #define CONFIG_SYS_OR1_PRELIM CONFIG_SYS_OR0_PRELIM | 164 | #define CONFIG_SYS_OR1_PRELIM CONFIG_SYS_OR0_PRELIM |
165 | 165 | ||
166 | /* NAND flash on CS2 */ | 166 | /* NAND flash on CS2 */ |
167 | #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_NAND_BASE | \ | 167 | #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_NAND_BASE | \ |
168 | (2<<BR_DECC_SHIFT) | \ | 168 | (2<<BR_DECC_SHIFT) | \ |
169 | BR_PS_8 | \ | 169 | BR_PS_8 | \ |
170 | BR_MS_FCM | \ | 170 | BR_MS_FCM | \ |
171 | BR_V) | 171 | BR_V) |
172 | 172 | ||
173 | /* NAND flash on CS2 */ | 173 | /* NAND flash on CS2 */ |
174 | #define CONFIG_SYS_OR2_PRELIM (OR_AM_256KB | \ | 174 | #define CONFIG_SYS_OR2_PRELIM (OR_AM_256KB | \ |
175 | OR_FCM_PGS | \ | 175 | OR_FCM_PGS | \ |
176 | OR_FCM_CSCT | \ | 176 | OR_FCM_CSCT | \ |
177 | OR_FCM_CST | \ | 177 | OR_FCM_CST | \ |
178 | OR_FCM_CHT | \ | 178 | OR_FCM_CHT | \ |
179 | OR_FCM_SCY_1 | \ | 179 | OR_FCM_SCY_1 | \ |
180 | OR_FCM_TRLX | \ | 180 | OR_FCM_TRLX | \ |
181 | OR_FCM_EHTR) | 181 | OR_FCM_EHTR) |
182 | 182 | ||
183 | /* NAND flash on CS3 */ | 183 | /* NAND flash on CS3 */ |
184 | #define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_NAND_BASE2 | \ | 184 | #define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_NAND_BASE2 | \ |
185 | (2<<BR_DECC_SHIFT) | \ | 185 | (2<<BR_DECC_SHIFT) | \ |
186 | BR_PS_8 | \ | 186 | BR_PS_8 | \ |
187 | BR_MS_FCM | \ | 187 | BR_MS_FCM | \ |
188 | BR_V) | 188 | BR_V) |
189 | #define CONFIG_SYS_OR3_PRELIM CONFIG_SYS_OR2_PRELIM | 189 | #define CONFIG_SYS_OR3_PRELIM CONFIG_SYS_OR2_PRELIM |
190 | 190 | ||
191 | /* | 191 | /* |
192 | * Use L1 as initial stack | 192 | * Use L1 as initial stack |
193 | */ | 193 | */ |
194 | #define CONFIG_SYS_INIT_RAM_LOCK 1 | 194 | #define CONFIG_SYS_INIT_RAM_LOCK 1 |
195 | #define CONFIG_SYS_INIT_RAM_ADDR 0xe0000000 | 195 | #define CONFIG_SYS_INIT_RAM_ADDR 0xe0000000 |
196 | #define CONFIG_SYS_INIT_RAM_END 0x00004000 | 196 | #define CONFIG_SYS_INIT_RAM_END 0x00004000 |
197 | 197 | ||
198 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data */ | 198 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data */ |
199 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 199 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
200 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET | 200 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
201 | 201 | ||
202 | #define CONFIG_SYS_MONITOR_LEN (512 * 1024) /* Reserve 512 KB for Mon */ | 202 | #define CONFIG_SYS_MONITOR_LEN (512 * 1024) /* Reserve 512 KB for Mon */ |
203 | #define CONFIG_SYS_MALLOC_LEN (1024 * 1024) /* Reserved for malloc */ | 203 | #define CONFIG_SYS_MALLOC_LEN (1024 * 1024) /* Reserved for malloc */ |
204 | 204 | ||
205 | /* | 205 | /* |
206 | * Serial Port | 206 | * Serial Port |
207 | */ | 207 | */ |
208 | #define CONFIG_CONS_INDEX 1 | 208 | #define CONFIG_CONS_INDEX 1 |
209 | #define CONFIG_SYS_NS16550 | 209 | #define CONFIG_SYS_NS16550 |
210 | #define CONFIG_SYS_NS16550_SERIAL | 210 | #define CONFIG_SYS_NS16550_SERIAL |
211 | #define CONFIG_SYS_NS16550_REG_SIZE 1 | 211 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
212 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) | 212 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) |
213 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) | 213 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) |
214 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) | 214 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) |
215 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 215 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
216 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200} | 216 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200} |
217 | #define CONFIG_BAUDRATE 115200 | 217 | #define CONFIG_BAUDRATE 115200 |
218 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ | 218 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
219 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ | 219 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
220 | 220 | ||
221 | /* | 221 | /* |
222 | * Use the HUSH parser | 222 | * Use the HUSH parser |
223 | */ | 223 | */ |
224 | #define CONFIG_SYS_HUSH_PARSER | 224 | #define CONFIG_SYS_HUSH_PARSER |
225 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | 225 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
226 | 226 | ||
227 | /* | 227 | /* |
228 | * Pass open firmware flat tree | 228 | * Pass open firmware flat tree |
229 | */ | 229 | */ |
230 | #define CONFIG_OF_LIBFDT 1 | 230 | #define CONFIG_OF_LIBFDT 1 |
231 | #define CONFIG_OF_BOARD_SETUP 1 | 231 | #define CONFIG_OF_BOARD_SETUP 1 |
232 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 | 232 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 |
233 | 233 | ||
234 | #define CONFIG_SYS_64BIT_VSPRINTF 1 | 234 | #define CONFIG_SYS_64BIT_VSPRINTF 1 |
235 | #define CONFIG_SYS_64BIT_STRTOUL 1 | 235 | #define CONFIG_SYS_64BIT_STRTOUL 1 |
236 | 236 | ||
237 | /* | 237 | /* |
238 | * I2C | 238 | * I2C |
239 | */ | 239 | */ |
240 | #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ | 240 | #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ |
241 | #define CONFIG_HARD_I2C /* I2C with hardware support */ | 241 | #define CONFIG_HARD_I2C /* I2C with hardware support */ |
242 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ | 242 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ |
243 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 243 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
244 | #define CONFIG_SYS_I2C_OFFSET 0x3000 | 244 | #define CONFIG_SYS_I2C_OFFSET 0x3000 |
245 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 | 245 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 |
246 | #define CONFIG_I2C_MULTI_BUS | 246 | #define CONFIG_I2C_MULTI_BUS |
247 | #define CONFIG_I2C_CMD_TREE | ||
248 | 247 | ||
249 | /* PEX8518 slave I2C interface */ | 248 | /* PEX8518 slave I2C interface */ |
250 | #define CONFIG_SYS_I2C_PEX8518_ADDR 0x70 | 249 | #define CONFIG_SYS_I2C_PEX8518_ADDR 0x70 |
251 | 250 | ||
252 | /* I2C DS1631 temperature sensor */ | 251 | /* I2C DS1631 temperature sensor */ |
253 | #define CONFIG_SYS_I2C_DS1621_ADDR 0x48 | 252 | #define CONFIG_SYS_I2C_DS1621_ADDR 0x48 |
254 | #define CONFIG_DTT_DS1621 | 253 | #define CONFIG_DTT_DS1621 |
255 | #define CONFIG_DTT_SENSORS { 0 } | 254 | #define CONFIG_DTT_SENSORS { 0 } |
256 | 255 | ||
257 | /* I2C EEPROM - AT24C128B */ | 256 | /* I2C EEPROM - AT24C128B */ |
258 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x54 | 257 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x54 |
259 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 | 258 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 |
260 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6 /* 64 byte pages */ | 259 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6 /* 64 byte pages */ |
261 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 /* take up to 10 msec */ | 260 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 /* take up to 10 msec */ |
262 | 261 | ||
263 | /* I2C RTC */ | 262 | /* I2C RTC */ |
264 | #define CONFIG_RTC_M41T11 1 | 263 | #define CONFIG_RTC_M41T11 1 |
265 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 | 264 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 |
266 | #define CONFIG_SYS_M41T11_BASE_YEAR 2000 | 265 | #define CONFIG_SYS_M41T11_BASE_YEAR 2000 |
267 | 266 | ||
268 | /* GPIO/EEPROM/SRAM */ | 267 | /* GPIO/EEPROM/SRAM */ |
269 | #define CONFIG_DS4510 | 268 | #define CONFIG_DS4510 |
270 | #define CONFIG_SYS_I2C_DS4510_ADDR 0x51 | 269 | #define CONFIG_SYS_I2C_DS4510_ADDR 0x51 |
271 | 270 | ||
272 | /* GPIO */ | 271 | /* GPIO */ |
273 | #define CONFIG_PCA953X | 272 | #define CONFIG_PCA953X |
274 | #define CONFIG_SYS_I2C_PCA953X_ADDR0 0x18 | 273 | #define CONFIG_SYS_I2C_PCA953X_ADDR0 0x18 |
275 | #define CONFIG_SYS_I2C_PCA953X_ADDR1 0x1c | 274 | #define CONFIG_SYS_I2C_PCA953X_ADDR1 0x1c |
276 | #define CONFIG_SYS_I2C_PCA953X_ADDR2 0x1e | 275 | #define CONFIG_SYS_I2C_PCA953X_ADDR2 0x1e |
277 | #define CONFIG_SYS_I2C_PCA953X_ADDR3 0x1f | 276 | #define CONFIG_SYS_I2C_PCA953X_ADDR3 0x1f |
278 | #define CONFIG_SYS_I2C_PCA953X_ADDR CONFIG_SYS_I2C_PCA953X_ADDR0 | 277 | #define CONFIG_SYS_I2C_PCA953X_ADDR CONFIG_SYS_I2C_PCA953X_ADDR0 |
279 | 278 | ||
280 | /* | 279 | /* |
281 | * PU = pulled high, PD = pulled low | 280 | * PU = pulled high, PD = pulled low |
282 | * I = input, O = output, IO = input/output | 281 | * I = input, O = output, IO = input/output |
283 | */ | 282 | */ |
284 | /* PCA9557 @ 0x18*/ | 283 | /* PCA9557 @ 0x18*/ |
285 | #define CONFIG_SYS_PCA953X_C0_SER0_EN 0x01 /* PU; UART0 enable (1: enabled) */ | 284 | #define CONFIG_SYS_PCA953X_C0_SER0_EN 0x01 /* PU; UART0 enable (1: enabled) */ |
286 | #define CONFIG_SYS_PCA953X_C0_SER0_MODE 0x02 /* PU; UART0 serial mode select */ | 285 | #define CONFIG_SYS_PCA953X_C0_SER0_MODE 0x02 /* PU; UART0 serial mode select */ |
287 | #define CONFIG_SYS_PCA953X_C0_SER1_EN 0x04 /* PU; UART1 enable (1: enabled) */ | 286 | #define CONFIG_SYS_PCA953X_C0_SER1_EN 0x04 /* PU; UART1 enable (1: enabled) */ |
288 | #define CONFIG_SYS_PCA953X_C0_SER1_MODE 0x08 /* PU; UART1 serial mode select */ | 287 | #define CONFIG_SYS_PCA953X_C0_SER1_MODE 0x08 /* PU; UART1 serial mode select */ |
289 | #define CONFIG_SYS_PCA953X_C0_FLASH_PASS_CS 0x10 /* PU; Boot flash CS select */ | 288 | #define CONFIG_SYS_PCA953X_C0_FLASH_PASS_CS 0x10 /* PU; Boot flash CS select */ |
290 | #define CONFIG_SYS_PCA953X_NVM_WP 0x20 /* PU; Set to 0 to enable NVM writing */ | 289 | #define CONFIG_SYS_PCA953X_NVM_WP 0x20 /* PU; Set to 0 to enable NVM writing */ |
291 | #define CONFIG_SYS_PCA953X_C0_VCORE_VID2 0x40 /* VID2 of ISL6262 */ | 290 | #define CONFIG_SYS_PCA953X_C0_VCORE_VID2 0x40 /* VID2 of ISL6262 */ |
292 | #define CONFIG_SYS_PCA953X_C0_VCORE_VID3 0x80 /* VID3 of ISL6262 */ | 291 | #define CONFIG_SYS_PCA953X_C0_VCORE_VID3 0x80 /* VID3 of ISL6262 */ |
293 | 292 | ||
294 | /* PCA9557 @ 0x1c*/ | 293 | /* PCA9557 @ 0x1c*/ |
295 | #define CONFIG_SYS_PCA953X_XMC0_ROOT0 0x01 /* PU; Low if XMC is RC */ | 294 | #define CONFIG_SYS_PCA953X_XMC0_ROOT0 0x01 /* PU; Low if XMC is RC */ |
296 | #define CONFIG_SYS_PCA953X_XMC0_MVMR0 0x02 /* XMC EEPROM write protect */ | 295 | #define CONFIG_SYS_PCA953X_XMC0_MVMR0 0x02 /* XMC EEPROM write protect */ |
297 | #define CONFIG_SYS_PCA953X_XMC0_WAKE 0x04 /* PU; XMC wake */ | 296 | #define CONFIG_SYS_PCA953X_XMC0_WAKE 0x04 /* PU; XMC wake */ |
298 | #define CONFIG_SYS_PCA953X_XMC0_BIST 0x08 /* PU; XMC built in self test */ | 297 | #define CONFIG_SYS_PCA953X_XMC0_BIST 0x08 /* PU; XMC built in self test */ |
299 | #define CONFIG_SYS_PCA953X_XMC_PRESENT 0x10 /* PU; Low if XMC module installed */ | 298 | #define CONFIG_SYS_PCA953X_XMC_PRESENT 0x10 /* PU; Low if XMC module installed */ |
300 | #define CONFIG_SYS_PCA953X_PMC_PRESENT 0x20 /* PU; Low if PMC module installed */ | 299 | #define CONFIG_SYS_PCA953X_PMC_PRESENT 0x20 /* PU; Low if PMC module installed */ |
301 | #define CONFIG_SYS_PCA953X_PMC0_MONARCH 0x40 /* PMC monarch mode enable */ | 300 | #define CONFIG_SYS_PCA953X_PMC0_MONARCH 0x40 /* PMC monarch mode enable */ |
302 | #define CONFIG_SYS_PCA953X_PMC0_EREADY 0x80 /* PU; PMC PCI eready */ | 301 | #define CONFIG_SYS_PCA953X_PMC0_EREADY 0x80 /* PU; PMC PCI eready */ |
303 | 302 | ||
304 | /* PCA9557 @ 0x1e*/ | 303 | /* PCA9557 @ 0x1e*/ |
305 | #define CONFIG_SYS_PCA953X_P0_GA0 0x01 /* PU; VPX Geographical address */ | 304 | #define CONFIG_SYS_PCA953X_P0_GA0 0x01 /* PU; VPX Geographical address */ |
306 | #define CONFIG_SYS_PCA953X_P0_GA1 0x02 /* PU; VPX Geographical address */ | 305 | #define CONFIG_SYS_PCA953X_P0_GA1 0x02 /* PU; VPX Geographical address */ |
307 | #define CONFIG_SYS_PCA953X_P0_GA2 0x04 /* PU; VPX Geographical address */ | 306 | #define CONFIG_SYS_PCA953X_P0_GA2 0x04 /* PU; VPX Geographical address */ |
308 | #define CONFIG_SYS_PCA953X_P0_GA3 0x08 /* PU; VPX Geographical address */ | 307 | #define CONFIG_SYS_PCA953X_P0_GA3 0x08 /* PU; VPX Geographical address */ |
309 | #define CONFIG_SYS_PCA953X_P0_GA4 0x10 /* PU; VPX Geographical address */ | 308 | #define CONFIG_SYS_PCA953X_P0_GA4 0x10 /* PU; VPX Geographical address */ |
310 | #define CONFIG_SYS_PCA953X_P0_GAP 0x20 /* PU; tied to VPX P0.GAP */ | 309 | #define CONFIG_SYS_PCA953X_P0_GAP 0x20 /* PU; tied to VPX P0.GAP */ |
311 | #define CONFIG_SYS_PCA953X_P1_SYSEN 0x80 /* PU; Pulled high; tied to VPX P1.SYSCON */ | 310 | #define CONFIG_SYS_PCA953X_P1_SYSEN 0x80 /* PU; Pulled high; tied to VPX P1.SYSCON */ |
312 | 311 | ||
313 | /* PCA9557 @ 0x1f */ | 312 | /* PCA9557 @ 0x1f */ |
314 | #define CONFIG_SYS_PCA953X_GPIO_VPX0 0x01 /* PU */ | 313 | #define CONFIG_SYS_PCA953X_GPIO_VPX0 0x01 /* PU */ |
315 | #define CONFIG_SYS_PCA953X_GPIO_VPX1 0x02 /* PU */ | 314 | #define CONFIG_SYS_PCA953X_GPIO_VPX1 0x02 /* PU */ |
316 | #define CONFIG_SYS_PCA953X_GPIO_VPX2 0x04 /* PU */ | 315 | #define CONFIG_SYS_PCA953X_GPIO_VPX2 0x04 /* PU */ |
317 | #define CONFIG_SYS_PCA953X_GPIO_VPX3 0x08 /* PU */ | 316 | #define CONFIG_SYS_PCA953X_GPIO_VPX3 0x08 /* PU */ |
318 | #define CONFIG_SYS_PCA953X_VPX_FRU_WRCTL 0x10 /* PD; I2C master source for FRU SEEPROM */ | 317 | #define CONFIG_SYS_PCA953X_VPX_FRU_WRCTL 0x10 /* PD; I2C master source for FRU SEEPROM */ |
319 | 318 | ||
320 | /* | 319 | /* |
321 | * General PCI | 320 | * General PCI |
322 | * Memory space is mapped 1-1, but I/O space must start from 0. | 321 | * Memory space is mapped 1-1, but I/O space must start from 0. |
323 | */ | 322 | */ |
324 | /* PCIE1 - VPX P1 */ | 323 | /* PCIE1 - VPX P1 */ |
325 | #define CONFIG_SYS_PCIE1_MEM_BASE 0x80000000 | 324 | #define CONFIG_SYS_PCIE1_MEM_BASE 0x80000000 |
326 | #define CONFIG_SYS_PCIE1_MEM_PHYS CONFIG_SYS_PCIE1_MEM_BASE | 325 | #define CONFIG_SYS_PCIE1_MEM_PHYS CONFIG_SYS_PCIE1_MEM_BASE |
327 | #define CONFIG_SYS_PCIE1_MEM_SIZE 0x40000000 /* 1G */ | 326 | #define CONFIG_SYS_PCIE1_MEM_SIZE 0x40000000 /* 1G */ |
328 | #define CONFIG_SYS_PCIE1_IO_BASE 0x00000000 | 327 | #define CONFIG_SYS_PCIE1_IO_BASE 0x00000000 |
329 | #define CONFIG_SYS_PCIE1_IO_PHYS 0xe8000000 | 328 | #define CONFIG_SYS_PCIE1_IO_PHYS 0xe8000000 |
330 | #define CONFIG_SYS_PCIE1_IO_SIZE 0x00800000 /* 8M */ | 329 | #define CONFIG_SYS_PCIE1_IO_SIZE 0x00800000 /* 8M */ |
331 | 330 | ||
332 | /* PCIE2 - PEX8518 */ | 331 | /* PCIE2 - PEX8518 */ |
333 | #define CONFIG_SYS_PCIE2_MEM_BASE 0xc0000000 | 332 | #define CONFIG_SYS_PCIE2_MEM_BASE 0xc0000000 |
334 | #define CONFIG_SYS_PCIE2_MEM_PHYS CONFIG_SYS_PCIE2_MEM_BASE | 333 | #define CONFIG_SYS_PCIE2_MEM_PHYS CONFIG_SYS_PCIE2_MEM_BASE |
335 | #define CONFIG_SYS_PCIE2_MEM_SIZE 0x10000000 /* 256M */ | 334 | #define CONFIG_SYS_PCIE2_MEM_SIZE 0x10000000 /* 256M */ |
336 | #define CONFIG_SYS_PCIE2_IO_BASE 0x00000000 | 335 | #define CONFIG_SYS_PCIE2_IO_BASE 0x00000000 |
337 | #define CONFIG_SYS_PCIE2_IO_PHYS 0xe8800000 | 336 | #define CONFIG_SYS_PCIE2_IO_PHYS 0xe8800000 |
338 | #define CONFIG_SYS_PCIE2_IO_SIZE 0x00800000 /* 8M */ | 337 | #define CONFIG_SYS_PCIE2_IO_SIZE 0x00800000 /* 8M */ |
339 | 338 | ||
340 | /* | 339 | /* |
341 | * Networking options | 340 | * Networking options |
342 | */ | 341 | */ |
343 | #define CONFIG_TSEC_ENET /* tsec ethernet support */ | 342 | #define CONFIG_TSEC_ENET /* tsec ethernet support */ |
344 | #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */ | 343 | #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */ |
345 | #define CONFIG_NET_MULTI 1 | 344 | #define CONFIG_NET_MULTI 1 |
346 | #define CONFIG_TSEC_TBI | 345 | #define CONFIG_TSEC_TBI |
347 | #define CONFIG_MII 1 /* MII PHY management */ | 346 | #define CONFIG_MII 1 /* MII PHY management */ |
348 | #define CONFIG_MII_DEFAULT_TSEC 1 /* Allow unregistered phys */ | 347 | #define CONFIG_MII_DEFAULT_TSEC 1 /* Allow unregistered phys */ |
349 | #define CONFIG_ETHPRIME "eTSEC2" | 348 | #define CONFIG_ETHPRIME "eTSEC2" |
350 | 349 | ||
351 | #define CONFIG_TSEC1 1 | 350 | #define CONFIG_TSEC1 1 |
352 | #define CONFIG_TSEC1_NAME "eTSEC1" | 351 | #define CONFIG_TSEC1_NAME "eTSEC1" |
353 | #define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) | 352 | #define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) |
354 | #define TSEC1_PHY_ADDR 1 | 353 | #define TSEC1_PHY_ADDR 1 |
355 | #define TSEC1_PHYIDX 0 | 354 | #define TSEC1_PHYIDX 0 |
356 | #define CONFIG_HAS_ETH0 | 355 | #define CONFIG_HAS_ETH0 |
357 | 356 | ||
358 | #define CONFIG_TSEC2 1 | 357 | #define CONFIG_TSEC2 1 |
359 | #define CONFIG_TSEC2_NAME "eTSEC2" | 358 | #define CONFIG_TSEC2_NAME "eTSEC2" |
360 | #define TSEC2_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) | 359 | #define TSEC2_FLAGS (TSEC_GIGABIT | TSEC_REDUCED) |
361 | #define TSEC2_PHY_ADDR 2 | 360 | #define TSEC2_PHY_ADDR 2 |
362 | #define TSEC2_PHYIDX 0 | 361 | #define TSEC2_PHYIDX 0 |
363 | #define CONFIG_HAS_ETH1 | 362 | #define CONFIG_HAS_ETH1 |
364 | 363 | ||
365 | /* | 364 | /* |
366 | * Command configuration. | 365 | * Command configuration. |
367 | */ | 366 | */ |
368 | #include <config_cmd_default.h> | 367 | #include <config_cmd_default.h> |
369 | 368 | ||
370 | #define CONFIG_CMD_ASKENV | 369 | #define CONFIG_CMD_ASKENV |
371 | #define CONFIG_CMD_DATE | 370 | #define CONFIG_CMD_DATE |
372 | #define CONFIG_CMD_DHCP | 371 | #define CONFIG_CMD_DHCP |
373 | #define CONFIG_CMD_DS4510 | 372 | #define CONFIG_CMD_DS4510 |
374 | #define CONFIG_CMD_DS4510_INFO | 373 | #define CONFIG_CMD_DS4510_INFO |
375 | #define CONFIG_CMD_DTT | 374 | #define CONFIG_CMD_DTT |
376 | #define CONFIG_CMD_EEPROM | 375 | #define CONFIG_CMD_EEPROM |
377 | #define CONFIG_CMD_ELF | 376 | #define CONFIG_CMD_ELF |
378 | #define CONFIG_CMD_SAVEENV | 377 | #define CONFIG_CMD_SAVEENV |
379 | #define CONFIG_CMD_FLASH | 378 | #define CONFIG_CMD_FLASH |
380 | #define CONFIG_CMD_I2C | 379 | #define CONFIG_CMD_I2C |
381 | #define CONFIG_CMD_JFFS2 | 380 | #define CONFIG_CMD_JFFS2 |
382 | #define CONFIG_CMD_MII | 381 | #define CONFIG_CMD_MII |
383 | #define CONFIG_CMD_NET | 382 | #define CONFIG_CMD_NET |
384 | #define CONFIG_CMD_PCA953X | 383 | #define CONFIG_CMD_PCA953X |
385 | #define CONFIG_CMD_PCA953X_INFO | 384 | #define CONFIG_CMD_PCA953X_INFO |
386 | #define CONFIG_CMD_PCI | 385 | #define CONFIG_CMD_PCI |
387 | #define CONFIG_CMD_PING | 386 | #define CONFIG_CMD_PING |
388 | #define CONFIG_CMD_SNTP | 387 | #define CONFIG_CMD_SNTP |
389 | 388 | ||
390 | /* | 389 | /* |
391 | * Miscellaneous configurable options | 390 | * Miscellaneous configurable options |
392 | */ | 391 | */ |
393 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 392 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
394 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ | 393 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ |
395 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | 394 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
396 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | 395 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
397 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ | 396 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
398 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 397 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
399 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | 398 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
400 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ | 399 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ |
401 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ | 400 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ |
402 | #define CONFIG_LOADADDR 0x1000000 /* default location for tftp and bootm */ | 401 | #define CONFIG_LOADADDR 0x1000000 /* default location for tftp and bootm */ |
403 | #define CONFIG_BOOTDELAY 3 /* -1 disables auto-boot */ | 402 | #define CONFIG_BOOTDELAY 3 /* -1 disables auto-boot */ |
404 | #define CONFIG_PANIC_HANG /* do not reset board on panic */ | 403 | #define CONFIG_PANIC_HANG /* do not reset board on panic */ |
405 | #define CONFIG_PREBOOT /* enable preboot variable */ | 404 | #define CONFIG_PREBOOT /* enable preboot variable */ |
406 | #define CONFIG_FIT 1 | 405 | #define CONFIG_FIT 1 |
407 | #define CONFIG_FIT_VERBOSE 1 | 406 | #define CONFIG_FIT_VERBOSE 1 |
408 | #define CONFIG_INTEGRITY /* support booting INTEGRITY OS */ | 407 | #define CONFIG_INTEGRITY /* support booting INTEGRITY OS */ |
409 | 408 | ||
410 | /* | 409 | /* |
411 | * For booting Linux, the board info and command line data | 410 | * For booting Linux, the board info and command line data |
412 | * have to be in the first 16 MB of memory, since this is | 411 | * have to be in the first 16 MB of memory, since this is |
413 | * the maximum mapped by the Linux kernel during initialization. | 412 | * the maximum mapped by the Linux kernel during initialization. |
414 | */ | 413 | */ |
415 | #define CONFIG_SYS_BOOTMAPSZ (16 << 20) /* Initial Memory map for Linux*/ | 414 | #define CONFIG_SYS_BOOTMAPSZ (16 << 20) /* Initial Memory map for Linux*/ |
416 | 415 | ||
417 | /* | 416 | /* |
418 | * Boot Flags | 417 | * Boot Flags |
419 | */ | 418 | */ |
420 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 419 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
421 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 420 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
422 | 421 | ||
423 | /* | 422 | /* |
424 | * Environment Configuration | 423 | * Environment Configuration |
425 | */ | 424 | */ |
426 | #define CONFIG_ENV_IS_IN_FLASH 1 | 425 | #define CONFIG_ENV_IS_IN_FLASH 1 |
427 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128k (one sector) for env */ | 426 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128k (one sector) for env */ |
428 | #define CONFIG_ENV_SIZE 0x8000 | 427 | #define CONFIG_ENV_SIZE 0x8000 |
429 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - (256 * 1024)) | 428 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - (256 * 1024)) |
430 | 429 | ||
431 | /* | 430 | /* |
432 | * Flash memory map: | 431 | * Flash memory map: |
433 | * fff80000 - ffffffff Pri U-Boot (512 KB) | 432 | * fff80000 - ffffffff Pri U-Boot (512 KB) |
434 | * fff40000 - fff7ffff Pri U-Boot Environment (256 KB) | 433 | * fff40000 - fff7ffff Pri U-Boot Environment (256 KB) |
435 | * fff00000 - fff3ffff Pri FDT (256KB) | 434 | * fff00000 - fff3ffff Pri FDT (256KB) |
436 | * fef00000 - ffefffff Pri OS image (16MB) | 435 | * fef00000 - ffefffff Pri OS image (16MB) |
437 | * f8000000 - feefffff Pri OS Use/Filesystem (111MB) | 436 | * f8000000 - feefffff Pri OS Use/Filesystem (111MB) |
438 | * | 437 | * |
439 | * f7f80000 - f7ffffff Sec U-Boot (512 KB) | 438 | * f7f80000 - f7ffffff Sec U-Boot (512 KB) |
440 | * f7f40000 - f7f7ffff Sec U-Boot Environment (256 KB) | 439 | * f7f40000 - f7f7ffff Sec U-Boot Environment (256 KB) |
441 | * f7f00000 - f7f3ffff Sec FDT (256KB) | 440 | * f7f00000 - f7f3ffff Sec FDT (256KB) |
442 | * f6f00000 - f7efffff Sec OS image (16MB) | 441 | * f6f00000 - f7efffff Sec OS image (16MB) |
443 | * f0000000 - f6efffff Sec OS Use/Filesystem (111MB) | 442 | * f0000000 - f6efffff Sec OS Use/Filesystem (111MB) |
444 | */ | 443 | */ |
445 | #define CONFIG_UBOOT1_ENV_ADDR MK_STR(0xfff80000) | 444 | #define CONFIG_UBOOT1_ENV_ADDR MK_STR(0xfff80000) |
446 | #define CONFIG_UBOOT2_ENV_ADDR MK_STR(0xf7f80000) | 445 | #define CONFIG_UBOOT2_ENV_ADDR MK_STR(0xf7f80000) |
447 | #define CONFIG_FDT1_ENV_ADDR MK_STR(0xfff00000) | 446 | #define CONFIG_FDT1_ENV_ADDR MK_STR(0xfff00000) |
448 | #define CONFIG_FDT2_ENV_ADDR MK_STR(0xf7f00000) | 447 | #define CONFIG_FDT2_ENV_ADDR MK_STR(0xf7f00000) |
449 | #define CONFIG_OS1_ENV_ADDR MK_STR(0xfef00000) | 448 | #define CONFIG_OS1_ENV_ADDR MK_STR(0xfef00000) |
450 | #define CONFIG_OS2_ENV_ADDR MK_STR(0xf6f00000) | 449 | #define CONFIG_OS2_ENV_ADDR MK_STR(0xf6f00000) |
451 | 450 | ||
452 | #define CONFIG_PROG_UBOOT1 \ | 451 | #define CONFIG_PROG_UBOOT1 \ |
453 | "$download_cmd $loadaddr $ubootfile; " \ | 452 | "$download_cmd $loadaddr $ubootfile; " \ |
454 | "if test $? -eq 0; then " \ | 453 | "if test $? -eq 0; then " \ |
455 | "protect off "CONFIG_UBOOT1_ENV_ADDR" +80000; " \ | 454 | "protect off "CONFIG_UBOOT1_ENV_ADDR" +80000; " \ |
456 | "erase "CONFIG_UBOOT1_ENV_ADDR" +80000; " \ | 455 | "erase "CONFIG_UBOOT1_ENV_ADDR" +80000; " \ |
457 | "cp.w $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 40000; " \ | 456 | "cp.w $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 40000; " \ |
458 | "protect on "CONFIG_UBOOT1_ENV_ADDR" +80000; " \ | 457 | "protect on "CONFIG_UBOOT1_ENV_ADDR" +80000; " \ |
459 | "cmp.b $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 80000; " \ | 458 | "cmp.b $loadaddr "CONFIG_UBOOT1_ENV_ADDR" 80000; " \ |
460 | "if test $? -ne 0; then " \ | 459 | "if test $? -ne 0; then " \ |
461 | "echo PROGRAM FAILED; " \ | 460 | "echo PROGRAM FAILED; " \ |
462 | "else; " \ | 461 | "else; " \ |
463 | "echo PROGRAM SUCCEEDED; " \ | 462 | "echo PROGRAM SUCCEEDED; " \ |
464 | "fi; " \ | 463 | "fi; " \ |
465 | "else; " \ | 464 | "else; " \ |
466 | "echo DOWNLOAD FAILED; " \ | 465 | "echo DOWNLOAD FAILED; " \ |
467 | "fi;" | 466 | "fi;" |
468 | 467 | ||
469 | #define CONFIG_PROG_UBOOT2 \ | 468 | #define CONFIG_PROG_UBOOT2 \ |
470 | "$download_cmd $loadaddr $ubootfile; " \ | 469 | "$download_cmd $loadaddr $ubootfile; " \ |
471 | "if test $? -eq 0; then " \ | 470 | "if test $? -eq 0; then " \ |
472 | "protect off "CONFIG_UBOOT2_ENV_ADDR" +80000; " \ | 471 | "protect off "CONFIG_UBOOT2_ENV_ADDR" +80000; " \ |
473 | "erase "CONFIG_UBOOT2_ENV_ADDR" +80000; " \ | 472 | "erase "CONFIG_UBOOT2_ENV_ADDR" +80000; " \ |
474 | "cp.w $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 40000; " \ | 473 | "cp.w $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 40000; " \ |
475 | "protect on "CONFIG_UBOOT2_ENV_ADDR" +80000; " \ | 474 | "protect on "CONFIG_UBOOT2_ENV_ADDR" +80000; " \ |
476 | "cmp.b $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 80000; " \ | 475 | "cmp.b $loadaddr "CONFIG_UBOOT2_ENV_ADDR" 80000; " \ |
477 | "if test $? -ne 0; then " \ | 476 | "if test $? -ne 0; then " \ |
478 | "echo PROGRAM FAILED; " \ | 477 | "echo PROGRAM FAILED; " \ |
479 | "else; " \ | 478 | "else; " \ |
480 | "echo PROGRAM SUCCEEDED; " \ | 479 | "echo PROGRAM SUCCEEDED; " \ |
481 | "fi; " \ | 480 | "fi; " \ |
482 | "else; " \ | 481 | "else; " \ |
483 | "echo DOWNLOAD FAILED; " \ | 482 | "echo DOWNLOAD FAILED; " \ |
484 | "fi;" | 483 | "fi;" |
485 | 484 | ||
486 | #define CONFIG_BOOT_OS_NET \ | 485 | #define CONFIG_BOOT_OS_NET \ |
487 | "$download_cmd $osaddr $osfile; " \ | 486 | "$download_cmd $osaddr $osfile; " \ |
488 | "if test $? -eq 0; then " \ | 487 | "if test $? -eq 0; then " \ |
489 | "if test -n $fdtaddr; then " \ | 488 | "if test -n $fdtaddr; then " \ |
490 | "$download_cmd $fdtaddr $fdtfile; " \ | 489 | "$download_cmd $fdtaddr $fdtfile; " \ |
491 | "if test $? -eq 0; then " \ | 490 | "if test $? -eq 0; then " \ |
492 | "bootm $osaddr - $fdtaddr; " \ | 491 | "bootm $osaddr - $fdtaddr; " \ |
493 | "else; " \ | 492 | "else; " \ |
494 | "echo FDT DOWNLOAD FAILED; " \ | 493 | "echo FDT DOWNLOAD FAILED; " \ |
495 | "fi; " \ | 494 | "fi; " \ |
496 | "else; " \ | 495 | "else; " \ |
497 | "bootm $osaddr; " \ | 496 | "bootm $osaddr; " \ |
498 | "fi; " \ | 497 | "fi; " \ |
499 | "else; " \ | 498 | "else; " \ |
500 | "echo OS DOWNLOAD FAILED; " \ | 499 | "echo OS DOWNLOAD FAILED; " \ |
501 | "fi;" | 500 | "fi;" |
502 | 501 | ||
503 | #define CONFIG_PROG_OS1 \ | 502 | #define CONFIG_PROG_OS1 \ |
504 | "$download_cmd $osaddr $osfile; " \ | 503 | "$download_cmd $osaddr $osfile; " \ |
505 | "if test $? -eq 0; then " \ | 504 | "if test $? -eq 0; then " \ |
506 | "erase "CONFIG_OS1_ENV_ADDR" +$filesize; " \ | 505 | "erase "CONFIG_OS1_ENV_ADDR" +$filesize; " \ |
507 | "cp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; " \ | 506 | "cp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; " \ |
508 | "cmp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; " \ | 507 | "cmp.b $osaddr "CONFIG_OS1_ENV_ADDR" $filesize; " \ |
509 | "if test $? -ne 0; then " \ | 508 | "if test $? -ne 0; then " \ |
510 | "echo OS PROGRAM FAILED; " \ | 509 | "echo OS PROGRAM FAILED; " \ |
511 | "else; " \ | 510 | "else; " \ |
512 | "echo OS PROGRAM SUCCEEDED; " \ | 511 | "echo OS PROGRAM SUCCEEDED; " \ |
513 | "fi; " \ | 512 | "fi; " \ |
514 | "else; " \ | 513 | "else; " \ |
515 | "echo OS DOWNLOAD FAILED; " \ | 514 | "echo OS DOWNLOAD FAILED; " \ |
516 | "fi;" | 515 | "fi;" |
517 | 516 | ||
518 | #define CONFIG_PROG_OS2 \ | 517 | #define CONFIG_PROG_OS2 \ |
519 | "$download_cmd $osaddr $osfile; " \ | 518 | "$download_cmd $osaddr $osfile; " \ |
520 | "if test $? -eq 0; then " \ | 519 | "if test $? -eq 0; then " \ |
521 | "erase "CONFIG_OS2_ENV_ADDR" +$filesize; " \ | 520 | "erase "CONFIG_OS2_ENV_ADDR" +$filesize; " \ |
522 | "cp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; " \ | 521 | "cp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; " \ |
523 | "cmp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; " \ | 522 | "cmp.b $osaddr "CONFIG_OS2_ENV_ADDR" $filesize; " \ |
524 | "if test $? -ne 0; then " \ | 523 | "if test $? -ne 0; then " \ |
525 | "echo OS PROGRAM FAILED; " \ | 524 | "echo OS PROGRAM FAILED; " \ |
526 | "else; " \ | 525 | "else; " \ |
527 | "echo OS PROGRAM SUCCEEDED; " \ | 526 | "echo OS PROGRAM SUCCEEDED; " \ |
528 | "fi; " \ | 527 | "fi; " \ |
529 | "else; " \ | 528 | "else; " \ |
530 | "echo OS DOWNLOAD FAILED; " \ | 529 | "echo OS DOWNLOAD FAILED; " \ |
531 | "fi;" | 530 | "fi;" |
532 | 531 | ||
533 | #define CONFIG_PROG_FDT1 \ | 532 | #define CONFIG_PROG_FDT1 \ |
534 | "$download_cmd $fdtaddr $fdtfile; " \ | 533 | "$download_cmd $fdtaddr $fdtfile; " \ |
535 | "if test $? -eq 0; then " \ | 534 | "if test $? -eq 0; then " \ |
536 | "erase "CONFIG_FDT1_ENV_ADDR" +$filesize;" \ | 535 | "erase "CONFIG_FDT1_ENV_ADDR" +$filesize;" \ |
537 | "cp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; " \ | 536 | "cp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; " \ |
538 | "cmp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; " \ | 537 | "cmp.b $fdtaddr "CONFIG_FDT1_ENV_ADDR" $filesize; " \ |
539 | "if test $? -ne 0; then " \ | 538 | "if test $? -ne 0; then " \ |
540 | "echo FDT PROGRAM FAILED; " \ | 539 | "echo FDT PROGRAM FAILED; " \ |
541 | "else; " \ | 540 | "else; " \ |
542 | "echo FDT PROGRAM SUCCEEDED; " \ | 541 | "echo FDT PROGRAM SUCCEEDED; " \ |
543 | "fi; " \ | 542 | "fi; " \ |
544 | "else; " \ | 543 | "else; " \ |
545 | "echo FDT DOWNLOAD FAILED; " \ | 544 | "echo FDT DOWNLOAD FAILED; " \ |
546 | "fi;" | 545 | "fi;" |
547 | 546 | ||
548 | #define CONFIG_PROG_FDT2 \ | 547 | #define CONFIG_PROG_FDT2 \ |
549 | "$download_cmd $fdtaddr $fdtfile; " \ | 548 | "$download_cmd $fdtaddr $fdtfile; " \ |
550 | "if test $? -eq 0; then " \ | 549 | "if test $? -eq 0; then " \ |
551 | "erase "CONFIG_FDT2_ENV_ADDR" +$filesize;" \ | 550 | "erase "CONFIG_FDT2_ENV_ADDR" +$filesize;" \ |
552 | "cp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; " \ | 551 | "cp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; " \ |
553 | "cmp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; " \ | 552 | "cmp.b $fdtaddr "CONFIG_FDT2_ENV_ADDR" $filesize; " \ |
554 | "if test $? -ne 0; then " \ | 553 | "if test $? -ne 0; then " \ |
555 | "echo FDT PROGRAM FAILED; " \ | 554 | "echo FDT PROGRAM FAILED; " \ |
556 | "else; " \ | 555 | "else; " \ |
557 | "echo FDT PROGRAM SUCCEEDED; " \ | 556 | "echo FDT PROGRAM SUCCEEDED; " \ |
558 | "fi; " \ | 557 | "fi; " \ |
559 | "else; " \ | 558 | "else; " \ |
560 | "echo FDT DOWNLOAD FAILED; " \ | 559 | "echo FDT DOWNLOAD FAILED; " \ |
561 | "fi;" | 560 | "fi;" |
562 | 561 | ||
563 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 562 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
564 | "autoload=yes\0" \ | 563 | "autoload=yes\0" \ |
565 | "download_cmd=tftp\0" \ | 564 | "download_cmd=tftp\0" \ |
566 | "console_args=console=ttyS0,115200\0" \ | 565 | "console_args=console=ttyS0,115200\0" \ |
567 | "root_args=root=/dev/nfs rw\0" \ | 566 | "root_args=root=/dev/nfs rw\0" \ |
568 | "misc_args=ip=on\0" \ | 567 | "misc_args=ip=on\0" \ |
569 | "set_bootargs=setenv bootargs ${console_args} ${root_args} ${misc_args}\0" \ | 568 | "set_bootargs=setenv bootargs ${console_args} ${root_args} ${misc_args}\0" \ |
570 | "bootfile=/home/user/file\0" \ | 569 | "bootfile=/home/user/file\0" \ |
571 | "osfile=/home/user/uImage-XPedite5370\0" \ | 570 | "osfile=/home/user/uImage-XPedite5370\0" \ |
572 | "fdtfile=/home/user/xpedite5370.dtb\0" \ | 571 | "fdtfile=/home/user/xpedite5370.dtb\0" \ |
573 | "ubootfile=/home/user/u-boot.bin\0" \ | 572 | "ubootfile=/home/user/u-boot.bin\0" \ |
574 | "fdtaddr=c00000\0" \ | 573 | "fdtaddr=c00000\0" \ |
575 | "osaddr=0x1000000\0" \ | 574 | "osaddr=0x1000000\0" \ |
576 | "loadaddr=0x1000000\0" \ | 575 | "loadaddr=0x1000000\0" \ |
577 | "prog_uboot1="CONFIG_PROG_UBOOT1"\0" \ | 576 | "prog_uboot1="CONFIG_PROG_UBOOT1"\0" \ |
578 | "prog_uboot2="CONFIG_PROG_UBOOT2"\0" \ | 577 | "prog_uboot2="CONFIG_PROG_UBOOT2"\0" \ |
579 | "prog_os1="CONFIG_PROG_OS1"\0" \ | 578 | "prog_os1="CONFIG_PROG_OS1"\0" \ |
580 | "prog_os2="CONFIG_PROG_OS2"\0" \ | 579 | "prog_os2="CONFIG_PROG_OS2"\0" \ |
581 | "prog_fdt1="CONFIG_PROG_FDT1"\0" \ | 580 | "prog_fdt1="CONFIG_PROG_FDT1"\0" \ |
582 | "prog_fdt2="CONFIG_PROG_FDT2"\0" \ | 581 | "prog_fdt2="CONFIG_PROG_FDT2"\0" \ |
583 | "bootcmd_net=run set_bootargs; "CONFIG_BOOT_OS_NET"\0" \ | 582 | "bootcmd_net=run set_bootargs; "CONFIG_BOOT_OS_NET"\0" \ |
584 | "bootcmd_flash1=run set_bootargs; " \ | 583 | "bootcmd_flash1=run set_bootargs; " \ |
585 | "bootm "CONFIG_OS1_ENV_ADDR" - "CONFIG_FDT1_ENV_ADDR"\0"\ | 584 | "bootm "CONFIG_OS1_ENV_ADDR" - "CONFIG_FDT1_ENV_ADDR"\0"\ |
586 | "bootcmd_flash2=run set_bootargs; " \ | 585 | "bootcmd_flash2=run set_bootargs; " \ |
587 | "bootm "CONFIG_OS2_ENV_ADDR" - "CONFIG_FDT2_ENV_ADDR"\0"\ | 586 | "bootm "CONFIG_OS2_ENV_ADDR" - "CONFIG_FDT2_ENV_ADDR"\0"\ |
588 | "bootcmd=run bootcmd_flash1\0" | 587 | "bootcmd=run bootcmd_flash1\0" |
589 | #endif /* __CONFIG_H */ | 588 | #endif /* __CONFIG_H */ |
590 | 589 |
include/configs/ads5121.h
1 | /* | 1 | /* |
2 | * (C) Copyright 2007, 2008 DENX Software Engineering | 2 | * (C) Copyright 2007, 2008 DENX Software Engineering |
3 | * | 3 | * |
4 | * See file CREDITS for list of people who contributed to this | 4 | * See file CREDITS for list of people who contributed to this |
5 | * project. | 5 | * project. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License as | 8 | * modify it under the terms of the GNU General Public License as |
9 | * published by the Free Software Foundation; either version 2 of | 9 | * published by the Free Software Foundation; either version 2 of |
10 | * the License, or (at your option) any later version. | 10 | * the License, or (at your option) any later version. |
11 | * | 11 | * |
12 | * This program is distributed in the hope that it will be useful, | 12 | * This program is distributed in the hope that it will be useful, |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
16 | * | 16 | * |
17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License |
18 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
20 | * MA 02111-1307 USA | 20 | * MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | 22 | ||
23 | /* | 23 | /* |
24 | * ADS5121 board configuration file | 24 | * ADS5121 board configuration file |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #ifndef __CONFIG_H | 27 | #ifndef __CONFIG_H |
28 | #define __CONFIG_H | 28 | #define __CONFIG_H |
29 | 29 | ||
30 | #define CONFIG_ADS5121 1 | 30 | #define CONFIG_ADS5121 1 |
31 | /* | 31 | /* |
32 | * Memory map for the ADS5121 board: | 32 | * Memory map for the ADS5121 board: |
33 | * | 33 | * |
34 | * 0x0000_0000 - 0x0FFF_FFFF DDR RAM (256 MB) | 34 | * 0x0000_0000 - 0x0FFF_FFFF DDR RAM (256 MB) |
35 | * 0x3000_0000 - 0x3001_FFFF SRAM (128 KB) | 35 | * 0x3000_0000 - 0x3001_FFFF SRAM (128 KB) |
36 | * 0x8000_0000 - 0x803F_FFFF IMMR (4 MB) | 36 | * 0x8000_0000 - 0x803F_FFFF IMMR (4 MB) |
37 | * 0x8200_0000 - 0x8200_001F CPLD (32 B) | 37 | * 0x8200_0000 - 0x8200_001F CPLD (32 B) |
38 | * 0x8400_0000 - 0x82FF_FFFF PCI I/O space (16 MB) | 38 | * 0x8400_0000 - 0x82FF_FFFF PCI I/O space (16 MB) |
39 | * 0xA000_0000 - 0xAFFF_FFFF PCI memory space (256 MB) | 39 | * 0xA000_0000 - 0xAFFF_FFFF PCI memory space (256 MB) |
40 | * 0xB000_0000 - 0xBFFF_FFFF PCI memory mapped I/O space (256 MB) | 40 | * 0xB000_0000 - 0xBFFF_FFFF PCI memory mapped I/O space (256 MB) |
41 | * 0xFC00_0000 - 0xFFFF_FFFF NOR Boot FLASH (64 MB) | 41 | * 0xFC00_0000 - 0xFFFF_FFFF NOR Boot FLASH (64 MB) |
42 | */ | 42 | */ |
43 | 43 | ||
44 | /* | 44 | /* |
45 | * High Level Configuration Options | 45 | * High Level Configuration Options |
46 | */ | 46 | */ |
47 | #define CONFIG_E300 1 /* E300 Family */ | 47 | #define CONFIG_E300 1 /* E300 Family */ |
48 | #define CONFIG_MPC512X 1 /* MPC512X family */ | 48 | #define CONFIG_MPC512X 1 /* MPC512X family */ |
49 | #define CONFIG_FSL_DIU_FB 1 /* FSL DIU */ | 49 | #define CONFIG_FSL_DIU_FB 1 /* FSL DIU */ |
50 | #undef CONFIG_FSL_DIU_LOGO_BMP /* Don't include FSL DIU binary bmp */ | 50 | #undef CONFIG_FSL_DIU_LOGO_BMP /* Don't include FSL DIU binary bmp */ |
51 | 51 | ||
52 | /* video */ | 52 | /* video */ |
53 | #undef CONFIG_VIDEO | 53 | #undef CONFIG_VIDEO |
54 | 54 | ||
55 | #if defined(CONFIG_VIDEO) | 55 | #if defined(CONFIG_VIDEO) |
56 | #define CONFIG_CFB_CONSOLE | 56 | #define CONFIG_CFB_CONSOLE |
57 | #define CONFIG_VGA_AS_SINGLE_DEVICE | 57 | #define CONFIG_VGA_AS_SINGLE_DEVICE |
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | /* CONFIG_PCI is defined at config time */ | 60 | /* CONFIG_PCI is defined at config time */ |
61 | 61 | ||
62 | #ifdef CONFIG_ADS5121_REV2 | 62 | #ifdef CONFIG_ADS5121_REV2 |
63 | #define CONFIG_SYS_MPC512X_CLKIN 66000000 /* in Hz */ | 63 | #define CONFIG_SYS_MPC512X_CLKIN 66000000 /* in Hz */ |
64 | #else | 64 | #else |
65 | #define CONFIG_SYS_MPC512X_CLKIN 33333333 /* in Hz */ | 65 | #define CONFIG_SYS_MPC512X_CLKIN 33333333 /* in Hz */ |
66 | #define CONFIG_PCI | 66 | #define CONFIG_PCI |
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | #define CONFIG_BOARD_EARLY_INIT_F /* call board_early_init_f() */ | 69 | #define CONFIG_BOARD_EARLY_INIT_F /* call board_early_init_f() */ |
70 | #define CONFIG_MISC_INIT_R | 70 | #define CONFIG_MISC_INIT_R |
71 | 71 | ||
72 | #define CONFIG_SYS_IMMR 0x80000000 | 72 | #define CONFIG_SYS_IMMR 0x80000000 |
73 | #define CONFIG_SYS_DIU_ADDR (CONFIG_SYS_IMMR+0x2100) | 73 | #define CONFIG_SYS_DIU_ADDR (CONFIG_SYS_IMMR+0x2100) |
74 | 74 | ||
75 | #define CONFIG_SYS_MEMTEST_START 0x00200000 /* memtest region */ | 75 | #define CONFIG_SYS_MEMTEST_START 0x00200000 /* memtest region */ |
76 | #define CONFIG_SYS_MEMTEST_END 0x00400000 | 76 | #define CONFIG_SYS_MEMTEST_END 0x00400000 |
77 | 77 | ||
78 | /* | 78 | /* |
79 | * DDR Setup - manually set all parameters as there's no SPD etc. | 79 | * DDR Setup - manually set all parameters as there's no SPD etc. |
80 | */ | 80 | */ |
81 | #ifdef CONFIG_ADS5121_REV2 | 81 | #ifdef CONFIG_ADS5121_REV2 |
82 | #define CONFIG_SYS_DDR_SIZE 256 /* MB */ | 82 | #define CONFIG_SYS_DDR_SIZE 256 /* MB */ |
83 | #else | 83 | #else |
84 | #define CONFIG_SYS_DDR_SIZE 512 /* MB */ | 84 | #define CONFIG_SYS_DDR_SIZE 512 /* MB */ |
85 | #endif | 85 | #endif |
86 | #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory*/ | 86 | #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory*/ |
87 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE | 87 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE |
88 | 88 | ||
89 | /* DDR Controller Configuration | 89 | /* DDR Controller Configuration |
90 | * | 90 | * |
91 | * SYS_CFG: | 91 | * SYS_CFG: |
92 | * [31:31] MDDRC Soft Reset: Diabled | 92 | * [31:31] MDDRC Soft Reset: Diabled |
93 | * [30:30] DRAM CKE pin: Enabled | 93 | * [30:30] DRAM CKE pin: Enabled |
94 | * [29:29] DRAM CLK: Enabled | 94 | * [29:29] DRAM CLK: Enabled |
95 | * [28:28] Command Mode: Enabled (For initialization only) | 95 | * [28:28] Command Mode: Enabled (For initialization only) |
96 | * [27:25] DRAM Row Select: dram_row[15:0] = magenta_address[25:10] | 96 | * [27:25] DRAM Row Select: dram_row[15:0] = magenta_address[25:10] |
97 | * [24:21] DRAM Bank Select: dram_bank[1:0] = magenta_address[11:10] | 97 | * [24:21] DRAM Bank Select: dram_bank[1:0] = magenta_address[11:10] |
98 | * [20:19] Read Test: DON'T USE | 98 | * [20:19] Read Test: DON'T USE |
99 | * [18:18] Self Refresh: Enabled | 99 | * [18:18] Self Refresh: Enabled |
100 | * [17:17] 16bit Mode: Disabled | 100 | * [17:17] 16bit Mode: Disabled |
101 | * [16:13] Ready Delay: 2 | 101 | * [16:13] Ready Delay: 2 |
102 | * [12:12] Half DQS Delay: Disabled | 102 | * [12:12] Half DQS Delay: Disabled |
103 | * [11:11] Quarter DQS Delay: Disabled | 103 | * [11:11] Quarter DQS Delay: Disabled |
104 | * [10:08] Write Delay: 2 | 104 | * [10:08] Write Delay: 2 |
105 | * [07:07] Early ODT: Disabled | 105 | * [07:07] Early ODT: Disabled |
106 | * [06:06] On DIE Termination: Disabled | 106 | * [06:06] On DIE Termination: Disabled |
107 | * [05:05] FIFO Overflow Clear: DON'T USE here | 107 | * [05:05] FIFO Overflow Clear: DON'T USE here |
108 | * [04:04] FIFO Underflow Clear: DON'T USE here | 108 | * [04:04] FIFO Underflow Clear: DON'T USE here |
109 | * [03:03] FIFO Overflow Pending: DON'T USE here | 109 | * [03:03] FIFO Overflow Pending: DON'T USE here |
110 | * [02:02] FIFO Underlfow Pending: DON'T USE here | 110 | * [02:02] FIFO Underlfow Pending: DON'T USE here |
111 | * [01:01] FIFO Overlfow Enabled: Enabled | 111 | * [01:01] FIFO Overlfow Enabled: Enabled |
112 | * [00:00] FIFO Underflow Enabled: Enabled | 112 | * [00:00] FIFO Underflow Enabled: Enabled |
113 | * TIME_CFG0 | 113 | * TIME_CFG0 |
114 | * [31:16] DRAM Refresh Time: 0 CSB clocks | 114 | * [31:16] DRAM Refresh Time: 0 CSB clocks |
115 | * [15:8] DRAM Command Time: 0 CSB clocks | 115 | * [15:8] DRAM Command Time: 0 CSB clocks |
116 | * [07:00] DRAM Precharge Time: 0 CSB clocks | 116 | * [07:00] DRAM Precharge Time: 0 CSB clocks |
117 | * TIME_CFG1 | 117 | * TIME_CFG1 |
118 | * [31:26] DRAM tRFC: | 118 | * [31:26] DRAM tRFC: |
119 | * [25:21] DRAM tWR1: | 119 | * [25:21] DRAM tWR1: |
120 | * [20:17] DRAM tWRT1: | 120 | * [20:17] DRAM tWRT1: |
121 | * [16:11] DRAM tDRR: | 121 | * [16:11] DRAM tDRR: |
122 | * [10:05] DRAM tRC: | 122 | * [10:05] DRAM tRC: |
123 | * [04:00] DRAM tRAS: | 123 | * [04:00] DRAM tRAS: |
124 | * TIME_CFG2 | 124 | * TIME_CFG2 |
125 | * [31:28] DRAM tRCD: | 125 | * [31:28] DRAM tRCD: |
126 | * [27:23] DRAM tFAW: | 126 | * [27:23] DRAM tFAW: |
127 | * [22:19] DRAM tRTW1: | 127 | * [22:19] DRAM tRTW1: |
128 | * [18:15] DRAM tCCD: | 128 | * [18:15] DRAM tCCD: |
129 | * [14:10] DRAM tRTP: | 129 | * [14:10] DRAM tRTP: |
130 | * [09:05] DRAM tRP: | 130 | * [09:05] DRAM tRP: |
131 | * [04:00] DRAM tRPA | 131 | * [04:00] DRAM tRPA |
132 | */ | 132 | */ |
133 | #ifdef CONFIG_ADS5121_REV2 | 133 | #ifdef CONFIG_ADS5121_REV2 |
134 | #define CONFIG_SYS_MDDRC_SYS_CFG 0xF8604A00 | 134 | #define CONFIG_SYS_MDDRC_SYS_CFG 0xF8604A00 |
135 | #define CONFIG_SYS_MDDRC_SYS_CFG_RUN 0xE8604A00 | 135 | #define CONFIG_SYS_MDDRC_SYS_CFG_RUN 0xE8604A00 |
136 | #define CONFIG_SYS_MDDRC_TIME_CFG1 0x54EC1168 | 136 | #define CONFIG_SYS_MDDRC_TIME_CFG1 0x54EC1168 |
137 | #define CONFIG_SYS_MDDRC_TIME_CFG2 0x35210864 | 137 | #define CONFIG_SYS_MDDRC_TIME_CFG2 0x35210864 |
138 | #else | 138 | #else |
139 | #define CONFIG_SYS_MDDRC_SYS_CFG 0xFA804A00 | 139 | #define CONFIG_SYS_MDDRC_SYS_CFG 0xFA804A00 |
140 | #define CONFIG_SYS_MDDRC_SYS_CFG_RUN 0xEA804A00 | 140 | #define CONFIG_SYS_MDDRC_SYS_CFG_RUN 0xEA804A00 |
141 | #define CONFIG_SYS_MDDRC_TIME_CFG1 0x68EC1168 | 141 | #define CONFIG_SYS_MDDRC_TIME_CFG1 0x68EC1168 |
142 | #define CONFIG_SYS_MDDRC_TIME_CFG2 0x34310864 | 142 | #define CONFIG_SYS_MDDRC_TIME_CFG2 0x34310864 |
143 | #endif | 143 | #endif |
144 | #define CONFIG_SYS_MDDRC_SYS_CFG_EN 0xF0000000 | 144 | #define CONFIG_SYS_MDDRC_SYS_CFG_EN 0xF0000000 |
145 | #define CONFIG_SYS_MDDRC_TIME_CFG0 0x00003D2E | 145 | #define CONFIG_SYS_MDDRC_TIME_CFG0 0x00003D2E |
146 | #define CONFIG_SYS_MDDRC_TIME_CFG0_RUN 0x06183D2E | 146 | #define CONFIG_SYS_MDDRC_TIME_CFG0_RUN 0x06183D2E |
147 | 147 | ||
148 | #define CONFIG_SYS_MICRON_NOP 0x01380000 | 148 | #define CONFIG_SYS_MICRON_NOP 0x01380000 |
149 | #define CONFIG_SYS_MICRON_PCHG_ALL 0x01100400 | 149 | #define CONFIG_SYS_MICRON_PCHG_ALL 0x01100400 |
150 | #define CONFIG_SYS_MICRON_EM2 0x01020000 | 150 | #define CONFIG_SYS_MICRON_EM2 0x01020000 |
151 | #define CONFIG_SYS_MICRON_EM3 0x01030000 | 151 | #define CONFIG_SYS_MICRON_EM3 0x01030000 |
152 | #define CONFIG_SYS_MICRON_EN_DLL 0x01010000 | 152 | #define CONFIG_SYS_MICRON_EN_DLL 0x01010000 |
153 | #define CONFIG_SYS_MICRON_RFSH 0x01080000 | 153 | #define CONFIG_SYS_MICRON_RFSH 0x01080000 |
154 | #define CONFIG_SYS_MICRON_INIT_DEV_OP 0x01000432 | 154 | #define CONFIG_SYS_MICRON_INIT_DEV_OP 0x01000432 |
155 | #define CONFIG_SYS_MICRON_OCD_DEFAULT 0x01010780 | 155 | #define CONFIG_SYS_MICRON_OCD_DEFAULT 0x01010780 |
156 | 156 | ||
157 | /* DDR Priority Manager Configuration */ | 157 | /* DDR Priority Manager Configuration */ |
158 | #define CONFIG_SYS_MDDRCGRP_PM_CFG1 0x00077777 | 158 | #define CONFIG_SYS_MDDRCGRP_PM_CFG1 0x00077777 |
159 | #define CONFIG_SYS_MDDRCGRP_PM_CFG2 0x00000000 | 159 | #define CONFIG_SYS_MDDRCGRP_PM_CFG2 0x00000000 |
160 | #define CONFIG_SYS_MDDRCGRP_HIPRIO_CFG 0x00000001 | 160 | #define CONFIG_SYS_MDDRCGRP_HIPRIO_CFG 0x00000001 |
161 | #define CONFIG_SYS_MDDRCGRP_LUT0_MU 0xFFEEDDCC | 161 | #define CONFIG_SYS_MDDRCGRP_LUT0_MU 0xFFEEDDCC |
162 | #define CONFIG_SYS_MDDRCGRP_LUT0_ML 0xBBAAAAAA | 162 | #define CONFIG_SYS_MDDRCGRP_LUT0_ML 0xBBAAAAAA |
163 | #define CONFIG_SYS_MDDRCGRP_LUT1_MU 0x66666666 | 163 | #define CONFIG_SYS_MDDRCGRP_LUT1_MU 0x66666666 |
164 | #define CONFIG_SYS_MDDRCGRP_LUT1_ML 0x55555555 | 164 | #define CONFIG_SYS_MDDRCGRP_LUT1_ML 0x55555555 |
165 | #define CONFIG_SYS_MDDRCGRP_LUT2_MU 0x44444444 | 165 | #define CONFIG_SYS_MDDRCGRP_LUT2_MU 0x44444444 |
166 | #define CONFIG_SYS_MDDRCGRP_LUT2_ML 0x44444444 | 166 | #define CONFIG_SYS_MDDRCGRP_LUT2_ML 0x44444444 |
167 | #define CONFIG_SYS_MDDRCGRP_LUT3_MU 0x55555555 | 167 | #define CONFIG_SYS_MDDRCGRP_LUT3_MU 0x55555555 |
168 | #define CONFIG_SYS_MDDRCGRP_LUT3_ML 0x55555558 | 168 | #define CONFIG_SYS_MDDRCGRP_LUT3_ML 0x55555558 |
169 | #define CONFIG_SYS_MDDRCGRP_LUT4_MU 0x11111111 | 169 | #define CONFIG_SYS_MDDRCGRP_LUT4_MU 0x11111111 |
170 | #define CONFIG_SYS_MDDRCGRP_LUT4_ML 0x11111122 | 170 | #define CONFIG_SYS_MDDRCGRP_LUT4_ML 0x11111122 |
171 | #define CONFIG_SYS_MDDRCGRP_LUT0_AU 0xaaaaaaaa | 171 | #define CONFIG_SYS_MDDRCGRP_LUT0_AU 0xaaaaaaaa |
172 | #define CONFIG_SYS_MDDRCGRP_LUT0_AL 0xaaaaaaaa | 172 | #define CONFIG_SYS_MDDRCGRP_LUT0_AL 0xaaaaaaaa |
173 | #define CONFIG_SYS_MDDRCGRP_LUT1_AU 0x66666666 | 173 | #define CONFIG_SYS_MDDRCGRP_LUT1_AU 0x66666666 |
174 | #define CONFIG_SYS_MDDRCGRP_LUT1_AL 0x66666666 | 174 | #define CONFIG_SYS_MDDRCGRP_LUT1_AL 0x66666666 |
175 | #define CONFIG_SYS_MDDRCGRP_LUT2_AU 0x11111111 | 175 | #define CONFIG_SYS_MDDRCGRP_LUT2_AU 0x11111111 |
176 | #define CONFIG_SYS_MDDRCGRP_LUT2_AL 0x11111111 | 176 | #define CONFIG_SYS_MDDRCGRP_LUT2_AL 0x11111111 |
177 | #define CONFIG_SYS_MDDRCGRP_LUT3_AU 0x11111111 | 177 | #define CONFIG_SYS_MDDRCGRP_LUT3_AU 0x11111111 |
178 | #define CONFIG_SYS_MDDRCGRP_LUT3_AL 0x11111111 | 178 | #define CONFIG_SYS_MDDRCGRP_LUT3_AL 0x11111111 |
179 | #define CONFIG_SYS_MDDRCGRP_LUT4_AU 0x11111111 | 179 | #define CONFIG_SYS_MDDRCGRP_LUT4_AU 0x11111111 |
180 | #define CONFIG_SYS_MDDRCGRP_LUT4_AL 0x11111111 | 180 | #define CONFIG_SYS_MDDRCGRP_LUT4_AL 0x11111111 |
181 | 181 | ||
182 | /* | 182 | /* |
183 | * NOR FLASH on the Local Bus | 183 | * NOR FLASH on the Local Bus |
184 | */ | 184 | */ |
185 | #undef CONFIG_BKUP_FLASH | 185 | #undef CONFIG_BKUP_FLASH |
186 | #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */ | 186 | #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */ |
187 | #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */ | 187 | #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */ |
188 | #ifdef CONFIG_BKUP_FLASH | 188 | #ifdef CONFIG_BKUP_FLASH |
189 | #define CONFIG_SYS_FLASH_BASE 0xFF800000 /* start of FLASH */ | 189 | #define CONFIG_SYS_FLASH_BASE 0xFF800000 /* start of FLASH */ |
190 | #define CONFIG_SYS_FLASH_SIZE 0x00800000 /* max flash size in bytes */ | 190 | #define CONFIG_SYS_FLASH_SIZE 0x00800000 /* max flash size in bytes */ |
191 | #else | 191 | #else |
192 | #define CONFIG_SYS_FLASH_BASE 0xFC000000 /* start of FLASH */ | 192 | #define CONFIG_SYS_FLASH_BASE 0xFC000000 /* start of FLASH */ |
193 | #define CONFIG_SYS_FLASH_SIZE 0x04000000 /* max flash size in bytes */ | 193 | #define CONFIG_SYS_FLASH_SIZE 0x04000000 /* max flash size in bytes */ |
194 | #endif | 194 | #endif |
195 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE | 195 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE |
196 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ | 196 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ |
197 | #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE} | 197 | #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE} |
198 | #define CONFIG_SYS_MAX_FLASH_SECT 256 /* max sectors per device */ | 198 | #define CONFIG_SYS_MAX_FLASH_SECT 256 /* max sectors per device */ |
199 | 199 | ||
200 | #undef CONFIG_SYS_FLASH_CHECKSUM | 200 | #undef CONFIG_SYS_FLASH_CHECKSUM |
201 | 201 | ||
202 | /* | 202 | /* |
203 | * CPLD registers area is really only 32 bytes in size, but the smallest possible LP | 203 | * CPLD registers area is really only 32 bytes in size, but the smallest possible LP |
204 | * window is 64KB | 204 | * window is 64KB |
205 | */ | 205 | */ |
206 | #define CONFIG_SYS_CPLD_BASE 0x82000000 | 206 | #define CONFIG_SYS_CPLD_BASE 0x82000000 |
207 | #define CONFIG_SYS_CPLD_SIZE 0x00010000 /* 64 KB */ | 207 | #define CONFIG_SYS_CPLD_SIZE 0x00010000 /* 64 KB */ |
208 | 208 | ||
209 | #define CONFIG_SYS_SRAM_BASE 0x30000000 | 209 | #define CONFIG_SYS_SRAM_BASE 0x30000000 |
210 | #define CONFIG_SYS_SRAM_SIZE 0x00020000 /* 128 KB */ | 210 | #define CONFIG_SYS_SRAM_SIZE 0x00020000 /* 128 KB */ |
211 | 211 | ||
212 | #define CONFIG_SYS_CS0_CFG 0x05059310 /* ALE active low, data size 4bytes */ | 212 | #define CONFIG_SYS_CS0_CFG 0x05059310 /* ALE active low, data size 4bytes */ |
213 | #define CONFIG_SYS_CS2_CFG 0x05059010 /* ALE active low, data size 1byte */ | 213 | #define CONFIG_SYS_CS2_CFG 0x05059010 /* ALE active low, data size 1byte */ |
214 | #define CONFIG_SYS_CS_ALETIMING 0x00000005 /* Use alternative CS timing for CS0 and CS2 */ | 214 | #define CONFIG_SYS_CS_ALETIMING 0x00000005 /* Use alternative CS timing for CS0 and CS2 */ |
215 | 215 | ||
216 | /* Use SRAM for initial stack */ | 216 | /* Use SRAM for initial stack */ |
217 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_SRAM_BASE /* Initial RAM address */ | 217 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_SRAM_BASE /* Initial RAM address */ |
218 | #define CONFIG_SYS_INIT_RAM_END CONFIG_SYS_SRAM_SIZE /* End of used area in RAM */ | 218 | #define CONFIG_SYS_INIT_RAM_END CONFIG_SYS_SRAM_SIZE /* End of used area in RAM */ |
219 | 219 | ||
220 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ | 220 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ |
221 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 221 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
222 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET | 222 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
223 | 223 | ||
224 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* Start of monitor */ | 224 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* Start of monitor */ |
225 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ | 225 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ |
226 | #ifdef CONFIG_FSL_DIU_FB | 226 | #ifdef CONFIG_FSL_DIU_FB |
227 | #define CONFIG_SYS_MALLOC_LEN (6 * 1024 * 1024) /* Reserved for malloc */ | 227 | #define CONFIG_SYS_MALLOC_LEN (6 * 1024 * 1024) /* Reserved for malloc */ |
228 | #else | 228 | #else |
229 | #define CONFIG_SYS_MALLOC_LEN (512 * 1024) | 229 | #define CONFIG_SYS_MALLOC_LEN (512 * 1024) |
230 | #endif | 230 | #endif |
231 | 231 | ||
232 | /* | 232 | /* |
233 | * Serial Port | 233 | * Serial Port |
234 | */ | 234 | */ |
235 | #define CONFIG_CONS_INDEX 1 | 235 | #define CONFIG_CONS_INDEX 1 |
236 | #undef CONFIG_SERIAL_SOFTWARE_FIFO | 236 | #undef CONFIG_SERIAL_SOFTWARE_FIFO |
237 | 237 | ||
238 | /* | 238 | /* |
239 | * Serial console configuration | 239 | * Serial console configuration |
240 | */ | 240 | */ |
241 | #define CONFIG_PSC_CONSOLE 3 /* console is on PSC3 */ | 241 | #define CONFIG_PSC_CONSOLE 3 /* console is on PSC3 */ |
242 | #if CONFIG_PSC_CONSOLE != 3 | 242 | #if CONFIG_PSC_CONSOLE != 3 |
243 | #error CONFIG_PSC_CONSOLE must be 3 | 243 | #error CONFIG_PSC_CONSOLE must be 3 |
244 | #endif | 244 | #endif |
245 | #define CONFIG_BAUDRATE 115200 /* ... at 115200 bps */ | 245 | #define CONFIG_BAUDRATE 115200 /* ... at 115200 bps */ |
246 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 246 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
247 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} | 247 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} |
248 | 248 | ||
249 | #define CONSOLE_FIFO_TX_SIZE FIFOC_PSC3_TX_SIZE | 249 | #define CONSOLE_FIFO_TX_SIZE FIFOC_PSC3_TX_SIZE |
250 | #define CONSOLE_FIFO_TX_ADDR FIFOC_PSC3_TX_ADDR | 250 | #define CONSOLE_FIFO_TX_ADDR FIFOC_PSC3_TX_ADDR |
251 | #define CONSOLE_FIFO_RX_SIZE FIFOC_PSC3_RX_SIZE | 251 | #define CONSOLE_FIFO_RX_SIZE FIFOC_PSC3_RX_SIZE |
252 | #define CONSOLE_FIFO_RX_ADDR FIFOC_PSC3_RX_ADDR | 252 | #define CONSOLE_FIFO_RX_ADDR FIFOC_PSC3_RX_ADDR |
253 | 253 | ||
254 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ | 254 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ |
255 | /* Use the HUSH parser */ | 255 | /* Use the HUSH parser */ |
256 | #define CONFIG_SYS_HUSH_PARSER | 256 | #define CONFIG_SYS_HUSH_PARSER |
257 | #ifdef CONFIG_SYS_HUSH_PARSER | 257 | #ifdef CONFIG_SYS_HUSH_PARSER |
258 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | 258 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
259 | #endif | 259 | #endif |
260 | 260 | ||
261 | /* | 261 | /* |
262 | * PCI | 262 | * PCI |
263 | */ | 263 | */ |
264 | #ifdef CONFIG_PCI | 264 | #ifdef CONFIG_PCI |
265 | 265 | ||
266 | /* | 266 | /* |
267 | * General PCI | 267 | * General PCI |
268 | */ | 268 | */ |
269 | #define CONFIG_SYS_PCI_MEM_BASE 0xA0000000 | 269 | #define CONFIG_SYS_PCI_MEM_BASE 0xA0000000 |
270 | #define CONFIG_SYS_PCI_MEM_PHYS CONFIG_SYS_PCI_MEM_BASE | 270 | #define CONFIG_SYS_PCI_MEM_PHYS CONFIG_SYS_PCI_MEM_BASE |
271 | #define CONFIG_SYS_PCI_MEM_SIZE 0x10000000 /* 256M */ | 271 | #define CONFIG_SYS_PCI_MEM_SIZE 0x10000000 /* 256M */ |
272 | #define CONFIG_SYS_PCI_MMIO_BASE (CONFIG_SYS_PCI_MEM_BASE + CONFIG_SYS_PCI_MEM_SIZE) | 272 | #define CONFIG_SYS_PCI_MMIO_BASE (CONFIG_SYS_PCI_MEM_BASE + CONFIG_SYS_PCI_MEM_SIZE) |
273 | #define CONFIG_SYS_PCI_MMIO_PHYS CONFIG_SYS_PCI_MMIO_BASE | 273 | #define CONFIG_SYS_PCI_MMIO_PHYS CONFIG_SYS_PCI_MMIO_BASE |
274 | #define CONFIG_SYS_PCI_MMIO_SIZE 0x10000000 /* 256M */ | 274 | #define CONFIG_SYS_PCI_MMIO_SIZE 0x10000000 /* 256M */ |
275 | #define CONFIG_SYS_PCI_IO_BASE 0x00000000 | 275 | #define CONFIG_SYS_PCI_IO_BASE 0x00000000 |
276 | #define CONFIG_SYS_PCI_IO_PHYS 0x84000000 | 276 | #define CONFIG_SYS_PCI_IO_PHYS 0x84000000 |
277 | #define CONFIG_SYS_PCI_IO_SIZE 0x01000000 /* 16M */ | 277 | #define CONFIG_SYS_PCI_IO_SIZE 0x01000000 /* 16M */ |
278 | 278 | ||
279 | 279 | ||
280 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ | 280 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ |
281 | 281 | ||
282 | #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ | 282 | #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ |
283 | 283 | ||
284 | #endif | 284 | #endif |
285 | 285 | ||
286 | /* I2C */ | 286 | /* I2C */ |
287 | #define CONFIG_HARD_I2C /* I2C with hardware support */ | 287 | #define CONFIG_HARD_I2C /* I2C with hardware support */ |
288 | #undef CONFIG_SOFT_I2C /* so disable bit-banged I2C */ | 288 | #undef CONFIG_SOFT_I2C /* so disable bit-banged I2C */ |
289 | #define CONFIG_I2C_MULTI_BUS | 289 | #define CONFIG_I2C_MULTI_BUS |
290 | #define CONFIG_I2C_CMD_TREE | ||
291 | #define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ | 290 | #define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ |
292 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 291 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
293 | #if 0 | 292 | #if 0 |
294 | #define CONFIG_SYS_I2C_NOPROBES {{0,0x69}} /* Don't probe these addrs */ | 293 | #define CONFIG_SYS_I2C_NOPROBES {{0,0x69}} /* Don't probe these addrs */ |
295 | #endif | 294 | #endif |
296 | 295 | ||
297 | /* | 296 | /* |
298 | * IIM - IC Identification Module | 297 | * IIM - IC Identification Module |
299 | */ | 298 | */ |
300 | #undef CONFIG_IIM | 299 | #undef CONFIG_IIM |
301 | 300 | ||
302 | /* | 301 | /* |
303 | * EEPROM configuration | 302 | * EEPROM configuration |
304 | */ | 303 | */ |
305 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* 16-bit EEPROM address */ | 304 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* 16-bit EEPROM address */ |
306 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Atmel: AT24C32A-10TQ-2.7 */ | 305 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Atmel: AT24C32A-10TQ-2.7 */ |
307 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 /* 10ms of delay */ | 306 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 /* 10ms of delay */ |
308 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5 /* 32-Byte Page Write Mode */ | 307 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5 /* 32-Byte Page Write Mode */ |
309 | 308 | ||
310 | /* | 309 | /* |
311 | * Ethernet configuration | 310 | * Ethernet configuration |
312 | */ | 311 | */ |
313 | #define CONFIG_MPC512x_FEC 1 | 312 | #define CONFIG_MPC512x_FEC 1 |
314 | #define CONFIG_NET_MULTI | 313 | #define CONFIG_NET_MULTI |
315 | #define CONFIG_PHY_ADDR 0x1 | 314 | #define CONFIG_PHY_ADDR 0x1 |
316 | #define CONFIG_MII 1 /* MII PHY management */ | 315 | #define CONFIG_MII 1 /* MII PHY management */ |
317 | #define CONFIG_FEC_AN_TIMEOUT 1 | 316 | #define CONFIG_FEC_AN_TIMEOUT 1 |
318 | #define CONFIG_HAS_ETH0 | 317 | #define CONFIG_HAS_ETH0 |
319 | 318 | ||
320 | /* | 319 | /* |
321 | * Configure on-board RTC | 320 | * Configure on-board RTC |
322 | */ | 321 | */ |
323 | #define CONFIG_RTC_M41T62 /* use M41T62 rtc via i2 */ | 322 | #define CONFIG_RTC_M41T62 /* use M41T62 rtc via i2 */ |
324 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 /* at address 0x68 */ | 323 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 /* at address 0x68 */ |
325 | 324 | ||
326 | /* | 325 | /* |
327 | * Environment | 326 | * Environment |
328 | */ | 327 | */ |
329 | #define CONFIG_ENV_IS_IN_FLASH 1 | 328 | #define CONFIG_ENV_IS_IN_FLASH 1 |
330 | /* This has to be a multiple of the Flash sector size */ | 329 | /* This has to be a multiple of the Flash sector size */ |
331 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) | 330 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) |
332 | #define CONFIG_ENV_SIZE 0x2000 | 331 | #define CONFIG_ENV_SIZE 0x2000 |
333 | #ifdef CONFIG_BKUP_FLASH | 332 | #ifdef CONFIG_BKUP_FLASH |
334 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* one sector (256K) for env */ | 333 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* one sector (256K) for env */ |
335 | #else | 334 | #else |
336 | #define CONFIG_ENV_SECT_SIZE 0x40000 /* one sector (256K) for env */ | 335 | #define CONFIG_ENV_SECT_SIZE 0x40000 /* one sector (256K) for env */ |
337 | #endif | 336 | #endif |
338 | 337 | ||
339 | /* Address and size of Redundant Environment Sector */ | 338 | /* Address and size of Redundant Environment Sector */ |
340 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE) | 339 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE) |
341 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) | 340 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) |
342 | 341 | ||
343 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ | 342 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
344 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ | 343 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
345 | 344 | ||
346 | #include <config_cmd_default.h> | 345 | #include <config_cmd_default.h> |
347 | 346 | ||
348 | #define CONFIG_CMD_ASKENV | 347 | #define CONFIG_CMD_ASKENV |
349 | #define CONFIG_CMD_DHCP | 348 | #define CONFIG_CMD_DHCP |
350 | #define CONFIG_CMD_I2C | 349 | #define CONFIG_CMD_I2C |
351 | #define CONFIG_CMD_MII | 350 | #define CONFIG_CMD_MII |
352 | #define CONFIG_CMD_NFS | 351 | #define CONFIG_CMD_NFS |
353 | #define CONFIG_CMD_PING | 352 | #define CONFIG_CMD_PING |
354 | #define CONFIG_CMD_REGINFO | 353 | #define CONFIG_CMD_REGINFO |
355 | #define CONFIG_CMD_EEPROM | 354 | #define CONFIG_CMD_EEPROM |
356 | #define CONFIG_CMD_DATE | 355 | #define CONFIG_CMD_DATE |
357 | #undef CONFIG_CMD_FUSE | 356 | #undef CONFIG_CMD_FUSE |
358 | #define CONFIG_CMD_IDE | 357 | #define CONFIG_CMD_IDE |
359 | #define CONFIG_CMD_EXT2 | 358 | #define CONFIG_CMD_EXT2 |
360 | 359 | ||
361 | #if defined(CONFIG_PCI) | 360 | #if defined(CONFIG_PCI) |
362 | #define CONFIG_CMD_PCI | 361 | #define CONFIG_CMD_PCI |
363 | #endif | 362 | #endif |
364 | 363 | ||
365 | #if defined(CONFIG_CMD_IDE) | 364 | #if defined(CONFIG_CMD_IDE) |
366 | #define CONFIG_DOS_PARTITION | 365 | #define CONFIG_DOS_PARTITION |
367 | #define CONFIG_MAC_PARTITION | 366 | #define CONFIG_MAC_PARTITION |
368 | #define CONFIG_ISO_PARTITION | 367 | #define CONFIG_ISO_PARTITION |
369 | #endif /* defined(CONFIG_CMD_IDE) */ | 368 | #endif /* defined(CONFIG_CMD_IDE) */ |
370 | 369 | ||
371 | /* | 370 | /* |
372 | * Watchdog timeout = CONFIG_SYS_WATCHDOG_VALUE * 65536 / IPS clock. | 371 | * Watchdog timeout = CONFIG_SYS_WATCHDOG_VALUE * 65536 / IPS clock. |
373 | * For example, when IPS is set to 66MHz and CONFIG_SYS_WATCHDOG_VALUE is set | 372 | * For example, when IPS is set to 66MHz and CONFIG_SYS_WATCHDOG_VALUE is set |
374 | * to 0xFFFF, watchdog timeouts after about 64s. For details refer | 373 | * to 0xFFFF, watchdog timeouts after about 64s. For details refer |
375 | * to chapter 36 of the MPC5121e Reference Manual. | 374 | * to chapter 36 of the MPC5121e Reference Manual. |
376 | */ | 375 | */ |
377 | /* #define CONFIG_WATCHDOG */ /* enable watchdog */ | 376 | /* #define CONFIG_WATCHDOG */ /* enable watchdog */ |
378 | #define CONFIG_SYS_WATCHDOG_VALUE 0xFFFF | 377 | #define CONFIG_SYS_WATCHDOG_VALUE 0xFFFF |
379 | 378 | ||
380 | /* | 379 | /* |
381 | * Miscellaneous configurable options | 380 | * Miscellaneous configurable options |
382 | */ | 381 | */ |
383 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 382 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
384 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ | 383 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ |
385 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | 384 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
386 | 385 | ||
387 | #ifdef CONFIG_CMD_KGDB | 386 | #ifdef CONFIG_CMD_KGDB |
388 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ | 387 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
389 | #else | 388 | #else |
390 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | 389 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
391 | #endif | 390 | #endif |
392 | 391 | ||
393 | 392 | ||
394 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) /* Print Buffer Size */ | 393 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) /* Print Buffer Size */ |
395 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 394 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
396 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | 395 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
397 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ | 396 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ |
398 | 397 | ||
399 | /* | 398 | /* |
400 | * For booting Linux, the board info and command line data | 399 | * For booting Linux, the board info and command line data |
401 | * have to be in the first 8 MB of memory, since this is | 400 | * have to be in the first 8 MB of memory, since this is |
402 | * the maximum mapped by the Linux kernel during initialization. | 401 | * the maximum mapped by the Linux kernel during initialization. |
403 | */ | 402 | */ |
404 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ | 403 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ |
405 | 404 | ||
406 | /* Cache Configuration */ | 405 | /* Cache Configuration */ |
407 | #define CONFIG_SYS_DCACHE_SIZE 32768 | 406 | #define CONFIG_SYS_DCACHE_SIZE 32768 |
408 | #define CONFIG_SYS_CACHELINE_SIZE 32 | 407 | #define CONFIG_SYS_CACHELINE_SIZE 32 |
409 | #ifdef CONFIG_CMD_KGDB | 408 | #ifdef CONFIG_CMD_KGDB |
410 | #define CONFIG_SYS_CACHELINE_SHIFT 5 /*log base 2 of the above value*/ | 409 | #define CONFIG_SYS_CACHELINE_SHIFT 5 /*log base 2 of the above value*/ |
411 | #endif | 410 | #endif |
412 | 411 | ||
413 | #define CONFIG_SYS_HID0_INIT 0x000000000 | 412 | #define CONFIG_SYS_HID0_INIT 0x000000000 |
414 | #define CONFIG_SYS_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK | HID0_ICE) | 413 | #define CONFIG_SYS_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK | HID0_ICE) |
415 | #define CONFIG_SYS_HID2 HID2_HBE | 414 | #define CONFIG_SYS_HID2 HID2_HBE |
416 | 415 | ||
417 | #define CONFIG_HIGH_BATS 1 /* High BATs supported */ | 416 | #define CONFIG_HIGH_BATS 1 /* High BATs supported */ |
418 | 417 | ||
419 | /* | 418 | /* |
420 | * Internal Definitions | 419 | * Internal Definitions |
421 | * | 420 | * |
422 | * Boot Flags | 421 | * Boot Flags |
423 | */ | 422 | */ |
424 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 423 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
425 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 424 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
426 | 425 | ||
427 | #ifdef CONFIG_CMD_KGDB | 426 | #ifdef CONFIG_CMD_KGDB |
428 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */ | 427 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */ |
429 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ | 428 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ |
430 | #endif | 429 | #endif |
431 | 430 | ||
432 | /* | 431 | /* |
433 | * Environment Configuration | 432 | * Environment Configuration |
434 | */ | 433 | */ |
435 | #define CONFIG_TIMESTAMP | 434 | #define CONFIG_TIMESTAMP |
436 | 435 | ||
437 | #define CONFIG_HOSTNAME ads5121 | 436 | #define CONFIG_HOSTNAME ads5121 |
438 | #define CONFIG_BOOTFILE ads5121/uImage | 437 | #define CONFIG_BOOTFILE ads5121/uImage |
439 | #define CONFIG_ROOTPATH /opt/eldk/ppc_6xx | 438 | #define CONFIG_ROOTPATH /opt/eldk/ppc_6xx |
440 | 439 | ||
441 | #define CONFIG_LOADADDR 400000 /* default location for tftp and bootm */ | 440 | #define CONFIG_LOADADDR 400000 /* default location for tftp and bootm */ |
442 | 441 | ||
443 | #define CONFIG_BOOTDELAY 5 /* -1 disables auto-boot */ | 442 | #define CONFIG_BOOTDELAY 5 /* -1 disables auto-boot */ |
444 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs */ | 443 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs */ |
445 | 444 | ||
446 | #define CONFIG_BAUDRATE 115200 | 445 | #define CONFIG_BAUDRATE 115200 |
447 | 446 | ||
448 | #define CONFIG_PREBOOT "echo;" \ | 447 | #define CONFIG_PREBOOT "echo;" \ |
449 | "echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;" \ | 448 | "echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;" \ |
450 | "echo" | 449 | "echo" |
451 | 450 | ||
452 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 451 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
453 | "u-boot_addr_r=200000\0" \ | 452 | "u-boot_addr_r=200000\0" \ |
454 | "kernel_addr_r=600000\0" \ | 453 | "kernel_addr_r=600000\0" \ |
455 | "fdt_addr_r=880000\0" \ | 454 | "fdt_addr_r=880000\0" \ |
456 | "ramdisk_addr_r=900000\0" \ | 455 | "ramdisk_addr_r=900000\0" \ |
457 | "u-boot_addr=FFF00000\0" \ | 456 | "u-boot_addr=FFF00000\0" \ |
458 | "kernel_addr=FFC40000\0" \ | 457 | "kernel_addr=FFC40000\0" \ |
459 | "fdt_addr=FFEC0000\0" \ | 458 | "fdt_addr=FFEC0000\0" \ |
460 | "ramdisk_addr=FC040000\0" \ | 459 | "ramdisk_addr=FC040000\0" \ |
461 | "ramdiskfile=ads5121/uRamdisk\0" \ | 460 | "ramdiskfile=ads5121/uRamdisk\0" \ |
462 | "u-boot=ads5121/u-boot.bin\0" \ | 461 | "u-boot=ads5121/u-boot.bin\0" \ |
463 | "bootfile=ads5121/uImage\0" \ | 462 | "bootfile=ads5121/uImage\0" \ |
464 | "fdtfile=ads5121/ads5121.dtb\0" \ | 463 | "fdtfile=ads5121/ads5121.dtb\0" \ |
465 | "rootpath=/opt/eldk/ppc_6xx\n" \ | 464 | "rootpath=/opt/eldk/ppc_6xx\n" \ |
466 | "netdev=eth0\0" \ | 465 | "netdev=eth0\0" \ |
467 | "consdev=ttyPSC0\0" \ | 466 | "consdev=ttyPSC0\0" \ |
468 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ | 467 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
469 | "nfsroot=${serverip}:${rootpath}\0" \ | 468 | "nfsroot=${serverip}:${rootpath}\0" \ |
470 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ | 469 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ |
471 | "addip=setenv bootargs ${bootargs} " \ | 470 | "addip=setenv bootargs ${bootargs} " \ |
472 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ | 471 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ |
473 | ":${hostname}:${netdev}:off panic=1\0" \ | 472 | ":${hostname}:${netdev}:off panic=1\0" \ |
474 | "addtty=setenv bootargs ${bootargs} " \ | 473 | "addtty=setenv bootargs ${bootargs} " \ |
475 | "console=${consdev},${baudrate}\0" \ | 474 | "console=${consdev},${baudrate}\0" \ |
476 | "flash_nfs=run nfsargs addip addtty;" \ | 475 | "flash_nfs=run nfsargs addip addtty;" \ |
477 | "bootm ${kernel_addr} - ${fdt_addr}\0" \ | 476 | "bootm ${kernel_addr} - ${fdt_addr}\0" \ |
478 | "flash_self=run ramargs addip addtty;" \ | 477 | "flash_self=run ramargs addip addtty;" \ |
479 | "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ | 478 | "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ |
480 | "net_nfs=tftp ${kernel_addr_r} ${bootfile};" \ | 479 | "net_nfs=tftp ${kernel_addr_r} ${bootfile};" \ |
481 | "tftp ${fdt_addr_r} ${fdtfile};" \ | 480 | "tftp ${fdt_addr_r} ${fdtfile};" \ |
482 | "run nfsargs addip addtty;" \ | 481 | "run nfsargs addip addtty;" \ |
483 | "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ | 482 | "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ |
484 | "net_self=tftp ${kernel_addr_r} ${bootfile};" \ | 483 | "net_self=tftp ${kernel_addr_r} ${bootfile};" \ |
485 | "tftp ${ramdisk_addr_r} ${ramdiskfile};" \ | 484 | "tftp ${ramdisk_addr_r} ${ramdiskfile};" \ |
486 | "tftp ${fdt_addr_r} ${fdtfile};" \ | 485 | "tftp ${fdt_addr_r} ${fdtfile};" \ |
487 | "run ramargs addip addtty;" \ | 486 | "run ramargs addip addtty;" \ |
488 | "bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\0"\ | 487 | "bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\0"\ |
489 | "load=tftp ${u-boot_addr_r} ${u-boot}\0" \ | 488 | "load=tftp ${u-boot_addr_r} ${u-boot}\0" \ |
490 | "update=protect off ${u-boot_addr} +${filesize};" \ | 489 | "update=protect off ${u-boot_addr} +${filesize};" \ |
491 | "era ${u-boot_addr} +${filesize};" \ | 490 | "era ${u-boot_addr} +${filesize};" \ |
492 | "cp.b ${u-boot_addr_r} ${u-boot_addr} ${filesize}\0" \ | 491 | "cp.b ${u-boot_addr_r} ${u-boot_addr} ${filesize}\0" \ |
493 | "upd=run load update\0" \ | 492 | "upd=run load update\0" \ |
494 | "" | 493 | "" |
495 | 494 | ||
496 | #define CONFIG_BOOTCOMMAND "run flash_self" | 495 | #define CONFIG_BOOTCOMMAND "run flash_self" |
497 | 496 | ||
498 | #define CONFIG_OF_LIBFDT 1 | 497 | #define CONFIG_OF_LIBFDT 1 |
499 | #define CONFIG_OF_BOARD_SETUP 1 | 498 | #define CONFIG_OF_BOARD_SETUP 1 |
500 | #define CONFIG_OF_SUPPORT_OLD_DEVICE_TREES 1 | 499 | #define CONFIG_OF_SUPPORT_OLD_DEVICE_TREES 1 |
501 | 500 | ||
502 | #define OF_CPU "PowerPC,5121@0" | 501 | #define OF_CPU "PowerPC,5121@0" |
503 | #define OF_SOC_COMPAT "fsl,mpc5121-immr" | 502 | #define OF_SOC_COMPAT "fsl,mpc5121-immr" |
504 | #define OF_TBCLK (bd->bi_busfreq / 4) | 503 | #define OF_TBCLK (bd->bi_busfreq / 4) |
505 | #define OF_STDOUT_PATH "/soc@80000000/serial@11300" | 504 | #define OF_STDOUT_PATH "/soc@80000000/serial@11300" |
506 | 505 | ||
507 | /*----------------------------------------------------------------------- | 506 | /*----------------------------------------------------------------------- |
508 | * IDE/ATA stuff | 507 | * IDE/ATA stuff |
509 | *----------------------------------------------------------------------- | 508 | *----------------------------------------------------------------------- |
510 | */ | 509 | */ |
511 | 510 | ||
512 | #undef CONFIG_IDE_8xx_PCCARD /* Use IDE with PC Card Adapter */ | 511 | #undef CONFIG_IDE_8xx_PCCARD /* Use IDE with PC Card Adapter */ |
513 | #undef CONFIG_IDE_8xx_DIRECT /* Direct IDE not supported */ | 512 | #undef CONFIG_IDE_8xx_DIRECT /* Direct IDE not supported */ |
514 | #undef CONFIG_IDE_LED /* LED for IDE not supported */ | 513 | #undef CONFIG_IDE_LED /* LED for IDE not supported */ |
515 | 514 | ||
516 | #define CONFIG_IDE_RESET /* reset for IDE supported */ | 515 | #define CONFIG_IDE_RESET /* reset for IDE supported */ |
517 | #define CONFIG_IDE_PREINIT | 516 | #define CONFIG_IDE_PREINIT |
518 | 517 | ||
519 | #define CONFIG_SYS_IDE_MAXBUS 1 /* max. 1 IDE bus */ | 518 | #define CONFIG_SYS_IDE_MAXBUS 1 /* max. 1 IDE bus */ |
520 | #define CONFIG_SYS_IDE_MAXDEVICE 2 /* max. 1 drive per IDE bus */ | 519 | #define CONFIG_SYS_IDE_MAXDEVICE 2 /* max. 1 drive per IDE bus */ |
521 | 520 | ||
522 | #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000 | 521 | #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000 |
523 | #define CONFIG_SYS_ATA_BASE_ADDR MPC512X_PATA | 522 | #define CONFIG_SYS_ATA_BASE_ADDR MPC512X_PATA |
524 | 523 | ||
525 | /* Offset for data I/O RefMan MPC5121EE Table 28-10 */ | 524 | /* Offset for data I/O RefMan MPC5121EE Table 28-10 */ |
526 | #define CONFIG_SYS_ATA_DATA_OFFSET (0x00A0) | 525 | #define CONFIG_SYS_ATA_DATA_OFFSET (0x00A0) |
527 | 526 | ||
528 | /* Offset for normal register accesses */ | 527 | /* Offset for normal register accesses */ |
529 | #define CONFIG_SYS_ATA_REG_OFFSET (CONFIG_SYS_ATA_DATA_OFFSET) | 528 | #define CONFIG_SYS_ATA_REG_OFFSET (CONFIG_SYS_ATA_DATA_OFFSET) |
530 | 529 | ||
531 | /* Offset for alternate registers RefMan MPC5121EE Table 28-23 */ | 530 | /* Offset for alternate registers RefMan MPC5121EE Table 28-23 */ |
532 | #define CONFIG_SYS_ATA_ALT_OFFSET (0x00D8) | 531 | #define CONFIG_SYS_ATA_ALT_OFFSET (0x00D8) |
533 | 532 | ||
534 | /* Interval between registers */ | 533 | /* Interval between registers */ |
535 | #define CONFIG_SYS_ATA_STRIDE 4 | 534 | #define CONFIG_SYS_ATA_STRIDE 4 |
536 | 535 | ||
537 | #define ATA_BASE_ADDR MPC512X_PATA | 536 | #define ATA_BASE_ADDR MPC512X_PATA |
538 | 537 | ||
539 | /* | 538 | /* |
540 | * Control register bit definitions | 539 | * Control register bit definitions |
541 | */ | 540 | */ |
542 | #define FSL_ATA_CTRL_FIFO_RST_B 0x80000000 | 541 | #define FSL_ATA_CTRL_FIFO_RST_B 0x80000000 |
543 | #define FSL_ATA_CTRL_ATA_RST_B 0x40000000 | 542 | #define FSL_ATA_CTRL_ATA_RST_B 0x40000000 |
544 | #define FSL_ATA_CTRL_FIFO_TX_EN 0x20000000 | 543 | #define FSL_ATA_CTRL_FIFO_TX_EN 0x20000000 |
545 | #define FSL_ATA_CTRL_FIFO_RCV_EN 0x10000000 | 544 | #define FSL_ATA_CTRL_FIFO_RCV_EN 0x10000000 |
546 | #define FSL_ATA_CTRL_DMA_PENDING 0x08000000 | 545 | #define FSL_ATA_CTRL_DMA_PENDING 0x08000000 |
547 | #define FSL_ATA_CTRL_DMA_ULTRA 0x04000000 | 546 | #define FSL_ATA_CTRL_DMA_ULTRA 0x04000000 |
548 | #define FSL_ATA_CTRL_DMA_WRITE 0x02000000 | 547 | #define FSL_ATA_CTRL_DMA_WRITE 0x02000000 |
549 | #define FSL_ATA_CTRL_IORDY_EN 0x01000000 | 548 | #define FSL_ATA_CTRL_IORDY_EN 0x01000000 |
550 | 549 | ||
551 | #endif /* __CONFIG_H */ | 550 | #endif /* __CONFIG_H */ |
552 | 551 |
include/configs/at91rm9200ek.h
1 | /* | 1 | /* |
2 | * Ulf Samuelsson <ulf@atmel.com> | 2 | * Ulf Samuelsson <ulf@atmel.com> |
3 | * Rick Bronson <rick@efn.org> | 3 | * Rick Bronson <rick@efn.org> |
4 | * | 4 | * |
5 | * Configuration settings for the AT91RM9200EK board. | 5 | * Configuration settings for the AT91RM9200EK board. |
6 | * | 6 | * |
7 | * See file CREDITS for list of people who contributed to this | 7 | * See file CREDITS for list of people who contributed to this |
8 | * project. | 8 | * project. |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or | 10 | * This program is free software; you can redistribute it and/or |
11 | * modify it under the terms of the GNU General Public License as | 11 | * modify it under the terms of the GNU General Public License as |
12 | * published by the Free Software Foundation; either version 2 of | 12 | * published by the Free Software Foundation; either version 2 of |
13 | * the License, or (at your option) any later version. | 13 | * the License, or (at your option) any later version. |
14 | * | 14 | * |
15 | * This program is distributed in the hope that it will be useful, | 15 | * This program is distributed in the hope that it will be useful, |
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 | * GNU General Public License for more details. | 18 | * GNU General Public License for more details. |
19 | * | 19 | * |
20 | * You should have received a copy of the GNU General Public License | 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 | 21 | * along with this program; if not, write to the Free Software |
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
23 | * MA 02111-1307 USA | 23 | * MA 02111-1307 USA |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #ifndef __CONFIG_H | 26 | #ifndef __CONFIG_H |
27 | #define __CONFIG_H | 27 | #define __CONFIG_H |
28 | 28 | ||
29 | /* ARM asynchronous clock */ | 29 | /* ARM asynchronous clock */ |
30 | /* | 30 | /* |
31 | * from 18.432 MHz crystal | 31 | * from 18.432 MHz crystal |
32 | * (18432000 / 4 * 39) | 32 | * (18432000 / 4 * 39) |
33 | */ | 33 | */ |
34 | #define AT91C_MAIN_CLOCK 179712000 | 34 | #define AT91C_MAIN_CLOCK 179712000 |
35 | /* | 35 | /* |
36 | * peripheral clock | 36 | * peripheral clock |
37 | * (AT91C_MASTER_CLOCK / 3) | 37 | * (AT91C_MASTER_CLOCK / 3) |
38 | */ | 38 | */ |
39 | #define AT91C_MASTER_CLOCK 59904000 | 39 | #define AT91C_MASTER_CLOCK 59904000 |
40 | 40 | ||
41 | #define AT91_SLOW_CLOCK 32768 /* slow clock */ | 41 | #define AT91_SLOW_CLOCK 32768 /* slow clock */ |
42 | 42 | ||
43 | #define CONFIG_ARM920T 1 /* This is an ARM920T Core */ | 43 | #define CONFIG_ARM920T 1 /* This is an ARM920T Core */ |
44 | #define CONFIG_AT91RM9200 1 /* It's an Atmel AT91RM9200 SoC */ | 44 | #define CONFIG_AT91RM9200 1 /* It's an Atmel AT91RM9200 SoC */ |
45 | #define CONFIG_AT91RM9200EK 1 /* on an AT91RM9200EK Board */ | 45 | #define CONFIG_AT91RM9200EK 1 /* on an AT91RM9200EK Board */ |
46 | #undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */ | 46 | #undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */ |
47 | #define USE_920T_MMU 1 | 47 | #define USE_920T_MMU 1 |
48 | 48 | ||
49 | #define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */ | 49 | #define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */ |
50 | #define CONFIG_SETUP_MEMORY_TAGS 1 | 50 | #define CONFIG_SETUP_MEMORY_TAGS 1 |
51 | #define CONFIG_INITRD_TAG 1 | 51 | #define CONFIG_INITRD_TAG 1 |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * LowLevel Init | 54 | * LowLevel Init |
55 | */ | 55 | */ |
56 | #ifndef CONFIG_SKIP_LOWLEVEL_INIT | 56 | #ifndef CONFIG_SKIP_LOWLEVEL_INIT |
57 | #define CONFIG_SYS_USE_MAIN_OSCILLATOR 1 | 57 | #define CONFIG_SYS_USE_MAIN_OSCILLATOR 1 |
58 | /* flash */ | 58 | /* flash */ |
59 | #define CONFIG_SYS_MC_PUIA_VAL 0x00000000 | 59 | #define CONFIG_SYS_MC_PUIA_VAL 0x00000000 |
60 | #define CONFIG_SYS_MC_PUP_VAL 0x00000000 | 60 | #define CONFIG_SYS_MC_PUP_VAL 0x00000000 |
61 | #define CONFIG_SYS_MC_PUER_VAL 0x00000000 | 61 | #define CONFIG_SYS_MC_PUER_VAL 0x00000000 |
62 | #define CONFIG_SYS_MC_ASR_VAL 0x00000000 | 62 | #define CONFIG_SYS_MC_ASR_VAL 0x00000000 |
63 | #define CONFIG_SYS_MC_AASR_VAL 0x00000000 | 63 | #define CONFIG_SYS_MC_AASR_VAL 0x00000000 |
64 | #define CONFIG_SYS_EBI_CFGR_VAL 0x00000000 | 64 | #define CONFIG_SYS_EBI_CFGR_VAL 0x00000000 |
65 | #define CONFIG_SYS_SMC_CSR0_VAL 0x00003284 /* 16bit, 2 TDF, 4 WS */ | 65 | #define CONFIG_SYS_SMC_CSR0_VAL 0x00003284 /* 16bit, 2 TDF, 4 WS */ |
66 | 66 | ||
67 | /* clocks */ | 67 | /* clocks */ |
68 | #define CONFIG_SYS_PLLAR_VAL 0x20263E04 /* 179.712000 MHz for PCK */ | 68 | #define CONFIG_SYS_PLLAR_VAL 0x20263E04 /* 179.712000 MHz for PCK */ |
69 | #define CONFIG_SYS_PLLBR_VAL 0x10483E0E /* 48.054857 MHz (divider by 2 for USB) */ | 69 | #define CONFIG_SYS_PLLBR_VAL 0x10483E0E /* 48.054857 MHz (divider by 2 for USB) */ |
70 | /* PCK/3 = MCK Master Clock = 59.904000MHz from PLLA */ | 70 | /* PCK/3 = MCK Master Clock = 59.904000MHz from PLLA */ |
71 | #define CONFIG_SYS_MCKR_VAL 0x00000202 | 71 | #define CONFIG_SYS_MCKR_VAL 0x00000202 |
72 | 72 | ||
73 | /* sdram */ | 73 | /* sdram */ |
74 | #define CONFIG_SYS_PIOC_ASR_VAL 0xFFFF0000 /* Configure PIOC as peripheral (D16/D31) */ | 74 | #define CONFIG_SYS_PIOC_ASR_VAL 0xFFFF0000 /* Configure PIOC as peripheral (D16/D31) */ |
75 | #define CONFIG_SYS_PIOC_BSR_VAL 0x00000000 | 75 | #define CONFIG_SYS_PIOC_BSR_VAL 0x00000000 |
76 | #define CONFIG_SYS_PIOC_PDR_VAL 0xFFFF0000 | 76 | #define CONFIG_SYS_PIOC_PDR_VAL 0xFFFF0000 |
77 | #define CONFIG_SYS_EBI_CSA_VAL 0x00000002 /* CS1=CONFIG_SYS_SDRAM */ | 77 | #define CONFIG_SYS_EBI_CSA_VAL 0x00000002 /* CS1=CONFIG_SYS_SDRAM */ |
78 | #define CONFIG_SYS_SDRC_CR_VAL 0x2188c155 /* set up the CONFIG_SYS_SDRAM */ | 78 | #define CONFIG_SYS_SDRC_CR_VAL 0x2188c155 /* set up the CONFIG_SYS_SDRAM */ |
79 | #define CONFIG_SYS_SDRAM 0x20000000 /* address of the CONFIG_SYS_SDRAM */ | 79 | #define CONFIG_SYS_SDRAM 0x20000000 /* address of the CONFIG_SYS_SDRAM */ |
80 | #define CONFIG_SYS_SDRAM1 0x20000080 /* address of the CONFIG_SYS_SDRAM */ | 80 | #define CONFIG_SYS_SDRAM1 0x20000080 /* address of the CONFIG_SYS_SDRAM */ |
81 | #define CONFIG_SYS_SDRAM_VAL 0x00000000 /* value written to CONFIG_SYS_SDRAM */ | 81 | #define CONFIG_SYS_SDRAM_VAL 0x00000000 /* value written to CONFIG_SYS_SDRAM */ |
82 | #define CONFIG_SYS_SDRC_MR_VAL 0x00000002 /* Precharge All */ | 82 | #define CONFIG_SYS_SDRC_MR_VAL 0x00000002 /* Precharge All */ |
83 | #define CONFIG_SYS_SDRC_MR_VAL1 0x00000004 /* refresh */ | 83 | #define CONFIG_SYS_SDRC_MR_VAL1 0x00000004 /* refresh */ |
84 | #define CONFIG_SYS_SDRC_MR_VAL2 0x00000003 /* Load Mode Register */ | 84 | #define CONFIG_SYS_SDRC_MR_VAL2 0x00000003 /* Load Mode Register */ |
85 | #define CONFIG_SYS_SDRC_MR_VAL3 0x00000000 /* Normal Mode */ | 85 | #define CONFIG_SYS_SDRC_MR_VAL3 0x00000000 /* Normal Mode */ |
86 | #define CONFIG_SYS_SDRC_TR_VAL 0x000002E0 /* Write refresh rate */ | 86 | #define CONFIG_SYS_SDRC_TR_VAL 0x000002E0 /* Write refresh rate */ |
87 | #else | 87 | #else |
88 | #define CONFIG_SKIP_RELOCATE_UBOOT | 88 | #define CONFIG_SKIP_RELOCATE_UBOOT |
89 | #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ | 89 | #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ |
90 | 90 | ||
91 | /* hardcode so no __divsi3 : AT91C_MASTER_CLOCK / baudrate / 16 */ | 91 | /* hardcode so no __divsi3 : AT91C_MASTER_CLOCK / baudrate / 16 */ |
92 | #define CONFIG_SYS_AT91C_BRGR_DIVISOR 33 | 92 | #define CONFIG_SYS_AT91C_BRGR_DIVISOR 33 |
93 | 93 | ||
94 | /* | 94 | /* |
95 | * Memory Configuration | 95 | * Memory Configuration |
96 | */ | 96 | */ |
97 | #define CONFIG_NR_DRAM_BANKS 1 | 97 | #define CONFIG_NR_DRAM_BANKS 1 |
98 | #define PHYS_SDRAM 0x20000000 | 98 | #define PHYS_SDRAM 0x20000000 |
99 | #define PHYS_SDRAM_SIZE 0x02000000 /* 32 megs */ | 99 | #define PHYS_SDRAM_SIZE 0x02000000 /* 32 megs */ |
100 | 100 | ||
101 | #define CONFIG_SYS_MEMTEST_START PHYS_SDRAM | 101 | #define CONFIG_SYS_MEMTEST_START PHYS_SDRAM |
102 | #define CONFIG_SYS_MEMTEST_END \ | 102 | #define CONFIG_SYS_MEMTEST_END \ |
103 | (CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 262144) | 103 | (CONFIG_SYS_MEMTEST_START + PHYS_SDRAM_SIZE - 262144) |
104 | 104 | ||
105 | /* | 105 | /* |
106 | * Hardware drivers | 106 | * Hardware drivers |
107 | */ | 107 | */ |
108 | 108 | ||
109 | /* | 109 | /* |
110 | * UART Configuration | 110 | * UART Configuration |
111 | * | 111 | * |
112 | * define one of these to choose the DBGU, | 112 | * define one of these to choose the DBGU, |
113 | * USART0 or USART1 as console | 113 | * USART0 or USART1 as console |
114 | */ | 114 | */ |
115 | #define CONFIG_AT91RM9200_USART | 115 | #define CONFIG_AT91RM9200_USART |
116 | #define CONFIG_DBGU | 116 | #define CONFIG_DBGU |
117 | #undef CONFIG_USART0 | 117 | #undef CONFIG_USART0 |
118 | #undef CONFIG_USART1 | 118 | #undef CONFIG_USART1 |
119 | /* don't include RTS/CTS flow control support */ | 119 | /* don't include RTS/CTS flow control support */ |
120 | #undef CONFIG_HWFLOW | 120 | #undef CONFIG_HWFLOW |
121 | /* disable modem initialization stuff */ | 121 | /* disable modem initialization stuff */ |
122 | #undef CONFIG_MODEM_SUPPORT | 122 | #undef CONFIG_MODEM_SUPPORT |
123 | 123 | ||
124 | #define CONFIG_SYS_BAUDRATE_TABLE {115200 , 19200, 38400, 57600, 9600 } | 124 | #define CONFIG_SYS_BAUDRATE_TABLE {115200 , 19200, 38400, 57600, 9600 } |
125 | #define CONFIG_BAUDRATE 115200 | 125 | #define CONFIG_BAUDRATE 115200 |
126 | 126 | ||
127 | /* | 127 | /* |
128 | * Command line configuration. | 128 | * Command line configuration. |
129 | */ | 129 | */ |
130 | #include <config_cmd_default.h> | 130 | #include <config_cmd_default.h> |
131 | 131 | ||
132 | #define CONFIG_CMD_DHCP | 132 | #define CONFIG_CMD_DHCP |
133 | #define CONFIG_CMD_FAT | 133 | #define CONFIG_CMD_FAT |
134 | #define CONFIG_CMD_MII | 134 | #define CONFIG_CMD_MII |
135 | #define CONFIG_CMD_PING | 135 | #define CONFIG_CMD_PING |
136 | 136 | ||
137 | #undef CONFIG_CMD_BDI | 137 | #undef CONFIG_CMD_BDI |
138 | #undef CONFIG_CMD_IMI | 138 | #undef CONFIG_CMD_IMI |
139 | #undef CONFIG_CMD_FPGA | 139 | #undef CONFIG_CMD_FPGA |
140 | #undef CONFIG_CMD_MISC | 140 | #undef CONFIG_CMD_MISC |
141 | #undef CONFIG_CMD_LOADS | 141 | #undef CONFIG_CMD_LOADS |
142 | 142 | ||
143 | #include <asm/arch/AT91RM9200.h> /* needed for port definitions */ | 143 | #include <asm/arch/AT91RM9200.h> /* needed for port definitions */ |
144 | /* Options for MMC/SD Card */ | 144 | /* Options for MMC/SD Card */ |
145 | #define CONFIG_DOS_PARTITION 1 | 145 | #define CONFIG_DOS_PARTITION 1 |
146 | #undef CONFIG_MMC | 146 | #undef CONFIG_MMC |
147 | #define CONFIG_SYS_MMC_BASE 0xFFFB4000 | 147 | #define CONFIG_SYS_MMC_BASE 0xFFFB4000 |
148 | #define CONFIG_SYS_MMC_BLOCKSIZE 512 | 148 | #define CONFIG_SYS_MMC_BLOCKSIZE 512 |
149 | 149 | ||
150 | /* | 150 | /* |
151 | * Network Driver Setting | 151 | * Network Driver Setting |
152 | */ | 152 | */ |
153 | #define CONFIG_DRIVER_ETHER | 153 | #define CONFIG_DRIVER_ETHER |
154 | #define CONFIG_NET_RETRY_COUNT 20 | 154 | #define CONFIG_NET_RETRY_COUNT 20 |
155 | #define CONFIG_AT91C_USE_RMII | 155 | #define CONFIG_AT91C_USE_RMII |
156 | 156 | ||
157 | /* | 157 | /* |
158 | * AC Characteristics | 158 | * AC Characteristics |
159 | * DLYBS = tCSS = 250ns min and DLYBCT = tCSH = 250ns | 159 | * DLYBS = tCSS = 250ns min and DLYBCT = tCSH = 250ns |
160 | */ | 160 | */ |
161 | #define DATAFLASH_TCSS (0xC << 16) | 161 | #define DATAFLASH_TCSS (0xC << 16) |
162 | #define DATAFLASH_TCHS (0x1 << 24) | 162 | #define DATAFLASH_TCHS (0x1 << 24) |
163 | 163 | ||
164 | #if defined(CONFIG_HAS_DATAFLASH) | 164 | #if defined(CONFIG_HAS_DATAFLASH) |
165 | #define CONFIG_SYS_SPI_WRITE_TOUT (5 * CONFIG_SYS_HZ) | 165 | #define CONFIG_SYS_SPI_WRITE_TOUT (5 * CONFIG_SYS_HZ) |
166 | #define CONFIG_SYS_MAX_DATAFLASH_BANKS 2 | 166 | #define CONFIG_SYS_MAX_DATAFLASH_BANKS 2 |
167 | #define CONFIG_SYS_MAX_DATAFLASH_PAGES 16384 | 167 | #define CONFIG_SYS_MAX_DATAFLASH_PAGES 16384 |
168 | /* Logical adress for CS0 */ | 168 | /* Logical adress for CS0 */ |
169 | #define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 0xC0000000 | 169 | #define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 0xC0000000 |
170 | /* Logical adress for CS3 */ | 170 | /* Logical adress for CS3 */ |
171 | #define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS3 0xD0000000 | 171 | #define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS3 0xD0000000 |
172 | #define CONFIG_SYS_SUPPORT_BLOCK_ERASE 1 | 172 | #define CONFIG_SYS_SUPPORT_BLOCK_ERASE 1 |
173 | #define CONFIG_SYS_DATAFLASH_MMC_PIO AT91C_PIO_PB22 | 173 | #define CONFIG_SYS_DATAFLASH_MMC_PIO AT91C_PIO_PB22 |
174 | #endif | 174 | #endif |
175 | 175 | ||
176 | /* | 176 | /* |
177 | * NOR Flash | 177 | * NOR Flash |
178 | */ | 178 | */ |
179 | #define CONFIG_SYS_FLASH_BASE 0x10000000 | 179 | #define CONFIG_SYS_FLASH_BASE 0x10000000 |
180 | #define PHYS_FLASH_SIZE 0x800000 /* 8MB */ | 180 | #define PHYS_FLASH_SIZE 0x800000 /* 8MB */ |
181 | #define CONFIG_SYS_FLASH_CFI 1 | 181 | #define CONFIG_SYS_FLASH_CFI 1 |
182 | #define CONFIG_FLASH_CFI_DRIVER 1 | 182 | #define CONFIG_FLASH_CFI_DRIVER 1 |
183 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 | 183 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 |
184 | #define CONFIG_SYS_MAX_FLASH_SECT 256 | 184 | #define CONFIG_SYS_MAX_FLASH_SECT 256 |
185 | #define CONFIG_SYS_FLASH_PROTECTION | 185 | #define CONFIG_SYS_FLASH_PROTECTION |
186 | 186 | ||
187 | /* | 187 | /* |
188 | * Environment Settings | 188 | * Environment Settings |
189 | */ | 189 | */ |
190 | #ifdef CONFIG_ENV_IS_IN_DATAFLASH | 190 | #ifdef CONFIG_ENV_IS_IN_DATAFLASH |
191 | /* | 191 | /* |
192 | * Datasflash Environment Settings | 192 | * Datasflash Environment Settings |
193 | */ | 193 | */ |
194 | #define CONFIG_ENV_OFFSET 0x4200 | 194 | #define CONFIG_ENV_OFFSET 0x4200 |
195 | #define CONFIG_ENV_ADDR \ | 195 | #define CONFIG_ENV_ADDR \ |
196 | (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET) | 196 | (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET) |
197 | /* 8 * 1056 really , but start.s is not OK with this*/ | 197 | /* 8 * 1056 really , but start.s is not OK with this*/ |
198 | #define CONFIG_ENV_SIZE 0x2000 | 198 | #define CONFIG_ENV_SIZE 0x2000 |
199 | 199 | ||
200 | #else | 200 | #else |
201 | /* | 201 | /* |
202 | * NOR Flash Environment Settings | 202 | * NOR Flash Environment Settings |
203 | */ | 203 | */ |
204 | #define CONFIG_ENV_IS_IN_FLASH 1 | 204 | #define CONFIG_ENV_IS_IN_FLASH 1 |
205 | 205 | ||
206 | #ifdef CONFIG_SKIP_LOWLEVEL_INIT | 206 | #ifdef CONFIG_SKIP_LOWLEVEL_INIT |
207 | /* | 207 | /* |
208 | * between boot.bin and u-boot.bin.gz | 208 | * between boot.bin and u-boot.bin.gz |
209 | */ | 209 | */ |
210 | #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0xe000) | 210 | #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0xe000) |
211 | #define CONFIG_ENV_SIZE 0x10000 /* sectors are 64K here */ | 211 | #define CONFIG_ENV_SIZE 0x10000 /* sectors are 64K here */ |
212 | #else | 212 | #else |
213 | /* | 213 | /* |
214 | * after u-boot.bin | 214 | * after u-boot.bin |
215 | */ | 215 | */ |
216 | #define CONFIG_ENV_ADDR \ | 216 | #define CONFIG_ENV_ADDR \ |
217 | (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) | 217 | (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) |
218 | #define CONFIG_ENV_SIZE 0x10000 /* sectors are 64K here */ | 218 | #define CONFIG_ENV_SIZE 0x10000 /* sectors are 64K here */ |
219 | /* The following #defines are needed to get flash environment right */ | 219 | /* The following #defines are needed to get flash environment right */ |
220 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE | 220 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE |
221 | #define CONFIG_SYS_MONITOR_LEN \ | 221 | #define CONFIG_SYS_MONITOR_LEN \ |
222 | (CONFIG_SYS_BOOT_SIZE + CONFIG_SYS_U_BOOT_SIZE) | 222 | (CONFIG_SYS_BOOT_SIZE + CONFIG_SYS_U_BOOT_SIZE) |
223 | #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ | 223 | #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ |
224 | 224 | ||
225 | #endif /* CONFIG_ENV_IS_IN_DATAFLASH */ | 225 | #endif /* CONFIG_ENV_IS_IN_DATAFLASH */ |
226 | 226 | ||
227 | /* | 227 | /* |
228 | * Boot option | 228 | * Boot option |
229 | */ | 229 | */ |
230 | #define CONFIG_BOOTDELAY 3 | 230 | #define CONFIG_BOOTDELAY 3 |
231 | 231 | ||
232 | #ifdef CONFIG_SKIP_LOWLEVEL_INIT | 232 | #ifdef CONFIG_SKIP_LOWLEVEL_INIT |
233 | /* boot.bin, env, u-boot.bin.gz */ | 233 | /* boot.bin, env, u-boot.bin.gz */ |
234 | #define CONFIG_SYS_BOOT_SIZE 0x6000 /* 24 KBytes */ | 234 | #define CONFIG_SYS_BOOT_SIZE 0x6000 /* 24 KBytes */ |
235 | #define CONFIG_SYS_U_BOOT_BASE (CONFIG_SYS_FLASH_BASE + 0x10000) | 235 | #define CONFIG_SYS_U_BOOT_BASE (CONFIG_SYS_FLASH_BASE + 0x10000) |
236 | #define CONFIG_SYS_U_BOOT_SIZE 0x10000 /* 64 KBytes */ | 236 | #define CONFIG_SYS_U_BOOT_SIZE 0x10000 /* 64 KBytes */ |
237 | #else | 237 | #else |
238 | /* u-boot.bin */ | 238 | /* u-boot.bin */ |
239 | #define CONFIG_SYS_BOOT_SIZE 0x0 /* 0 KBytes */ | 239 | #define CONFIG_SYS_BOOT_SIZE 0x0 /* 0 KBytes */ |
240 | #define CONFIG_SYS_U_BOOT_BASE CONFIG_SYS_FLASH_BASE | 240 | #define CONFIG_SYS_U_BOOT_BASE CONFIG_SYS_FLASH_BASE |
241 | #define CONFIG_SYS_U_BOOT_SIZE 0x40000 /* 128 KBytes */ | 241 | #define CONFIG_SYS_U_BOOT_SIZE 0x40000 /* 128 KBytes */ |
242 | #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ | 242 | #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ |
243 | 243 | ||
244 | #define CONFIG_SYS_LOAD_ADDR 0x21000000 /* default load address */ | 244 | #define CONFIG_SYS_LOAD_ADDR 0x21000000 /* default load address */ |
245 | #define CONFIG_ENV_OVERWRITE 1 | 245 | #define CONFIG_ENV_OVERWRITE 1 |
246 | 246 | ||
247 | /* | 247 | /* |
248 | * USB Config | 248 | * USB Config |
249 | */ | 249 | */ |
250 | #define CONFIG_CMD_USB | 250 | #define CONFIG_CMD_USB |
251 | #define CONFIG_USB_OHCI_NEW 1 | 251 | #define CONFIG_USB_OHCI_NEW 1 |
252 | #define CONFIG_USB_KEYBOARD 1 | 252 | #define CONFIG_USB_KEYBOARD 1 |
253 | #define CONFIG_USB_STORAGE 1 | 253 | #define CONFIG_USB_STORAGE 1 |
254 | #define CONFIG_DOS_PARTITION 1 | 254 | #define CONFIG_DOS_PARTITION 1 |
255 | 255 | ||
256 | #undef CONFIG_SYS_USB_OHCI_BOARD_INIT | 256 | #undef CONFIG_SYS_USB_OHCI_BOARD_INIT |
257 | #define CONFIG_SYS_USB_OHCI_CPU_INIT 1 | 257 | #define CONFIG_SYS_USB_OHCI_CPU_INIT 1 |
258 | #define CONFIG_SYS_USB_OHCI_REGS_BASE AT91_USB_HOST_BASE | 258 | #define CONFIG_SYS_USB_OHCI_REGS_BASE AT91_USB_HOST_BASE |
259 | #define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91rm9200" | 259 | #define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91rm9200" |
260 | #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15 | 260 | #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15 |
261 | 261 | ||
262 | /* | 262 | /* |
263 | * I2C | 263 | * I2C |
264 | */ | 264 | */ |
265 | #define CONFIG_HARD_I2C | 265 | #define CONFIG_HARD_I2C |
266 | 266 | ||
267 | #ifdef CONFIG_HARD_I2C | 267 | #ifdef CONFIG_HARD_I2C |
268 | #define CONFIG_CMD_I2C | 268 | #define CONFIG_CMD_I2C |
269 | #define CONFIG_I2C_CMD_TREE | ||
270 | #define CONFIG_SYS_I2C_SPEED 0 /* not used */ | 269 | #define CONFIG_SYS_I2C_SPEED 0 /* not used */ |
271 | #define CONFIG_SYS_I2C_SLAVE 0 /* not used */ | 270 | #define CONFIG_SYS_I2C_SLAVE 0 /* not used */ |
272 | #endif | 271 | #endif |
273 | 272 | ||
274 | /* | 273 | /* |
275 | * Shell Settings | 274 | * Shell Settings |
276 | */ | 275 | */ |
277 | #define CONFIG_CMDLINE_EDITING 1 | 276 | #define CONFIG_CMDLINE_EDITING 1 |
278 | #define CONFIG_SYS_LONGHELP 1 | 277 | #define CONFIG_SYS_LONGHELP 1 |
279 | #define CONFIG_AUTO_COMPLETE 1 | 278 | #define CONFIG_AUTO_COMPLETE 1 |
280 | #define CONFIG_SYS_HUSH_PARSER 1 | 279 | #define CONFIG_SYS_HUSH_PARSER 1 |
281 | #define CONFIG_SYS_PROMPT "U-Boot> " | 280 | #define CONFIG_SYS_PROMPT "U-Boot> " |
282 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | 281 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
283 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | 282 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
284 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 283 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
285 | /* Print Buffer Size */ | 284 | /* Print Buffer Size */ |
286 | #define CONFIG_SYS_PBSIZE \ | 285 | #define CONFIG_SYS_PBSIZE \ |
287 | (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) | 286 | (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) |
288 | 287 | ||
289 | #ifndef __ASSEMBLY__ | 288 | #ifndef __ASSEMBLY__ |
290 | /*----------------------------------------------------------------------- | 289 | /*----------------------------------------------------------------------- |
291 | * Board specific extension for bd_info | 290 | * Board specific extension for bd_info |
292 | * | 291 | * |
293 | * This structure is embedded in the global bd_info (bd_t) structure | 292 | * This structure is embedded in the global bd_info (bd_t) structure |
294 | * and can be used by the board specific code (eg board/...) | 293 | * and can be used by the board specific code (eg board/...) |
295 | */ | 294 | */ |
296 | 295 | ||
297 | struct bd_info_ext { | 296 | struct bd_info_ext { |
298 | /* helper variable for board environment handling | 297 | /* helper variable for board environment handling |
299 | * | 298 | * |
300 | * env_crc_valid == 0 => uninitialised | 299 | * env_crc_valid == 0 => uninitialised |
301 | * env_crc_valid > 0 => environment crc in flash is valid | 300 | * env_crc_valid > 0 => environment crc in flash is valid |
302 | * env_crc_valid < 0 => environment crc in flash is invalid | 301 | * env_crc_valid < 0 => environment crc in flash is invalid |
303 | */ | 302 | */ |
304 | int env_crc_valid; | 303 | int env_crc_valid; |
305 | }; | 304 | }; |
306 | #endif | 305 | #endif |
307 | 306 | ||
308 | #define CONFIG_SYS_HZ 1000 | 307 | #define CONFIG_SYS_HZ 1000 |
309 | /* | 308 | /* |
310 | * AT91C_TC0_CMR is implicitly set to | 309 | * AT91C_TC0_CMR is implicitly set to |
311 | * AT91C_TC_TIMER_DIV1_CLOCK | 310 | * AT91C_TC_TIMER_DIV1_CLOCK |
312 | */ | 311 | */ |
313 | #define CONFIG_SYS_HZ_CLOCK (AT91C_MASTER_CLOCK / 2) | 312 | #define CONFIG_SYS_HZ_CLOCK (AT91C_MASTER_CLOCK / 2) |
314 | 313 | ||
315 | #define ROUND(A, B) (((A) + (B)) & ~((B) - 1)) | 314 | #define ROUND(A, B) (((A) + (B)) & ~((B) - 1)) |
316 | /* | 315 | /* |
317 | * Size of malloc() pool | 316 | * Size of malloc() pool |
318 | */ | 317 | */ |
319 | #define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128 * 1024 \ | 318 | #define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128 * 1024 \ |
320 | , 0x1000) | 319 | , 0x1000) |
321 | /* size in bytes reserved for initial data */ | 320 | /* size in bytes reserved for initial data */ |
322 | #define CONFIG_SYS_GBL_DATA_SIZE 128 | 321 | #define CONFIG_SYS_GBL_DATA_SIZE 128 |
323 | 322 | ||
324 | #define CONFIG_STACKSIZE (32 * 1024) /* regular stack */ | 323 | #define CONFIG_STACKSIZE (32 * 1024) /* regular stack */ |
325 | #define CONFIG_STACKSIZE_IRQ (4 * 1024) /* Unsure if to big or to small*/ | 324 | #define CONFIG_STACKSIZE_IRQ (4 * 1024) /* Unsure if to big or to small*/ |
326 | #define CONFIG_STACKSIZE_FIQ (4 * 1024) /* Unsure if to big or to small*/ | 325 | #define CONFIG_STACKSIZE_FIQ (4 * 1024) /* Unsure if to big or to small*/ |
327 | #endif | 326 | #endif |
328 | 327 |
include/configs/katmai.h
1 | /* | 1 | /* |
2 | * (C) Copyright 2007 | 2 | * (C) Copyright 2007 |
3 | * Stefan Roese, DENX Software Engineering, sr@denx.de. | 3 | * Stefan Roese, DENX Software Engineering, sr@denx.de. |
4 | * | 4 | * |
5 | * (C) Copyright 2004 Paul Reynolds <PaulReynolds@lhsolutions.com> | 5 | * (C) Copyright 2004 Paul Reynolds <PaulReynolds@lhsolutions.com> |
6 | * | 6 | * |
7 | * See file CREDITS for list of people who contributed to this | 7 | * See file CREDITS for list of people who contributed to this |
8 | * project. | 8 | * project. |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or | 10 | * This program is free software; you can redistribute it and/or |
11 | * modify it under the terms of the GNU General Public License as | 11 | * modify it under the terms of the GNU General Public License as |
12 | * published by the Free Software Foundation; either version 2 of | 12 | * published by the Free Software Foundation; either version 2 of |
13 | * the License, or (at your option) any later version. | 13 | * the License, or (at your option) any later version. |
14 | * | 14 | * |
15 | * This program is distributed in the hope that it will be useful, | 15 | * This program is distributed in the hope that it will be useful, |
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 | * GNU General Public License for more details. | 18 | * GNU General Public License for more details. |
19 | * | 19 | * |
20 | * You should have received a copy of the GNU General Public License | 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 | 21 | * along with this program; if not, write to the Free Software |
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
23 | * MA 02111-1307 USA | 23 | * MA 02111-1307 USA |
24 | */ | 24 | */ |
25 | 25 | ||
26 | /************************************************************************ | 26 | /************************************************************************ |
27 | * katmai.h - configuration for AMCC Katmai (440SPe) | 27 | * katmai.h - configuration for AMCC Katmai (440SPe) |
28 | ***********************************************************************/ | 28 | ***********************************************************************/ |
29 | 29 | ||
30 | #ifndef __CONFIG_H | 30 | #ifndef __CONFIG_H |
31 | #define __CONFIG_H | 31 | #define __CONFIG_H |
32 | 32 | ||
33 | /*----------------------------------------------------------------------- | 33 | /*----------------------------------------------------------------------- |
34 | * High Level Configuration Options | 34 | * High Level Configuration Options |
35 | *----------------------------------------------------------------------*/ | 35 | *----------------------------------------------------------------------*/ |
36 | #define CONFIG_KATMAI 1 /* Board is Katmai */ | 36 | #define CONFIG_KATMAI 1 /* Board is Katmai */ |
37 | #define CONFIG_4xx 1 /* ... PPC4xx family */ | 37 | #define CONFIG_4xx 1 /* ... PPC4xx family */ |
38 | #define CONFIG_440 1 /* ... PPC440 family */ | 38 | #define CONFIG_440 1 /* ... PPC440 family */ |
39 | #define CONFIG_440SPE 1 /* Specifc SPe support */ | 39 | #define CONFIG_440SPE 1 /* Specifc SPe support */ |
40 | #define CONFIG_SYS_CLK_FREQ 33333333 /* external freq to pll */ | 40 | #define CONFIG_SYS_CLK_FREQ 33333333 /* external freq to pll */ |
41 | #define CONFIG_SYS_4xx_RESET_TYPE 0x2 /* use chip reset on this board */ | 41 | #define CONFIG_SYS_4xx_RESET_TYPE 0x2 /* use chip reset on this board */ |
42 | 42 | ||
43 | /* | 43 | /* |
44 | * Enable this board for more than 2GB of SDRAM | 44 | * Enable this board for more than 2GB of SDRAM |
45 | */ | 45 | */ |
46 | #define CONFIG_PHYS_64BIT | 46 | #define CONFIG_PHYS_64BIT |
47 | #define CONFIG_VERY_BIG_RAM | 47 | #define CONFIG_VERY_BIG_RAM |
48 | 48 | ||
49 | /* | 49 | /* |
50 | * Include common defines/options for all AMCC eval boards | 50 | * Include common defines/options for all AMCC eval boards |
51 | */ | 51 | */ |
52 | #define CONFIG_HOSTNAME katmai | 52 | #define CONFIG_HOSTNAME katmai |
53 | #include "amcc-common.h" | 53 | #include "amcc-common.h" |
54 | 54 | ||
55 | /* | 55 | /* |
56 | * For booting 256K-paged Linux we should have 16MB of memory | 56 | * For booting 256K-paged Linux we should have 16MB of memory |
57 | * for Linux initial memory map | 57 | * for Linux initial memory map |
58 | */ | 58 | */ |
59 | #undef CONFIG_SYS_BOOTMAPSZ | 59 | #undef CONFIG_SYS_BOOTMAPSZ |
60 | #define CONFIG_SYS_BOOTMAPSZ (16 << 20) | 60 | #define CONFIG_SYS_BOOTMAPSZ (16 << 20) |
61 | 61 | ||
62 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_pre_init */ | 62 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_pre_init */ |
63 | #undef CONFIG_SHOW_BOOT_PROGRESS | 63 | #undef CONFIG_SHOW_BOOT_PROGRESS |
64 | 64 | ||
65 | /*----------------------------------------------------------------------- | 65 | /*----------------------------------------------------------------------- |
66 | * Base addresses -- Note these are effective addresses where the | 66 | * Base addresses -- Note these are effective addresses where the |
67 | * actual resources get mapped (not physical addresses) | 67 | * actual resources get mapped (not physical addresses) |
68 | *----------------------------------------------------------------------*/ | 68 | *----------------------------------------------------------------------*/ |
69 | #define CONFIG_SYS_FLASH_BASE 0xff000000 /* start of FLASH */ | 69 | #define CONFIG_SYS_FLASH_BASE 0xff000000 /* start of FLASH */ |
70 | #define CONFIG_SYS_PERIPHERAL_BASE 0xa0000000 /* internal peripherals */ | 70 | #define CONFIG_SYS_PERIPHERAL_BASE 0xa0000000 /* internal peripherals */ |
71 | #define CONFIG_SYS_ISRAM_BASE 0x90000000 /* internal SRAM */ | 71 | #define CONFIG_SYS_ISRAM_BASE 0x90000000 /* internal SRAM */ |
72 | 72 | ||
73 | #define CONFIG_SYS_PCI_MEMBASE 0x80000000 /* mapped PCI memory */ | 73 | #define CONFIG_SYS_PCI_MEMBASE 0x80000000 /* mapped PCI memory */ |
74 | #define CONFIG_SYS_PCI_BASE 0xd0000000 /* internal PCI regs */ | 74 | #define CONFIG_SYS_PCI_BASE 0xd0000000 /* internal PCI regs */ |
75 | #define CONFIG_SYS_PCI_TARGBASE CONFIG_SYS_PCI_MEMBASE | 75 | #define CONFIG_SYS_PCI_TARGBASE CONFIG_SYS_PCI_MEMBASE |
76 | 76 | ||
77 | #define CONFIG_SYS_PCIE_MEMBASE 0xb0000000 /* mapped PCIe memory */ | 77 | #define CONFIG_SYS_PCIE_MEMBASE 0xb0000000 /* mapped PCIe memory */ |
78 | #define CONFIG_SYS_PCIE_MEMSIZE 0x08000000 /* smallest incr for PCIe port */ | 78 | #define CONFIG_SYS_PCIE_MEMSIZE 0x08000000 /* smallest incr for PCIe port */ |
79 | #define CONFIG_SYS_PCIE_BASE 0xe0000000 /* PCIe UTL regs */ | 79 | #define CONFIG_SYS_PCIE_BASE 0xe0000000 /* PCIe UTL regs */ |
80 | 80 | ||
81 | #define CONFIG_SYS_PCIE0_CFGBASE 0xc0000000 | 81 | #define CONFIG_SYS_PCIE0_CFGBASE 0xc0000000 |
82 | #define CONFIG_SYS_PCIE1_CFGBASE 0xc1000000 | 82 | #define CONFIG_SYS_PCIE1_CFGBASE 0xc1000000 |
83 | #define CONFIG_SYS_PCIE2_CFGBASE 0xc2000000 | 83 | #define CONFIG_SYS_PCIE2_CFGBASE 0xc2000000 |
84 | #define CONFIG_SYS_PCIE0_XCFGBASE 0xc3000000 | 84 | #define CONFIG_SYS_PCIE0_XCFGBASE 0xc3000000 |
85 | #define CONFIG_SYS_PCIE1_XCFGBASE 0xc3001000 | 85 | #define CONFIG_SYS_PCIE1_XCFGBASE 0xc3001000 |
86 | #define CONFIG_SYS_PCIE2_XCFGBASE 0xc3002000 | 86 | #define CONFIG_SYS_PCIE2_XCFGBASE 0xc3002000 |
87 | 87 | ||
88 | /* base address of inbound PCIe window */ | 88 | /* base address of inbound PCIe window */ |
89 | #define CONFIG_SYS_PCIE_INBOUND_BASE 0x0000000000000000ULL | 89 | #define CONFIG_SYS_PCIE_INBOUND_BASE 0x0000000000000000ULL |
90 | 90 | ||
91 | /* System RAM mapped to PCI space */ | 91 | /* System RAM mapped to PCI space */ |
92 | #define CONFIG_PCI_SYS_MEM_BUS CONFIG_SYS_SDRAM_BASE | 92 | #define CONFIG_PCI_SYS_MEM_BUS CONFIG_SYS_SDRAM_BASE |
93 | #define CONFIG_PCI_SYS_MEM_PHYS CONFIG_SYS_SDRAM_BASE | 93 | #define CONFIG_PCI_SYS_MEM_PHYS CONFIG_SYS_SDRAM_BASE |
94 | #define CONFIG_PCI_SYS_MEM_SIZE (1024 * 1024 * 1024) | 94 | #define CONFIG_PCI_SYS_MEM_SIZE (1024 * 1024 * 1024) |
95 | 95 | ||
96 | #define CONFIG_SYS_ACE_BASE 0xfe000000 /* Xilinx ACE controller - Compact Flash */ | 96 | #define CONFIG_SYS_ACE_BASE 0xfe000000 /* Xilinx ACE controller - Compact Flash */ |
97 | 97 | ||
98 | /*----------------------------------------------------------------------- | 98 | /*----------------------------------------------------------------------- |
99 | * Initial RAM & stack pointer (placed in internal SRAM) | 99 | * Initial RAM & stack pointer (placed in internal SRAM) |
100 | *----------------------------------------------------------------------*/ | 100 | *----------------------------------------------------------------------*/ |
101 | #define CONFIG_SYS_TEMP_STACK_OCM 1 | 101 | #define CONFIG_SYS_TEMP_STACK_OCM 1 |
102 | #define CONFIG_SYS_OCM_DATA_ADDR CONFIG_SYS_ISRAM_BASE | 102 | #define CONFIG_SYS_OCM_DATA_ADDR CONFIG_SYS_ISRAM_BASE |
103 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_ISRAM_BASE /* Initial RAM address */ | 103 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_ISRAM_BASE /* Initial RAM address */ |
104 | #define CONFIG_SYS_INIT_RAM_END 0x2000 /* End of used area in RAM */ | 104 | #define CONFIG_SYS_INIT_RAM_END 0x2000 /* End of used area in RAM */ |
105 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data */ | 105 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data */ |
106 | 106 | ||
107 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 107 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
108 | #define CONFIG_SYS_POST_WORD_ADDR (CONFIG_SYS_GBL_DATA_OFFSET - 0x4) | 108 | #define CONFIG_SYS_POST_WORD_ADDR (CONFIG_SYS_GBL_DATA_OFFSET - 0x4) |
109 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_POST_WORD_ADDR | 109 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_POST_WORD_ADDR |
110 | 110 | ||
111 | /*----------------------------------------------------------------------- | 111 | /*----------------------------------------------------------------------- |
112 | * Serial Port | 112 | * Serial Port |
113 | *----------------------------------------------------------------------*/ | 113 | *----------------------------------------------------------------------*/ |
114 | #undef CONFIG_UART1_CONSOLE | 114 | #undef CONFIG_UART1_CONSOLE |
115 | #undef CONFIG_SYS_EXT_SERIAL_CLOCK | 115 | #undef CONFIG_SYS_EXT_SERIAL_CLOCK |
116 | 116 | ||
117 | /*----------------------------------------------------------------------- | 117 | /*----------------------------------------------------------------------- |
118 | * DDR SDRAM | 118 | * DDR SDRAM |
119 | *----------------------------------------------------------------------*/ | 119 | *----------------------------------------------------------------------*/ |
120 | #define CONFIG_SPD_EEPROM 1 /* Use SPD EEPROM for setup */ | 120 | #define CONFIG_SPD_EEPROM 1 /* Use SPD EEPROM for setup */ |
121 | #define SPD_EEPROM_ADDRESS {0x51, 0x52} /* SPD i2c spd addresses*/ | 121 | #define SPD_EEPROM_ADDRESS {0x51, 0x52} /* SPD i2c spd addresses*/ |
122 | #define CONFIG_DDR_ECC 1 /* with ECC support */ | 122 | #define CONFIG_DDR_ECC 1 /* with ECC support */ |
123 | #define CONFIG_DDR_RQDC_FIXED 0x80000038 /* optimal value found by GDA*/ | 123 | #define CONFIG_DDR_RQDC_FIXED 0x80000038 /* optimal value found by GDA*/ |
124 | #undef CONFIG_STRESS | 124 | #undef CONFIG_STRESS |
125 | 125 | ||
126 | /*----------------------------------------------------------------------- | 126 | /*----------------------------------------------------------------------- |
127 | * I2C | 127 | * I2C |
128 | *----------------------------------------------------------------------*/ | 128 | *----------------------------------------------------------------------*/ |
129 | #define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ | 129 | #define CONFIG_SYS_I2C_SPEED 100000 /* I2C speed and slave address */ |
130 | 130 | ||
131 | #define CONFIG_I2C_MULTI_BUS | 131 | #define CONFIG_I2C_MULTI_BUS |
132 | #define CONFIG_I2C_CMD_TREE | ||
133 | #define CONFIG_SYS_SPD_BUS_NUM 0 /* The I2C bus for SPD */ | 132 | #define CONFIG_SYS_SPD_BUS_NUM 0 /* The I2C bus for SPD */ |
134 | 133 | ||
135 | #define IIC0_BOOTPROM_ADDR 0x50 | 134 | #define IIC0_BOOTPROM_ADDR 0x50 |
136 | #define IIC0_ALT_BOOTPROM_ADDR 0x54 | 135 | #define IIC0_ALT_BOOTPROM_ADDR 0x54 |
137 | 136 | ||
138 | #define CONFIG_SYS_I2C_MULTI_EEPROMS | 137 | #define CONFIG_SYS_I2C_MULTI_EEPROMS |
139 | #define CONFIG_SYS_I2C_EEPROM_ADDR (0x50) | 138 | #define CONFIG_SYS_I2C_EEPROM_ADDR (0x50) |
140 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 | 139 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 |
141 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 | 140 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 |
142 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 | 141 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 |
143 | 142 | ||
144 | /* I2C RTC */ | 143 | /* I2C RTC */ |
145 | #define CONFIG_RTC_M41T11 1 | 144 | #define CONFIG_RTC_M41T11 1 |
146 | #define CONFIG_SYS_RTC_BUS_NUM 1 /* The I2C bus for RTC */ | 145 | #define CONFIG_SYS_RTC_BUS_NUM 1 /* The I2C bus for RTC */ |
147 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 | 146 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 |
148 | #define CONFIG_SYS_M41T11_BASE_YEAR 1900 /* play along with linux */ | 147 | #define CONFIG_SYS_M41T11_BASE_YEAR 1900 /* play along with linux */ |
149 | 148 | ||
150 | /* I2C DTT */ | 149 | /* I2C DTT */ |
151 | #define CONFIG_DTT_ADM1021 1 /* ADM1021 temp sensor support */ | 150 | #define CONFIG_DTT_ADM1021 1 /* ADM1021 temp sensor support */ |
152 | #define CONFIG_SYS_DTT_BUS_NUM 1 /* The I2C bus for DTT */ | 151 | #define CONFIG_SYS_DTT_BUS_NUM 1 /* The I2C bus for DTT */ |
153 | /* | 152 | /* |
154 | * standard dtt sensor configuration - bottom bit will determine local or | 153 | * standard dtt sensor configuration - bottom bit will determine local or |
155 | * remote sensor of the ADM1021, the rest determines index into | 154 | * remote sensor of the ADM1021, the rest determines index into |
156 | * CONFIG_SYS_DTT_ADM1021 array below. | 155 | * CONFIG_SYS_DTT_ADM1021 array below. |
157 | */ | 156 | */ |
158 | #define CONFIG_DTT_SENSORS { 0, 1 } | 157 | #define CONFIG_DTT_SENSORS { 0, 1 } |
159 | 158 | ||
160 | /* | 159 | /* |
161 | * ADM1021 temp sensor configuration (see dtt/adm1021.c for details). | 160 | * ADM1021 temp sensor configuration (see dtt/adm1021.c for details). |
162 | * there will be one entry in this array for each two (dummy) sensors in | 161 | * there will be one entry in this array for each two (dummy) sensors in |
163 | * CONFIG_DTT_SENSORS. | 162 | * CONFIG_DTT_SENSORS. |
164 | * | 163 | * |
165 | * For Katmai board: | 164 | * For Katmai board: |
166 | * - only one ADM1021 | 165 | * - only one ADM1021 |
167 | * - i2c addr 0x18 | 166 | * - i2c addr 0x18 |
168 | * - conversion rate 0x02 = 0.25 conversions/second | 167 | * - conversion rate 0x02 = 0.25 conversions/second |
169 | * - ALERT ouput disabled | 168 | * - ALERT ouput disabled |
170 | * - local temp sensor enabled, min set to 0 deg, max set to 85 deg | 169 | * - local temp sensor enabled, min set to 0 deg, max set to 85 deg |
171 | * - remote temp sensor enabled, min set to 0 deg, max set to 85 deg | 170 | * - remote temp sensor enabled, min set to 0 deg, max set to 85 deg |
172 | */ | 171 | */ |
173 | #define CONFIG_SYS_DTT_ADM1021 { { 0x18, 0x02, 0, 1, 0, 85, 1, 0, 58} } | 172 | #define CONFIG_SYS_DTT_ADM1021 { { 0x18, 0x02, 0, 1, 0, 85, 1, 0, 58} } |
174 | 173 | ||
175 | /*----------------------------------------------------------------------- | 174 | /*----------------------------------------------------------------------- |
176 | * Environment | 175 | * Environment |
177 | *----------------------------------------------------------------------*/ | 176 | *----------------------------------------------------------------------*/ |
178 | #define CONFIG_ENV_IS_IN_FLASH 1 /* Environment uses flash */ | 177 | #define CONFIG_ENV_IS_IN_FLASH 1 /* Environment uses flash */ |
179 | 178 | ||
180 | /* | 179 | /* |
181 | * Default environment variables | 180 | * Default environment variables |
182 | */ | 181 | */ |
183 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 182 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
184 | CONFIG_AMCC_DEF_ENV \ | 183 | CONFIG_AMCC_DEF_ENV \ |
185 | CONFIG_AMCC_DEF_ENV_POWERPC \ | 184 | CONFIG_AMCC_DEF_ENV_POWERPC \ |
186 | CONFIG_AMCC_DEF_ENV_PPC_OLD \ | 185 | CONFIG_AMCC_DEF_ENV_PPC_OLD \ |
187 | CONFIG_AMCC_DEF_ENV_NOR_UPD \ | 186 | CONFIG_AMCC_DEF_ENV_NOR_UPD \ |
188 | "kernel_addr=fff10000\0" \ | 187 | "kernel_addr=fff10000\0" \ |
189 | "ramdisk_addr=fff20000\0" \ | 188 | "ramdisk_addr=fff20000\0" \ |
190 | "kozio=bootm ffc60000\0" \ | 189 | "kozio=bootm ffc60000\0" \ |
191 | "pciconfighost=1\0" \ | 190 | "pciconfighost=1\0" \ |
192 | "pcie_mode=RP:RP:RP\0" \ | 191 | "pcie_mode=RP:RP:RP\0" \ |
193 | "" | 192 | "" |
194 | 193 | ||
195 | /* | 194 | /* |
196 | * Commands additional to the ones defined in amcc-common.h | 195 | * Commands additional to the ones defined in amcc-common.h |
197 | */ | 196 | */ |
198 | #define CONFIG_CMD_EXT2 | 197 | #define CONFIG_CMD_EXT2 |
199 | #define CONFIG_CMD_DATE | 198 | #define CONFIG_CMD_DATE |
200 | #define CONFIG_CMD_PCI | 199 | #define CONFIG_CMD_PCI |
201 | #define CONFIG_CMD_SDRAM | 200 | #define CONFIG_CMD_SDRAM |
202 | #define CONFIG_CMD_SNTP | 201 | #define CONFIG_CMD_SNTP |
203 | 202 | ||
204 | #define CONFIG_IBM_EMAC4_V4 1 /* 440SPe has this EMAC version */ | 203 | #define CONFIG_IBM_EMAC4_V4 1 /* 440SPe has this EMAC version */ |
205 | #define CONFIG_PHY_ADDR 1 /* PHY address, See schematics */ | 204 | #define CONFIG_PHY_ADDR 1 /* PHY address, See schematics */ |
206 | #define CONFIG_HAS_ETH0 | 205 | #define CONFIG_HAS_ETH0 |
207 | #define CONFIG_PHY_RESET 1 /* reset phy upon startup */ | 206 | #define CONFIG_PHY_RESET 1 /* reset phy upon startup */ |
208 | #define CONFIG_PHY_RESET_DELAY 1000 | 207 | #define CONFIG_PHY_RESET_DELAY 1000 |
209 | #define CONFIG_CIS8201_PHY 1 /* Enable 'special' RGMII mode for Cicada phy */ | 208 | #define CONFIG_CIS8201_PHY 1 /* Enable 'special' RGMII mode for Cicada phy */ |
210 | #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */ | 209 | #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */ |
211 | 210 | ||
212 | /*----------------------------------------------------------------------- | 211 | /*----------------------------------------------------------------------- |
213 | * FLASH related | 212 | * FLASH related |
214 | *----------------------------------------------------------------------*/ | 213 | *----------------------------------------------------------------------*/ |
215 | #define CONFIG_SYS_FLASH_CFI | 214 | #define CONFIG_SYS_FLASH_CFI |
216 | #define CONFIG_FLASH_CFI_DRIVER | 215 | #define CONFIG_FLASH_CFI_DRIVER |
217 | #define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */ | 216 | #define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */ |
218 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */ | 217 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */ |
219 | 218 | ||
220 | #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE} | 219 | #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE} |
221 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ | 220 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ |
222 | #define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */ | 221 | #define CONFIG_SYS_MAX_FLASH_SECT 1024 /* sectors per device */ |
223 | 222 | ||
224 | #undef CONFIG_SYS_FLASH_CHECKSUM | 223 | #undef CONFIG_SYS_FLASH_CHECKSUM |
225 | #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ | 224 | #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ |
226 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ | 225 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ |
227 | 226 | ||
228 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* size of one complete sector */ | 227 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* size of one complete sector */ |
229 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE-CONFIG_ENV_SECT_SIZE) | 228 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE-CONFIG_ENV_SECT_SIZE) |
230 | #define CONFIG_ENV_SIZE 0x4000 /* Total Size of Environment Sector */ | 229 | #define CONFIG_ENV_SIZE 0x4000 /* Total Size of Environment Sector */ |
231 | 230 | ||
232 | /* Address and size of Redundant Environment Sector */ | 231 | /* Address and size of Redundant Environment Sector */ |
233 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR-CONFIG_ENV_SECT_SIZE) | 232 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR-CONFIG_ENV_SECT_SIZE) |
234 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) | 233 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) |
235 | 234 | ||
236 | /*----------------------------------------------------------------------- | 235 | /*----------------------------------------------------------------------- |
237 | * PCI stuff | 236 | * PCI stuff |
238 | *----------------------------------------------------------------------- | 237 | *----------------------------------------------------------------------- |
239 | */ | 238 | */ |
240 | /* General PCI */ | 239 | /* General PCI */ |
241 | #define CONFIG_PCI /* include pci support */ | 240 | #define CONFIG_PCI /* include pci support */ |
242 | #define CONFIG_PCI_PNP 1 /* do pci plug-and-play */ | 241 | #define CONFIG_PCI_PNP 1 /* do pci plug-and-play */ |
243 | #define CONFIG_PCI_SCAN_SHOW 1 /* show pci devices on startup */ | 242 | #define CONFIG_PCI_SCAN_SHOW 1 /* show pci devices on startup */ |
244 | #define CONFIG_PCI_CONFIG_HOST_BRIDGE | 243 | #define CONFIG_PCI_CONFIG_HOST_BRIDGE |
245 | 244 | ||
246 | /* Board-specific PCI */ | 245 | /* Board-specific PCI */ |
247 | #define CONFIG_SYS_PCI_TARGET_INIT /* let board init pci target */ | 246 | #define CONFIG_SYS_PCI_TARGET_INIT /* let board init pci target */ |
248 | #undef CONFIG_SYS_PCI_MASTER_INIT | 247 | #undef CONFIG_SYS_PCI_MASTER_INIT |
249 | 248 | ||
250 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1014 /* IBM */ | 249 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1014 /* IBM */ |
251 | #define CONFIG_SYS_PCI_SUBSYS_DEVICEID 0xcafe /* Whatever */ | 250 | #define CONFIG_SYS_PCI_SUBSYS_DEVICEID 0xcafe /* Whatever */ |
252 | /* #define CONFIG_SYS_PCI_SUBSYS_ID CONFIG_SYS_PCI_SUBSYS_DEVICEID */ | 251 | /* #define CONFIG_SYS_PCI_SUBSYS_ID CONFIG_SYS_PCI_SUBSYS_DEVICEID */ |
253 | 252 | ||
254 | /* | 253 | /* |
255 | * NETWORK Support (PCI): | 254 | * NETWORK Support (PCI): |
256 | */ | 255 | */ |
257 | /* Support for Intel 82557/82559/82559ER chips. */ | 256 | /* Support for Intel 82557/82559/82559ER chips. */ |
258 | #define CONFIG_EEPRO100 | 257 | #define CONFIG_EEPRO100 |
259 | 258 | ||
260 | /*----------------------------------------------------------------------- | 259 | /*----------------------------------------------------------------------- |
261 | * Xilinx System ACE support | 260 | * Xilinx System ACE support |
262 | *----------------------------------------------------------------------*/ | 261 | *----------------------------------------------------------------------*/ |
263 | #define CONFIG_SYSTEMACE 1 /* Enable SystemACE support */ | 262 | #define CONFIG_SYSTEMACE 1 /* Enable SystemACE support */ |
264 | #define CONFIG_SYS_SYSTEMACE_WIDTH 16 /* Data bus width is 16 */ | 263 | #define CONFIG_SYS_SYSTEMACE_WIDTH 16 /* Data bus width is 16 */ |
265 | #define CONFIG_SYS_SYSTEMACE_BASE CONFIG_SYS_ACE_BASE | 264 | #define CONFIG_SYS_SYSTEMACE_BASE CONFIG_SYS_ACE_BASE |
266 | #define CONFIG_DOS_PARTITION 1 | 265 | #define CONFIG_DOS_PARTITION 1 |
267 | 266 | ||
268 | /*----------------------------------------------------------------------- | 267 | /*----------------------------------------------------------------------- |
269 | * External Bus Controller (EBC) Setup | 268 | * External Bus Controller (EBC) Setup |
270 | *----------------------------------------------------------------------*/ | 269 | *----------------------------------------------------------------------*/ |
271 | 270 | ||
272 | /* Memory Bank 0 (Flash) initialization */ | 271 | /* Memory Bank 0 (Flash) initialization */ |
273 | #define CONFIG_SYS_EBC_PB0AP (EBC_BXAP_BME_DISABLED | \ | 272 | #define CONFIG_SYS_EBC_PB0AP (EBC_BXAP_BME_DISABLED | \ |
274 | EBC_BXAP_TWT_ENCODE(7) | \ | 273 | EBC_BXAP_TWT_ENCODE(7) | \ |
275 | EBC_BXAP_BCE_DISABLE | \ | 274 | EBC_BXAP_BCE_DISABLE | \ |
276 | EBC_BXAP_BCT_2TRANS | \ | 275 | EBC_BXAP_BCT_2TRANS | \ |
277 | EBC_BXAP_CSN_ENCODE(0) | \ | 276 | EBC_BXAP_CSN_ENCODE(0) | \ |
278 | EBC_BXAP_OEN_ENCODE(0) | \ | 277 | EBC_BXAP_OEN_ENCODE(0) | \ |
279 | EBC_BXAP_WBN_ENCODE(0) | \ | 278 | EBC_BXAP_WBN_ENCODE(0) | \ |
280 | EBC_BXAP_WBF_ENCODE(0) | \ | 279 | EBC_BXAP_WBF_ENCODE(0) | \ |
281 | EBC_BXAP_TH_ENCODE(0) | \ | 280 | EBC_BXAP_TH_ENCODE(0) | \ |
282 | EBC_BXAP_RE_DISABLED | \ | 281 | EBC_BXAP_RE_DISABLED | \ |
283 | EBC_BXAP_SOR_DELAYED | \ | 282 | EBC_BXAP_SOR_DELAYED | \ |
284 | EBC_BXAP_BEM_WRITEONLY | \ | 283 | EBC_BXAP_BEM_WRITEONLY | \ |
285 | EBC_BXAP_PEN_DISABLED) | 284 | EBC_BXAP_PEN_DISABLED) |
286 | #define CONFIG_SYS_EBC_PB0CR (EBC_BXCR_BAS_ENCODE(CONFIG_SYS_FLASH_BASE) | \ | 285 | #define CONFIG_SYS_EBC_PB0CR (EBC_BXCR_BAS_ENCODE(CONFIG_SYS_FLASH_BASE) | \ |
287 | EBC_BXCR_BS_16MB | \ | 286 | EBC_BXCR_BS_16MB | \ |
288 | EBC_BXCR_BU_RW | \ | 287 | EBC_BXCR_BU_RW | \ |
289 | EBC_BXCR_BW_16BIT) | 288 | EBC_BXCR_BW_16BIT) |
290 | 289 | ||
291 | /* Memory Bank 1 (Xilinx System ACE controller) initialization */ | 290 | /* Memory Bank 1 (Xilinx System ACE controller) initialization */ |
292 | #define CONFIG_SYS_EBC_PB1AP (EBC_BXAP_BME_DISABLED | \ | 291 | #define CONFIG_SYS_EBC_PB1AP (EBC_BXAP_BME_DISABLED | \ |
293 | EBC_BXAP_TWT_ENCODE(4) | \ | 292 | EBC_BXAP_TWT_ENCODE(4) | \ |
294 | EBC_BXAP_BCE_DISABLE | \ | 293 | EBC_BXAP_BCE_DISABLE | \ |
295 | EBC_BXAP_BCT_2TRANS | \ | 294 | EBC_BXAP_BCT_2TRANS | \ |
296 | EBC_BXAP_CSN_ENCODE(0) | \ | 295 | EBC_BXAP_CSN_ENCODE(0) | \ |
297 | EBC_BXAP_OEN_ENCODE(0) | \ | 296 | EBC_BXAP_OEN_ENCODE(0) | \ |
298 | EBC_BXAP_WBN_ENCODE(0) | \ | 297 | EBC_BXAP_WBN_ENCODE(0) | \ |
299 | EBC_BXAP_WBF_ENCODE(0) | \ | 298 | EBC_BXAP_WBF_ENCODE(0) | \ |
300 | EBC_BXAP_TH_ENCODE(0) | \ | 299 | EBC_BXAP_TH_ENCODE(0) | \ |
301 | EBC_BXAP_RE_DISABLED | \ | 300 | EBC_BXAP_RE_DISABLED | \ |
302 | EBC_BXAP_SOR_NONDELAYED | \ | 301 | EBC_BXAP_SOR_NONDELAYED | \ |
303 | EBC_BXAP_BEM_WRITEONLY | \ | 302 | EBC_BXAP_BEM_WRITEONLY | \ |
304 | EBC_BXAP_PEN_DISABLED) | 303 | EBC_BXAP_PEN_DISABLED) |
305 | #define CONFIG_SYS_EBC_PB1CR (EBC_BXCR_BAS_ENCODE(CONFIG_SYS_ACE_BASE) | \ | 304 | #define CONFIG_SYS_EBC_PB1CR (EBC_BXCR_BAS_ENCODE(CONFIG_SYS_ACE_BASE) | \ |
306 | EBC_BXCR_BS_1MB | \ | 305 | EBC_BXCR_BS_1MB | \ |
307 | EBC_BXCR_BU_RW | \ | 306 | EBC_BXCR_BU_RW | \ |
308 | EBC_BXCR_BW_16BIT) | 307 | EBC_BXCR_BW_16BIT) |
309 | 308 | ||
310 | /*------------------------------------------------------------------------- | 309 | /*------------------------------------------------------------------------- |
311 | * Initialize EBC CONFIG - | 310 | * Initialize EBC CONFIG - |
312 | * Keep the Default value, but the bit PDT which has to be set to 1 ?TBC | 311 | * Keep the Default value, but the bit PDT which has to be set to 1 ?TBC |
313 | * default value : 0x07C00000 - 0 0 000 1 1 1 1 1 0000 0 00000 000000000000 | 312 | * default value : 0x07C00000 - 0 0 000 1 1 1 1 1 0000 0 00000 000000000000 |
314 | *-------------------------------------------------------------------------*/ | 313 | *-------------------------------------------------------------------------*/ |
315 | #define CONFIG_SYS_EBC_CFG (EBC_CFG_LE_UNLOCK | \ | 314 | #define CONFIG_SYS_EBC_CFG (EBC_CFG_LE_UNLOCK | \ |
316 | EBC_CFG_PTD_ENABLE | \ | 315 | EBC_CFG_PTD_ENABLE | \ |
317 | EBC_CFG_RTC_16PERCLK | \ | 316 | EBC_CFG_RTC_16PERCLK | \ |
318 | EBC_CFG_ATC_PREVIOUS | \ | 317 | EBC_CFG_ATC_PREVIOUS | \ |
319 | EBC_CFG_DTC_PREVIOUS | \ | 318 | EBC_CFG_DTC_PREVIOUS | \ |
320 | EBC_CFG_CTC_PREVIOUS | \ | 319 | EBC_CFG_CTC_PREVIOUS | \ |
321 | EBC_CFG_OEO_PREVIOUS | \ | 320 | EBC_CFG_OEO_PREVIOUS | \ |
322 | EBC_CFG_EMC_DEFAULT | \ | 321 | EBC_CFG_EMC_DEFAULT | \ |
323 | EBC_CFG_PME_DISABLE | \ | 322 | EBC_CFG_PME_DISABLE | \ |
324 | EBC_CFG_PR_16) | 323 | EBC_CFG_PR_16) |
325 | 324 | ||
326 | /*----------------------------------------------------------------------- | 325 | /*----------------------------------------------------------------------- |
327 | * GPIO Setup | 326 | * GPIO Setup |
328 | *----------------------------------------------------------------------*/ | 327 | *----------------------------------------------------------------------*/ |
329 | #define CONFIG_SYS_GPIO_PCIE_PRESENT0 17 | 328 | #define CONFIG_SYS_GPIO_PCIE_PRESENT0 17 |
330 | #define CONFIG_SYS_GPIO_PCIE_PRESENT1 21 | 329 | #define CONFIG_SYS_GPIO_PCIE_PRESENT1 21 |
331 | #define CONFIG_SYS_GPIO_PCIE_PRESENT2 23 | 330 | #define CONFIG_SYS_GPIO_PCIE_PRESENT2 23 |
332 | #define CONFIG_SYS_GPIO_RS232_FORCEOFF 30 | 331 | #define CONFIG_SYS_GPIO_RS232_FORCEOFF 30 |
333 | 332 | ||
334 | #define CONFIG_SYS_PFC0 (GPIO_VAL(CONFIG_SYS_GPIO_PCIE_PRESENT0) | \ | 333 | #define CONFIG_SYS_PFC0 (GPIO_VAL(CONFIG_SYS_GPIO_PCIE_PRESENT0) | \ |
335 | GPIO_VAL(CONFIG_SYS_GPIO_PCIE_PRESENT1) | \ | 334 | GPIO_VAL(CONFIG_SYS_GPIO_PCIE_PRESENT1) | \ |
336 | GPIO_VAL(CONFIG_SYS_GPIO_PCIE_PRESENT2) | \ | 335 | GPIO_VAL(CONFIG_SYS_GPIO_PCIE_PRESENT2) | \ |
337 | GPIO_VAL(CONFIG_SYS_GPIO_RS232_FORCEOFF)) | 336 | GPIO_VAL(CONFIG_SYS_GPIO_RS232_FORCEOFF)) |
338 | #define CONFIG_SYS_GPIO_OR GPIO_VAL(CONFIG_SYS_GPIO_RS232_FORCEOFF) | 337 | #define CONFIG_SYS_GPIO_OR GPIO_VAL(CONFIG_SYS_GPIO_RS232_FORCEOFF) |
339 | #define CONFIG_SYS_GPIO_TCR GPIO_VAL(CONFIG_SYS_GPIO_RS232_FORCEOFF) | 338 | #define CONFIG_SYS_GPIO_TCR GPIO_VAL(CONFIG_SYS_GPIO_RS232_FORCEOFF) |
340 | #define CONFIG_SYS_GPIO_ODR 0 | 339 | #define CONFIG_SYS_GPIO_ODR 0 |
341 | 340 | ||
342 | #endif /* __CONFIG_H */ | 341 | #endif /* __CONFIG_H */ |
343 | 342 |
include/configs/keymile-common.h
1 | /* | 1 | /* |
2 | * (C) Copyright 2008 | 2 | * (C) Copyright 2008 |
3 | * Heiko Schocher, DENX Software Engineering, hs@denx.de. | 3 | * Heiko Schocher, DENX Software Engineering, hs@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 | #ifndef __CONFIG_KEYMILE_H | 24 | #ifndef __CONFIG_KEYMILE_H |
25 | #define __CONFIG_KEYMILE_H | 25 | #define __CONFIG_KEYMILE_H |
26 | 26 | ||
27 | /* Do boardspecific init for all boards */ | 27 | /* Do boardspecific init for all boards */ |
28 | #define CONFIG_BOARD_EARLY_INIT_R 1 | 28 | #define CONFIG_BOARD_EARLY_INIT_R 1 |
29 | 29 | ||
30 | #define CONFIG_BOOTCOUNT_LIMIT | 30 | #define CONFIG_BOOTCOUNT_LIMIT |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * Command line configuration. | 33 | * Command line configuration. |
34 | */ | 34 | */ |
35 | #include <config_cmd_default.h> | 35 | #include <config_cmd_default.h> |
36 | 36 | ||
37 | #define CONFIG_CMD_ASKENV | 37 | #define CONFIG_CMD_ASKENV |
38 | #define CONFIG_CMD_DHCP | 38 | #define CONFIG_CMD_DHCP |
39 | #define CONFIG_CMD_ECHO | 39 | #define CONFIG_CMD_ECHO |
40 | #define CONFIG_CMD_IMMAP | 40 | #define CONFIG_CMD_IMMAP |
41 | #define CONFIG_CMD_MII | 41 | #define CONFIG_CMD_MII |
42 | #define CONFIG_CMD_PING | 42 | #define CONFIG_CMD_PING |
43 | #define CONFIG_CMD_DTT | 43 | #define CONFIG_CMD_DTT |
44 | #define CONFIG_CMD_EEPROM | 44 | #define CONFIG_CMD_EEPROM |
45 | #define CONFIG_CMD_I2C | 45 | #define CONFIG_CMD_I2C |
46 | #define CONFIG_CMD_JFFS2 | 46 | #define CONFIG_CMD_JFFS2 |
47 | #define CONFIG_JFFS2_CMDLINE | 47 | #define CONFIG_JFFS2_CMDLINE |
48 | 48 | ||
49 | #undef CONFIG_WATCHDOG /* disable platform specific watchdog */ | 49 | #undef CONFIG_WATCHDOG /* disable platform specific watchdog */ |
50 | 50 | ||
51 | #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ | 51 | #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ |
52 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs */ | 52 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs */ |
53 | 53 | ||
54 | /* | 54 | /* |
55 | * Miscellaneous configurable options | 55 | * Miscellaneous configurable options |
56 | */ | 56 | */ |
57 | #define CONFIG_SYS_HUSH_PARSER | 57 | #define CONFIG_SYS_HUSH_PARSER |
58 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | 58 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
59 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 59 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
60 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | 60 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
61 | #if defined(CONFIG_CMD_KGDB) | 61 | #if defined(CONFIG_CMD_KGDB) |
62 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ | 62 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
63 | #else | 63 | #else |
64 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | 64 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
65 | #endif | 65 | #endif |
66 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ | 66 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
67 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 67 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
68 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | 68 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
69 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ | 69 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ |
70 | #define CONFIG_COMMAND_HISTORY 1 | 70 | #define CONFIG_COMMAND_HISTORY 1 |
71 | #define CONFIG_AUTO_COMPLETE /* add autocompletion support */ | 71 | #define CONFIG_AUTO_COMPLETE /* add autocompletion support */ |
72 | 72 | ||
73 | #define CONFIG_HUSH_INIT_VAR 1 | 73 | #define CONFIG_HUSH_INIT_VAR 1 |
74 | 74 | ||
75 | #define CONFIG_SYS_ALT_MEMTEST /* memory test, takes time */ | 75 | #define CONFIG_SYS_ALT_MEMTEST /* memory test, takes time */ |
76 | #define CONFIG_SYS_MEMTEST_START 0x00100000 /* memtest works on */ | 76 | #define CONFIG_SYS_MEMTEST_START 0x00100000 /* memtest works on */ |
77 | #define CONFIG_SYS_MEMTEST_END 0x00f00000 /* 1 ... 15 MB in DRAM */ | 77 | #define CONFIG_SYS_MEMTEST_END 0x00f00000 /* 1 ... 15 MB in DRAM */ |
78 | 78 | ||
79 | #define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */ | 79 | #define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */ |
80 | 80 | ||
81 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ | 81 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ |
82 | 82 | ||
83 | #define CONFIG_BAUDRATE 115200 | 83 | #define CONFIG_BAUDRATE 115200 |
84 | #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 } | 84 | #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 } |
85 | 85 | ||
86 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ | 86 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
87 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ | 87 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
88 | 88 | ||
89 | /* | 89 | /* |
90 | * How to get access to the slot ID. Put this here to make it easy | 90 | * How to get access to the slot ID. Put this here to make it easy |
91 | * to modify in a centralized location. This is used in the HDLC | 91 | * to modify in a centralized location. This is used in the HDLC |
92 | * driver to set the MAC. | 92 | * driver to set the MAC. |
93 | */ | 93 | */ |
94 | #define CONFIG_CHECK_ETHERNET_PRESENT 1 | 94 | #define CONFIG_CHECK_ETHERNET_PRESENT 1 |
95 | #define CONFIG_SYS_SLOT_ID_BASE CONFIG_SYS_PIGGY_BASE | 95 | #define CONFIG_SYS_SLOT_ID_BASE CONFIG_SYS_PIGGY_BASE |
96 | #define CONFIG_SYS_SLOT_ID_OFF (0x07) /* register offset */ | 96 | #define CONFIG_SYS_SLOT_ID_OFF (0x07) /* register offset */ |
97 | #define CONFIG_SYS_SLOT_ID_MASK (0x3f) /* mask for slot ID bits */ | 97 | #define CONFIG_SYS_SLOT_ID_MASK (0x3f) /* mask for slot ID bits */ |
98 | 98 | ||
99 | #define CONFIG_I2C_MULTI_BUS 1 | 99 | #define CONFIG_I2C_MULTI_BUS 1 |
100 | #define CONFIG_I2C_CMD_TREE 1 | ||
101 | #define CONFIG_SYS_MAX_I2C_BUS 2 | 100 | #define CONFIG_SYS_MAX_I2C_BUS 2 |
102 | #define CONFIG_SYS_I2C_INIT_BOARD 1 | 101 | #define CONFIG_SYS_I2C_INIT_BOARD 1 |
103 | #define CONFIG_I2C_MUX 1 | 102 | #define CONFIG_I2C_MUX 1 |
104 | 103 | ||
105 | /* EEprom support */ | 104 | /* EEprom support */ |
106 | #define CONFIG_SYS_I2C_MULTI_EEPROMS 1 | 105 | #define CONFIG_SYS_I2C_MULTI_EEPROMS 1 |
107 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_ENABLE | 106 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_ENABLE |
108 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 | 107 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 |
109 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 | 108 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 |
110 | 109 | ||
111 | /* Support the IVM EEprom */ | 110 | /* Support the IVM EEprom */ |
112 | #define CONFIG_SYS_IVM_EEPROM_ADR 0x50 | 111 | #define CONFIG_SYS_IVM_EEPROM_ADR 0x50 |
113 | #define CONFIG_SYS_IVM_EEPROM_MAX_LEN 0x400 | 112 | #define CONFIG_SYS_IVM_EEPROM_MAX_LEN 0x400 |
114 | #define CONFIG_SYS_IVM_EEPROM_PAGE_LEN 0x100 | 113 | #define CONFIG_SYS_IVM_EEPROM_PAGE_LEN 0x100 |
115 | 114 | ||
116 | #define CONFIG_SYS_FLASH_PROTECTION 1 | 115 | #define CONFIG_SYS_FLASH_PROTECTION 1 |
117 | 116 | ||
118 | /* | 117 | /* |
119 | * BOOTP options | 118 | * BOOTP options |
120 | */ | 119 | */ |
121 | #define CONFIG_BOOTP_BOOTFILESIZE | 120 | #define CONFIG_BOOTP_BOOTFILESIZE |
122 | #define CONFIG_BOOTP_BOOTPATH | 121 | #define CONFIG_BOOTP_BOOTPATH |
123 | #define CONFIG_BOOTP_GATEWAY | 122 | #define CONFIG_BOOTP_GATEWAY |
124 | #define CONFIG_BOOTP_HOSTNAME | 123 | #define CONFIG_BOOTP_HOSTNAME |
125 | 124 | ||
126 | /* define this to use the keymile's io muxing feature */ | 125 | /* define this to use the keymile's io muxing feature */ |
127 | /*#define CONFIG_IO_MUXING */ | 126 | /*#define CONFIG_IO_MUXING */ |
128 | 127 | ||
129 | #ifdef CONFIG_IO_MUXING | 128 | #ifdef CONFIG_IO_MUXING |
130 | #define CONFIG_KM_DEF_ENV_IOMUX \ | 129 | #define CONFIG_KM_DEF_ENV_IOMUX \ |
131 | "nc=setenv ethact HDLC ETHERNET \0" \ | 130 | "nc=setenv ethact HDLC ETHERNET \0" \ |
132 | "nce=setenv ethact SCC ETHERNET \0" \ | 131 | "nce=setenv ethact SCC ETHERNET \0" \ |
133 | "stderr=serial,nc \0" \ | 132 | "stderr=serial,nc \0" \ |
134 | "stdin=serial,nc \0" \ | 133 | "stdin=serial,nc \0" \ |
135 | "stdout=serial,nc \0" \ | 134 | "stdout=serial,nc \0" \ |
136 | "tftpsrcp=69 \0" \ | 135 | "tftpsrcp=69 \0" \ |
137 | "tftpdstp=69 \0" | 136 | "tftpdstp=69 \0" |
138 | #else | 137 | #else |
139 | #define CONFIG_KM_DEF_ENV_IOMUX \ | 138 | #define CONFIG_KM_DEF_ENV_IOMUX \ |
140 | "stderr=serial \0" \ | 139 | "stderr=serial \0" \ |
141 | "stdin=serial \0" \ | 140 | "stdin=serial \0" \ |
142 | "stdout=serial \0" | 141 | "stdout=serial \0" |
143 | #endif | 142 | #endif |
144 | 143 | ||
145 | #ifndef CONFIG_KM_DEF_ENV_PRIVATE | 144 | #ifndef CONFIG_KM_DEF_ENV_PRIVATE |
146 | #define CONFIG_KM_DEF_ENV_PRIVATE \ | 145 | #define CONFIG_KM_DEF_ENV_PRIVATE \ |
147 | "kmprivate=empty\0" | 146 | "kmprivate=empty\0" |
148 | #endif | 147 | #endif |
149 | 148 | ||
150 | #define xstr(s) str(s) | 149 | #define xstr(s) str(s) |
151 | #define str(s) #s | 150 | #define str(s) #s |
152 | 151 | ||
153 | #ifndef CONFIG_KM_DEF_ENV | 152 | #ifndef CONFIG_KM_DEF_ENV |
154 | #define CONFIG_KM_DEF_ENV \ | 153 | #define CONFIG_KM_DEF_ENV \ |
155 | "netdev=eth0\0" \ | 154 | "netdev=eth0\0" \ |
156 | "u-boot_addr_r=100000\0" \ | 155 | "u-boot_addr_r=100000\0" \ |
157 | "kernel_addr_r=200000\0" \ | 156 | "kernel_addr_r=200000\0" \ |
158 | "fdt_addr_r=600000\0" \ | 157 | "fdt_addr_r=600000\0" \ |
159 | "ram_ws=800000 \0" \ | 158 | "ram_ws=800000 \0" \ |
160 | "autoscr_ws=780000 \0" \ | 159 | "autoscr_ws=780000 \0" \ |
161 | "fdt_file=" xstr(CONFIG_HOSTNAME) "/" \ | 160 | "fdt_file=" xstr(CONFIG_HOSTNAME) "/" \ |
162 | xstr(CONFIG_HOSTNAME) ".dtb\0" \ | 161 | xstr(CONFIG_HOSTNAME) ".dtb\0" \ |
163 | "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin \0" \ | 162 | "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin \0" \ |
164 | "kernel_file=" xstr(CONFIG_HOSTNAME) "/uImage \0" \ | 163 | "kernel_file=" xstr(CONFIG_HOSTNAME) "/uImage \0" \ |
165 | "load=tftp ${u-boot_addr_r} ${u-boot}\0" \ | 164 | "load=tftp ${u-boot_addr_r} ${u-boot}\0" \ |
166 | "update=protect off " xstr(BOOTFLASH_START) " +${filesize};" \ | 165 | "update=protect off " xstr(BOOTFLASH_START) " +${filesize};" \ |
167 | "erase " xstr(BOOTFLASH_START) " +${filesize};" \ | 166 | "erase " xstr(BOOTFLASH_START) " +${filesize};" \ |
168 | "cp.b ${u-boot_addr_r} " xstr(BOOTFLASH_START) \ | 167 | "cp.b ${u-boot_addr_r} " xstr(BOOTFLASH_START) \ |
169 | " ${filesize};" \ | 168 | " ${filesize};" \ |
170 | "protect on " xstr(BOOTFLASH_START) " +${filesize}\0" \ | 169 | "protect on " xstr(BOOTFLASH_START) " +${filesize}\0" \ |
171 | "load_fdt=tftp ${fdt_addr_r} ${fdt_file}; " \ | 170 | "load_fdt=tftp ${fdt_addr_r} ${fdt_file}; " \ |
172 | "setenv actual_fdt_addr ${fdt_addr_r} \0" \ | 171 | "setenv actual_fdt_addr ${fdt_addr_r} \0" \ |
173 | "load_kernel=tftp ${kernel_addr_r} ${kernel_file}; " \ | 172 | "load_kernel=tftp ${kernel_addr_r} ${kernel_file}; " \ |
174 | "setenv actual_kernel_addr ${kernel_addr_r} \0" \ | 173 | "setenv actual_kernel_addr ${kernel_addr_r} \0" \ |
175 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ | 174 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ |
176 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ | 175 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
177 | "nfsroot=${serverip}:${rootpath}\0" \ | 176 | "nfsroot=${serverip}:${rootpath}\0" \ |
178 | "mtdargs=setenv bootargs root=${actual_rootfs} rw " \ | 177 | "mtdargs=setenv bootargs root=${actual_rootfs} rw " \ |
179 | "rootfstype=jffs2 \0" \ | 178 | "rootfstype=jffs2 \0" \ |
180 | "altmtdargs=setenv bootargs root=${backup_rootfs} rw " \ | 179 | "altmtdargs=setenv bootargs root=${backup_rootfs} rw " \ |
181 | "rootfstype=jffs2 \0" \ | 180 | "rootfstype=jffs2 \0" \ |
182 | "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ | 181 | "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ |
183 | "addip=setenv bootargs ${bootargs} " \ | 182 | "addip=setenv bootargs ${bootargs} " \ |
184 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ | 183 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ |
185 | ":${hostname}:${netdev}:off panic=1\0" \ | 184 | ":${hostname}:${netdev}:off panic=1\0" \ |
186 | "addboardid=setenv bootargs ${bootargs} " \ | 185 | "addboardid=setenv bootargs ${bootargs} " \ |
187 | "hwKey=${IVM_HWKey} boardId=0x${IVM_BoardId} \0" \ | 186 | "hwKey=${IVM_HWKey} boardId=0x${IVM_BoardId} \0" \ |
188 | "addpram=setenv bootargs ${bootargs} " \ | 187 | "addpram=setenv bootargs ${bootargs} " \ |
189 | "mem=${mem} pram=${pram}\0" \ | 188 | "mem=${mem} pram=${pram}\0" \ |
190 | "pram=" xstr(CONFIG_PRAM) "k\0" \ | 189 | "pram=" xstr(CONFIG_PRAM) "k\0" \ |
191 | "net_nfs=tftp ${kernel_addr_r} ${kernel_file}; " \ | 190 | "net_nfs=tftp ${kernel_addr_r} ${kernel_file}; " \ |
192 | "tftp ${fdt_addr_r} ${fdt_file}; " \ | 191 | "tftp ${fdt_addr_r} ${fdt_file}; " \ |
193 | "run nfsargs addip addcon addboardid addpram;" \ | 192 | "run nfsargs addip addcon addboardid addpram;" \ |
194 | "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ | 193 | "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ |
195 | "net_self=tftp ${kernel_addr_r} ${kernel_file}; " \ | 194 | "net_self=tftp ${kernel_addr_r} ${kernel_file}; " \ |
196 | "tftp ${fdt_addr_r} ${fdt_file}; " \ | 195 | "tftp ${fdt_addr_r} ${fdt_file}; " \ |
197 | "tftp ${ramdisk_addr} ${ramdisk_file}; " \ | 196 | "tftp ${ramdisk_addr} ${ramdisk_file}; " \ |
198 | "run ramargs addip addboardid addpram; " \ | 197 | "run ramargs addip addboardid addpram; " \ |
199 | "bootm ${kernel_addr_r} ${ramdisk_addr} ${fdt_addr_r}\0"\ | 198 | "bootm ${kernel_addr_r} ${ramdisk_addr} ${fdt_addr_r}\0"\ |
200 | "flash_nfs=run nfsargs addip addcon;" \ | 199 | "flash_nfs=run nfsargs addip addcon;" \ |
201 | "bootm ${kernel_addr} - ${fdt_addr}\0" \ | 200 | "bootm ${kernel_addr} - ${fdt_addr}\0" \ |
202 | "flash_self=run ramargs addip addcon addboardid addpram;" \ | 201 | "flash_self=run ramargs addip addcon addboardid addpram;" \ |
203 | "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ | 202 | "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ |
204 | "bootcmd=run mtdargs addip addcon addboardid addpram; " \ | 203 | "bootcmd=run mtdargs addip addcon addboardid addpram; " \ |
205 | "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \0" \ | 204 | "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \0" \ |
206 | "altbootcmd=run altmtdargs addip addcon addboardid addpram; " \ | 205 | "altbootcmd=run altmtdargs addip addcon addboardid addpram; " \ |
207 | "bootm ${backup_kernel_addr} - ${backup_fdt_addr} \0" \ | 206 | "bootm ${backup_kernel_addr} - ${backup_fdt_addr} \0" \ |
208 | "actual0=setenv actual_bank 0; setenv actual_kernel_addr " \ | 207 | "actual0=setenv actual_bank 0; setenv actual_kernel_addr " \ |
209 | "${bank0_kernel_addr}; " \ | 208 | "${bank0_kernel_addr}; " \ |
210 | "setenv actual_fdt_addr ${bank0_fdt_addr}; " \ | 209 | "setenv actual_fdt_addr ${bank0_fdt_addr}; " \ |
211 | "setenv actual_rootfs ${bank0_rootfs} \0" \ | 210 | "setenv actual_rootfs ${bank0_rootfs} \0" \ |
212 | "actual1=setenv actual_bank 1; setenv actual_kernel_addr " \ | 211 | "actual1=setenv actual_bank 1; setenv actual_kernel_addr " \ |
213 | "${bank1_kernel_addr}; " \ | 212 | "${bank1_kernel_addr}; " \ |
214 | "setenv actual_fdt_addr ${bank1_fdt_addr}; " \ | 213 | "setenv actual_fdt_addr ${bank1_fdt_addr}; " \ |
215 | "setenv actual_rootfs ${bank1_rootfs} \0" \ | 214 | "setenv actual_rootfs ${bank1_rootfs} \0" \ |
216 | "backup0=setenv backup_bank 0; setenv backup_kernel_addr " \ | 215 | "backup0=setenv backup_bank 0; setenv backup_kernel_addr " \ |
217 | "${bank0_kernel_addr}; " \ | 216 | "${bank0_kernel_addr}; " \ |
218 | "setenv backup_fdt_addr ${bank0_fdt_addr}; " \ | 217 | "setenv backup_fdt_addr ${bank0_fdt_addr}; " \ |
219 | "setenv backup_rootfs ${bank0_rootfs} \0" \ | 218 | "setenv backup_rootfs ${bank0_rootfs} \0" \ |
220 | "backup1=setenv backup_bank 1; setenv backup_kernel_addr " \ | 219 | "backup1=setenv backup_bank 1; setenv backup_kernel_addr " \ |
221 | "${bank1_kernel_addr}; " \ | 220 | "${bank1_kernel_addr}; " \ |
222 | "setenv backup_fdt_addr ${bank1_fdt_addr}; " \ | 221 | "setenv backup_fdt_addr ${bank1_fdt_addr}; " \ |
223 | "setenv backup_rootfs ${bank1_rootfs} \0" \ | 222 | "setenv backup_rootfs ${bank1_rootfs} \0" \ |
224 | "setbank0=run actual0 backup1 \0" \ | 223 | "setbank0=run actual0 backup1 \0" \ |
225 | "setbank1=run actual1 backup0 \0" \ | 224 | "setbank1=run actual1 backup0 \0" \ |
226 | "release=setenv bootcmd " \ | 225 | "release=setenv bootcmd " \ |
227 | "\'run mtdargs addip addcon addboardid addpram;" \ | 226 | "\'run mtdargs addip addcon addboardid addpram;" \ |
228 | "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \'; " \ | 227 | "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \'; " \ |
229 | "saveenv \0" \ | 228 | "saveenv \0" \ |
230 | "develop=setenv bootcmd " \ | 229 | "develop=setenv bootcmd " \ |
231 | "\'run nfsargs addip addcon addboardid addpram;" \ | 230 | "\'run nfsargs addip addcon addboardid addpram;" \ |
232 | "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \'; " \ | 231 | "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \'; " \ |
233 | "saveenv \0" \ | 232 | "saveenv \0" \ |
234 | "developall=setenv bootcmd " \ | 233 | "developall=setenv bootcmd " \ |
235 | "\'run load_fdt load_kernel nfsargs " \ | 234 | "\'run load_fdt load_kernel nfsargs " \ |
236 | "addip addcon addboardid addpram; " \ | 235 | "addip addcon addboardid addpram; " \ |
237 | "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \'; " \ | 236 | "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \'; " \ |
238 | "saveenv \0" \ | 237 | "saveenv \0" \ |
239 | "set_new_esw_script=setenv new_esw_script " \ | 238 | "set_new_esw_script=setenv new_esw_script " \ |
240 | "new_esw_0x${IVM_BoardId}_0x${IVM_HWKey}.scr \0" \ | 239 | "new_esw_0x${IVM_BoardId}_0x${IVM_HWKey}.scr \0" \ |
241 | "new_esw=run set_new_esw_script; " \ | 240 | "new_esw=run set_new_esw_script; " \ |
242 | "tftp ${autoscr_ws} ${new_esw_script}; " \ | 241 | "tftp ${autoscr_ws} ${new_esw_script}; " \ |
243 | "iminfo ${autoscr_ws}; source ${autoscr_ws} \0" \ | 242 | "iminfo ${autoscr_ws}; source ${autoscr_ws} \0" \ |
244 | "bootlimit=0 \0" \ | 243 | "bootlimit=0 \0" \ |
245 | CONFIG_KM_DEF_ENV_IOMUX \ | 244 | CONFIG_KM_DEF_ENV_IOMUX \ |
246 | CONFIG_KM_DEF_ENV_PRIVATE \ | 245 | CONFIG_KM_DEF_ENV_PRIVATE \ |
247 | "" | 246 | "" |
248 | #endif /* CONFIG_KM_DEF_ENV */ | 247 | #endif /* CONFIG_KM_DEF_ENV */ |
249 | 248 | ||
250 | #define CONFIG_VERSION_VARIABLE /* include version env variable */ | 249 | #define CONFIG_VERSION_VARIABLE /* include version env variable */ |
251 | 250 | ||
252 | #endif /* __CONFIG_KEYMILE_H */ | 251 | #endif /* __CONFIG_KEYMILE_H */ |
253 | 252 |
include/configs/kmeter1.h
1 | /* | 1 | /* |
2 | * Copyright (C) 2006 Freescale Semiconductor, Inc. | 2 | * Copyright (C) 2006 Freescale Semiconductor, Inc. |
3 | * Dave Liu <daveliu@freescale.com> | 3 | * Dave Liu <daveliu@freescale.com> |
4 | * | 4 | * |
5 | * Copyright (C) 2007 Logic Product Development, Inc. | 5 | * Copyright (C) 2007 Logic Product Development, Inc. |
6 | * Peter Barada <peterb@logicpd.com> | 6 | * Peter Barada <peterb@logicpd.com> |
7 | * | 7 | * |
8 | * Copyright (C) 2007 MontaVista Software, Inc. | 8 | * Copyright (C) 2007 MontaVista Software, Inc. |
9 | * Anton Vorontsov <avorontsov@ru.mvista.com> | 9 | * Anton Vorontsov <avorontsov@ru.mvista.com> |
10 | * | 10 | * |
11 | * (C) Copyright 2008 | 11 | * (C) Copyright 2008 |
12 | * Heiko Schocher, DENX Software Engineering, hs@denx.de. | 12 | * Heiko Schocher, DENX Software Engineering, hs@denx.de. |
13 | * | 13 | * |
14 | * This program is free software; you can redistribute it and/or | 14 | * This program is free software; you can redistribute it and/or |
15 | * modify it under the terms of the GNU General Public License as | 15 | * modify it under the terms of the GNU General Public License as |
16 | * published by the Free Software Foundation; either version 2 of | 16 | * published by the Free Software Foundation; either version 2 of |
17 | * the License, or (at your option) any later version. | 17 | * the License, or (at your option) any later version. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #ifndef __CONFIG_H | 20 | #ifndef __CONFIG_H |
21 | #define __CONFIG_H | 21 | #define __CONFIG_H |
22 | 22 | ||
23 | /* | 23 | /* |
24 | * High Level Configuration Options | 24 | * High Level Configuration Options |
25 | */ | 25 | */ |
26 | #define CONFIG_E300 1 /* E300 family */ | 26 | #define CONFIG_E300 1 /* E300 family */ |
27 | #define CONFIG_QE 1 /* Has QE */ | 27 | #define CONFIG_QE 1 /* Has QE */ |
28 | #define CONFIG_MPC83XX 1 /* MPC83XX family */ | 28 | #define CONFIG_MPC83XX 1 /* MPC83XX family */ |
29 | #define CONFIG_MPC8360 1 /* MPC8360 CPU specific */ | 29 | #define CONFIG_MPC8360 1 /* MPC8360 CPU specific */ |
30 | #define CONFIG_KMETER1 1 /* KMETER1 board specific */ | 30 | #define CONFIG_KMETER1 1 /* KMETER1 board specific */ |
31 | #define CONFIG_HOSTNAME kmeter1 | 31 | #define CONFIG_HOSTNAME kmeter1 |
32 | 32 | ||
33 | /* include common defines/options for all Keymile boards */ | 33 | /* include common defines/options for all Keymile boards */ |
34 | #include "keymile-common.h" | 34 | #include "keymile-common.h" |
35 | 35 | ||
36 | #undef CONFIG_SYS_I2C_INIT_BOARD | 36 | #undef CONFIG_SYS_I2C_INIT_BOARD |
37 | #define CONFIG_MISC_INIT_R 1 | 37 | #define CONFIG_MISC_INIT_R 1 |
38 | /* | 38 | /* |
39 | * System Clock Setup | 39 | * System Clock Setup |
40 | */ | 40 | */ |
41 | #define CONFIG_83XX_CLKIN 66000000 | 41 | #define CONFIG_83XX_CLKIN 66000000 |
42 | #define CONFIG_SYS_CLK_FREQ 66000000 | 42 | #define CONFIG_SYS_CLK_FREQ 66000000 |
43 | #define CONFIG_83XX_PCICLK 66000000 | 43 | #define CONFIG_83XX_PCICLK 66000000 |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * Hardware Reset Configuration Word | 46 | * Hardware Reset Configuration Word |
47 | */ | 47 | */ |
48 | #define CONFIG_SYS_HRCW_LOW (\ | 48 | #define CONFIG_SYS_HRCW_LOW (\ |
49 | HRCWL_CSB_TO_CLKIN_4X1 | \ | 49 | HRCWL_CSB_TO_CLKIN_4X1 | \ |
50 | HRCWL_CORE_TO_CSB_2X1 | \ | 50 | HRCWL_CORE_TO_CSB_2X1 | \ |
51 | HRCWL_CE_PLL_VCO_DIV_2 | \ | 51 | HRCWL_CE_PLL_VCO_DIV_2 | \ |
52 | HRCWL_CE_TO_PLL_1X6 ) | 52 | HRCWL_CE_TO_PLL_1X6 ) |
53 | 53 | ||
54 | #define CONFIG_SYS_HRCW_HIGH (\ | 54 | #define CONFIG_SYS_HRCW_HIGH (\ |
55 | HRCWH_CORE_ENABLE | \ | 55 | HRCWH_CORE_ENABLE | \ |
56 | HRCWH_FROM_0X00000100 | \ | 56 | HRCWH_FROM_0X00000100 | \ |
57 | HRCWH_BOOTSEQ_DISABLE | \ | 57 | HRCWH_BOOTSEQ_DISABLE | \ |
58 | HRCWH_SW_WATCHDOG_DISABLE | \ | 58 | HRCWH_SW_WATCHDOG_DISABLE | \ |
59 | HRCWH_ROM_LOC_LOCAL_16BIT | \ | 59 | HRCWH_ROM_LOC_LOCAL_16BIT | \ |
60 | HRCWH_BIG_ENDIAN | \ | 60 | HRCWH_BIG_ENDIAN | \ |
61 | HRCWH_LALE_EARLY | \ | 61 | HRCWH_LALE_EARLY | \ |
62 | HRCWH_LDP_CLEAR ) | 62 | HRCWH_LDP_CLEAR ) |
63 | 63 | ||
64 | /* | 64 | /* |
65 | * System IO Config | 65 | * System IO Config |
66 | */ | 66 | */ |
67 | #define CONFIG_SYS_SICRH 0x00000006 | 67 | #define CONFIG_SYS_SICRH 0x00000006 |
68 | #define CONFIG_SYS_SICRL 0x00000000 | 68 | #define CONFIG_SYS_SICRL 0x00000000 |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * IMMR new address | 71 | * IMMR new address |
72 | */ | 72 | */ |
73 | #define CONFIG_SYS_IMMR 0xE0000000 | 73 | #define CONFIG_SYS_IMMR 0xE0000000 |
74 | 74 | ||
75 | /* | 75 | /* |
76 | * DDR Setup | 76 | * DDR Setup |
77 | */ | 77 | */ |
78 | #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory */ | 78 | #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory */ |
79 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE | 79 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE |
80 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE | 80 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE |
81 | #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \ | 81 | #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \ |
82 | DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05) | 82 | DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05) |
83 | 83 | ||
84 | #define CFG_83XX_DDR_USES_CS0 | 84 | #define CFG_83XX_DDR_USES_CS0 |
85 | 85 | ||
86 | #undef CONFIG_DDR_ECC | 86 | #undef CONFIG_DDR_ECC |
87 | 87 | ||
88 | /* | 88 | /* |
89 | * DDRCDR - DDR Control Driver Register | 89 | * DDRCDR - DDR Control Driver Register |
90 | */ | 90 | */ |
91 | 91 | ||
92 | #undef CONFIG_SPD_EEPROM /* Do not use SPD EEPROM for DDR setup */ | 92 | #undef CONFIG_SPD_EEPROM /* Do not use SPD EEPROM for DDR setup */ |
93 | 93 | ||
94 | /* | 94 | /* |
95 | * Manually set up DDR parameters | 95 | * Manually set up DDR parameters |
96 | */ | 96 | */ |
97 | #define CONFIG_DDR_II | 97 | #define CONFIG_DDR_II |
98 | #define CONFIG_SYS_DDR_SIZE 2048 /* MB */ | 98 | #define CONFIG_SYS_DDR_SIZE 2048 /* MB */ |
99 | #define CONFIG_SYS_DDR_CS0_BNDS 0x0000007f | 99 | #define CONFIG_SYS_DDR_CS0_BNDS 0x0000007f |
100 | #define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN | CSCONFIG_AP | \ | 100 | #define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN | CSCONFIG_AP | \ |
101 | CSCONFIG_ROW_BIT_13 | \ | 101 | CSCONFIG_ROW_BIT_13 | \ |
102 | CSCONFIG_COL_BIT_10 | CSCONFIG_ODT_WR_ACS) | 102 | CSCONFIG_COL_BIT_10 | CSCONFIG_ODT_WR_ACS) |
103 | 103 | ||
104 | #define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SDRAM_TYPE_DDR2 | \ | 104 | #define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SDRAM_TYPE_DDR2 | \ |
105 | SDRAM_CFG_SREN) | 105 | SDRAM_CFG_SREN) |
106 | #define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000 | 106 | #define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000 |
107 | #define CONFIG_SYS_DDR_CLK_CNTL (DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05) | 107 | #define CONFIG_SYS_DDR_CLK_CNTL (DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05) |
108 | #define CONFIG_SYS_DDR_INTERVAL ((0x080 << SDRAM_INTERVAL_BSTOPRE_SHIFT) | \ | 108 | #define CONFIG_SYS_DDR_INTERVAL ((0x080 << SDRAM_INTERVAL_BSTOPRE_SHIFT) | \ |
109 | (0x3cf << SDRAM_INTERVAL_REFINT_SHIFT)) | 109 | (0x3cf << SDRAM_INTERVAL_REFINT_SHIFT)) |
110 | 110 | ||
111 | #define CONFIG_SYS_DDRCDR 0x40000001 | 111 | #define CONFIG_SYS_DDRCDR 0x40000001 |
112 | #define CONFIG_SYS_DDR_MODE 0x47860452 | 112 | #define CONFIG_SYS_DDR_MODE 0x47860452 |
113 | #define CONFIG_SYS_DDR_MODE2 0x8080c000 | 113 | #define CONFIG_SYS_DDR_MODE2 0x8080c000 |
114 | 114 | ||
115 | #define CONFIG_SYS_DDR_TIMING_0 ((2 << TIMING_CFG0_MRS_CYC_SHIFT) | \ | 115 | #define CONFIG_SYS_DDR_TIMING_0 ((2 << TIMING_CFG0_MRS_CYC_SHIFT) | \ |
116 | (8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) | \ | 116 | (8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) | \ |
117 | (6 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) | \ | 117 | (6 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) | \ |
118 | (2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) | \ | 118 | (2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) | \ |
119 | (0 << TIMING_CFG0_WWT_SHIFT) | \ | 119 | (0 << TIMING_CFG0_WWT_SHIFT) | \ |
120 | (0 << TIMING_CFG0_RRT_SHIFT) | \ | 120 | (0 << TIMING_CFG0_RRT_SHIFT) | \ |
121 | (0 << TIMING_CFG0_WRT_SHIFT) | \ | 121 | (0 << TIMING_CFG0_WRT_SHIFT) | \ |
122 | (0 << TIMING_CFG0_RWT_SHIFT)) | 122 | (0 << TIMING_CFG0_RWT_SHIFT)) |
123 | 123 | ||
124 | #define CONFIG_SYS_DDR_TIMING_1 (( TIMING_CFG1_CASLAT_50) | \ | 124 | #define CONFIG_SYS_DDR_TIMING_1 (( TIMING_CFG1_CASLAT_50) | \ |
125 | ( 2 << TIMING_CFG1_WRTORD_SHIFT) | \ | 125 | ( 2 << TIMING_CFG1_WRTORD_SHIFT) | \ |
126 | ( 2 << TIMING_CFG1_ACTTOACT_SHIFT) | \ | 126 | ( 2 << TIMING_CFG1_ACTTOACT_SHIFT) | \ |
127 | ( 3 << TIMING_CFG1_WRREC_SHIFT) | \ | 127 | ( 3 << TIMING_CFG1_WRREC_SHIFT) | \ |
128 | ( 7 << TIMING_CFG1_REFREC_SHIFT) | \ | 128 | ( 7 << TIMING_CFG1_REFREC_SHIFT) | \ |
129 | ( 3 << TIMING_CFG1_ACTTORW_SHIFT) | \ | 129 | ( 3 << TIMING_CFG1_ACTTORW_SHIFT) | \ |
130 | ( 8 << TIMING_CFG1_ACTTOPRE_SHIFT) | \ | 130 | ( 8 << TIMING_CFG1_ACTTOPRE_SHIFT) | \ |
131 | ( 3 << TIMING_CFG1_PRETOACT_SHIFT)) | 131 | ( 3 << TIMING_CFG1_PRETOACT_SHIFT)) |
132 | 132 | ||
133 | #define CONFIG_SYS_DDR_TIMING_2 ((8 << TIMING_CFG2_FOUR_ACT_SHIFT) | \ | 133 | #define CONFIG_SYS_DDR_TIMING_2 ((8 << TIMING_CFG2_FOUR_ACT_SHIFT) | \ |
134 | (3 << TIMING_CFG2_CKE_PLS_SHIFT) | \ | 134 | (3 << TIMING_CFG2_CKE_PLS_SHIFT) | \ |
135 | (2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) | \ | 135 | (2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) | \ |
136 | (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) | \ | 136 | (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) | \ |
137 | (4 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) | \ | 137 | (4 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) | \ |
138 | (0 << TIMING_CFG2_ADD_LAT_SHIFT) | \ | 138 | (0 << TIMING_CFG2_ADD_LAT_SHIFT) | \ |
139 | (5 << TIMING_CFG2_CPO_SHIFT)) | 139 | (5 << TIMING_CFG2_CPO_SHIFT)) |
140 | 140 | ||
141 | #define CONFIG_SYS_DDR_TIMING_3 0x00000000 | 141 | #define CONFIG_SYS_DDR_TIMING_3 0x00000000 |
142 | 142 | ||
143 | /* | 143 | /* |
144 | * The reserved memory | 144 | * The reserved memory |
145 | */ | 145 | */ |
146 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ | 146 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ |
147 | #define CONFIG_SYS_FLASH_BASE 0xF0000000 | 147 | #define CONFIG_SYS_FLASH_BASE 0xF0000000 |
148 | #define CONFIG_SYS_FLASH_BASE_1 0xF2000000 | 148 | #define CONFIG_SYS_FLASH_BASE_1 0xF2000000 |
149 | #define CONFIG_SYS_PIGGY_BASE 0xE8000000 | 149 | #define CONFIG_SYS_PIGGY_BASE 0xE8000000 |
150 | #define CONFIG_SYS_PIGGY_SIZE 128 | 150 | #define CONFIG_SYS_PIGGY_SIZE 128 |
151 | #define CONFIG_SYS_PAXE_BASE 0xA0000000 | 151 | #define CONFIG_SYS_PAXE_BASE 0xA0000000 |
152 | #define CONFIG_SYS_PAXE_SIZE 512 | 152 | #define CONFIG_SYS_PAXE_SIZE 512 |
153 | 153 | ||
154 | #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE) | 154 | #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE) |
155 | #define CONFIG_SYS_RAMBOOT | 155 | #define CONFIG_SYS_RAMBOOT |
156 | #else | 156 | #else |
157 | #undef CONFIG_SYS_RAMBOOT | 157 | #undef CONFIG_SYS_RAMBOOT |
158 | #endif | 158 | #endif |
159 | 159 | ||
160 | #define CONFIG_SYS_MONITOR_LEN (384 * 1024) /* Reserve 256 kB for Mon */ | 160 | #define CONFIG_SYS_MONITOR_LEN (384 * 1024) /* Reserve 256 kB for Mon */ |
161 | #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserved for malloc */ | 161 | #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserved for malloc */ |
162 | 162 | ||
163 | /* | 163 | /* |
164 | * Initial RAM Base Address Setup | 164 | * Initial RAM Base Address Setup |
165 | */ | 165 | */ |
166 | #define CONFIG_SYS_INIT_RAM_LOCK 1 | 166 | #define CONFIG_SYS_INIT_RAM_LOCK 1 |
167 | #define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM address */ | 167 | #define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM address */ |
168 | #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM */ | 168 | #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM */ |
169 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ | 169 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ |
170 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 170 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
171 | 171 | ||
172 | /* | 172 | /* |
173 | * Local Bus Configuration & Clock Setup | 173 | * Local Bus Configuration & Clock Setup |
174 | */ | 174 | */ |
175 | #define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_EADC_2 | LCRR_CLKDIV_4) | 175 | #define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_EADC_2 | LCRR_CLKDIV_4) |
176 | 176 | ||
177 | /* | 177 | /* |
178 | * Init Local Bus Memory Controller: | 178 | * Init Local Bus Memory Controller: |
179 | * | 179 | * |
180 | * Bank Bus Machine PortSz Size Device | 180 | * Bank Bus Machine PortSz Size Device |
181 | * ---- --- ------- ------ ----- ------ | 181 | * ---- --- ------- ------ ----- ------ |
182 | * 0 Local GPCM 16 bit 256MB FLASH | 182 | * 0 Local GPCM 16 bit 256MB FLASH |
183 | * 1 Local GPCM 8 bit 128MB GPIO/PIGGY | 183 | * 1 Local GPCM 8 bit 128MB GPIO/PIGGY |
184 | * 3 Local GPCM 8 bit 512MB PAXE | 184 | * 3 Local GPCM 8 bit 512MB PAXE |
185 | * | 185 | * |
186 | */ | 186 | */ |
187 | /* | 187 | /* |
188 | * FLASH on the Local Bus | 188 | * FLASH on the Local Bus |
189 | */ | 189 | */ |
190 | #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */ | 190 | #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */ |
191 | #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */ | 191 | #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */ |
192 | #define CONFIG_SYS_FLASH_SIZE 256 /* max FLASH size is 256M */ | 192 | #define CONFIG_SYS_FLASH_SIZE 256 /* max FLASH size is 256M */ |
193 | #define CONFIG_SYS_FLASH_PROTECTION 1 | 193 | #define CONFIG_SYS_FLASH_PROTECTION 1 |
194 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 | 194 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 |
195 | 195 | ||
196 | #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE /* Window base at flash base */ | 196 | #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE /* Window base at flash base */ |
197 | #define CONFIG_SYS_LBLAWAR0_PRELIM 0x8000001b /* 256MB window size */ | 197 | #define CONFIG_SYS_LBLAWAR0_PRELIM 0x8000001b /* 256MB window size */ |
198 | 198 | ||
199 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | \ | 199 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | \ |
200 | (2 << BR_PS_SHIFT) | /* 16 bit port size */ \ | 200 | (2 << BR_PS_SHIFT) | /* 16 bit port size */ \ |
201 | BR_V) | 201 | BR_V) |
202 | 202 | ||
203 | #define CONFIG_SYS_OR0_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH_SIZE) | \ | 203 | #define CONFIG_SYS_OR0_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH_SIZE) | \ |
204 | OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | \ | 204 | OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | \ |
205 | OR_GPCM_SCY_5 | \ | 205 | OR_GPCM_SCY_5 | \ |
206 | OR_GPCM_TRLX | OR_GPCM_EAD) | 206 | OR_GPCM_TRLX | OR_GPCM_EAD) |
207 | 207 | ||
208 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max num of flash banks */ | 208 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max num of flash banks */ |
209 | #define CONFIG_SYS_MAX_FLASH_SECT 512 /* max num of sects on one chip */ | 209 | #define CONFIG_SYS_MAX_FLASH_SECT 512 /* max num of sects on one chip */ |
210 | #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE_1 } | 210 | #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE_1 } |
211 | 211 | ||
212 | #undef CONFIG_SYS_FLASH_CHECKSUM | 212 | #undef CONFIG_SYS_FLASH_CHECKSUM |
213 | 213 | ||
214 | /* | 214 | /* |
215 | * PRIO1/PIGGY on the local bus CS1 | 215 | * PRIO1/PIGGY on the local bus CS1 |
216 | */ | 216 | */ |
217 | #define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_PIGGY_BASE /* Window base at flash base */ | 217 | #define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_PIGGY_BASE /* Window base at flash base */ |
218 | #define CONFIG_SYS_LBLAWAR1_PRELIM 0x8000001A /* 128MB window size */ | 218 | #define CONFIG_SYS_LBLAWAR1_PRELIM 0x8000001A /* 128MB window size */ |
219 | 219 | ||
220 | #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_PIGGY_BASE | \ | 220 | #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_PIGGY_BASE | \ |
221 | (1 << BR_PS_SHIFT) | /* 8 bit port size */ \ | 221 | (1 << BR_PS_SHIFT) | /* 8 bit port size */ \ |
222 | BR_V) | 222 | BR_V) |
223 | #define CONFIG_SYS_OR1_PRELIM (MEG_TO_AM(CONFIG_SYS_PIGGY_SIZE) | /* 128MB */ \ | 223 | #define CONFIG_SYS_OR1_PRELIM (MEG_TO_AM(CONFIG_SYS_PIGGY_SIZE) | /* 128MB */ \ |
224 | OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | \ | 224 | OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | \ |
225 | OR_GPCM_SCY_2 | \ | 225 | OR_GPCM_SCY_2 | \ |
226 | OR_GPCM_TRLX | OR_GPCM_EAD) | 226 | OR_GPCM_TRLX | OR_GPCM_EAD) |
227 | 227 | ||
228 | /* | 228 | /* |
229 | * PAXE on the local bus CS3 | 229 | * PAXE on the local bus CS3 |
230 | */ | 230 | */ |
231 | #define CONFIG_SYS_LBLAWBAR3_PRELIM CONFIG_SYS_PAXE_BASE /* Window base at flash base */ | 231 | #define CONFIG_SYS_LBLAWBAR3_PRELIM CONFIG_SYS_PAXE_BASE /* Window base at flash base */ |
232 | #define CONFIG_SYS_LBLAWAR3_PRELIM 0x8000001C /* 512MB window size */ | 232 | #define CONFIG_SYS_LBLAWAR3_PRELIM 0x8000001C /* 512MB window size */ |
233 | 233 | ||
234 | #define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_PAXE_BASE | \ | 234 | #define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_PAXE_BASE | \ |
235 | (1 << BR_PS_SHIFT) | /* 8 bit port size */ \ | 235 | (1 << BR_PS_SHIFT) | /* 8 bit port size */ \ |
236 | BR_V) | 236 | BR_V) |
237 | #define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_PAXE_SIZE) | \ | 237 | #define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_PAXE_SIZE) | \ |
238 | OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | \ | 238 | OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | \ |
239 | OR_GPCM_SCY_2 | \ | 239 | OR_GPCM_SCY_2 | \ |
240 | OR_GPCM_TRLX | OR_GPCM_EAD) | 240 | OR_GPCM_TRLX | OR_GPCM_EAD) |
241 | 241 | ||
242 | /* | 242 | /* |
243 | * Serial Port | 243 | * Serial Port |
244 | */ | 244 | */ |
245 | #define CONFIG_CONS_INDEX 1 | 245 | #define CONFIG_CONS_INDEX 1 |
246 | #undef CONFIG_SERIAL_SOFTWARE_FIFO | 246 | #undef CONFIG_SERIAL_SOFTWARE_FIFO |
247 | #define CONFIG_SYS_NS16550 | 247 | #define CONFIG_SYS_NS16550 |
248 | #define CONFIG_SYS_NS16550_SERIAL | 248 | #define CONFIG_SYS_NS16550_SERIAL |
249 | #define CONFIG_SYS_NS16550_REG_SIZE 1 | 249 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
250 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) | 250 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) |
251 | 251 | ||
252 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500) | 252 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500) |
253 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600) | 253 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600) |
254 | 254 | ||
255 | /* Pass open firmware flat tree */ | 255 | /* Pass open firmware flat tree */ |
256 | #define CONFIG_OF_LIBFDT 1 | 256 | #define CONFIG_OF_LIBFDT 1 |
257 | #define CONFIG_OF_BOARD_SETUP 1 | 257 | #define CONFIG_OF_BOARD_SETUP 1 |
258 | #define CONFIG_OF_STDOUT_VIA_ALIAS | 258 | #define CONFIG_OF_STDOUT_VIA_ALIAS |
259 | 259 | ||
260 | /* | 260 | /* |
261 | * General PCI | 261 | * General PCI |
262 | * Addresses are mapped 1-1. | 262 | * Addresses are mapped 1-1. |
263 | */ | 263 | */ |
264 | #undef CONFIG_PCI /* No PCI */ | 264 | #undef CONFIG_PCI /* No PCI */ |
265 | 265 | ||
266 | #ifndef CONFIG_NET_MULTI | 266 | #ifndef CONFIG_NET_MULTI |
267 | #define CONFIG_NET_MULTI 1 | 267 | #define CONFIG_NET_MULTI 1 |
268 | #endif | 268 | #endif |
269 | /* | 269 | /* |
270 | * QE UEC ethernet configuration | 270 | * QE UEC ethernet configuration |
271 | */ | 271 | */ |
272 | #define CONFIG_UEC_ETH | 272 | #define CONFIG_UEC_ETH |
273 | #define CONFIG_ETHPRIME "FSL UEC0" | 273 | #define CONFIG_ETHPRIME "FSL UEC0" |
274 | 274 | ||
275 | #define CONFIG_UEC_ETH1 /* GETH1 */ | 275 | #define CONFIG_UEC_ETH1 /* GETH1 */ |
276 | #define UEC_VERBOSE_DEBUG 1 | 276 | #define UEC_VERBOSE_DEBUG 1 |
277 | 277 | ||
278 | #ifdef CONFIG_UEC_ETH1 | 278 | #ifdef CONFIG_UEC_ETH1 |
279 | #define CONFIG_SYS_UEC1_UCC_NUM 3 /* UCC4 */ | 279 | #define CONFIG_SYS_UEC1_UCC_NUM 3 /* UCC4 */ |
280 | #define CONFIG_SYS_UEC1_RX_CLK QE_CLK_NONE /* not used in RMII Mode */ | 280 | #define CONFIG_SYS_UEC1_RX_CLK QE_CLK_NONE /* not used in RMII Mode */ |
281 | #define CONFIG_SYS_UEC1_TX_CLK QE_CLK17 | 281 | #define CONFIG_SYS_UEC1_TX_CLK QE_CLK17 |
282 | #define CONFIG_SYS_UEC1_ETH_TYPE FAST_ETH | 282 | #define CONFIG_SYS_UEC1_ETH_TYPE FAST_ETH |
283 | #define CONFIG_SYS_UEC1_PHY_ADDR 0 | 283 | #define CONFIG_SYS_UEC1_PHY_ADDR 0 |
284 | #define CONFIG_SYS_UEC1_INTERFACE_MODE ENET_100_RMII | 284 | #define CONFIG_SYS_UEC1_INTERFACE_MODE ENET_100_RMII |
285 | #endif | 285 | #endif |
286 | 286 | ||
287 | /* | 287 | /* |
288 | * Environment | 288 | * Environment |
289 | */ | 289 | */ |
290 | 290 | ||
291 | #ifndef CONFIG_SYS_RAMBOOT | 291 | #ifndef CONFIG_SYS_RAMBOOT |
292 | #define CONFIG_ENV_IS_IN_FLASH 1 | 292 | #define CONFIG_ENV_IS_IN_FLASH 1 |
293 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) | 293 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) |
294 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */ | 294 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */ |
295 | #define CONFIG_ENV_SIZE 0x20000 | 295 | #define CONFIG_ENV_SIZE 0x20000 |
296 | #define CONFIG_ENV_OFFSET (CONFIG_SYS_MONITOR_LEN) | 296 | #define CONFIG_ENV_OFFSET (CONFIG_SYS_MONITOR_LEN) |
297 | 297 | ||
298 | /* Address and size of Redundant Environment Sector */ | 298 | /* Address and size of Redundant Environment Sector */ |
299 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET+CONFIG_ENV_SECT_SIZE) | 299 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET+CONFIG_ENV_SECT_SIZE) |
300 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) | 300 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) |
301 | 301 | ||
302 | #else /* CFG_RAMBOOT */ | 302 | #else /* CFG_RAMBOOT */ |
303 | #define CONFIG_SYS_NO_FLASH 1 /* Flash is not usable now */ | 303 | #define CONFIG_SYS_NO_FLASH 1 /* Flash is not usable now */ |
304 | #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */ | 304 | #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */ |
305 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000) | 305 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000) |
306 | #define CONFIG_ENV_SIZE 0x2000 | 306 | #define CONFIG_ENV_SIZE 0x2000 |
307 | #endif /* CFG_RAMBOOT */ | 307 | #endif /* CFG_RAMBOOT */ |
308 | 308 | ||
309 | /* I2C */ | 309 | /* I2C */ |
310 | #define CONFIG_HARD_I2C /* I2C with hardware support */ | 310 | #define CONFIG_HARD_I2C /* I2C with hardware support */ |
311 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ | 311 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ |
312 | #define CONFIG_FSL_I2C | 312 | #define CONFIG_FSL_I2C |
313 | #define CONFIG_SYS_I2C_SPEED 200000 /* I2C speed and slave address */ | 313 | #define CONFIG_SYS_I2C_SPEED 200000 /* I2C speed and slave address */ |
314 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 314 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
315 | #define CONFIG_SYS_I2C_OFFSET 0x3000 | 315 | #define CONFIG_SYS_I2C_OFFSET 0x3000 |
316 | #define CONFIG_I2C_MULTI_BUS 1 | 316 | #define CONFIG_I2C_MULTI_BUS 1 |
317 | #define CONFIG_I2C_CMD_TREE 1 | ||
318 | #define CONFIG_SYS_MAX_I2C_BUS 2 | 317 | #define CONFIG_SYS_MAX_I2C_BUS 2 |
319 | #define CONFIG_I2C_MUX 1 | 318 | #define CONFIG_I2C_MUX 1 |
320 | 319 | ||
321 | /* EEprom support */ | 320 | /* EEprom support */ |
322 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 | 321 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 |
323 | 322 | ||
324 | /* I2C SYSMON (LM75, AD7414 is almost compatible) */ | 323 | /* I2C SYSMON (LM75, AD7414 is almost compatible) */ |
325 | #define CONFIG_DTT_LM75 1 /* ON Semi's LM75 */ | 324 | #define CONFIG_DTT_LM75 1 /* ON Semi's LM75 */ |
326 | #define CONFIG_DTT_SENSORS {0, 1, 2, 3} /* Sensor addresses */ | 325 | #define CONFIG_DTT_SENSORS {0, 1, 2, 3} /* Sensor addresses */ |
327 | #define CONFIG_SYS_DTT_MAX_TEMP 70 | 326 | #define CONFIG_SYS_DTT_MAX_TEMP 70 |
328 | #define CONFIG_SYS_DTT_LOW_TEMP -30 | 327 | #define CONFIG_SYS_DTT_LOW_TEMP -30 |
329 | #define CONFIG_SYS_DTT_HYSTERESIS 3 | 328 | #define CONFIG_SYS_DTT_HYSTERESIS 3 |
330 | #define CONFIG_SYS_DTT_BUS_NUM (2) | 329 | #define CONFIG_SYS_DTT_BUS_NUM (2) |
331 | 330 | ||
332 | #if defined(CONFIG_PCI) | 331 | #if defined(CONFIG_PCI) |
333 | #define CONFIG_CMD_PCI | 332 | #define CONFIG_CMD_PCI |
334 | #endif | 333 | #endif |
335 | 334 | ||
336 | #if defined(CFG_RAMBOOT) | 335 | #if defined(CFG_RAMBOOT) |
337 | #undef CONFIG_CMD_SAVEENV | 336 | #undef CONFIG_CMD_SAVEENV |
338 | #undef CONFIG_CMD_LOADS | 337 | #undef CONFIG_CMD_LOADS |
339 | #endif | 338 | #endif |
340 | 339 | ||
341 | /* | 340 | /* |
342 | * For booting Linux, the board info and command line data | 341 | * For booting Linux, the board info and command line data |
343 | * have to be in the first 8 MB of memory, since this is | 342 | * have to be in the first 8 MB of memory, since this is |
344 | * the maximum mapped by the Linux kernel during initialization. | 343 | * the maximum mapped by the Linux kernel during initialization. |
345 | */ | 344 | */ |
346 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ | 345 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ |
347 | 346 | ||
348 | /* | 347 | /* |
349 | * Core HID Setup | 348 | * Core HID Setup |
350 | */ | 349 | */ |
351 | #define CONFIG_SYS_HID0_INIT 0x000000000 | 350 | #define CONFIG_SYS_HID0_INIT 0x000000000 |
352 | #define CONFIG_SYS_HID0_FINAL HID0_ENABLE_MACHINE_CHECK | 351 | #define CONFIG_SYS_HID0_FINAL HID0_ENABLE_MACHINE_CHECK |
353 | #define CONFIG_SYS_HID2 HID2_HBE | 352 | #define CONFIG_SYS_HID2 HID2_HBE |
354 | 353 | ||
355 | /* | 354 | /* |
356 | * MMU Setup | 355 | * MMU Setup |
357 | */ | 356 | */ |
358 | 357 | ||
359 | #define CONFIG_HIGH_BATS 1 /* High BATs supported */ | 358 | #define CONFIG_HIGH_BATS 1 /* High BATs supported */ |
360 | 359 | ||
361 | /* DDR: cache cacheable */ | 360 | /* DDR: cache cacheable */ |
362 | #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | \ | 361 | #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | \ |
363 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 362 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
364 | #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 363 | #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
365 | #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L | 364 | #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L |
366 | #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U | 365 | #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U |
367 | 366 | ||
368 | /* IMMRBAR & PCI IO: cache-inhibit and guarded */ | 367 | /* IMMRBAR & PCI IO: cache-inhibit and guarded */ |
369 | #define CONFIG_SYS_IBAT1L (CONFIG_SYS_IMMR | BATL_PP_10 | \ | 368 | #define CONFIG_SYS_IBAT1L (CONFIG_SYS_IMMR | BATL_PP_10 | \ |
370 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 369 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
371 | #define CONFIG_SYS_IBAT1U (CONFIG_SYS_IMMR | BATU_BL_4M | BATU_VS | BATU_VP) | 370 | #define CONFIG_SYS_IBAT1U (CONFIG_SYS_IMMR | BATU_BL_4M | BATU_VS | BATU_VP) |
372 | #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L | 371 | #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L |
373 | #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U | 372 | #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U |
374 | 373 | ||
375 | /* PRIO1, PIGGY: icache cacheable, but dcache-inhibit and guarded */ | 374 | /* PRIO1, PIGGY: icache cacheable, but dcache-inhibit and guarded */ |
376 | #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PIGGY_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) | 375 | #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PIGGY_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) |
377 | #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PIGGY_BASE | BATU_BL_128M | BATU_VS | BATU_VP) | 376 | #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PIGGY_BASE | BATU_BL_128M | BATU_VS | BATU_VP) |
378 | #define CONFIG_SYS_DBAT2L (CONFIG_SYS_PIGGY_BASE | BATL_PP_10 | \ | 377 | #define CONFIG_SYS_DBAT2L (CONFIG_SYS_PIGGY_BASE | BATL_PP_10 | \ |
379 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 378 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
380 | #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U | 379 | #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U |
381 | 380 | ||
382 | /* FLASH: icache cacheable, but dcache-inhibit and guarded */ | 381 | /* FLASH: icache cacheable, but dcache-inhibit and guarded */ |
383 | #define CONFIG_SYS_IBAT3L (CONFIG_SYS_FLASH_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) | 382 | #define CONFIG_SYS_IBAT3L (CONFIG_SYS_FLASH_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) |
384 | #define CONFIG_SYS_IBAT3U (CONFIG_SYS_FLASH_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 383 | #define CONFIG_SYS_IBAT3U (CONFIG_SYS_FLASH_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
385 | #define CONFIG_SYS_DBAT3L (CONFIG_SYS_FLASH_BASE | BATL_PP_10 | \ | 384 | #define CONFIG_SYS_DBAT3L (CONFIG_SYS_FLASH_BASE | BATL_PP_10 | \ |
386 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 385 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
387 | #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U | 386 | #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U |
388 | 387 | ||
389 | /* Stack in dcache: cacheable, no memory coherence */ | 388 | /* Stack in dcache: cacheable, no memory coherence */ |
390 | #define CONFIG_SYS_IBAT4L (CONFIG_SYS_INIT_RAM_ADDR | BATL_PP_10) | 389 | #define CONFIG_SYS_IBAT4L (CONFIG_SYS_INIT_RAM_ADDR | BATL_PP_10) |
391 | #define CONFIG_SYS_IBAT4U (CONFIG_SYS_INIT_RAM_ADDR | BATU_BL_128K | BATU_VS | BATU_VP) | 390 | #define CONFIG_SYS_IBAT4U (CONFIG_SYS_INIT_RAM_ADDR | BATU_BL_128K | BATU_VS | BATU_VP) |
392 | #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L | 391 | #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L |
393 | #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U | 392 | #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U |
394 | 393 | ||
395 | /* PAXE: icache cacheable, but dcache-inhibit and guarded */ | 394 | /* PAXE: icache cacheable, but dcache-inhibit and guarded */ |
396 | #define CONFIG_SYS_IBAT5L (CONFIG_SYS_PAXE_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) | 395 | #define CONFIG_SYS_IBAT5L (CONFIG_SYS_PAXE_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) |
397 | #define CONFIG_SYS_IBAT5U (CONFIG_SYS_PAXE_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 396 | #define CONFIG_SYS_IBAT5U (CONFIG_SYS_PAXE_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
398 | #define CONFIG_SYS_DBAT5L (CONFIG_SYS_PAXE_BASE | BATL_PP_10 | \ | 397 | #define CONFIG_SYS_DBAT5L (CONFIG_SYS_PAXE_BASE | BATL_PP_10 | \ |
399 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 398 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
400 | #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U | 399 | #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U |
401 | 400 | ||
402 | #ifdef CONFIG_PCI | 401 | #ifdef CONFIG_PCI |
403 | /* PCI MEM space: cacheable */ | 402 | /* PCI MEM space: cacheable */ |
404 | #define CFG_IBAT6L (CFG_PCI1_MEM_PHYS | BATL_PP_10 | BATL_MEMCOHERENCE) | 403 | #define CFG_IBAT6L (CFG_PCI1_MEM_PHYS | BATL_PP_10 | BATL_MEMCOHERENCE) |
405 | #define CFG_IBAT6U (CFG_PCI1_MEM_PHYS | BATU_BL_256M | BATU_VS | BATU_VP) | 404 | #define CFG_IBAT6U (CFG_PCI1_MEM_PHYS | BATU_BL_256M | BATU_VS | BATU_VP) |
406 | #define CFG_DBAT6L CFG_IBAT6L | 405 | #define CFG_DBAT6L CFG_IBAT6L |
407 | #define CFG_DBAT6U CFG_IBAT6U | 406 | #define CFG_DBAT6U CFG_IBAT6U |
408 | /* PCI MMIO space: cache-inhibit and guarded */ | 407 | /* PCI MMIO space: cache-inhibit and guarded */ |
409 | #define CFG_IBAT7L (CFG_PCI1_MMIO_PHYS | BATL_PP_10 | \ | 408 | #define CFG_IBAT7L (CFG_PCI1_MMIO_PHYS | BATL_PP_10 | \ |
410 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 409 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
411 | #define CFG_IBAT7U (CFG_PCI1_MMIO_PHYS | BATU_BL_256M | BATU_VS | BATU_VP) | 410 | #define CFG_IBAT7U (CFG_PCI1_MMIO_PHYS | BATU_BL_256M | BATU_VS | BATU_VP) |
412 | #define CFG_DBAT7L CFG_IBAT7L | 411 | #define CFG_DBAT7L CFG_IBAT7L |
413 | #define CFG_DBAT7U CFG_IBAT7U | 412 | #define CFG_DBAT7U CFG_IBAT7U |
414 | #else /* CONFIG_PCI */ | 413 | #else /* CONFIG_PCI */ |
415 | #define CONFIG_SYS_IBAT6L (0) | 414 | #define CONFIG_SYS_IBAT6L (0) |
416 | #define CONFIG_SYS_IBAT6U (0) | 415 | #define CONFIG_SYS_IBAT6U (0) |
417 | #define CONFIG_SYS_IBAT7L (0) | 416 | #define CONFIG_SYS_IBAT7L (0) |
418 | #define CONFIG_SYS_IBAT7U (0) | 417 | #define CONFIG_SYS_IBAT7U (0) |
419 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L | 418 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L |
420 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U | 419 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U |
421 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L | 420 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L |
422 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U | 421 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U |
423 | #endif /* CONFIG_PCI */ | 422 | #endif /* CONFIG_PCI */ |
424 | 423 | ||
425 | /* | 424 | /* |
426 | * Internal Definitions | 425 | * Internal Definitions |
427 | * | 426 | * |
428 | * Boot Flags | 427 | * Boot Flags |
429 | */ | 428 | */ |
430 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 429 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
431 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 430 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
432 | 431 | ||
433 | #define BOOTFLASH_START F0000000 | 432 | #define BOOTFLASH_START F0000000 |
434 | 433 | ||
435 | #define CONFIG_PRAM 512 /* protected RAM [KBytes] */ | 434 | #define CONFIG_PRAM 512 /* protected RAM [KBytes] */ |
436 | 435 | ||
437 | #define MTDIDS_DEFAULT "nor0=app" | 436 | #define MTDIDS_DEFAULT "nor0=app" |
438 | #define MTDPARTS_DEFAULT \ | 437 | #define MTDPARTS_DEFAULT \ |
439 | "mtdparts=app:256k(u-boot),128k(env),128k(envred)," \ | 438 | "mtdparts=app:256k(u-boot),128k(env),128k(envred)," \ |
440 | "1536k(esw0),8704k(rootfs0),1536k(esw1),2432k(rootfs1),640k(var),768k(cfg)" | 439 | "1536k(esw0),8704k(rootfs0),1536k(esw1),2432k(rootfs1),640k(var),768k(cfg)" |
441 | 440 | ||
442 | /* | 441 | /* |
443 | * Environment Configuration | 442 | * Environment Configuration |
444 | */ | 443 | */ |
445 | #define CONFIG_ENV_OVERWRITE | 444 | #define CONFIG_ENV_OVERWRITE |
446 | #ifndef CONFIG_KM_DEF_ENV /* if not set by keymile-common.h */ | 445 | #ifndef CONFIG_KM_DEF_ENV /* if not set by keymile-common.h */ |
447 | #define CONFIG_KM_DEF_ENV "km-common=empty\0" | 446 | #define CONFIG_KM_DEF_ENV "km-common=empty\0" |
448 | #endif | 447 | #endif |
449 | 448 | ||
450 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 449 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
451 | CONFIG_KM_DEF_ENV \ | 450 | CONFIG_KM_DEF_ENV \ |
452 | "rootpath=/opt/eldk/ppc_82xx\0" \ | 451 | "rootpath=/opt/eldk/ppc_82xx\0" \ |
453 | "addcon=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\ | 452 | "addcon=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\ |
454 | "ramdisk_file=/tftpboot/kmeter1/uRamdisk\0" \ | 453 | "ramdisk_file=/tftpboot/kmeter1/uRamdisk\0" \ |
455 | "loadram=tftp ${ramdisk_addr_r} ${ramdisk_file}\0" \ | 454 | "loadram=tftp ${ramdisk_addr_r} ${ramdisk_file}\0" \ |
456 | "loadfdt=tftp ${fdt_addr_r} ${fdt_file}\0" \ | 455 | "loadfdt=tftp ${fdt_addr_r} ${fdt_file}\0" \ |
457 | "loadkernel=tftp ${kernel_addr_r} ${bootfile}\0" \ | 456 | "loadkernel=tftp ${kernel_addr_r} ${bootfile}\0" \ |
458 | "unlock=yes\0" \ | 457 | "unlock=yes\0" \ |
459 | "fdt_addr=F0080000\0" \ | 458 | "fdt_addr=F0080000\0" \ |
460 | "kernel_addr=F00a0000\0" \ | 459 | "kernel_addr=F00a0000\0" \ |
461 | "ramdisk_addr=F03a0000\0" \ | 460 | "ramdisk_addr=F03a0000\0" \ |
462 | "ramdisk_addr_r=F10000\0" \ | 461 | "ramdisk_addr_r=F10000\0" \ |
463 | "EEprom_ivm=pca9547:70:9\0" \ | 462 | "EEprom_ivm=pca9547:70:9\0" \ |
464 | "dtt_bus=pca9547:70:a\0" \ | 463 | "dtt_bus=pca9547:70:a\0" \ |
465 | "mtdids=nor0=app \0" \ | 464 | "mtdids=nor0=app \0" \ |
466 | "mtdparts=" MK_STR(MTDPARTS_DEFAULT) "\0" \ | 465 | "mtdparts=" MK_STR(MTDPARTS_DEFAULT) "\0" \ |
467 | "" | 466 | "" |
468 | 467 | ||
469 | #if defined(CONFIG_UEC_ETH) | 468 | #if defined(CONFIG_UEC_ETH) |
470 | #define CONFIG_HAS_ETH0 | 469 | #define CONFIG_HAS_ETH0 |
471 | #endif | 470 | #endif |
472 | 471 | ||
473 | #endif /* __CONFIG_H */ | 472 | #endif /* __CONFIG_H */ |
474 | 473 |
include/configs/korat.h
1 | /* | 1 | /* |
2 | * (C) Copyright 2007-2009 | 2 | * (C) Copyright 2007-2009 |
3 | * Larry Johnson, lrj@acm.org | 3 | * Larry Johnson, lrj@acm.org |
4 | * | 4 | * |
5 | * (C) Copyright 2006-2007 | 5 | * (C) Copyright 2006-2007 |
6 | * Stefan Roese, DENX Software Engineering, sr@denx.de. | 6 | * Stefan Roese, DENX Software Engineering, sr@denx.de. |
7 | * | 7 | * |
8 | * (C) Copyright 2006 | 8 | * (C) Copyright 2006 |
9 | * Jacqueline Pira-Ferriol, AMCC/IBM, jpira-ferriol@fr.ibm.com | 9 | * Jacqueline Pira-Ferriol, AMCC/IBM, jpira-ferriol@fr.ibm.com |
10 | * Alain Saurel, AMCC/IBM, alain.saurel@fr.ibm.com | 10 | * Alain Saurel, AMCC/IBM, alain.saurel@fr.ibm.com |
11 | * | 11 | * |
12 | * This program is free software; you can redistribute it and/or | 12 | * This program is free software; you can redistribute it and/or |
13 | * modify it under the terms of the GNU General Public License as | 13 | * modify it under the terms of the GNU General Public License as |
14 | * published by the Free Software Foundation; either version 2 of | 14 | * published by the Free Software Foundation; either version 2 of |
15 | * the License, or (at your option) any later version. | 15 | * the License, or (at your option) any later version. |
16 | * | 16 | * |
17 | * This program is distributed in the hope that it will be useful, | 17 | * This program is distributed in the hope that it will be useful, |
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 | * GNU General Public License for more details. | 20 | * GNU General Public License for more details. |
21 | * | 21 | * |
22 | * You should have received a copy of the GNU General Public License | 22 | * You should have received a copy of the GNU General Public License |
23 | * along with this program; if not, write to the Free Software | 23 | * along with this program; if not, write to the Free Software |
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
25 | * MA 02111-1307 USA | 25 | * MA 02111-1307 USA |
26 | */ | 26 | */ |
27 | 27 | ||
28 | /* | 28 | /* |
29 | * korat.h - configuration for Korat board | 29 | * korat.h - configuration for Korat board |
30 | */ | 30 | */ |
31 | #ifndef __CONFIG_H | 31 | #ifndef __CONFIG_H |
32 | #define __CONFIG_H | 32 | #define __CONFIG_H |
33 | 33 | ||
34 | /* | 34 | /* |
35 | * High Level Configuration Options | 35 | * High Level Configuration Options |
36 | */ | 36 | */ |
37 | #define CONFIG_440EPX 1 /* Specific PPC440EPx */ | 37 | #define CONFIG_440EPX 1 /* Specific PPC440EPx */ |
38 | #define CONFIG_4xx 1 /* ... PPC4xx family */ | 38 | #define CONFIG_4xx 1 /* ... PPC4xx family */ |
39 | #define CONFIG_SYS_CLK_FREQ 33333333 | 39 | #define CONFIG_SYS_CLK_FREQ 33333333 |
40 | 40 | ||
41 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */ | 41 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */ |
42 | #define CONFIG_MISC_INIT_R 1 /* Call misc_init_r */ | 42 | #define CONFIG_MISC_INIT_R 1 /* Call misc_init_r */ |
43 | 43 | ||
44 | /* | 44 | /* |
45 | * Manufacturer's information serial EEPROM parameters | 45 | * Manufacturer's information serial EEPROM parameters |
46 | */ | 46 | */ |
47 | #define MAN_DATA_EEPROM_ADDR 0x53 /* EEPROM I2C address */ | 47 | #define MAN_DATA_EEPROM_ADDR 0x53 /* EEPROM I2C address */ |
48 | #define MAN_INFO_FIELD 2 | 48 | #define MAN_INFO_FIELD 2 |
49 | #define MAN_INFO_LENGTH 9 | 49 | #define MAN_INFO_LENGTH 9 |
50 | #define MAN_MAC_ADDR_FIELD 3 | 50 | #define MAN_MAC_ADDR_FIELD 3 |
51 | #define MAN_MAC_ADDR_LENGTH 12 | 51 | #define MAN_MAC_ADDR_LENGTH 12 |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * Base addresses -- Note these are effective addresses where the actual | 54 | * Base addresses -- Note these are effective addresses where the actual |
55 | * resources get mapped (not physical addresses). | 55 | * resources get mapped (not physical addresses). |
56 | */ | 56 | */ |
57 | #define CONFIG_SYS_MONITOR_LEN (384 * 1024) /* Reserve 384 kiB for Monitor */ | 57 | #define CONFIG_SYS_MONITOR_LEN (384 * 1024) /* Reserve 384 kiB for Monitor */ |
58 | #define CONFIG_SYS_MALLOC_LEN (256 * 1024) /* Reserve 256 kiB for malloc() */ | 58 | #define CONFIG_SYS_MALLOC_LEN (256 * 1024) /* Reserve 256 kiB for malloc() */ |
59 | 59 | ||
60 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 /* _must_ be 0 */ | 60 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 /* _must_ be 0 */ |
61 | #define CONFIG_SYS_FLASH0_SIZE 0x01000000 | 61 | #define CONFIG_SYS_FLASH0_SIZE 0x01000000 |
62 | #define CONFIG_SYS_FLASH0_ADDR (-CONFIG_SYS_FLASH0_SIZE) | 62 | #define CONFIG_SYS_FLASH0_ADDR (-CONFIG_SYS_FLASH0_SIZE) |
63 | #define CONFIG_SYS_FLASH1_TOP 0xF8000000 | 63 | #define CONFIG_SYS_FLASH1_TOP 0xF8000000 |
64 | #define CONFIG_SYS_FLASH1_MAX_SIZE 0x08000000 | 64 | #define CONFIG_SYS_FLASH1_MAX_SIZE 0x08000000 |
65 | #define CONFIG_SYS_FLASH1_ADDR (CONFIG_SYS_FLASH1_TOP - CONFIG_SYS_FLASH1_MAX_SIZE) | 65 | #define CONFIG_SYS_FLASH1_ADDR (CONFIG_SYS_FLASH1_TOP - CONFIG_SYS_FLASH1_MAX_SIZE) |
66 | #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_FLASH1_ADDR /* start of FLASH */ | 66 | #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_FLASH1_ADDR /* start of FLASH */ |
67 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE | 67 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE |
68 | #define CONFIG_SYS_OCM_BASE 0xe0010000 /* ocm */ | 68 | #define CONFIG_SYS_OCM_BASE 0xe0010000 /* ocm */ |
69 | #define CONFIG_SYS_OCM_DATA_ADDR CONFIG_SYS_OCM_BASE | 69 | #define CONFIG_SYS_OCM_DATA_ADDR CONFIG_SYS_OCM_BASE |
70 | #define CONFIG_SYS_PCI_BASE 0xe0000000 /* Internal PCI regs */ | 70 | #define CONFIG_SYS_PCI_BASE 0xe0000000 /* Internal PCI regs */ |
71 | #define CONFIG_SYS_PCI_MEMBASE 0x80000000 /* mapped pci memory */ | 71 | #define CONFIG_SYS_PCI_MEMBASE 0x80000000 /* mapped pci memory */ |
72 | 72 | ||
73 | /* Don't change either of these */ | 73 | /* Don't change either of these */ |
74 | #define CONFIG_SYS_PERIPHERAL_BASE 0xef600000 /* internal peripherals */ | 74 | #define CONFIG_SYS_PERIPHERAL_BASE 0xef600000 /* internal peripherals */ |
75 | 75 | ||
76 | #define CONFIG_SYS_USB2D0_BASE 0xe0000100 | 76 | #define CONFIG_SYS_USB2D0_BASE 0xe0000100 |
77 | #define CONFIG_SYS_USB_DEVICE 0xe0000000 | 77 | #define CONFIG_SYS_USB_DEVICE 0xe0000000 |
78 | #define CONFIG_SYS_USB_HOST 0xe0000400 | 78 | #define CONFIG_SYS_USB_HOST 0xe0000400 |
79 | #define CONFIG_SYS_CPLD_BASE 0xc0000000 | 79 | #define CONFIG_SYS_CPLD_BASE 0xc0000000 |
80 | 80 | ||
81 | /* | 81 | /* |
82 | * Initial RAM & stack pointer | 82 | * Initial RAM & stack pointer |
83 | */ | 83 | */ |
84 | /* 440EPx has 16KB of internal SRAM, so no need for D-Cache */ | 84 | /* 440EPx has 16KB of internal SRAM, so no need for D-Cache */ |
85 | #undef CONFIG_SYS_INIT_RAM_DCACHE | 85 | #undef CONFIG_SYS_INIT_RAM_DCACHE |
86 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_OCM_BASE /* OCM */ | 86 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_OCM_BASE /* OCM */ |
87 | #define CONFIG_SYS_INIT_RAM_END (4 << 10) | 87 | #define CONFIG_SYS_INIT_RAM_END (4 << 10) |
88 | #define CONFIG_SYS_GBL_DATA_SIZE 256 /* num bytes initial data */ | 88 | #define CONFIG_SYS_GBL_DATA_SIZE 256 /* num bytes initial data */ |
89 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 89 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
90 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_POST_WORD_ADDR | 90 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_POST_WORD_ADDR |
91 | 91 | ||
92 | /* | 92 | /* |
93 | * Serial Port | 93 | * Serial Port |
94 | */ | 94 | */ |
95 | #define CONFIG_SYS_EXT_SERIAL_CLOCK 11059200 /* ext. 11.059MHz clk */ | 95 | #define CONFIG_SYS_EXT_SERIAL_CLOCK 11059200 /* ext. 11.059MHz clk */ |
96 | #define CONFIG_BAUDRATE 115200 | 96 | #define CONFIG_BAUDRATE 115200 |
97 | #define CONFIG_SERIAL_MULTI 1 | 97 | #define CONFIG_SERIAL_MULTI 1 |
98 | /* define this if you want console on UART1 */ | 98 | /* define this if you want console on UART1 */ |
99 | #undef CONFIG_UART1_CONSOLE | 99 | #undef CONFIG_UART1_CONSOLE |
100 | 100 | ||
101 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 101 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
102 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200} | 102 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200} |
103 | 103 | ||
104 | /* | 104 | /* |
105 | * Environment | 105 | * Environment |
106 | */ | 106 | */ |
107 | #define CONFIG_ENV_IS_IN_FLASH 1 /* use FLASH for environ vars */ | 107 | #define CONFIG_ENV_IS_IN_FLASH 1 /* use FLASH for environ vars */ |
108 | 108 | ||
109 | /* | 109 | /* |
110 | * FLASH related | 110 | * FLASH related |
111 | */ | 111 | */ |
112 | #define CONFIG_SYS_FLASH_CFI /* The flash is CFI compatible */ | 112 | #define CONFIG_SYS_FLASH_CFI /* The flash is CFI compatible */ |
113 | #define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver */ | 113 | #define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver */ |
114 | #define CONFIG_FLASH_CFI_LEGACY /* Allow hard-coded config for FLASH0 */ | 114 | #define CONFIG_FLASH_CFI_LEGACY /* Allow hard-coded config for FLASH0 */ |
115 | 115 | ||
116 | #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH1_ADDR, CONFIG_SYS_FLASH0_ADDR } | 116 | #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH1_ADDR, CONFIG_SYS_FLASH0_ADDR } |
117 | 117 | ||
118 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max number of memory banks */ | 118 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max number of memory banks */ |
119 | #define CONFIG_SYS_MAX_FLASH_SECT 1024 /* max number of sectors on one chip */ | 119 | #define CONFIG_SYS_MAX_FLASH_SECT 1024 /* max number of sectors on one chip */ |
120 | 120 | ||
121 | #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ | 121 | #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ |
122 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ | 122 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ |
123 | 123 | ||
124 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */ | 124 | #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */ |
125 | #define CONFIG_SYS_FLASH_PROTECTION 1 /* use hardware flash protection */ | 125 | #define CONFIG_SYS_FLASH_PROTECTION 1 /* use hardware flash protection */ |
126 | 126 | ||
127 | #define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */ | 127 | #define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */ |
128 | #define CONFIG_SYS_FLASH_QUIET_TEST 1 /* don't warn upon unknown flash */ | 128 | #define CONFIG_SYS_FLASH_QUIET_TEST 1 /* don't warn upon unknown flash */ |
129 | 129 | ||
130 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* size of one complete sector */ | 130 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* size of one complete sector */ |
131 | #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH1_TOP - CONFIG_ENV_SECT_SIZE) | 131 | #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH1_TOP - CONFIG_ENV_SECT_SIZE) |
132 | #define CONFIG_ENV_SIZE 0x2000 /* Total Size of Environment Sector */ | 132 | #define CONFIG_ENV_SIZE 0x2000 /* Total Size of Environment Sector */ |
133 | 133 | ||
134 | /* Address and size of Redundant Environment Sector */ | 134 | /* Address and size of Redundant Environment Sector */ |
135 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR - CONFIG_ENV_SECT_SIZE) | 135 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR - CONFIG_ENV_SECT_SIZE) |
136 | #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE | 136 | #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE |
137 | 137 | ||
138 | /* | 138 | /* |
139 | * DDR SDRAM | 139 | * DDR SDRAM |
140 | */ | 140 | */ |
141 | #define CONFIG_DDR_DATA_EYE /* use DDR2 optimization */ | 141 | #define CONFIG_DDR_DATA_EYE /* use DDR2 optimization */ |
142 | #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for setup */ | 142 | #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for setup */ |
143 | #define CONFIG_ZERO_SDRAM /* Zero SDRAM after setup */ | 143 | #define CONFIG_ZERO_SDRAM /* Zero SDRAM after setup */ |
144 | #define CONFIG_DDR_ECC /* Use ECC when available */ | 144 | #define CONFIG_DDR_ECC /* Use ECC when available */ |
145 | #define SPD_EEPROM_ADDRESS {0x50} | 145 | #define SPD_EEPROM_ADDRESS {0x50} |
146 | #define CONFIG_PROG_SDRAM_TLB | 146 | #define CONFIG_PROG_SDRAM_TLB |
147 | #define CONFIG_SYS_MEM_TOP_HIDE (4 << 10) /* don't use last 4 KiB as */ | 147 | #define CONFIG_SYS_MEM_TOP_HIDE (4 << 10) /* don't use last 4 KiB as */ |
148 | /* per 440EPx Errata CHIP_11 */ | 148 | /* per 440EPx Errata CHIP_11 */ |
149 | 149 | ||
150 | /* | 150 | /* |
151 | * I2C | 151 | * I2C |
152 | */ | 152 | */ |
153 | #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ | 153 | #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ |
154 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ | 154 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ |
155 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ | 155 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ |
156 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 156 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
157 | 157 | ||
158 | #define CONFIG_SYS_I2C_MULTI_EEPROMS | 158 | #define CONFIG_SYS_I2C_MULTI_EEPROMS |
159 | #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1) | 159 | #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1) |
160 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 | 160 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 |
161 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 | 161 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 |
162 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 | 162 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 |
163 | 163 | ||
164 | /* I2C RTC */ | 164 | /* I2C RTC */ |
165 | #define CONFIG_RTC_M41T60 1 | 165 | #define CONFIG_RTC_M41T60 1 |
166 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 | 166 | #define CONFIG_SYS_I2C_RTC_ADDR 0x68 |
167 | 167 | ||
168 | /* I2C SYSMON (LM73) */ | 168 | /* I2C SYSMON (LM73) */ |
169 | #define CONFIG_DTT_LM73 1 /* National Semi's LM73 */ | 169 | #define CONFIG_DTT_LM73 1 /* National Semi's LM73 */ |
170 | #define CONFIG_DTT_SENSORS {2} /* Sensor addresses */ | 170 | #define CONFIG_DTT_SENSORS {2} /* Sensor addresses */ |
171 | #define CONFIG_SYS_DTT_MAX_TEMP 70 | 171 | #define CONFIG_SYS_DTT_MAX_TEMP 70 |
172 | #define CONFIG_SYS_DTT_MIN_TEMP -30 | 172 | #define CONFIG_SYS_DTT_MIN_TEMP -30 |
173 | 173 | ||
174 | #define CONFIG_PREBOOT "echo;" \ | 174 | #define CONFIG_PREBOOT "echo;" \ |
175 | "echo Type \\\"run flash_cf\\\" to mount from CompactFlash(R);" \ | 175 | "echo Type \\\"run flash_cf\\\" to mount from CompactFlash(R);" \ |
176 | "echo" | 176 | "echo" |
177 | 177 | ||
178 | #undef CONFIG_BOOTARGS | 178 | #undef CONFIG_BOOTARGS |
179 | 179 | ||
180 | /* Setup some board specific values for the default environment variables */ | 180 | /* Setup some board specific values for the default environment variables */ |
181 | #define CONFIG_HOSTNAME korat | 181 | #define CONFIG_HOSTNAME korat |
182 | 182 | ||
183 | /* Note: kernel_addr and ramdisk_addr assume that FLASH1 is 64 MiB. */ | 183 | /* Note: kernel_addr and ramdisk_addr assume that FLASH1 is 64 MiB. */ |
184 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 184 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
185 | "u_boot=korat/u-boot.bin\0" \ | 185 | "u_boot=korat/u-boot.bin\0" \ |
186 | "load=tftp 200000 ${u_boot}\0" \ | 186 | "load=tftp 200000 ${u_boot}\0" \ |
187 | "update=protect off F7F60000 F7FBFFFF;erase F7F60000 F7FBFFFF;" \ | 187 | "update=protect off F7F60000 F7FBFFFF;erase F7F60000 F7FBFFFF;" \ |
188 | "cp.b ${fileaddr} F7F60000 ${filesize};protect on " \ | 188 | "cp.b ${fileaddr} F7F60000 ${filesize};protect on " \ |
189 | "F7F60000 F7FBFFFF\0" \ | 189 | "F7F60000 F7FBFFFF\0" \ |
190 | "upd=run load update\0" \ | 190 | "upd=run load update\0" \ |
191 | "bootfile=korat/uImage\0" \ | 191 | "bootfile=korat/uImage\0" \ |
192 | "dtb=korat/korat.dtb\0" \ | 192 | "dtb=korat/korat.dtb\0" \ |
193 | "kernel_addr=F4000000\0" \ | 193 | "kernel_addr=F4000000\0" \ |
194 | "ramdisk_addr=F4400000\0" \ | 194 | "ramdisk_addr=F4400000\0" \ |
195 | "dtb_addr=F41E0000\0" \ | 195 | "dtb_addr=F41E0000\0" \ |
196 | "udl=tftp 200000 ${bootfile}; erase F4000000 F41DFFFF; " \ | 196 | "udl=tftp 200000 ${bootfile}; erase F4000000 F41DFFFF; " \ |
197 | "cp.b ${fileaddr} F4000000 ${filesize}\0" \ | 197 | "cp.b ${fileaddr} F4000000 ${filesize}\0" \ |
198 | "udd=tftp 200000 ${dtb}; erase F41E0000 F41FFFFF; " \ | 198 | "udd=tftp 200000 ${dtb}; erase F41E0000 F41FFFFF; " \ |
199 | "cp.b ${fileaddr} F41E0000 ${filesize}\0" \ | 199 | "cp.b ${fileaddr} F41E0000 ${filesize}\0" \ |
200 | "ll=setenv kernel_addr 200000; setenv dtb_addr 1000000; " \ | 200 | "ll=setenv kernel_addr 200000; setenv dtb_addr 1000000; " \ |
201 | "tftp ${kernel_addr} ${uImage}; tftp ${dtb_addr} " \ | 201 | "tftp ${kernel_addr} ${uImage}; tftp ${dtb_addr} " \ |
202 | "${dtb}\0" \ | 202 | "${dtb}\0" \ |
203 | "rd_size=73728\0" \ | 203 | "rd_size=73728\0" \ |
204 | "ramargs=setenv bootargs root=/dev/ram rw " \ | 204 | "ramargs=setenv bootargs root=/dev/ram rw " \ |
205 | "ramdisk_size=${rd_size}\0" \ | 205 | "ramdisk_size=${rd_size}\0" \ |
206 | "usbdev=sda1\0" \ | 206 | "usbdev=sda1\0" \ |
207 | "usbargs=setenv bootargs root=/dev/${usbdev} ro rootdelay=10\0" \ | 207 | "usbargs=setenv bootargs root=/dev/${usbdev} ro rootdelay=10\0" \ |
208 | "rootpath=/opt/eldk/ppc_4xxFP\0" \ | 208 | "rootpath=/opt/eldk/ppc_4xxFP\0" \ |
209 | "netdev=eth0\0" \ | 209 | "netdev=eth0\0" \ |
210 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ | 210 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
211 | "nfsroot=${serverip}:${rootpath}\0" \ | 211 | "nfsroot=${serverip}:${rootpath}\0" \ |
212 | "pciclk=33\0" \ | 212 | "pciclk=33\0" \ |
213 | "addide=setenv bootargs ${bootargs} ide=reverse " \ | 213 | "addide=setenv bootargs ${bootargs} ide=reverse " \ |
214 | "idebus=${pciclk}\0" \ | 214 | "idebus=${pciclk}\0" \ |
215 | "addip=setenv bootargs ${bootargs} " \ | 215 | "addip=setenv bootargs ${bootargs} " \ |
216 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ | 216 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ |
217 | ":${hostname}:${netdev}:off panic=1\0" \ | 217 | ":${hostname}:${netdev}:off panic=1\0" \ |
218 | "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\ | 218 | "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\ |
219 | "flash_cf=run usbargs addide addip addtty; " \ | 219 | "flash_cf=run usbargs addide addip addtty; " \ |
220 | "bootm ${kernel_addr} - ${dtb_addr}\0" \ | 220 | "bootm ${kernel_addr} - ${dtb_addr}\0" \ |
221 | "flash_nfs=run nfsargs addide addip addtty; " \ | 221 | "flash_nfs=run nfsargs addide addip addtty; " \ |
222 | "bootm ${kernel_addr} - ${dtb_addr}\0" \ | 222 | "bootm ${kernel_addr} - ${dtb_addr}\0" \ |
223 | "flash_self=run ramargs addip addtty; " \ | 223 | "flash_self=run ramargs addip addtty; " \ |
224 | "bootm ${kernel_addr} ${ramdisk_addr} ${dtb_addr}\0" \ | 224 | "bootm ${kernel_addr} ${ramdisk_addr} ${dtb_addr}\0" \ |
225 | "" | 225 | "" |
226 | 226 | ||
227 | #define CONFIG_BOOTCOMMAND "run flash_cf" | 227 | #define CONFIG_BOOTCOMMAND "run flash_cf" |
228 | 228 | ||
229 | #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ | 229 | #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ |
230 | 230 | ||
231 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ | 231 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
232 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ | 232 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
233 | 233 | ||
234 | #define CONFIG_PPC4xx_EMAC | 234 | #define CONFIG_PPC4xx_EMAC |
235 | #define CONFIG_IBM_EMAC4_V4 1 | 235 | #define CONFIG_IBM_EMAC4_V4 1 |
236 | #define CONFIG_MII 1 /* MII PHY management */ | 236 | #define CONFIG_MII 1 /* MII PHY management */ |
237 | #define CONFIG_PHY_ADDR 2 /* PHY address, See schematics */ | 237 | #define CONFIG_PHY_ADDR 2 /* PHY address, See schematics */ |
238 | #define CONFIG_PHY_DYNAMIC_ANEG 1 | 238 | #define CONFIG_PHY_DYNAMIC_ANEG 1 |
239 | 239 | ||
240 | #undef CONFIG_PHY_RESET /* Don't do software PHY reset */ | 240 | #undef CONFIG_PHY_RESET /* Don't do software PHY reset */ |
241 | #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */ | 241 | #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */ |
242 | 242 | ||
243 | #define CONFIG_HAS_ETH0 | 243 | #define CONFIG_HAS_ETH0 |
244 | #define CONFIG_SYS_RX_ETH_BUFFER 32 /* Number of ethernet rx */ | 244 | #define CONFIG_SYS_RX_ETH_BUFFER 32 /* Number of ethernet rx */ |
245 | /* buffers & descriptors */ | 245 | /* buffers & descriptors */ |
246 | #define CONFIG_NET_MULTI 1 | 246 | #define CONFIG_NET_MULTI 1 |
247 | #define CONFIG_HAS_ETH1 1 /* add support for "eth1addr" */ | 247 | #define CONFIG_HAS_ETH1 1 /* add support for "eth1addr" */ |
248 | #define CONFIG_PHY1_ADDR 3 | 248 | #define CONFIG_PHY1_ADDR 3 |
249 | 249 | ||
250 | /* USB */ | 250 | /* USB */ |
251 | #define CONFIG_USB_OHCI | 251 | #define CONFIG_USB_OHCI |
252 | #define CONFIG_USB_STORAGE | 252 | #define CONFIG_USB_STORAGE |
253 | 253 | ||
254 | /* Comment this out to enable USB 1.1 device */ | 254 | /* Comment this out to enable USB 1.1 device */ |
255 | #define USB_2_0_DEVICE | 255 | #define USB_2_0_DEVICE |
256 | 256 | ||
257 | /* Partitions */ | 257 | /* Partitions */ |
258 | #define CONFIG_MAC_PARTITION | 258 | #define CONFIG_MAC_PARTITION |
259 | #define CONFIG_DOS_PARTITION | 259 | #define CONFIG_DOS_PARTITION |
260 | #define CONFIG_ISO_PARTITION | 260 | #define CONFIG_ISO_PARTITION |
261 | 261 | ||
262 | /* | 262 | /* |
263 | * BOOTP options | 263 | * BOOTP options |
264 | */ | 264 | */ |
265 | #define CONFIG_BOOTP_BOOTFILESIZE | 265 | #define CONFIG_BOOTP_BOOTFILESIZE |
266 | #define CONFIG_BOOTP_BOOTPATH | 266 | #define CONFIG_BOOTP_BOOTPATH |
267 | #define CONFIG_BOOTP_GATEWAY | 267 | #define CONFIG_BOOTP_GATEWAY |
268 | #define CONFIG_BOOTP_HOSTNAME | 268 | #define CONFIG_BOOTP_HOSTNAME |
269 | #define CONFIG_BOOTP_SUBNETMASK | 269 | #define CONFIG_BOOTP_SUBNETMASK |
270 | 270 | ||
271 | /* | 271 | /* |
272 | * Command line configuration. | 272 | * Command line configuration. |
273 | */ | 273 | */ |
274 | #include <config_cmd_default.h> | 274 | #include <config_cmd_default.h> |
275 | 275 | ||
276 | #define CONFIG_CMD_ASKENV | 276 | #define CONFIG_CMD_ASKENV |
277 | #define CONFIG_CMD_DATE | 277 | #define CONFIG_CMD_DATE |
278 | #define CONFIG_CMD_DHCP | 278 | #define CONFIG_CMD_DHCP |
279 | #define CONFIG_CMD_DTT | 279 | #define CONFIG_CMD_DTT |
280 | #define CONFIG_CMD_DIAG | 280 | #define CONFIG_CMD_DIAG |
281 | #define CONFIG_CMD_EEPROM | 281 | #define CONFIG_CMD_EEPROM |
282 | #define CONFIG_CMD_ELF | 282 | #define CONFIG_CMD_ELF |
283 | #define CONFIG_CMD_FAT | 283 | #define CONFIG_CMD_FAT |
284 | #define CONFIG_CMD_I2C | 284 | #define CONFIG_CMD_I2C |
285 | #define CONFIG_I2C_CMD_TREE | ||
286 | #define CONFIG_CMD_IRQ | 285 | #define CONFIG_CMD_IRQ |
287 | #define CONFIG_CMD_MII | 286 | #define CONFIG_CMD_MII |
288 | #define CONFIG_CMD_NET | 287 | #define CONFIG_CMD_NET |
289 | #define CONFIG_CMD_NFS | 288 | #define CONFIG_CMD_NFS |
290 | #define CONFIG_CMD_PCI | 289 | #define CONFIG_CMD_PCI |
291 | #define CONFIG_CMD_PING | 290 | #define CONFIG_CMD_PING |
292 | #define CONFIG_CMD_REGINFO | 291 | #define CONFIG_CMD_REGINFO |
293 | #define CONFIG_CMD_SDRAM | 292 | #define CONFIG_CMD_SDRAM |
294 | #define CONFIG_CMD_USB | 293 | #define CONFIG_CMD_USB |
295 | 294 | ||
296 | /* POST support */ | 295 | /* POST support */ |
297 | #define CONFIG_POST (CONFIG_SYS_POST_CACHE | \ | 296 | #define CONFIG_POST (CONFIG_SYS_POST_CACHE | \ |
298 | CONFIG_SYS_POST_CPU | \ | 297 | CONFIG_SYS_POST_CPU | \ |
299 | CONFIG_SYS_POST_ECC | \ | 298 | CONFIG_SYS_POST_ECC | \ |
300 | CONFIG_SYS_POST_ETHER | \ | 299 | CONFIG_SYS_POST_ETHER | \ |
301 | CONFIG_SYS_POST_FPU | \ | 300 | CONFIG_SYS_POST_FPU | \ |
302 | CONFIG_SYS_POST_I2C | \ | 301 | CONFIG_SYS_POST_I2C | \ |
303 | CONFIG_SYS_POST_MEMORY | \ | 302 | CONFIG_SYS_POST_MEMORY | \ |
304 | CONFIG_SYS_POST_RTC | \ | 303 | CONFIG_SYS_POST_RTC | \ |
305 | CONFIG_SYS_POST_SPR | \ | 304 | CONFIG_SYS_POST_SPR | \ |
306 | CONFIG_SYS_POST_UART) | 305 | CONFIG_SYS_POST_UART) |
307 | 306 | ||
308 | #define CONFIG_SYS_POST_WORD_ADDR (CONFIG_SYS_GBL_DATA_OFFSET - 0x4) | 307 | #define CONFIG_SYS_POST_WORD_ADDR (CONFIG_SYS_GBL_DATA_OFFSET - 0x4) |
309 | #define CONFIG_LOGBUFFER | 308 | #define CONFIG_LOGBUFFER |
310 | #define CONFIG_SYS_POST_CACHE_ADDR 0xC8000000 /* free virtual address */ | 309 | #define CONFIG_SYS_POST_CACHE_ADDR 0xC8000000 /* free virtual address */ |
311 | 310 | ||
312 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV /* Otherwise it catches logbuffer as output */ | 311 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV /* Otherwise it catches logbuffer as output */ |
313 | 312 | ||
314 | #define CONFIG_SUPPORT_VFAT | 313 | #define CONFIG_SUPPORT_VFAT |
315 | 314 | ||
316 | /* | 315 | /* |
317 | * Miscellaneous configurable options | 316 | * Miscellaneous configurable options |
318 | */ | 317 | */ |
319 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 318 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
320 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | 319 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
321 | #if defined(CONFIG_CMD_KGDB) | 320 | #if defined(CONFIG_CMD_KGDB) |
322 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ | 321 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
323 | #else | 322 | #else |
324 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | 323 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
325 | #endif | 324 | #endif |
326 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) | 325 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) |
327 | /* Print Buffer Size */ | 326 | /* Print Buffer Size */ |
328 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 327 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
329 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | 328 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
330 | 329 | ||
331 | #define CONFIG_SYS_MEMTEST_START 0x0400000 /* memtest works on */ | 330 | #define CONFIG_SYS_MEMTEST_START 0x0400000 /* memtest works on */ |
332 | #define CONFIG_SYS_MEMTEST_END 0x0C00000 /* 4 ... 12 MB in DRAM */ | 331 | #define CONFIG_SYS_MEMTEST_END 0x0C00000 /* 4 ... 12 MB in DRAM */ |
333 | 332 | ||
334 | #define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */ | 333 | #define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */ |
335 | #define CONFIG_SYS_EXTBDINFO 1 /* To use extended board_into (bd_t) */ | 334 | #define CONFIG_SYS_EXTBDINFO 1 /* To use extended board_into (bd_t) */ |
336 | 335 | ||
337 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ | 336 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ |
338 | 337 | ||
339 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ | 338 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ |
340 | #define CONFIG_LOOPW 1 /* enable loopw command */ | 339 | #define CONFIG_LOOPW 1 /* enable loopw command */ |
341 | #define CONFIG_MX_CYCLIC 1 /* enable mdc/mwc commands */ | 340 | #define CONFIG_MX_CYCLIC 1 /* enable mdc/mwc commands */ |
342 | #define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */ | 341 | #define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */ |
343 | #define CONFIG_VERSION_VARIABLE 1 /* include version env variable */ | 342 | #define CONFIG_VERSION_VARIABLE 1 /* include version env variable */ |
344 | 343 | ||
345 | /* | 344 | /* |
346 | * Korat-specific options | 345 | * Korat-specific options |
347 | */ | 346 | */ |
348 | #define CONFIG_SYS_KORAT_MAN_RESET_MS 10000 /* timeout for manufacturer reset */ | 347 | #define CONFIG_SYS_KORAT_MAN_RESET_MS 10000 /* timeout for manufacturer reset */ |
349 | 348 | ||
350 | /* | 349 | /* |
351 | * PCI stuff | 350 | * PCI stuff |
352 | */ | 351 | */ |
353 | /* General PCI */ | 352 | /* General PCI */ |
354 | #define CONFIG_PCI /* include pci support */ | 353 | #define CONFIG_PCI /* include pci support */ |
355 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ | 354 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ |
356 | #define CONFIG_SYS_PCI_CACHE_LINE_SIZE 0 /* to avoid problems with PNP */ | 355 | #define CONFIG_SYS_PCI_CACHE_LINE_SIZE 0 /* to avoid problems with PNP */ |
357 | #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ | 356 | #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ |
358 | #define CONFIG_SYS_PCI_TARGBASE 0x80000000 /* PCIaddr mapped to */ | 357 | #define CONFIG_SYS_PCI_TARGBASE 0x80000000 /* PCIaddr mapped to */ |
359 | /* CONFIG_SYS_PCI_MEMBASE */ | 358 | /* CONFIG_SYS_PCI_MEMBASE */ |
360 | /* Board-specific PCI */ | 359 | /* Board-specific PCI */ |
361 | #define CONFIG_SYS_PCI_TARGET_INIT | 360 | #define CONFIG_SYS_PCI_TARGET_INIT |
362 | #define CONFIG_SYS_PCI_MASTER_INIT | 361 | #define CONFIG_SYS_PCI_MASTER_INIT |
363 | 362 | ||
364 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x10e8 /* AMCC */ | 363 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x10e8 /* AMCC */ |
365 | #define CONFIG_SYS_PCI_SUBSYS_ID 0xcafe /* Whatever */ | 364 | #define CONFIG_SYS_PCI_SUBSYS_ID 0xcafe /* Whatever */ |
366 | 365 | ||
367 | /* | 366 | /* |
368 | * For booting Linux, the board info and command line data have to be in the | 367 | * For booting Linux, the board info and command line data have to be in the |
369 | * first 8 MB of memory, since this is the maximum mapped by the Linux kernel | 368 | * first 8 MB of memory, since this is the maximum mapped by the Linux kernel |
370 | * during initialization. | 369 | * during initialization. |
371 | */ | 370 | */ |
372 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ | 371 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ |
373 | 372 | ||
374 | /* | 373 | /* |
375 | * External Bus Controller (EBC) Setup | 374 | * External Bus Controller (EBC) Setup |
376 | */ | 375 | */ |
377 | 376 | ||
378 | /* Memory Bank 0 (NOR-FLASH) initialization */ | 377 | /* Memory Bank 0 (NOR-FLASH) initialization */ |
379 | #if CONFIG_SYS_FLASH0_SIZE == 0x01000000 | 378 | #if CONFIG_SYS_FLASH0_SIZE == 0x01000000 |
380 | #define CONFIG_SYS_EBC_PB0AP 0x04017300 | 379 | #define CONFIG_SYS_EBC_PB0AP 0x04017300 |
381 | #define CONFIG_SYS_EBC_PB0CR (CONFIG_SYS_FLASH0_ADDR | 0x0009A000) | 380 | #define CONFIG_SYS_EBC_PB0CR (CONFIG_SYS_FLASH0_ADDR | 0x0009A000) |
382 | #elif CONFIG_SYS_FLASH0_SIZE == 0x04000000 | 381 | #elif CONFIG_SYS_FLASH0_SIZE == 0x04000000 |
383 | #define CONFIG_SYS_EBC_PB0AP 0x04017300 | 382 | #define CONFIG_SYS_EBC_PB0AP 0x04017300 |
384 | #define CONFIG_SYS_EBC_PB0CR (CONFIG_SYS_FLASH0_ADDR | 0x000DA000) | 383 | #define CONFIG_SYS_EBC_PB0CR (CONFIG_SYS_FLASH0_ADDR | 0x000DA000) |
385 | #else | 384 | #else |
386 | #error Unable to configure chip select for current CONFIG_SYS_FLASH0_SIZE | 385 | #error Unable to configure chip select for current CONFIG_SYS_FLASH0_SIZE |
387 | #endif | 386 | #endif |
388 | 387 | ||
389 | /* Memory Bank 1 (NOR-FLASH) initialization */ | 388 | /* Memory Bank 1 (NOR-FLASH) initialization */ |
390 | #if CONFIG_SYS_FLASH1_MAX_SIZE == 0x08000000 | 389 | #if CONFIG_SYS_FLASH1_MAX_SIZE == 0x08000000 |
391 | #define CONFIG_SYS_EBC_PB1AP 0x04017300 | 390 | #define CONFIG_SYS_EBC_PB1AP 0x04017300 |
392 | #define CONFIG_SYS_EBC_PB1CR (CONFIG_SYS_FLASH1_ADDR | 0x000FA000) | 391 | #define CONFIG_SYS_EBC_PB1CR (CONFIG_SYS_FLASH1_ADDR | 0x000FA000) |
393 | #else | 392 | #else |
394 | #error Unable to configure chip select for current CONFIG_SYS_FLASH1_MAX_SIZE | 393 | #error Unable to configure chip select for current CONFIG_SYS_FLASH1_MAX_SIZE |
395 | #endif | 394 | #endif |
396 | 395 | ||
397 | /* Memory Bank 2 (CPLD) initialization */ | 396 | /* Memory Bank 2 (CPLD) initialization */ |
398 | #define CONFIG_SYS_EBC_PB2AP 0x04017300 | 397 | #define CONFIG_SYS_EBC_PB2AP 0x04017300 |
399 | #define CONFIG_SYS_EBC_PB2CR (CONFIG_SYS_CPLD_BASE | 0x00038000) | 398 | #define CONFIG_SYS_EBC_PB2CR (CONFIG_SYS_CPLD_BASE | 0x00038000) |
400 | 399 | ||
401 | /* | 400 | /* |
402 | * GPIO Setup | 401 | * GPIO Setup |
403 | * | 402 | * |
404 | * Korat GPIO usage: | 403 | * Korat GPIO usage: |
405 | * | 404 | * |
406 | * Init. | 405 | * Init. |
407 | * Pin Source I/O value Function | 406 | * Pin Source I/O value Function |
408 | * ------ ------ --- ----- --------------------------------- | 407 | * ------ ------ --- ----- --------------------------------- |
409 | * GPIO00 Alt1 I/O x PerAddr07 | 408 | * GPIO00 Alt1 I/O x PerAddr07 |
410 | * GPIO01 Alt1 I/O x PerAddr06 | 409 | * GPIO01 Alt1 I/O x PerAddr06 |
411 | * GPIO02 Alt1 I/O x PerAddr05 | 410 | * GPIO02 Alt1 I/O x PerAddr05 |
412 | * GPIO03 GPIO x x GPIO03 to expansion bus connector | 411 | * GPIO03 GPIO x x GPIO03 to expansion bus connector |
413 | * GPIO04 GPIO x x GPIO04 to expansion bus connector | 412 | * GPIO04 GPIO x x GPIO04 to expansion bus connector |
414 | * GPIO05 GPIO x x GPIO05 to expansion bus connector | 413 | * GPIO05 GPIO x x GPIO05 to expansion bus connector |
415 | * GPIO06 Alt1 O x PerCS1 (2nd NOR flash) | 414 | * GPIO06 Alt1 O x PerCS1 (2nd NOR flash) |
416 | * GPIO07 Alt1 O x PerCS2 (CPLD) | 415 | * GPIO07 Alt1 O x PerCS2 (CPLD) |
417 | * GPIO08 Alt1 O x PerCS3 to expansion bus connector | 416 | * GPIO08 Alt1 O x PerCS3 to expansion bus connector |
418 | * GPIO09 Alt1 O x PerCS4 to expansion bus connector | 417 | * GPIO09 Alt1 O x PerCS4 to expansion bus connector |
419 | * GPIO10 Alt1 O x PerCS5 to expansion bus connector | 418 | * GPIO10 Alt1 O x PerCS5 to expansion bus connector |
420 | * GPIO11 Alt1 I x PerErr | 419 | * GPIO11 Alt1 I x PerErr |
421 | * GPIO12 GPIO O 0 ATMega !Reset | 420 | * GPIO12 GPIO O 0 ATMega !Reset |
422 | * GPIO13 GPIO x x Test Point 2 (TP2) | 421 | * GPIO13 GPIO x x Test Point 2 (TP2) |
423 | * GPIO14 GPIO O 1 Write protect EEPROM #1 (0xA8) | 422 | * GPIO14 GPIO O 1 Write protect EEPROM #1 (0xA8) |
424 | * GPIO15 GPIO O 0 CPU Run LED !On | 423 | * GPIO15 GPIO O 0 CPU Run LED !On |
425 | * GPIO16 Alt1 O x GMC1TxD0 | 424 | * GPIO16 Alt1 O x GMC1TxD0 |
426 | * GPIO17 Alt1 O x GMC1TxD1 | 425 | * GPIO17 Alt1 O x GMC1TxD1 |
427 | * GPIO18 Alt1 O x GMC1TxD2 | 426 | * GPIO18 Alt1 O x GMC1TxD2 |
428 | * GPIO19 Alt1 O x GMC1TxD3 | 427 | * GPIO19 Alt1 O x GMC1TxD3 |
429 | * GPIO20 Alt1 I x RejectPkt0 | 428 | * GPIO20 Alt1 I x RejectPkt0 |
430 | * GPIO21 Alt1 I x RejectPkt1 | 429 | * GPIO21 Alt1 I x RejectPkt1 |
431 | * GPIO22 GPIO I x PGOOD_DDR | 430 | * GPIO22 GPIO I x PGOOD_DDR |
432 | * GPIO23 Alt1 O x SCPD0 | 431 | * GPIO23 Alt1 O x SCPD0 |
433 | * GPIO24 Alt1 O x GMC0TxD2 | 432 | * GPIO24 Alt1 O x GMC0TxD2 |
434 | * GPIO25 Alt1 O x GMC0TxD3 | 433 | * GPIO25 Alt1 O x GMC0TxD3 |
435 | * GPIO26 GPIO? I/O x IIC0SDA (selected in SDR0_PFC4) | 434 | * GPIO26 GPIO? I/O x IIC0SDA (selected in SDR0_PFC4) |
436 | * GPIO27 GPIO O 0 PHY #0 1000BASE-X select | 435 | * GPIO27 GPIO O 0 PHY #0 1000BASE-X select |
437 | * GPIO28 GPIO O 0 PHY #1 1000BASE-X select | 436 | * GPIO28 GPIO O 0 PHY #1 1000BASE-X select |
438 | * GPIO29 GPIO I x Test jumper !Present | 437 | * GPIO29 GPIO I x Test jumper !Present |
439 | * GPIO30 GPIO I x SFP module #0 !Present | 438 | * GPIO30 GPIO I x SFP module #0 !Present |
440 | * GPIO31 GPIO I x SFP module #1 !Present | 439 | * GPIO31 GPIO I x SFP module #1 !Present |
441 | * | 440 | * |
442 | * GPIO32 GPIO O 1 SFP module #0 Tx !Enable | 441 | * GPIO32 GPIO O 1 SFP module #0 Tx !Enable |
443 | * GPIO33 GPIO O 1 SFP module #1 Tx !Enable | 442 | * GPIO33 GPIO O 1 SFP module #1 Tx !Enable |
444 | * GPIO34 Alt2 I x !UART1_CTS | 443 | * GPIO34 Alt2 I x !UART1_CTS |
445 | * GPIO35 Alt2 O x !UART1_RTS | 444 | * GPIO35 Alt2 O x !UART1_RTS |
446 | * GPIO36 Alt1 I x !UART0_CTS | 445 | * GPIO36 Alt1 I x !UART0_CTS |
447 | * GPIO37 Alt1 O x !UART0_RTS | 446 | * GPIO37 Alt1 O x !UART0_RTS |
448 | * GPIO38 Alt2 O x UART1_Tx | 447 | * GPIO38 Alt2 O x UART1_Tx |
449 | * GPIO39 Alt2 I x UART1_Rx | 448 | * GPIO39 Alt2 I x UART1_Rx |
450 | * GPIO40 Alt1 I x IRQ0 (Ethernet 0) | 449 | * GPIO40 Alt1 I x IRQ0 (Ethernet 0) |
451 | * GPIO41 Alt1 I x IRQ1 (Ethernet 1) | 450 | * GPIO41 Alt1 I x IRQ1 (Ethernet 1) |
452 | * GPIO42 Alt1 I x IRQ2 (PCI interrupt) | 451 | * GPIO42 Alt1 I x IRQ2 (PCI interrupt) |
453 | * GPIO43 Alt1 I x IRQ3 (System Alert from CPLD) | 452 | * GPIO43 Alt1 I x IRQ3 (System Alert from CPLD) |
454 | * GPIO44 xxxx x x (grounded through pulldown) | 453 | * GPIO44 xxxx x x (grounded through pulldown) |
455 | * GPIO45 GPIO O 0 PHY #0 Enable | 454 | * GPIO45 GPIO O 0 PHY #0 Enable |
456 | * GPIO46 GPIO O 0 PHY #1 Enable | 455 | * GPIO46 GPIO O 0 PHY #1 Enable |
457 | * GPIO47 GPIO I x Reset switch !Pressed | 456 | * GPIO47 GPIO I x Reset switch !Pressed |
458 | * GPIO48 GPIO I x Shutdown switch !Pressed | 457 | * GPIO48 GPIO I x Shutdown switch !Pressed |
459 | * GPIO49 xxxx x x (reserved for trace port) | 458 | * GPIO49 xxxx x x (reserved for trace port) |
460 | * . . . . . | 459 | * . . . . . |
461 | * . . . . . | 460 | * . . . . . |
462 | * . . . . . | 461 | * . . . . . |
463 | * GPIO63 xxxx x x (reserved for trace port) | 462 | * GPIO63 xxxx x x (reserved for trace port) |
464 | */ | 463 | */ |
465 | 464 | ||
466 | #define CONFIG_SYS_GPIO_ATMEGA_RESET_ 12 | 465 | #define CONFIG_SYS_GPIO_ATMEGA_RESET_ 12 |
467 | #define CONFIG_SYS_GPIO_ATMEGA_SS_ 13 | 466 | #define CONFIG_SYS_GPIO_ATMEGA_SS_ 13 |
468 | #define CONFIG_SYS_GPIO_PHY0_FIBER_SEL 27 | 467 | #define CONFIG_SYS_GPIO_PHY0_FIBER_SEL 27 |
469 | #define CONFIG_SYS_GPIO_PHY1_FIBER_SEL 28 | 468 | #define CONFIG_SYS_GPIO_PHY1_FIBER_SEL 28 |
470 | #define CONFIG_SYS_GPIO_SFP0_PRESENT_ 30 | 469 | #define CONFIG_SYS_GPIO_SFP0_PRESENT_ 30 |
471 | #define CONFIG_SYS_GPIO_SFP1_PRESENT_ 31 | 470 | #define CONFIG_SYS_GPIO_SFP1_PRESENT_ 31 |
472 | #define CONFIG_SYS_GPIO_SFP0_TX_EN_ 32 | 471 | #define CONFIG_SYS_GPIO_SFP0_TX_EN_ 32 |
473 | #define CONFIG_SYS_GPIO_SFP1_TX_EN_ 33 | 472 | #define CONFIG_SYS_GPIO_SFP1_TX_EN_ 33 |
474 | #define CONFIG_SYS_GPIO_PHY0_EN 45 | 473 | #define CONFIG_SYS_GPIO_PHY0_EN 45 |
475 | #define CONFIG_SYS_GPIO_PHY1_EN 46 | 474 | #define CONFIG_SYS_GPIO_PHY1_EN 46 |
476 | #define CONFIG_SYS_GPIO_RESET_PRESSED_ 47 | 475 | #define CONFIG_SYS_GPIO_RESET_PRESSED_ 47 |
477 | 476 | ||
478 | /* | 477 | /* |
479 | * PPC440 GPIO Configuration | 478 | * PPC440 GPIO Configuration |
480 | */ | 479 | */ |
481 | #define CONFIG_SYS_4xx_GPIO_TABLE { /* Out GPIO Alternate1 Alternate2 Alternate3 */ \ | 480 | #define CONFIG_SYS_4xx_GPIO_TABLE { /* Out GPIO Alternate1 Alternate2 Alternate3 */ \ |
482 | { \ | 481 | { \ |
483 | /* GPIO Core 0 */ \ | 482 | /* GPIO Core 0 */ \ |
484 | {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO0 EBC_ADDR(7) DMA_REQ(2) */ \ | 483 | {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO0 EBC_ADDR(7) DMA_REQ(2) */ \ |
485 | {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO1 EBC_ADDR(6) DMA_ACK(2) */ \ | 484 | {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO1 EBC_ADDR(6) DMA_ACK(2) */ \ |
486 | {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO2 EBC_ADDR(5) DMA_EOT/TC(2) */ \ | 485 | {GPIO0_BASE, GPIO_BI , GPIO_ALT1, GPIO_OUT_0}, /* GPIO2 EBC_ADDR(5) DMA_EOT/TC(2) */ \ |
487 | {GPIO0_BASE, GPIO_DIS, GPIO_SEL , GPIO_OUT_0}, /* GPIO3 EBC_ADDR(4) DMA_REQ(3) */ \ | 486 | {GPIO0_BASE, GPIO_DIS, GPIO_SEL , GPIO_OUT_0}, /* GPIO3 EBC_ADDR(4) DMA_REQ(3) */ \ |
488 | {GPIO0_BASE, GPIO_DIS, GPIO_SEL , GPIO_OUT_0}, /* GPIO4 EBC_ADDR(3) DMA_ACK(3) */ \ | 487 | {GPIO0_BASE, GPIO_DIS, GPIO_SEL , GPIO_OUT_0}, /* GPIO4 EBC_ADDR(3) DMA_ACK(3) */ \ |
489 | {GPIO0_BASE, GPIO_DIS, GPIO_SEL , GPIO_OUT_0}, /* GPIO5 EBC_ADDR(2) DMA_EOT/TC(3) */ \ | 488 | {GPIO0_BASE, GPIO_DIS, GPIO_SEL , GPIO_OUT_0}, /* GPIO5 EBC_ADDR(2) DMA_EOT/TC(3) */ \ |
490 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO6 EBC_CS_N(1) */ \ | 489 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO6 EBC_CS_N(1) */ \ |
491 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO7 EBC_CS_N(2) */ \ | 490 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO7 EBC_CS_N(2) */ \ |
492 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO8 EBC_CS_N(3) */ \ | 491 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO8 EBC_CS_N(3) */ \ |
493 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO9 EBC_CS_N(4) */ \ | 492 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO9 EBC_CS_N(4) */ \ |
494 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO10 EBC_CS_N(5) */ \ | 493 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO10 EBC_CS_N(5) */ \ |
495 | {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO11 EBC_BUS_ERR */ \ | 494 | {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO11 EBC_BUS_ERR */ \ |
496 | {GPIO0_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_0}, /* GPIO12 */ \ | 495 | {GPIO0_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_0}, /* GPIO12 */ \ |
497 | {GPIO0_BASE, GPIO_DIS, GPIO_SEL , GPIO_OUT_0}, /* GPIO13 */ \ | 496 | {GPIO0_BASE, GPIO_DIS, GPIO_SEL , GPIO_OUT_0}, /* GPIO13 */ \ |
498 | {GPIO0_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_1}, /* GPIO14 */ \ | 497 | {GPIO0_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_1}, /* GPIO14 */ \ |
499 | {GPIO0_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_0}, /* GPIO15 */ \ | 498 | {GPIO0_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_0}, /* GPIO15 */ \ |
500 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1}, /* GPIO16 GMCTxD(4) */ \ | 499 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1}, /* GPIO16 GMCTxD(4) */ \ |
501 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1}, /* GPIO17 GMCTxD(5) */ \ | 500 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1}, /* GPIO17 GMCTxD(5) */ \ |
502 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1}, /* GPIO18 GMCTxD(6) */ \ | 501 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1}, /* GPIO18 GMCTxD(6) */ \ |
503 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1}, /* GPIO19 GMCTxD(7) */ \ | 502 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1}, /* GPIO19 GMCTxD(7) */ \ |
504 | {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO20 RejectPkt0 */ \ | 503 | {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO20 RejectPkt0 */ \ |
505 | {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO21 RejectPkt1 */ \ | 504 | {GPIO0_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO21 RejectPkt1 */ \ |
506 | {GPIO0_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO22 */ \ | 505 | {GPIO0_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO22 */ \ |
507 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO23 SCPD0 */ \ | 506 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0}, /* GPIO23 SCPD0 */ \ |
508 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1}, /* GPIO24 GMCTxD(2) */ \ | 507 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1}, /* GPIO24 GMCTxD(2) */ \ |
509 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1}, /* GPIO25 GMCTxD(3) */ \ | 508 | {GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1}, /* GPIO25 GMCTxD(3) */ \ |
510 | {GPIO0_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO26 */ \ | 509 | {GPIO0_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO26 */ \ |
511 | {GPIO0_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_0}, /* GPIO27 EXT_EBC_REQ USB2D_RXERROR */ \ | 510 | {GPIO0_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_0}, /* GPIO27 EXT_EBC_REQ USB2D_RXERROR */ \ |
512 | {GPIO0_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_0}, /* GPIO28 USB2D_TXVALID */ \ | 511 | {GPIO0_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_0}, /* GPIO28 USB2D_TXVALID */ \ |
513 | {GPIO0_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO29 EBC_EXT_HDLA USB2D_PAD_SUSPNDM */ \ | 512 | {GPIO0_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO29 EBC_EXT_HDLA USB2D_PAD_SUSPNDM */ \ |
514 | {GPIO0_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO30 EBC_EXT_ACK USB2D_XCVRSELECT*/ \ | 513 | {GPIO0_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO30 EBC_EXT_ACK USB2D_XCVRSELECT*/ \ |
515 | {GPIO0_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO31 EBC_EXR_BUSREQ USB2D_TERMSELECT*/ \ | 514 | {GPIO0_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO31 EBC_EXR_BUSREQ USB2D_TERMSELECT*/ \ |
516 | }, \ | 515 | }, \ |
517 | { \ | 516 | { \ |
518 | /* GPIO Core 1 */ \ | 517 | /* GPIO Core 1 */ \ |
519 | {GPIO1_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_1}, /* GPIO32 USB2D_OPMODE0 EBC_DATA(2) */ \ | 518 | {GPIO1_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_1}, /* GPIO32 USB2D_OPMODE0 EBC_DATA(2) */ \ |
520 | {GPIO1_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_1}, /* GPIO33 USB2D_OPMODE1 EBC_DATA(3) */ \ | 519 | {GPIO1_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_1}, /* GPIO33 USB2D_OPMODE1 EBC_DATA(3) */ \ |
521 | {GPIO1_BASE, GPIO_IN , GPIO_ALT2, GPIO_OUT_0}, /* GPIO34 UART0_DCD_N UART1_DSR_CTS_N UART2_SOUT*/ \ | 520 | {GPIO1_BASE, GPIO_IN , GPIO_ALT2, GPIO_OUT_0}, /* GPIO34 UART0_DCD_N UART1_DSR_CTS_N UART2_SOUT*/ \ |
522 | {GPIO1_BASE, GPIO_OUT, GPIO_ALT2, GPIO_OUT_1}, /* GPIO35 UART0_8PIN_DSR_N UART1_RTS_DTR_N UART2_SIN*/ \ | 521 | {GPIO1_BASE, GPIO_OUT, GPIO_ALT2, GPIO_OUT_1}, /* GPIO35 UART0_8PIN_DSR_N UART1_RTS_DTR_N UART2_SIN*/ \ |
523 | {GPIO1_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO36 UART0_8PIN_CTS_N EBC_DATA(0) UART3_SIN*/ \ | 522 | {GPIO1_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO36 UART0_8PIN_CTS_N EBC_DATA(0) UART3_SIN*/ \ |
524 | {GPIO1_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1}, /* GPIO37 UART0_RTS_N EBC_DATA(1) UART3_SOUT*/ \ | 523 | {GPIO1_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1}, /* GPIO37 UART0_RTS_N EBC_DATA(1) UART3_SOUT*/ \ |
525 | {GPIO1_BASE, GPIO_OUT, GPIO_ALT2, GPIO_OUT_1}, /* GPIO38 UART0_DTR_N UART1_SOUT */ \ | 524 | {GPIO1_BASE, GPIO_OUT, GPIO_ALT2, GPIO_OUT_1}, /* GPIO38 UART0_DTR_N UART1_SOUT */ \ |
526 | {GPIO1_BASE, GPIO_IN , GPIO_ALT2, GPIO_OUT_0}, /* GPIO39 UART0_RI_N UART1_SIN */ \ | 525 | {GPIO1_BASE, GPIO_IN , GPIO_ALT2, GPIO_OUT_0}, /* GPIO39 UART0_RI_N UART1_SIN */ \ |
527 | {GPIO1_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO40 UIC_IRQ(0) */ \ | 526 | {GPIO1_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO40 UIC_IRQ(0) */ \ |
528 | {GPIO1_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO41 UIC_IRQ(1) */ \ | 527 | {GPIO1_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO41 UIC_IRQ(1) */ \ |
529 | {GPIO1_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO42 UIC_IRQ(2) */ \ | 528 | {GPIO1_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO42 UIC_IRQ(2) */ \ |
530 | {GPIO1_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO43 UIC_IRQ(3) */ \ | 529 | {GPIO1_BASE, GPIO_IN , GPIO_ALT1, GPIO_OUT_0}, /* GPIO43 UIC_IRQ(3) */ \ |
531 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO44 UIC_IRQ(4) DMA_ACK(1) */ \ | 530 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO44 UIC_IRQ(4) DMA_ACK(1) */ \ |
532 | {GPIO1_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_0}, /* GPIO45 UIC_IRQ(6) DMA_EOT/TC(1) */ \ | 531 | {GPIO1_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_0}, /* GPIO45 UIC_IRQ(6) DMA_EOT/TC(1) */ \ |
533 | {GPIO1_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_0}, /* GPIO46 UIC_IRQ(7) DMA_REQ(0) */ \ | 532 | {GPIO1_BASE, GPIO_OUT, GPIO_SEL , GPIO_OUT_0}, /* GPIO46 UIC_IRQ(7) DMA_REQ(0) */ \ |
534 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO47 UIC_IRQ(8) DMA_ACK(0) */ \ | 533 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO47 UIC_IRQ(8) DMA_ACK(0) */ \ |
535 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO48 UIC_IRQ(9) DMA_EOT/TC(0) */ \ | 534 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO48 UIC_IRQ(9) DMA_EOT/TC(0) */ \ |
536 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO49 Unselect via TraceSelect Bit */ \ | 535 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO49 Unselect via TraceSelect Bit */ \ |
537 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO50 Unselect via TraceSelect Bit */ \ | 536 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO50 Unselect via TraceSelect Bit */ \ |
538 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO51 Unselect via TraceSelect Bit */ \ | 537 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO51 Unselect via TraceSelect Bit */ \ |
539 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO52 Unselect via TraceSelect Bit */ \ | 538 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO52 Unselect via TraceSelect Bit */ \ |
540 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO53 Unselect via TraceSelect Bit */ \ | 539 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO53 Unselect via TraceSelect Bit */ \ |
541 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO54 Unselect via TraceSelect Bit */ \ | 540 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO54 Unselect via TraceSelect Bit */ \ |
542 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO55 Unselect via TraceSelect Bit */ \ | 541 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO55 Unselect via TraceSelect Bit */ \ |
543 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO56 Unselect via TraceSelect Bit */ \ | 542 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO56 Unselect via TraceSelect Bit */ \ |
544 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO57 Unselect via TraceSelect Bit */ \ | 543 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO57 Unselect via TraceSelect Bit */ \ |
545 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO58 Unselect via TraceSelect Bit */ \ | 544 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO58 Unselect via TraceSelect Bit */ \ |
546 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO59 Unselect via TraceSelect Bit */ \ | 545 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO59 Unselect via TraceSelect Bit */ \ |
547 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO60 Unselect via TraceSelect Bit */ \ | 546 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO60 Unselect via TraceSelect Bit */ \ |
548 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO61 Unselect via TraceSelect Bit */ \ | 547 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO61 Unselect via TraceSelect Bit */ \ |
549 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO62 Unselect via TraceSelect Bit */ \ | 548 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO62 Unselect via TraceSelect Bit */ \ |
550 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO63 Unselect via TraceSelect Bit */ \ | 549 | {GPIO1_BASE, GPIO_IN , GPIO_SEL , GPIO_OUT_0}, /* GPIO63 Unselect via TraceSelect Bit */ \ |
551 | } \ | 550 | } \ |
552 | } | 551 | } |
553 | 552 | ||
554 | /* | 553 | /* |
555 | * Internal Definitions | 554 | * Internal Definitions |
556 | * | 555 | * |
557 | * Boot Flags | 556 | * Boot Flags |
558 | */ | 557 | */ |
559 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 558 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
560 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 559 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
561 | 560 | ||
562 | #if defined(CONFIG_CMD_KGDB) | 561 | #if defined(CONFIG_CMD_KGDB) |
563 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ | 562 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ |
564 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ | 563 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ |
565 | #endif | 564 | #endif |
566 | 565 | ||
567 | /* Pass open firmware flat tree */ | 566 | /* Pass open firmware flat tree */ |
568 | #define CONFIG_OF_LIBFDT 1 | 567 | #define CONFIG_OF_LIBFDT 1 |
569 | #define CONFIG_OF_BOARD_SETUP 1 | 568 | #define CONFIG_OF_BOARD_SETUP 1 |
570 | 569 | ||
571 | #endif /* __CONFIG_H */ | 570 | #endif /* __CONFIG_H */ |
572 | 571 |
include/configs/sbc8349.h
1 | /* | 1 | /* |
2 | * WindRiver SBC8349 U-Boot configuration file. | 2 | * WindRiver SBC8349 U-Boot configuration file. |
3 | * Copyright (c) 2006, 2007 Wind River Systems, Inc. | 3 | * Copyright (c) 2006, 2007 Wind River Systems, Inc. |
4 | * | 4 | * |
5 | * Paul Gortmaker <paul.gortmaker@windriver.com> | 5 | * Paul Gortmaker <paul.gortmaker@windriver.com> |
6 | * Based on the MPC8349EMDS config. | 6 | * Based on the MPC8349EMDS config. |
7 | * | 7 | * |
8 | * See file CREDITS for list of people who contributed to this | 8 | * See file CREDITS for list of people who contributed to this |
9 | * project. | 9 | * project. |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or | 11 | * This program is free software; you can redistribute it and/or |
12 | * modify it under the terms of the GNU General Public License as | 12 | * modify it under the terms of the GNU General Public License as |
13 | * published by the Free Software Foundation; either version 2 of | 13 | * published by the Free Software Foundation; either version 2 of |
14 | * the License, or (at your option) any later version. | 14 | * the License, or (at your option) any later version. |
15 | * | 15 | * |
16 | * This program is distributed in the hope that it will be useful, | 16 | * This program is distributed in the hope that it will be useful, |
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
19 | * GNU General Public License for more details. | 19 | * GNU General Public License for more details. |
20 | * | 20 | * |
21 | * You should have received a copy of the GNU General Public License | 21 | * You should have received a copy of the GNU General Public License |
22 | * along with this program; if not, write to the Free Software | 22 | * along with this program; if not, write to the Free Software |
23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
24 | * MA 02111-1307 USA | 24 | * MA 02111-1307 USA |
25 | */ | 25 | */ |
26 | 26 | ||
27 | /* | 27 | /* |
28 | * sbc8349 board configuration file. | 28 | * sbc8349 board configuration file. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef __CONFIG_H | 31 | #ifndef __CONFIG_H |
32 | #define __CONFIG_H | 32 | #define __CONFIG_H |
33 | 33 | ||
34 | /* | 34 | /* |
35 | * High Level Configuration Options | 35 | * High Level Configuration Options |
36 | */ | 36 | */ |
37 | #define CONFIG_E300 1 /* E300 Family */ | 37 | #define CONFIG_E300 1 /* E300 Family */ |
38 | #define CONFIG_MPC83XX 1 /* MPC83XX family */ | 38 | #define CONFIG_MPC83XX 1 /* MPC83XX family */ |
39 | #define CONFIG_MPC834X 1 /* MPC834X family */ | 39 | #define CONFIG_MPC834X 1 /* MPC834X family */ |
40 | #define CONFIG_MPC8349 1 /* MPC8349 specific */ | 40 | #define CONFIG_MPC8349 1 /* MPC8349 specific */ |
41 | #define CONFIG_SBC8349 1 /* WRS SBC8349 board specific */ | 41 | #define CONFIG_SBC8349 1 /* WRS SBC8349 board specific */ |
42 | 42 | ||
43 | #undef CONFIG_PCI | 43 | #undef CONFIG_PCI |
44 | /* Don't enable PCI2 on sbc834x - it doesn't exist physically. */ | 44 | /* Don't enable PCI2 on sbc834x - it doesn't exist physically. */ |
45 | #undef CONFIG_MPC83XX_PCI2 /* support for 2nd PCI controller */ | 45 | #undef CONFIG_MPC83XX_PCI2 /* support for 2nd PCI controller */ |
46 | 46 | ||
47 | #define PCI_66M | 47 | #define PCI_66M |
48 | #ifdef PCI_66M | 48 | #ifdef PCI_66M |
49 | #define CONFIG_83XX_CLKIN 66000000 /* in Hz */ | 49 | #define CONFIG_83XX_CLKIN 66000000 /* in Hz */ |
50 | #else | 50 | #else |
51 | #define CONFIG_83XX_CLKIN 33000000 /* in Hz */ | 51 | #define CONFIG_83XX_CLKIN 33000000 /* in Hz */ |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | #ifndef CONFIG_SYS_CLK_FREQ | 54 | #ifndef CONFIG_SYS_CLK_FREQ |
55 | #ifdef PCI_66M | 55 | #ifdef PCI_66M |
56 | #define CONFIG_SYS_CLK_FREQ 66000000 | 56 | #define CONFIG_SYS_CLK_FREQ 66000000 |
57 | #define HRCWL_CSB_TO_CLKIN HRCWL_CSB_TO_CLKIN_4X1 | 57 | #define HRCWL_CSB_TO_CLKIN HRCWL_CSB_TO_CLKIN_4X1 |
58 | #else | 58 | #else |
59 | #define CONFIG_SYS_CLK_FREQ 33000000 | 59 | #define CONFIG_SYS_CLK_FREQ 33000000 |
60 | #define HRCWL_CSB_TO_CLKIN HRCWL_CSB_TO_CLKIN_8X1 | 60 | #define HRCWL_CSB_TO_CLKIN HRCWL_CSB_TO_CLKIN_8X1 |
61 | #endif | 61 | #endif |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | #undef CONFIG_BOARD_EARLY_INIT_F /* call board_pre_init */ | 64 | #undef CONFIG_BOARD_EARLY_INIT_F /* call board_pre_init */ |
65 | 65 | ||
66 | #define CONFIG_SYS_IMMR 0xE0000000 | 66 | #define CONFIG_SYS_IMMR 0xE0000000 |
67 | 67 | ||
68 | #undef CONFIG_SYS_DRAM_TEST /* memory test, takes time */ | 68 | #undef CONFIG_SYS_DRAM_TEST /* memory test, takes time */ |
69 | #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest region */ | 69 | #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest region */ |
70 | #define CONFIG_SYS_MEMTEST_END 0x00100000 | 70 | #define CONFIG_SYS_MEMTEST_END 0x00100000 |
71 | 71 | ||
72 | /* | 72 | /* |
73 | * DDR Setup | 73 | * DDR Setup |
74 | */ | 74 | */ |
75 | #undef CONFIG_DDR_ECC /* only for ECC DDR module */ | 75 | #undef CONFIG_DDR_ECC /* only for ECC DDR module */ |
76 | #undef CONFIG_DDR_ECC_CMD /* use DDR ECC user commands */ | 76 | #undef CONFIG_DDR_ECC_CMD /* use DDR ECC user commands */ |
77 | #define CONFIG_SPD_EEPROM /* use SPD EEPROM for DDR setup*/ | 77 | #define CONFIG_SPD_EEPROM /* use SPD EEPROM for DDR setup*/ |
78 | #define CONFIG_SYS_83XX_DDR_USES_CS0 /* WRS; Fsl board uses CS2/CS3 */ | 78 | #define CONFIG_SYS_83XX_DDR_USES_CS0 /* WRS; Fsl board uses CS2/CS3 */ |
79 | 79 | ||
80 | /* | 80 | /* |
81 | * 32-bit data path mode. | 81 | * 32-bit data path mode. |
82 | * | 82 | * |
83 | * Please note that using this mode for devices with the real density of 64-bit | 83 | * Please note that using this mode for devices with the real density of 64-bit |
84 | * effectively reduces the amount of available memory due to the effect of | 84 | * effectively reduces the amount of available memory due to the effect of |
85 | * wrapping around while translating address to row/columns, for example in the | 85 | * wrapping around while translating address to row/columns, for example in the |
86 | * 256MB module the upper 128MB get aliased with contents of the lower | 86 | * 256MB module the upper 128MB get aliased with contents of the lower |
87 | * 128MB); normally this define should be used for devices with real 32-bit | 87 | * 128MB); normally this define should be used for devices with real 32-bit |
88 | * data path. | 88 | * data path. |
89 | */ | 89 | */ |
90 | #undef CONFIG_DDR_32BIT | 90 | #undef CONFIG_DDR_32BIT |
91 | 91 | ||
92 | #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory*/ | 92 | #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory*/ |
93 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE | 93 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE |
94 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE | 94 | #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE |
95 | #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \ | 95 | #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \ |
96 | DDR_SDRAM_CLK_CNTL_CLK_ADJUST_075) | 96 | DDR_SDRAM_CLK_CNTL_CLK_ADJUST_075) |
97 | #define CONFIG_DDR_2T_TIMING | 97 | #define CONFIG_DDR_2T_TIMING |
98 | 98 | ||
99 | #if defined(CONFIG_SPD_EEPROM) | 99 | #if defined(CONFIG_SPD_EEPROM) |
100 | /* | 100 | /* |
101 | * Determine DDR configuration from I2C interface. | 101 | * Determine DDR configuration from I2C interface. |
102 | */ | 102 | */ |
103 | #define SPD_EEPROM_ADDRESS 0x52 /* DDR DIMM */ | 103 | #define SPD_EEPROM_ADDRESS 0x52 /* DDR DIMM */ |
104 | 104 | ||
105 | #else | 105 | #else |
106 | /* | 106 | /* |
107 | * Manually set up DDR parameters | 107 | * Manually set up DDR parameters |
108 | * NB: manual DDR setup untested on sbc834x | 108 | * NB: manual DDR setup untested on sbc834x |
109 | */ | 109 | */ |
110 | #define CONFIG_SYS_DDR_SIZE 256 /* MB */ | 110 | #define CONFIG_SYS_DDR_SIZE 256 /* MB */ |
111 | #define CONFIG_SYS_DDR_CONFIG (CSCONFIG_EN | CSCONFIG_ROW_BIT_13 | CSCONFIG_COL_BIT_10) | 111 | #define CONFIG_SYS_DDR_CONFIG (CSCONFIG_EN | CSCONFIG_ROW_BIT_13 | CSCONFIG_COL_BIT_10) |
112 | #define CONFIG_SYS_DDR_TIMING_1 0x36332321 | 112 | #define CONFIG_SYS_DDR_TIMING_1 0x36332321 |
113 | #define CONFIG_SYS_DDR_TIMING_2 0x00000800 /* P9-45,may need tuning */ | 113 | #define CONFIG_SYS_DDR_TIMING_2 0x00000800 /* P9-45,may need tuning */ |
114 | #define CONFIG_SYS_DDR_CONTROL 0xc2000000 /* unbuffered,no DYN_PWR */ | 114 | #define CONFIG_SYS_DDR_CONTROL 0xc2000000 /* unbuffered,no DYN_PWR */ |
115 | #define CONFIG_SYS_DDR_INTERVAL 0x04060100 /* autocharge,no open page */ | 115 | #define CONFIG_SYS_DDR_INTERVAL 0x04060100 /* autocharge,no open page */ |
116 | 116 | ||
117 | #if defined(CONFIG_DDR_32BIT) | 117 | #if defined(CONFIG_DDR_32BIT) |
118 | /* set burst length to 8 for 32-bit data path */ | 118 | /* set burst length to 8 for 32-bit data path */ |
119 | #define CONFIG_SYS_DDR_MODE 0x00000023 /* DLL,normal,seq,4/2.5, 8 burst len */ | 119 | #define CONFIG_SYS_DDR_MODE 0x00000023 /* DLL,normal,seq,4/2.5, 8 burst len */ |
120 | #else | 120 | #else |
121 | /* the default burst length is 4 - for 64-bit data path */ | 121 | /* the default burst length is 4 - for 64-bit data path */ |
122 | #define CONFIG_SYS_DDR_MODE 0x00000022 /* DLL,normal,seq,4/2.5, 4 burst len */ | 122 | #define CONFIG_SYS_DDR_MODE 0x00000022 /* DLL,normal,seq,4/2.5, 4 burst len */ |
123 | #endif | 123 | #endif |
124 | #endif | 124 | #endif |
125 | 125 | ||
126 | /* | 126 | /* |
127 | * SDRAM on the Local Bus | 127 | * SDRAM on the Local Bus |
128 | */ | 128 | */ |
129 | #define CONFIG_SYS_LBC_SDRAM_BASE 0x10000000 /* Localbus SDRAM */ | 129 | #define CONFIG_SYS_LBC_SDRAM_BASE 0x10000000 /* Localbus SDRAM */ |
130 | #define CONFIG_SYS_LBC_SDRAM_SIZE 128 /* LBC SDRAM is 128MB */ | 130 | #define CONFIG_SYS_LBC_SDRAM_SIZE 128 /* LBC SDRAM is 128MB */ |
131 | 131 | ||
132 | /* | 132 | /* |
133 | * FLASH on the Local Bus | 133 | * FLASH on the Local Bus |
134 | */ | 134 | */ |
135 | #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */ | 135 | #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */ |
136 | #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */ | 136 | #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */ |
137 | #define CONFIG_SYS_FLASH_BASE 0xFF800000 /* start of FLASH */ | 137 | #define CONFIG_SYS_FLASH_BASE 0xFF800000 /* start of FLASH */ |
138 | #define CONFIG_SYS_FLASH_SIZE 8 /* flash size in MB */ | 138 | #define CONFIG_SYS_FLASH_SIZE 8 /* flash size in MB */ |
139 | /* #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE */ | 139 | /* #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE */ |
140 | 140 | ||
141 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | /* flash Base address */ \ | 141 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | /* flash Base address */ \ |
142 | (2 << BR_PS_SHIFT) | /* 32 bit port size */ \ | 142 | (2 << BR_PS_SHIFT) | /* 32 bit port size */ \ |
143 | BR_V) /* valid */ | 143 | BR_V) /* valid */ |
144 | 144 | ||
145 | #define CONFIG_SYS_OR0_PRELIM 0xFF806FF7 /* 8 MB flash size */ | 145 | #define CONFIG_SYS_OR0_PRELIM 0xFF806FF7 /* 8 MB flash size */ |
146 | #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE /* window base at flash base */ | 146 | #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE /* window base at flash base */ |
147 | #define CONFIG_SYS_LBLAWAR0_PRELIM 0x80000016 /* 8 MB window size */ | 147 | #define CONFIG_SYS_LBLAWAR0_PRELIM 0x80000016 /* 8 MB window size */ |
148 | 148 | ||
149 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ | 149 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */ |
150 | #define CONFIG_SYS_MAX_FLASH_SECT 64 /* sectors per device */ | 150 | #define CONFIG_SYS_MAX_FLASH_SECT 64 /* sectors per device */ |
151 | 151 | ||
152 | #undef CONFIG_SYS_FLASH_CHECKSUM | 152 | #undef CONFIG_SYS_FLASH_CHECKSUM |
153 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ | 153 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ |
154 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ | 154 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ |
155 | 155 | ||
156 | #define CONFIG_SYS_MID_FLASH_JUMP 0x7F000000 | 156 | #define CONFIG_SYS_MID_FLASH_JUMP 0x7F000000 |
157 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ | 157 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ |
158 | 158 | ||
159 | #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE) | 159 | #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE) |
160 | #define CONFIG_SYS_RAMBOOT | 160 | #define CONFIG_SYS_RAMBOOT |
161 | #else | 161 | #else |
162 | #undef CONFIG_SYS_RAMBOOT | 162 | #undef CONFIG_SYS_RAMBOOT |
163 | #endif | 163 | #endif |
164 | 164 | ||
165 | #define CONFIG_SYS_INIT_RAM_LOCK 1 | 165 | #define CONFIG_SYS_INIT_RAM_LOCK 1 |
166 | #define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 /* Initial RAM address */ | 166 | #define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 /* Initial RAM address */ |
167 | #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM*/ | 167 | #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM*/ |
168 | 168 | ||
169 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ | 169 | #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */ |
170 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 170 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
171 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET | 171 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
172 | 172 | ||
173 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ | 173 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */ |
174 | #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserved for malloc */ | 174 | #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserved for malloc */ |
175 | 175 | ||
176 | /* | 176 | /* |
177 | * Local Bus LCRR and LBCR regs | 177 | * Local Bus LCRR and LBCR regs |
178 | * LCRR: DLL bypass, Clock divider is 4 | 178 | * LCRR: DLL bypass, Clock divider is 4 |
179 | * External Local Bus rate is | 179 | * External Local Bus rate is |
180 | * CLKIN * HRCWL_CSB_TO_CLKIN / HRCWL_LCL_BUS_TO_SCB_CLK / LCRR_CLKDIV | 180 | * CLKIN * HRCWL_CSB_TO_CLKIN / HRCWL_LCL_BUS_TO_SCB_CLK / LCRR_CLKDIV |
181 | */ | 181 | */ |
182 | #define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_CLKDIV_4) | 182 | #define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_CLKDIV_4) |
183 | #define CONFIG_SYS_LBC_LBCR 0x00000000 | 183 | #define CONFIG_SYS_LBC_LBCR 0x00000000 |
184 | 184 | ||
185 | #undef CONFIG_SYS_LB_SDRAM /* if board has SDRAM on local bus */ | 185 | #undef CONFIG_SYS_LB_SDRAM /* if board has SDRAM on local bus */ |
186 | 186 | ||
187 | #ifdef CONFIG_SYS_LB_SDRAM | 187 | #ifdef CONFIG_SYS_LB_SDRAM |
188 | /* Local bus BR2, OR2 definition for SDRAM if soldered on the board*/ | 188 | /* Local bus BR2, OR2 definition for SDRAM if soldered on the board*/ |
189 | /* | 189 | /* |
190 | * Base Register 2 and Option Register 2 configure SDRAM. | 190 | * Base Register 2 and Option Register 2 configure SDRAM. |
191 | * The SDRAM base address, CONFIG_SYS_LBC_SDRAM_BASE, is 0xf0000000. | 191 | * The SDRAM base address, CONFIG_SYS_LBC_SDRAM_BASE, is 0xf0000000. |
192 | * | 192 | * |
193 | * For BR2, need: | 193 | * For BR2, need: |
194 | * Base address of 0xf0000000 = BR[0:16] = 1111 0000 0000 0000 0 | 194 | * Base address of 0xf0000000 = BR[0:16] = 1111 0000 0000 0000 0 |
195 | * port-size = 32-bits = BR2[19:20] = 11 | 195 | * port-size = 32-bits = BR2[19:20] = 11 |
196 | * no parity checking = BR2[21:22] = 00 | 196 | * no parity checking = BR2[21:22] = 00 |
197 | * SDRAM for MSEL = BR2[24:26] = 011 | 197 | * SDRAM for MSEL = BR2[24:26] = 011 |
198 | * Valid = BR[31] = 1 | 198 | * Valid = BR[31] = 1 |
199 | * | 199 | * |
200 | * 0 4 8 12 16 20 24 28 | 200 | * 0 4 8 12 16 20 24 28 |
201 | * 1111 0000 0000 0000 0001 1000 0110 0001 = F0001861 | 201 | * 1111 0000 0000 0000 0001 1000 0110 0001 = F0001861 |
202 | * | 202 | * |
203 | * FIXME: CONFIG_SYS_LBC_SDRAM_BASE should be masked and OR'ed into | 203 | * FIXME: CONFIG_SYS_LBC_SDRAM_BASE should be masked and OR'ed into |
204 | * FIXME: the top 17 bits of BR2. | 204 | * FIXME: the top 17 bits of BR2. |
205 | */ | 205 | */ |
206 | 206 | ||
207 | #define CONFIG_SYS_BR2_PRELIM 0xF0001861 /* Port-size=32bit, MSEL=SDRAM */ | 207 | #define CONFIG_SYS_BR2_PRELIM 0xF0001861 /* Port-size=32bit, MSEL=SDRAM */ |
208 | #define CONFIG_SYS_LBLAWBAR2_PRELIM 0xF0000000 | 208 | #define CONFIG_SYS_LBLAWBAR2_PRELIM 0xF0000000 |
209 | #define CONFIG_SYS_LBLAWAR2_PRELIM 0x80000019 /* 64M */ | 209 | #define CONFIG_SYS_LBLAWAR2_PRELIM 0x80000019 /* 64M */ |
210 | 210 | ||
211 | /* | 211 | /* |
212 | * The SDRAM size in MB, CONFIG_SYS_LBC_SDRAM_SIZE, is 64. | 212 | * The SDRAM size in MB, CONFIG_SYS_LBC_SDRAM_SIZE, is 64. |
213 | * | 213 | * |
214 | * For OR2, need: | 214 | * For OR2, need: |
215 | * 64MB mask for AM, OR2[0:7] = 1111 1100 | 215 | * 64MB mask for AM, OR2[0:7] = 1111 1100 |
216 | * XAM, OR2[17:18] = 11 | 216 | * XAM, OR2[17:18] = 11 |
217 | * 9 columns OR2[19-21] = 010 | 217 | * 9 columns OR2[19-21] = 010 |
218 | * 13 rows OR2[23-25] = 100 | 218 | * 13 rows OR2[23-25] = 100 |
219 | * EAD set for extra time OR[31] = 1 | 219 | * EAD set for extra time OR[31] = 1 |
220 | * | 220 | * |
221 | * 0 4 8 12 16 20 24 28 | 221 | * 0 4 8 12 16 20 24 28 |
222 | * 1111 1100 0000 0000 0110 1001 0000 0001 = FC006901 | 222 | * 1111 1100 0000 0000 0110 1001 0000 0001 = FC006901 |
223 | */ | 223 | */ |
224 | 224 | ||
225 | #define CONFIG_SYS_OR2_PRELIM 0xFC006901 | 225 | #define CONFIG_SYS_OR2_PRELIM 0xFC006901 |
226 | 226 | ||
227 | #define CONFIG_SYS_LBC_LSRT 0x32000000 /* LB sdram refresh timer, about 6us */ | 227 | #define CONFIG_SYS_LBC_LSRT 0x32000000 /* LB sdram refresh timer, about 6us */ |
228 | #define CONFIG_SYS_LBC_MRTPR 0x20000000 /* LB refresh timer prescal, 266MHz/32 */ | 228 | #define CONFIG_SYS_LBC_MRTPR 0x20000000 /* LB refresh timer prescal, 266MHz/32 */ |
229 | 229 | ||
230 | #define CONFIG_SYS_LBC_LSDMR_COMMON ( LSDMR_RFEN \ | 230 | #define CONFIG_SYS_LBC_LSDMR_COMMON ( LSDMR_RFEN \ |
231 | | LSDMR_BSMA1516 \ | 231 | | LSDMR_BSMA1516 \ |
232 | | LSDMR_RFCR8 \ | 232 | | LSDMR_RFCR8 \ |
233 | | LSDMR_PRETOACT6 \ | 233 | | LSDMR_PRETOACT6 \ |
234 | | LSDMR_ACTTORW3 \ | 234 | | LSDMR_ACTTORW3 \ |
235 | | LSDMR_BL8 \ | 235 | | LSDMR_BL8 \ |
236 | | LSDMR_WRC3 \ | 236 | | LSDMR_WRC3 \ |
237 | | LSDMR_CL3 \ | 237 | | LSDMR_CL3 \ |
238 | ) | 238 | ) |
239 | 239 | ||
240 | /* | 240 | /* |
241 | * SDRAM Controller configuration sequence. | 241 | * SDRAM Controller configuration sequence. |
242 | */ | 242 | */ |
243 | #define CONFIG_SYS_LBC_LSDMR_1 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_PCHALL) | 243 | #define CONFIG_SYS_LBC_LSDMR_1 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_PCHALL) |
244 | #define CONFIG_SYS_LBC_LSDMR_2 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH) | 244 | #define CONFIG_SYS_LBC_LSDMR_2 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH) |
245 | #define CONFIG_SYS_LBC_LSDMR_3 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH) | 245 | #define CONFIG_SYS_LBC_LSDMR_3 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH) |
246 | #define CONFIG_SYS_LBC_LSDMR_4 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_MRW) | 246 | #define CONFIG_SYS_LBC_LSDMR_4 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_MRW) |
247 | #define CONFIG_SYS_LBC_LSDMR_5 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_NORMAL) | 247 | #define CONFIG_SYS_LBC_LSDMR_5 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_NORMAL) |
248 | #endif | 248 | #endif |
249 | 249 | ||
250 | /* | 250 | /* |
251 | * Serial Port | 251 | * Serial Port |
252 | */ | 252 | */ |
253 | #define CONFIG_CONS_INDEX 1 | 253 | #define CONFIG_CONS_INDEX 1 |
254 | #undef CONFIG_SERIAL_SOFTWARE_FIFO | 254 | #undef CONFIG_SERIAL_SOFTWARE_FIFO |
255 | #define CONFIG_SYS_NS16550 | 255 | #define CONFIG_SYS_NS16550 |
256 | #define CONFIG_SYS_NS16550_SERIAL | 256 | #define CONFIG_SYS_NS16550_SERIAL |
257 | #define CONFIG_SYS_NS16550_REG_SIZE 1 | 257 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
258 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) | 258 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) |
259 | 259 | ||
260 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 260 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
261 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} | 261 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} |
262 | 262 | ||
263 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500) | 263 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500) |
264 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600) | 264 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600) |
265 | 265 | ||
266 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ | 266 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ |
267 | /* Use the HUSH parser */ | 267 | /* Use the HUSH parser */ |
268 | #define CONFIG_SYS_HUSH_PARSER | 268 | #define CONFIG_SYS_HUSH_PARSER |
269 | #ifdef CONFIG_SYS_HUSH_PARSER | 269 | #ifdef CONFIG_SYS_HUSH_PARSER |
270 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | 270 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
271 | #endif | 271 | #endif |
272 | 272 | ||
273 | /* pass open firmware flat tree */ | 273 | /* pass open firmware flat tree */ |
274 | #define CONFIG_OF_LIBFDT 1 | 274 | #define CONFIG_OF_LIBFDT 1 |
275 | #define CONFIG_OF_BOARD_SETUP 1 | 275 | #define CONFIG_OF_BOARD_SETUP 1 |
276 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 | 276 | #define CONFIG_OF_STDOUT_VIA_ALIAS 1 |
277 | 277 | ||
278 | /* I2C */ | 278 | /* I2C */ |
279 | #define CONFIG_HARD_I2C /* I2C with hardware support*/ | 279 | #define CONFIG_HARD_I2C /* I2C with hardware support*/ |
280 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ | 280 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ |
281 | #define CONFIG_FSL_I2C | 281 | #define CONFIG_FSL_I2C |
282 | #define CONFIG_I2C_CMD_TREE | ||
283 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ | 282 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ |
284 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 283 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
285 | #define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ | 284 | #define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */ |
286 | #define CONFIG_SYS_I2C1_OFFSET 0x3000 | 285 | #define CONFIG_SYS_I2C1_OFFSET 0x3000 |
287 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 | 286 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 |
288 | #define CONFIG_SYS_I2C_OFFSET CONFIG_SYS_I2C2_OFFSET | 287 | #define CONFIG_SYS_I2C_OFFSET CONFIG_SYS_I2C2_OFFSET |
289 | /* could also use CONFIG_I2C_MULTI_BUS and CONFIG_SPD_BUS_NUM... */ | 288 | /* could also use CONFIG_I2C_MULTI_BUS and CONFIG_SPD_BUS_NUM... */ |
290 | 289 | ||
291 | /* TSEC */ | 290 | /* TSEC */ |
292 | #define CONFIG_SYS_TSEC1_OFFSET 0x24000 | 291 | #define CONFIG_SYS_TSEC1_OFFSET 0x24000 |
293 | #define CONFIG_SYS_TSEC1 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC1_OFFSET) | 292 | #define CONFIG_SYS_TSEC1 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC1_OFFSET) |
294 | #define CONFIG_SYS_TSEC2_OFFSET 0x25000 | 293 | #define CONFIG_SYS_TSEC2_OFFSET 0x25000 |
295 | #define CONFIG_SYS_TSEC2 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC2_OFFSET) | 294 | #define CONFIG_SYS_TSEC2 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC2_OFFSET) |
296 | 295 | ||
297 | /* | 296 | /* |
298 | * General PCI | 297 | * General PCI |
299 | * Addresses are mapped 1-1. | 298 | * Addresses are mapped 1-1. |
300 | */ | 299 | */ |
301 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 | 300 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 |
302 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE | 301 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE |
303 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */ | 302 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */ |
304 | #define CONFIG_SYS_PCI1_MMIO_BASE 0x90000000 | 303 | #define CONFIG_SYS_PCI1_MMIO_BASE 0x90000000 |
305 | #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE | 304 | #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE |
306 | #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */ | 305 | #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */ |
307 | #define CONFIG_SYS_PCI1_IO_BASE 0x00000000 | 306 | #define CONFIG_SYS_PCI1_IO_BASE 0x00000000 |
308 | #define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000 | 307 | #define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000 |
309 | #define CONFIG_SYS_PCI1_IO_SIZE 0x00100000 /* 1M */ | 308 | #define CONFIG_SYS_PCI1_IO_SIZE 0x00100000 /* 1M */ |
310 | 309 | ||
311 | #define CONFIG_SYS_PCI2_MEM_BASE 0xA0000000 | 310 | #define CONFIG_SYS_PCI2_MEM_BASE 0xA0000000 |
312 | #define CONFIG_SYS_PCI2_MEM_PHYS CONFIG_SYS_PCI2_MEM_BASE | 311 | #define CONFIG_SYS_PCI2_MEM_PHYS CONFIG_SYS_PCI2_MEM_BASE |
313 | #define CONFIG_SYS_PCI2_MEM_SIZE 0x10000000 /* 256M */ | 312 | #define CONFIG_SYS_PCI2_MEM_SIZE 0x10000000 /* 256M */ |
314 | #define CONFIG_SYS_PCI2_MMIO_BASE 0xB0000000 | 313 | #define CONFIG_SYS_PCI2_MMIO_BASE 0xB0000000 |
315 | #define CONFIG_SYS_PCI2_MMIO_PHYS CONFIG_SYS_PCI2_MMIO_BASE | 314 | #define CONFIG_SYS_PCI2_MMIO_PHYS CONFIG_SYS_PCI2_MMIO_BASE |
316 | #define CONFIG_SYS_PCI2_MMIO_SIZE 0x10000000 /* 256M */ | 315 | #define CONFIG_SYS_PCI2_MMIO_SIZE 0x10000000 /* 256M */ |
317 | #define CONFIG_SYS_PCI2_IO_BASE 0x00000000 | 316 | #define CONFIG_SYS_PCI2_IO_BASE 0x00000000 |
318 | #define CONFIG_SYS_PCI2_IO_PHYS 0xE2100000 | 317 | #define CONFIG_SYS_PCI2_IO_PHYS 0xE2100000 |
319 | #define CONFIG_SYS_PCI2_IO_SIZE 0x00100000 /* 1M */ | 318 | #define CONFIG_SYS_PCI2_IO_SIZE 0x00100000 /* 1M */ |
320 | 319 | ||
321 | #if defined(CONFIG_PCI) | 320 | #if defined(CONFIG_PCI) |
322 | 321 | ||
323 | #define PCI_64BIT | 322 | #define PCI_64BIT |
324 | #define PCI_ONE_PCI1 | 323 | #define PCI_ONE_PCI1 |
325 | #if defined(PCI_64BIT) | 324 | #if defined(PCI_64BIT) |
326 | #undef PCI_ALL_PCI1 | 325 | #undef PCI_ALL_PCI1 |
327 | #undef PCI_TWO_PCI1 | 326 | #undef PCI_TWO_PCI1 |
328 | #undef PCI_ONE_PCI1 | 327 | #undef PCI_ONE_PCI1 |
329 | #endif | 328 | #endif |
330 | 329 | ||
331 | #define CONFIG_NET_MULTI | 330 | #define CONFIG_NET_MULTI |
332 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ | 331 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ |
333 | 332 | ||
334 | #undef CONFIG_EEPRO100 | 333 | #undef CONFIG_EEPRO100 |
335 | #undef CONFIG_TULIP | 334 | #undef CONFIG_TULIP |
336 | 335 | ||
337 | #if !defined(CONFIG_PCI_PNP) | 336 | #if !defined(CONFIG_PCI_PNP) |
338 | #define PCI_ENET0_IOADDR 0xFIXME | 337 | #define PCI_ENET0_IOADDR 0xFIXME |
339 | #define PCI_ENET0_MEMADDR 0xFIXME | 338 | #define PCI_ENET0_MEMADDR 0xFIXME |
340 | #define PCI_IDSEL_NUMBER 0xFIXME | 339 | #define PCI_IDSEL_NUMBER 0xFIXME |
341 | #endif | 340 | #endif |
342 | 341 | ||
343 | #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ | 342 | #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ |
344 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1057 /* Motorola */ | 343 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1057 /* Motorola */ |
345 | 344 | ||
346 | #endif /* CONFIG_PCI */ | 345 | #endif /* CONFIG_PCI */ |
347 | 346 | ||
348 | /* | 347 | /* |
349 | * TSEC configuration | 348 | * TSEC configuration |
350 | */ | 349 | */ |
351 | #define CONFIG_TSEC_ENET /* TSEC ethernet support */ | 350 | #define CONFIG_TSEC_ENET /* TSEC ethernet support */ |
352 | 351 | ||
353 | #if defined(CONFIG_TSEC_ENET) | 352 | #if defined(CONFIG_TSEC_ENET) |
354 | #ifndef CONFIG_NET_MULTI | 353 | #ifndef CONFIG_NET_MULTI |
355 | #define CONFIG_NET_MULTI 1 | 354 | #define CONFIG_NET_MULTI 1 |
356 | #endif | 355 | #endif |
357 | 356 | ||
358 | #define CONFIG_TSEC1 1 | 357 | #define CONFIG_TSEC1 1 |
359 | #define CONFIG_TSEC1_NAME "TSEC0" | 358 | #define CONFIG_TSEC1_NAME "TSEC0" |
360 | #define CONFIG_TSEC2 1 | 359 | #define CONFIG_TSEC2 1 |
361 | #define CONFIG_TSEC2_NAME "TSEC1" | 360 | #define CONFIG_TSEC2_NAME "TSEC1" |
362 | #define CONFIG_PHY_BCM5421S 1 | 361 | #define CONFIG_PHY_BCM5421S 1 |
363 | #define TSEC1_PHY_ADDR 0x19 | 362 | #define TSEC1_PHY_ADDR 0x19 |
364 | #define TSEC2_PHY_ADDR 0x1a | 363 | #define TSEC2_PHY_ADDR 0x1a |
365 | #define TSEC1_PHYIDX 0 | 364 | #define TSEC1_PHYIDX 0 |
366 | #define TSEC2_PHYIDX 0 | 365 | #define TSEC2_PHYIDX 0 |
367 | #define TSEC1_FLAGS TSEC_GIGABIT | 366 | #define TSEC1_FLAGS TSEC_GIGABIT |
368 | #define TSEC2_FLAGS TSEC_GIGABIT | 367 | #define TSEC2_FLAGS TSEC_GIGABIT |
369 | 368 | ||
370 | /* Options are: TSEC[0-1] */ | 369 | /* Options are: TSEC[0-1] */ |
371 | #define CONFIG_ETHPRIME "TSEC0" | 370 | #define CONFIG_ETHPRIME "TSEC0" |
372 | 371 | ||
373 | #endif /* CONFIG_TSEC_ENET */ | 372 | #endif /* CONFIG_TSEC_ENET */ |
374 | 373 | ||
375 | /* | 374 | /* |
376 | * Environment | 375 | * Environment |
377 | */ | 376 | */ |
378 | #ifndef CONFIG_SYS_RAMBOOT | 377 | #ifndef CONFIG_SYS_RAMBOOT |
379 | #define CONFIG_ENV_IS_IN_FLASH 1 | 378 | #define CONFIG_ENV_IS_IN_FLASH 1 |
380 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + 0x40000) | 379 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + 0x40000) |
381 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */ | 380 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */ |
382 | #define CONFIG_ENV_SIZE 0x2000 | 381 | #define CONFIG_ENV_SIZE 0x2000 |
383 | 382 | ||
384 | /* Address and size of Redundant Environment Sector */ | 383 | /* Address and size of Redundant Environment Sector */ |
385 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE) | 384 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE) |
386 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) | 385 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) |
387 | 386 | ||
388 | #else | 387 | #else |
389 | #define CONFIG_SYS_NO_FLASH 1 /* Flash is not usable now */ | 388 | #define CONFIG_SYS_NO_FLASH 1 /* Flash is not usable now */ |
390 | #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */ | 389 | #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */ |
391 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000) | 390 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000) |
392 | #define CONFIG_ENV_SIZE 0x2000 | 391 | #define CONFIG_ENV_SIZE 0x2000 |
393 | #endif | 392 | #endif |
394 | 393 | ||
395 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ | 394 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
396 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ | 395 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
397 | 396 | ||
398 | 397 | ||
399 | /* | 398 | /* |
400 | * BOOTP options | 399 | * BOOTP options |
401 | */ | 400 | */ |
402 | #define CONFIG_BOOTP_BOOTFILESIZE | 401 | #define CONFIG_BOOTP_BOOTFILESIZE |
403 | #define CONFIG_BOOTP_BOOTPATH | 402 | #define CONFIG_BOOTP_BOOTPATH |
404 | #define CONFIG_BOOTP_GATEWAY | 403 | #define CONFIG_BOOTP_GATEWAY |
405 | #define CONFIG_BOOTP_HOSTNAME | 404 | #define CONFIG_BOOTP_HOSTNAME |
406 | 405 | ||
407 | 406 | ||
408 | /* | 407 | /* |
409 | * Command line configuration. | 408 | * Command line configuration. |
410 | */ | 409 | */ |
411 | #include <config_cmd_default.h> | 410 | #include <config_cmd_default.h> |
412 | 411 | ||
413 | #define CONFIG_CMD_I2C | 412 | #define CONFIG_CMD_I2C |
414 | #define CONFIG_CMD_MII | 413 | #define CONFIG_CMD_MII |
415 | #define CONFIG_CMD_PING | 414 | #define CONFIG_CMD_PING |
416 | 415 | ||
417 | #if defined(CONFIG_PCI) | 416 | #if defined(CONFIG_PCI) |
418 | #define CONFIG_CMD_PCI | 417 | #define CONFIG_CMD_PCI |
419 | #endif | 418 | #endif |
420 | 419 | ||
421 | #if defined(CONFIG_SYS_RAMBOOT) | 420 | #if defined(CONFIG_SYS_RAMBOOT) |
422 | #undef CONFIG_CMD_SAVEENV | 421 | #undef CONFIG_CMD_SAVEENV |
423 | #undef CONFIG_CMD_LOADS | 422 | #undef CONFIG_CMD_LOADS |
424 | #endif | 423 | #endif |
425 | 424 | ||
426 | 425 | ||
427 | #undef CONFIG_WATCHDOG /* watchdog disabled */ | 426 | #undef CONFIG_WATCHDOG /* watchdog disabled */ |
428 | 427 | ||
429 | /* | 428 | /* |
430 | * Miscellaneous configurable options | 429 | * Miscellaneous configurable options |
431 | */ | 430 | */ |
432 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 431 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
433 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ | 432 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ |
434 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | 433 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
435 | 434 | ||
436 | #if defined(CONFIG_CMD_KGDB) | 435 | #if defined(CONFIG_CMD_KGDB) |
437 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ | 436 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
438 | #else | 437 | #else |
439 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | 438 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
440 | #endif | 439 | #endif |
441 | 440 | ||
442 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ | 441 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
443 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 442 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
444 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | 443 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
445 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ | 444 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ |
446 | 445 | ||
447 | /* | 446 | /* |
448 | * For booting Linux, the board info and command line data | 447 | * For booting Linux, the board info and command line data |
449 | * have to be in the first 8 MB of memory, since this is | 448 | * have to be in the first 8 MB of memory, since this is |
450 | * the maximum mapped by the Linux kernel during initialization. | 449 | * the maximum mapped by the Linux kernel during initialization. |
451 | */ | 450 | */ |
452 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ | 451 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/ |
453 | 452 | ||
454 | #define CONFIG_SYS_RCWH_PCIHOST 0x80000000 /* PCIHOST */ | 453 | #define CONFIG_SYS_RCWH_PCIHOST 0x80000000 /* PCIHOST */ |
455 | 454 | ||
456 | #if 1 /*528/264*/ | 455 | #if 1 /*528/264*/ |
457 | #define CONFIG_SYS_HRCW_LOW (\ | 456 | #define CONFIG_SYS_HRCW_LOW (\ |
458 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ | 457 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ |
459 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ | 458 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ |
460 | HRCWL_CSB_TO_CLKIN |\ | 459 | HRCWL_CSB_TO_CLKIN |\ |
461 | HRCWL_VCO_1X2 |\ | 460 | HRCWL_VCO_1X2 |\ |
462 | HRCWL_CORE_TO_CSB_2X1) | 461 | HRCWL_CORE_TO_CSB_2X1) |
463 | #elif 0 /*396/132*/ | 462 | #elif 0 /*396/132*/ |
464 | #define CONFIG_SYS_HRCW_LOW (\ | 463 | #define CONFIG_SYS_HRCW_LOW (\ |
465 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ | 464 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ |
466 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ | 465 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ |
467 | HRCWL_CSB_TO_CLKIN |\ | 466 | HRCWL_CSB_TO_CLKIN |\ |
468 | HRCWL_VCO_1X4 |\ | 467 | HRCWL_VCO_1X4 |\ |
469 | HRCWL_CORE_TO_CSB_3X1) | 468 | HRCWL_CORE_TO_CSB_3X1) |
470 | #elif 0 /*264/132*/ | 469 | #elif 0 /*264/132*/ |
471 | #define CONFIG_SYS_HRCW_LOW (\ | 470 | #define CONFIG_SYS_HRCW_LOW (\ |
472 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ | 471 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ |
473 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ | 472 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ |
474 | HRCWL_CSB_TO_CLKIN |\ | 473 | HRCWL_CSB_TO_CLKIN |\ |
475 | HRCWL_VCO_1X4 |\ | 474 | HRCWL_VCO_1X4 |\ |
476 | HRCWL_CORE_TO_CSB_2X1) | 475 | HRCWL_CORE_TO_CSB_2X1) |
477 | #elif 0 /*132/132*/ | 476 | #elif 0 /*132/132*/ |
478 | #define CONFIG_SYS_HRCW_LOW (\ | 477 | #define CONFIG_SYS_HRCW_LOW (\ |
479 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ | 478 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ |
480 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ | 479 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ |
481 | HRCWL_CSB_TO_CLKIN |\ | 480 | HRCWL_CSB_TO_CLKIN |\ |
482 | HRCWL_VCO_1X4 |\ | 481 | HRCWL_VCO_1X4 |\ |
483 | HRCWL_CORE_TO_CSB_1X1) | 482 | HRCWL_CORE_TO_CSB_1X1) |
484 | #elif 0 /*264/264 */ | 483 | #elif 0 /*264/264 */ |
485 | #define CONFIG_SYS_HRCW_LOW (\ | 484 | #define CONFIG_SYS_HRCW_LOW (\ |
486 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ | 485 | HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\ |
487 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ | 486 | HRCWL_DDR_TO_SCB_CLK_1X1 |\ |
488 | HRCWL_CSB_TO_CLKIN |\ | 487 | HRCWL_CSB_TO_CLKIN |\ |
489 | HRCWL_VCO_1X4 |\ | 488 | HRCWL_VCO_1X4 |\ |
490 | HRCWL_CORE_TO_CSB_1X1) | 489 | HRCWL_CORE_TO_CSB_1X1) |
491 | #endif | 490 | #endif |
492 | 491 | ||
493 | #if defined(PCI_64BIT) | 492 | #if defined(PCI_64BIT) |
494 | #define CONFIG_SYS_HRCW_HIGH (\ | 493 | #define CONFIG_SYS_HRCW_HIGH (\ |
495 | HRCWH_PCI_HOST |\ | 494 | HRCWH_PCI_HOST |\ |
496 | HRCWH_64_BIT_PCI |\ | 495 | HRCWH_64_BIT_PCI |\ |
497 | HRCWH_PCI1_ARBITER_ENABLE |\ | 496 | HRCWH_PCI1_ARBITER_ENABLE |\ |
498 | HRCWH_PCI2_ARBITER_DISABLE |\ | 497 | HRCWH_PCI2_ARBITER_DISABLE |\ |
499 | HRCWH_CORE_ENABLE |\ | 498 | HRCWH_CORE_ENABLE |\ |
500 | HRCWH_FROM_0X00000100 |\ | 499 | HRCWH_FROM_0X00000100 |\ |
501 | HRCWH_BOOTSEQ_DISABLE |\ | 500 | HRCWH_BOOTSEQ_DISABLE |\ |
502 | HRCWH_SW_WATCHDOG_DISABLE |\ | 501 | HRCWH_SW_WATCHDOG_DISABLE |\ |
503 | HRCWH_ROM_LOC_LOCAL_16BIT |\ | 502 | HRCWH_ROM_LOC_LOCAL_16BIT |\ |
504 | HRCWH_TSEC1M_IN_GMII |\ | 503 | HRCWH_TSEC1M_IN_GMII |\ |
505 | HRCWH_TSEC2M_IN_GMII ) | 504 | HRCWH_TSEC2M_IN_GMII ) |
506 | #else | 505 | #else |
507 | #define CONFIG_SYS_HRCW_HIGH (\ | 506 | #define CONFIG_SYS_HRCW_HIGH (\ |
508 | HRCWH_PCI_HOST |\ | 507 | HRCWH_PCI_HOST |\ |
509 | HRCWH_32_BIT_PCI |\ | 508 | HRCWH_32_BIT_PCI |\ |
510 | HRCWH_PCI1_ARBITER_ENABLE |\ | 509 | HRCWH_PCI1_ARBITER_ENABLE |\ |
511 | HRCWH_PCI2_ARBITER_ENABLE |\ | 510 | HRCWH_PCI2_ARBITER_ENABLE |\ |
512 | HRCWH_CORE_ENABLE |\ | 511 | HRCWH_CORE_ENABLE |\ |
513 | HRCWH_FROM_0X00000100 |\ | 512 | HRCWH_FROM_0X00000100 |\ |
514 | HRCWH_BOOTSEQ_DISABLE |\ | 513 | HRCWH_BOOTSEQ_DISABLE |\ |
515 | HRCWH_SW_WATCHDOG_DISABLE |\ | 514 | HRCWH_SW_WATCHDOG_DISABLE |\ |
516 | HRCWH_ROM_LOC_LOCAL_16BIT |\ | 515 | HRCWH_ROM_LOC_LOCAL_16BIT |\ |
517 | HRCWH_TSEC1M_IN_GMII |\ | 516 | HRCWH_TSEC1M_IN_GMII |\ |
518 | HRCWH_TSEC2M_IN_GMII ) | 517 | HRCWH_TSEC2M_IN_GMII ) |
519 | #endif | 518 | #endif |
520 | 519 | ||
521 | /* System IO Config */ | 520 | /* System IO Config */ |
522 | #define CONFIG_SYS_SICRH 0 | 521 | #define CONFIG_SYS_SICRH 0 |
523 | #define CONFIG_SYS_SICRL SICRL_LDP_A | 522 | #define CONFIG_SYS_SICRL SICRL_LDP_A |
524 | 523 | ||
525 | #define CONFIG_SYS_HID0_INIT 0x000000000 | 524 | #define CONFIG_SYS_HID0_INIT 0x000000000 |
526 | #define CONFIG_SYS_HID0_FINAL HID0_ENABLE_MACHINE_CHECK | 525 | #define CONFIG_SYS_HID0_FINAL HID0_ENABLE_MACHINE_CHECK |
527 | 526 | ||
528 | /* #define CONFIG_SYS_HID0_FINAL (\ | 527 | /* #define CONFIG_SYS_HID0_FINAL (\ |
529 | HID0_ENABLE_INSTRUCTION_CACHE |\ | 528 | HID0_ENABLE_INSTRUCTION_CACHE |\ |
530 | HID0_ENABLE_M_BIT |\ | 529 | HID0_ENABLE_M_BIT |\ |
531 | HID0_ENABLE_ADDRESS_BROADCAST ) */ | 530 | HID0_ENABLE_ADDRESS_BROADCAST ) */ |
532 | 531 | ||
533 | 532 | ||
534 | #define CONFIG_SYS_HID2 HID2_HBE | 533 | #define CONFIG_SYS_HID2 HID2_HBE |
535 | 534 | ||
536 | #define CONFIG_HIGH_BATS 1 /* High BATs supported */ | 535 | #define CONFIG_HIGH_BATS 1 /* High BATs supported */ |
537 | 536 | ||
538 | /* DDR @ 0x00000000 */ | 537 | /* DDR @ 0x00000000 */ |
539 | #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) | 538 | #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) |
540 | #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 539 | #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
541 | 540 | ||
542 | /* PCI @ 0x80000000 */ | 541 | /* PCI @ 0x80000000 */ |
543 | #ifdef CONFIG_PCI | 542 | #ifdef CONFIG_PCI |
544 | #define CONFIG_SYS_IBAT1L (CONFIG_SYS_PCI1_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) | 543 | #define CONFIG_SYS_IBAT1L (CONFIG_SYS_PCI1_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) |
545 | #define CONFIG_SYS_IBAT1U (CONFIG_SYS_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 544 | #define CONFIG_SYS_IBAT1U (CONFIG_SYS_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
546 | #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 545 | #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
547 | #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 546 | #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
548 | #else | 547 | #else |
549 | #define CONFIG_SYS_IBAT1L (0) | 548 | #define CONFIG_SYS_IBAT1L (0) |
550 | #define CONFIG_SYS_IBAT1U (0) | 549 | #define CONFIG_SYS_IBAT1U (0) |
551 | #define CONFIG_SYS_IBAT2L (0) | 550 | #define CONFIG_SYS_IBAT2L (0) |
552 | #define CONFIG_SYS_IBAT2U (0) | 551 | #define CONFIG_SYS_IBAT2U (0) |
553 | #endif | 552 | #endif |
554 | 553 | ||
555 | #ifdef CONFIG_MPC83XX_PCI2 | 554 | #ifdef CONFIG_MPC83XX_PCI2 |
556 | #define CONFIG_SYS_IBAT3L (CONFIG_SYS_PCI2_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) | 555 | #define CONFIG_SYS_IBAT3L (CONFIG_SYS_PCI2_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) |
557 | #define CONFIG_SYS_IBAT3U (CONFIG_SYS_PCI2_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 556 | #define CONFIG_SYS_IBAT3U (CONFIG_SYS_PCI2_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
558 | #define CONFIG_SYS_IBAT4L (CONFIG_SYS_PCI2_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 557 | #define CONFIG_SYS_IBAT4L (CONFIG_SYS_PCI2_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
559 | #define CONFIG_SYS_IBAT4U (CONFIG_SYS_PCI2_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP) | 558 | #define CONFIG_SYS_IBAT4U (CONFIG_SYS_PCI2_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
560 | #else | 559 | #else |
561 | #define CONFIG_SYS_IBAT3L (0) | 560 | #define CONFIG_SYS_IBAT3L (0) |
562 | #define CONFIG_SYS_IBAT3U (0) | 561 | #define CONFIG_SYS_IBAT3U (0) |
563 | #define CONFIG_SYS_IBAT4L (0) | 562 | #define CONFIG_SYS_IBAT4L (0) |
564 | #define CONFIG_SYS_IBAT4U (0) | 563 | #define CONFIG_SYS_IBAT4U (0) |
565 | #endif | 564 | #endif |
566 | 565 | ||
567 | /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 */ | 566 | /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 */ |
568 | #define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) | 567 | #define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
569 | #define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR | BATU_BL_256M | BATU_VS | BATU_VP) | 568 | #define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR | BATU_BL_256M | BATU_VS | BATU_VP) |
570 | 569 | ||
571 | /* SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */ | 570 | /* SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */ |
572 | #define CONFIG_SYS_IBAT6L (0xF0000000 | BATL_PP_10 | BATL_MEMCOHERENCE | \ | 571 | #define CONFIG_SYS_IBAT6L (0xF0000000 | BATL_PP_10 | BATL_MEMCOHERENCE | \ |
573 | BATL_GUARDEDSTORAGE) | 572 | BATL_GUARDEDSTORAGE) |
574 | #define CONFIG_SYS_IBAT6U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP) | 573 | #define CONFIG_SYS_IBAT6U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP) |
575 | 574 | ||
576 | #define CONFIG_SYS_IBAT7L (0) | 575 | #define CONFIG_SYS_IBAT7L (0) |
577 | #define CONFIG_SYS_IBAT7U (0) | 576 | #define CONFIG_SYS_IBAT7U (0) |
578 | 577 | ||
579 | #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L | 578 | #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L |
580 | #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U | 579 | #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U |
581 | #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L | 580 | #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L |
582 | #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U | 581 | #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U |
583 | #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L | 582 | #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L |
584 | #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U | 583 | #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U |
585 | #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L | 584 | #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L |
586 | #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U | 585 | #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U |
587 | #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L | 586 | #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L |
588 | #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U | 587 | #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U |
589 | #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L | 588 | #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L |
590 | #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U | 589 | #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U |
591 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L | 590 | #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L |
592 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U | 591 | #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U |
593 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L | 592 | #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L |
594 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U | 593 | #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U |
595 | 594 | ||
596 | /* | 595 | /* |
597 | * Internal Definitions | 596 | * Internal Definitions |
598 | * | 597 | * |
599 | * Boot Flags | 598 | * Boot Flags |
600 | */ | 599 | */ |
601 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ | 600 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
602 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 601 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
603 | 602 | ||
604 | #if defined(CONFIG_CMD_KGDB) | 603 | #if defined(CONFIG_CMD_KGDB) |
605 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */ | 604 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */ |
606 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ | 605 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ |
607 | #endif | 606 | #endif |
608 | 607 | ||
609 | /* | 608 | /* |
610 | * Environment Configuration | 609 | * Environment Configuration |
611 | */ | 610 | */ |
612 | #define CONFIG_ENV_OVERWRITE | 611 | #define CONFIG_ENV_OVERWRITE |
613 | 612 | ||
614 | #if defined(CONFIG_TSEC_ENET) | 613 | #if defined(CONFIG_TSEC_ENET) |
615 | #define CONFIG_HAS_ETH0 | 614 | #define CONFIG_HAS_ETH0 |
616 | #define CONFIG_ETHADDR 00:a0:1e:a0:13:8d | 615 | #define CONFIG_ETHADDR 00:a0:1e:a0:13:8d |
617 | #define CONFIG_HAS_ETH1 | 616 | #define CONFIG_HAS_ETH1 |
618 | #define CONFIG_ETH1ADDR 00:a0:1e:a0:13:8e | 617 | #define CONFIG_ETH1ADDR 00:a0:1e:a0:13:8e |
619 | #endif | 618 | #endif |
620 | 619 | ||
621 | #define CONFIG_IPADDR 192.168.1.234 | 620 | #define CONFIG_IPADDR 192.168.1.234 |
622 | 621 | ||
623 | #define CONFIG_HOSTNAME SBC8349 | 622 | #define CONFIG_HOSTNAME SBC8349 |
624 | #define CONFIG_ROOTPATH /tftpboot/rootfs | 623 | #define CONFIG_ROOTPATH /tftpboot/rootfs |
625 | #define CONFIG_BOOTFILE uImage | 624 | #define CONFIG_BOOTFILE uImage |
626 | 625 | ||
627 | #define CONFIG_SERVERIP 192.168.1.1 | 626 | #define CONFIG_SERVERIP 192.168.1.1 |
628 | #define CONFIG_GATEWAYIP 192.168.1.1 | 627 | #define CONFIG_GATEWAYIP 192.168.1.1 |
629 | #define CONFIG_NETMASK 255.255.255.0 | 628 | #define CONFIG_NETMASK 255.255.255.0 |
630 | 629 | ||
631 | #define CONFIG_LOADADDR 500000 /* default location for tftp and bootm */ | 630 | #define CONFIG_LOADADDR 500000 /* default location for tftp and bootm */ |
632 | 631 | ||
633 | #define CONFIG_BOOTDELAY 6 /* -1 disables auto-boot */ | 632 | #define CONFIG_BOOTDELAY 6 /* -1 disables auto-boot */ |
634 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs */ | 633 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs */ |
635 | 634 | ||
636 | #define CONFIG_BAUDRATE 115200 | 635 | #define CONFIG_BAUDRATE 115200 |
637 | 636 | ||
638 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 637 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
639 | "netdev=eth0\0" \ | 638 | "netdev=eth0\0" \ |
640 | "hostname=sbc8349\0" \ | 639 | "hostname=sbc8349\0" \ |
641 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ | 640 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
642 | "nfsroot=${serverip}:${rootpath}\0" \ | 641 | "nfsroot=${serverip}:${rootpath}\0" \ |
643 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ | 642 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ |
644 | "addip=setenv bootargs ${bootargs} " \ | 643 | "addip=setenv bootargs ${bootargs} " \ |
645 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ | 644 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ |
646 | ":${hostname}:${netdev}:off panic=1\0" \ | 645 | ":${hostname}:${netdev}:off panic=1\0" \ |
647 | "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\ | 646 | "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\ |
648 | "flash_nfs=run nfsargs addip addtty;" \ | 647 | "flash_nfs=run nfsargs addip addtty;" \ |
649 | "bootm ${kernel_addr}\0" \ | 648 | "bootm ${kernel_addr}\0" \ |
650 | "flash_self=run ramargs addip addtty;" \ | 649 | "flash_self=run ramargs addip addtty;" \ |
651 | "bootm ${kernel_addr} ${ramdisk_addr}\0" \ | 650 | "bootm ${kernel_addr} ${ramdisk_addr}\0" \ |
652 | "net_nfs=tftp 200000 ${bootfile};run nfsargs addip addtty;" \ | 651 | "net_nfs=tftp 200000 ${bootfile};run nfsargs addip addtty;" \ |
653 | "bootm\0" \ | 652 | "bootm\0" \ |
654 | "load=tftp 100000 /tftpboot/sbc8349/u-boot.bin\0" \ | 653 | "load=tftp 100000 /tftpboot/sbc8349/u-boot.bin\0" \ |
655 | "update=protect off fff00000 fff3ffff; " \ | 654 | "update=protect off fff00000 fff3ffff; " \ |
656 | "era fff00000 fff3ffff; cp.b 100000 fff00000 ${filesize}\0" \ | 655 | "era fff00000 fff3ffff; cp.b 100000 fff00000 ${filesize}\0" \ |
657 | "upd=run load update\0" \ | 656 | "upd=run load update\0" \ |
658 | "fdtaddr=400000\0" \ | 657 | "fdtaddr=400000\0" \ |
659 | "fdtfile=sbc8349.dtb\0" \ | 658 | "fdtfile=sbc8349.dtb\0" \ |
660 | "" | 659 | "" |
661 | 660 | ||
662 | #define CONFIG_NFSBOOTCOMMAND \ | 661 | #define CONFIG_NFSBOOTCOMMAND \ |
663 | "setenv bootargs root=/dev/nfs rw " \ | 662 | "setenv bootargs root=/dev/nfs rw " \ |
664 | "nfsroot=$serverip:$rootpath " \ | 663 | "nfsroot=$serverip:$rootpath " \ |
665 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ | 664 | "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ |
666 | "console=$consoledev,$baudrate $othbootargs;" \ | 665 | "console=$consoledev,$baudrate $othbootargs;" \ |
667 | "tftp $loadaddr $bootfile;" \ | 666 | "tftp $loadaddr $bootfile;" \ |
668 | "tftp $fdtaddr $fdtfile;" \ | 667 | "tftp $fdtaddr $fdtfile;" \ |
669 | "bootm $loadaddr - $fdtaddr" | 668 | "bootm $loadaddr - $fdtaddr" |
670 | 669 | ||
671 | #define CONFIG_RAMBOOTCOMMAND \ | 670 | #define CONFIG_RAMBOOTCOMMAND \ |
672 | "setenv bootargs root=/dev/ram rw " \ | 671 | "setenv bootargs root=/dev/ram rw " \ |
673 | "console=$consoledev,$baudrate $othbootargs;" \ | 672 | "console=$consoledev,$baudrate $othbootargs;" \ |
674 | "tftp $ramdiskaddr $ramdiskfile;" \ | 673 | "tftp $ramdiskaddr $ramdiskfile;" \ |
675 | "tftp $loadaddr $bootfile;" \ | 674 | "tftp $loadaddr $bootfile;" \ |
676 | "tftp $fdtaddr $fdtfile;" \ | 675 | "tftp $fdtaddr $fdtfile;" \ |
677 | "bootm $loadaddr $ramdiskaddr $fdtaddr" | 676 | "bootm $loadaddr $ramdiskaddr $fdtaddr" |
678 | 677 | ||
679 | #define CONFIG_BOOTCOMMAND "run flash_self" | 678 | #define CONFIG_BOOTCOMMAND "run flash_self" |
680 | 679 | ||
681 | #endif /* __CONFIG_H */ | 680 | #endif /* __CONFIG_H */ |
682 | 681 |
include/configs/socrates.h
1 | /* | 1 | /* |
2 | * (C) Copyright 2008 | 2 | * (C) Copyright 2008 |
3 | * Sergei Poselenov, Emcraft Systems, sposelenov@emcraft.com. | 3 | * Sergei Poselenov, Emcraft Systems, sposelenov@emcraft.com. |
4 | * | 4 | * |
5 | * Wolfgang Denk <wd@denx.de> | 5 | * Wolfgang Denk <wd@denx.de> |
6 | * Copyright 2004 Freescale Semiconductor. | 6 | * Copyright 2004 Freescale Semiconductor. |
7 | * (C) Copyright 2002,2003 Motorola,Inc. | 7 | * (C) Copyright 2002,2003 Motorola,Inc. |
8 | * Xianghua Xiao <X.Xiao@motorola.com> | 8 | * Xianghua Xiao <X.Xiao@motorola.com> |
9 | * | 9 | * |
10 | * See file CREDITS for list of people who contributed to this | 10 | * See file CREDITS for list of people who contributed to this |
11 | * project. | 11 | * project. |
12 | * | 12 | * |
13 | * This program is free software; you can redistribute it and/or | 13 | * This program is free software; you can redistribute it and/or |
14 | * modify it under the terms of the GNU General Public License as | 14 | * modify it under the terms of the GNU General Public License as |
15 | * published by the Free Software Foundation; either version 2 of | 15 | * published by the Free Software Foundation; either version 2 of |
16 | * the License, or (at your option) any later version. | 16 | * the License, or (at your option) any later version. |
17 | * | 17 | * |
18 | * This program is distributed in the hope that it will be useful, | 18 | * This program is distributed in the hope that it will be useful, |
19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
21 | * GNU General Public License for more details. | 21 | * GNU General Public License for more details. |
22 | * | 22 | * |
23 | * You should have received a copy of the GNU General Public License | 23 | * You should have received a copy of the GNU General Public License |
24 | * along with this program; if not, write to the Free Software | 24 | * along with this program; if not, write to the Free Software |
25 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 25 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
26 | * MA 02111-1307 USA | 26 | * MA 02111-1307 USA |
27 | */ | 27 | */ |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * Socrates | 30 | * Socrates |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #ifndef __CONFIG_H | 33 | #ifndef __CONFIG_H |
34 | #define __CONFIG_H | 34 | #define __CONFIG_H |
35 | 35 | ||
36 | /* new uImage format support */ | 36 | /* new uImage format support */ |
37 | #define CONFIG_FIT 1 | 37 | #define CONFIG_FIT 1 |
38 | #define CONFIG_OF_LIBFDT 1 | 38 | #define CONFIG_OF_LIBFDT 1 |
39 | #define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ | 39 | #define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ |
40 | 40 | ||
41 | /* High Level Configuration Options */ | 41 | /* High Level Configuration Options */ |
42 | #define CONFIG_BOOKE 1 /* BOOKE */ | 42 | #define CONFIG_BOOKE 1 /* BOOKE */ |
43 | #define CONFIG_E500 1 /* BOOKE e500 family */ | 43 | #define CONFIG_E500 1 /* BOOKE e500 family */ |
44 | #define CONFIG_MPC85xx 1 /* MPC8540/60/55/41 */ | 44 | #define CONFIG_MPC85xx 1 /* MPC8540/60/55/41 */ |
45 | #define CONFIG_MPC8544 1 | 45 | #define CONFIG_MPC8544 1 |
46 | #define CONFIG_SOCRATES 1 | 46 | #define CONFIG_SOCRATES 1 |
47 | 47 | ||
48 | #define CONFIG_PCI | 48 | #define CONFIG_PCI |
49 | 49 | ||
50 | #define CONFIG_TSEC_ENET /* tsec ethernet support */ | 50 | #define CONFIG_TSEC_ENET /* tsec ethernet support */ |
51 | 51 | ||
52 | #define CONFIG_MISC_INIT_R 1 /* Call misc_init_r */ | 52 | #define CONFIG_MISC_INIT_R 1 /* Call misc_init_r */ |
53 | #define CONFIG_BOARD_EARLY_INIT_R 1 /* Call board_early_init_r */ | 53 | #define CONFIG_BOARD_EARLY_INIT_R 1 /* Call board_early_init_r */ |
54 | 54 | ||
55 | #define CONFIG_FSL_LAW 1 /* Use common FSL init code */ | 55 | #define CONFIG_FSL_LAW 1 /* Use common FSL init code */ |
56 | 56 | ||
57 | /* | 57 | /* |
58 | * Only possible on E500 Version 2 or newer cores. | 58 | * Only possible on E500 Version 2 or newer cores. |
59 | */ | 59 | */ |
60 | #define CONFIG_ENABLE_36BIT_PHYS 1 | 60 | #define CONFIG_ENABLE_36BIT_PHYS 1 |
61 | 61 | ||
62 | /* | 62 | /* |
63 | * sysclk for MPC85xx | 63 | * sysclk for MPC85xx |
64 | * | 64 | * |
65 | * Two valid values are: | 65 | * Two valid values are: |
66 | * 33000000 | 66 | * 33000000 |
67 | * 66000000 | 67 | * 66000000 |
68 | * | 68 | * |
69 | * Most PCI cards are still 33Mhz, so in the presence of PCI, 33MHz | 69 | * Most PCI cards are still 33Mhz, so in the presence of PCI, 33MHz |
70 | * is likely the desired value here, so that is now the default. | 70 | * is likely the desired value here, so that is now the default. |
71 | * The board, however, can run at 66MHz. In any event, this value | 71 | * The board, however, can run at 66MHz. In any event, this value |
72 | * must match the settings of some switches. Details can be found | 72 | * must match the settings of some switches. Details can be found |
73 | * in the README.mpc85xxads. | 73 | * in the README.mpc85xxads. |
74 | */ | 74 | */ |
75 | 75 | ||
76 | #ifndef CONFIG_SYS_CLK_FREQ | 76 | #ifndef CONFIG_SYS_CLK_FREQ |
77 | #define CONFIG_SYS_CLK_FREQ 66666666 | 77 | #define CONFIG_SYS_CLK_FREQ 66666666 |
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | /* | 80 | /* |
81 | * These can be toggled for performance analysis, otherwise use default. | 81 | * These can be toggled for performance analysis, otherwise use default. |
82 | */ | 82 | */ |
83 | #define CONFIG_L2_CACHE /* toggle L2 cache */ | 83 | #define CONFIG_L2_CACHE /* toggle L2 cache */ |
84 | #define CONFIG_BTB /* toggle branch predition */ | 84 | #define CONFIG_BTB /* toggle branch predition */ |
85 | 85 | ||
86 | #define CONFIG_SYS_INIT_DBCR DBCR_IDM /* Enable Debug Exceptions */ | 86 | #define CONFIG_SYS_INIT_DBCR DBCR_IDM /* Enable Debug Exceptions */ |
87 | 87 | ||
88 | #undef CONFIG_SYS_DRAM_TEST /* memory test, takes time */ | 88 | #undef CONFIG_SYS_DRAM_TEST /* memory test, takes time */ |
89 | #define CONFIG_SYS_MEMTEST_START 0x00400000 | 89 | #define CONFIG_SYS_MEMTEST_START 0x00400000 |
90 | #define CONFIG_SYS_MEMTEST_END 0x00C00000 | 90 | #define CONFIG_SYS_MEMTEST_END 0x00C00000 |
91 | 91 | ||
92 | /* | 92 | /* |
93 | * Base addresses -- Note these are effective addresses where the | 93 | * Base addresses -- Note these are effective addresses where the |
94 | * actual resources get mapped (not physical addresses) | 94 | * actual resources get mapped (not physical addresses) |
95 | */ | 95 | */ |
96 | #define CONFIG_SYS_CCSRBAR_DEFAULT 0xFF700000 /* CCSRBAR Default */ | 96 | #define CONFIG_SYS_CCSRBAR_DEFAULT 0xFF700000 /* CCSRBAR Default */ |
97 | #define CONFIG_SYS_CCSRBAR 0xE0000000 /* relocated CCSRBAR */ | 97 | #define CONFIG_SYS_CCSRBAR 0xE0000000 /* relocated CCSRBAR */ |
98 | #define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR /* physical addr of CCSRBAR */ | 98 | #define CONFIG_SYS_CCSRBAR_PHYS CONFIG_SYS_CCSRBAR /* physical addr of CCSRBAR */ |
99 | #define CONFIG_SYS_IMMR CONFIG_SYS_CCSRBAR /* PQII uses CONFIG_SYS_IMMR */ | 99 | #define CONFIG_SYS_IMMR CONFIG_SYS_CCSRBAR /* PQII uses CONFIG_SYS_IMMR */ |
100 | 100 | ||
101 | /* DDR Setup */ | 101 | /* DDR Setup */ |
102 | #define CONFIG_FSL_DDR2 | 102 | #define CONFIG_FSL_DDR2 |
103 | #undef CONFIG_FSL_DDR_INTERACTIVE | 103 | #undef CONFIG_FSL_DDR_INTERACTIVE |
104 | #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup */ | 104 | #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup */ |
105 | #define CONFIG_DDR_SPD | 105 | #define CONFIG_DDR_SPD |
106 | 106 | ||
107 | #undef CONFIG_ECC_INIT_VIA_DDRCONTROLLER /* DDR controller or DMA? */ | 107 | #undef CONFIG_ECC_INIT_VIA_DDRCONTROLLER /* DDR controller or DMA? */ |
108 | #define CONFIG_MEM_INIT_VALUE 0xDeadBeef | 108 | #define CONFIG_MEM_INIT_VALUE 0xDeadBeef |
109 | 109 | ||
110 | #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 | 110 | #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000 |
111 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE | 111 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE |
112 | #define CONFIG_VERY_BIG_RAM | 112 | #define CONFIG_VERY_BIG_RAM |
113 | 113 | ||
114 | #define CONFIG_NUM_DDR_CONTROLLERS 1 | 114 | #define CONFIG_NUM_DDR_CONTROLLERS 1 |
115 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 | 115 | #define CONFIG_DIMM_SLOTS_PER_CTLR 1 |
116 | #define CONFIG_CHIP_SELECTS_PER_CTRL 2 | 116 | #define CONFIG_CHIP_SELECTS_PER_CTRL 2 |
117 | 117 | ||
118 | /* I2C addresses of SPD EEPROMs */ | 118 | /* I2C addresses of SPD EEPROMs */ |
119 | #define SPD_EEPROM_ADDRESS 0x50 /* CTLR 0 DIMM 0 */ | 119 | #define SPD_EEPROM_ADDRESS 0x50 /* CTLR 0 DIMM 0 */ |
120 | 120 | ||
121 | #define CONFIG_DDR_DEFAULT_CL 30 /* CAS latency 3 */ | 121 | #define CONFIG_DDR_DEFAULT_CL 30 /* CAS latency 3 */ |
122 | 122 | ||
123 | /* Hardcoded values, to use instead of SPD */ | 123 | /* Hardcoded values, to use instead of SPD */ |
124 | #define CONFIG_SYS_DDR_CS0_BNDS 0x0000000f | 124 | #define CONFIG_SYS_DDR_CS0_BNDS 0x0000000f |
125 | #define CONFIG_SYS_DDR_CS0_CONFIG 0x80010102 | 125 | #define CONFIG_SYS_DDR_CS0_CONFIG 0x80010102 |
126 | #define CONFIG_SYS_DDR_TIMING_0 0x00260802 | 126 | #define CONFIG_SYS_DDR_TIMING_0 0x00260802 |
127 | #define CONFIG_SYS_DDR_TIMING_1 0x3935D322 | 127 | #define CONFIG_SYS_DDR_TIMING_1 0x3935D322 |
128 | #define CONFIG_SYS_DDR_TIMING_2 0x14904CC8 | 128 | #define CONFIG_SYS_DDR_TIMING_2 0x14904CC8 |
129 | #define CONFIG_SYS_DDR_MODE 0x00480432 | 129 | #define CONFIG_SYS_DDR_MODE 0x00480432 |
130 | #define CONFIG_SYS_DDR_INTERVAL 0x030C0100 | 130 | #define CONFIG_SYS_DDR_INTERVAL 0x030C0100 |
131 | #define CONFIG_SYS_DDR_CONFIG_2 0x04400000 | 131 | #define CONFIG_SYS_DDR_CONFIG_2 0x04400000 |
132 | #define CONFIG_SYS_DDR_CONFIG 0xC3008000 | 132 | #define CONFIG_SYS_DDR_CONFIG 0xC3008000 |
133 | #define CONFIG_SYS_DDR_CLK_CONTROL 0x03800000 | 133 | #define CONFIG_SYS_DDR_CLK_CONTROL 0x03800000 |
134 | #define CONFIG_SYS_SDRAM_SIZE 256 /* in Megs */ | 134 | #define CONFIG_SYS_SDRAM_SIZE 256 /* in Megs */ |
135 | 135 | ||
136 | /* | 136 | /* |
137 | * Flash on the LocalBus | 137 | * Flash on the LocalBus |
138 | */ | 138 | */ |
139 | #define CONFIG_SYS_LBC_CACHE_BASE 0xf0000000 /* Localbus cacheable */ | 139 | #define CONFIG_SYS_LBC_CACHE_BASE 0xf0000000 /* Localbus cacheable */ |
140 | 140 | ||
141 | #define CONFIG_SYS_FLASH0 0xFE000000 | 141 | #define CONFIG_SYS_FLASH0 0xFE000000 |
142 | #define CONFIG_SYS_FLASH1 0xFC000000 | 142 | #define CONFIG_SYS_FLASH1 0xFC000000 |
143 | #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH1, CONFIG_SYS_FLASH0 } | 143 | #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH1, CONFIG_SYS_FLASH0 } |
144 | 144 | ||
145 | #define CONFIG_SYS_LBC_FLASH_BASE CONFIG_SYS_FLASH1 /* Localbus flash start */ | 145 | #define CONFIG_SYS_LBC_FLASH_BASE CONFIG_SYS_FLASH1 /* Localbus flash start */ |
146 | #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_LBC_FLASH_BASE /* start of FLASH */ | 146 | #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_LBC_FLASH_BASE /* start of FLASH */ |
147 | 147 | ||
148 | #define CONFIG_SYS_BR0_PRELIM 0xfe001001 /* port size 16bit */ | 148 | #define CONFIG_SYS_BR0_PRELIM 0xfe001001 /* port size 16bit */ |
149 | #define CONFIG_SYS_OR0_PRELIM 0xfe000030 /* 32MB Flash */ | 149 | #define CONFIG_SYS_OR0_PRELIM 0xfe000030 /* 32MB Flash */ |
150 | #define CONFIG_SYS_BR1_PRELIM 0xfc001001 /* port size 16bit */ | 150 | #define CONFIG_SYS_BR1_PRELIM 0xfc001001 /* port size 16bit */ |
151 | #define CONFIG_SYS_OR1_PRELIM 0xfe000030 /* 32MB Flash */ | 151 | #define CONFIG_SYS_OR1_PRELIM 0xfe000030 /* 32MB Flash */ |
152 | 152 | ||
153 | #define CONFIG_SYS_FLASH_CFI /* flash is CFI compat. */ | 153 | #define CONFIG_SYS_FLASH_CFI /* flash is CFI compat. */ |
154 | #define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver*/ | 154 | #define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver*/ |
155 | 155 | ||
156 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */ | 156 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* number of banks */ |
157 | #define CONFIG_SYS_MAX_FLASH_SECT 256 /* sectors per device */ | 157 | #define CONFIG_SYS_MAX_FLASH_SECT 256 /* sectors per device */ |
158 | #undef CONFIG_SYS_FLASH_CHECKSUM | 158 | #undef CONFIG_SYS_FLASH_CHECKSUM |
159 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ | 159 | #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ |
160 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ | 160 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */ |
161 | 161 | ||
162 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ | 162 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */ |
163 | 163 | ||
164 | #define CONFIG_SYS_LBC_LCRR 0x00030004 /* LB clock ratio reg */ | 164 | #define CONFIG_SYS_LBC_LCRR 0x00030004 /* LB clock ratio reg */ |
165 | #define CONFIG_SYS_LBC_LBCR 0x00000000 /* LB config reg */ | 165 | #define CONFIG_SYS_LBC_LBCR 0x00000000 /* LB config reg */ |
166 | #define CONFIG_SYS_LBC_LSRT 0x20000000 /* LB sdram refresh timer */ | 166 | #define CONFIG_SYS_LBC_LSRT 0x20000000 /* LB sdram refresh timer */ |
167 | #define CONFIG_SYS_LBC_MRTPR 0x20000000 /* LB refresh timer presc.*/ | 167 | #define CONFIG_SYS_LBC_MRTPR 0x20000000 /* LB refresh timer presc.*/ |
168 | 168 | ||
169 | #define CONFIG_SYS_INIT_RAM_LOCK 1 | 169 | #define CONFIG_SYS_INIT_RAM_LOCK 1 |
170 | #define CONFIG_SYS_INIT_RAM_ADDR 0xe4010000 /* Initial RAM address */ | 170 | #define CONFIG_SYS_INIT_RAM_ADDR 0xe4010000 /* Initial RAM address */ |
171 | #define CONFIG_SYS_INIT_RAM_END 0x4000 /* End used area in RAM */ | 171 | #define CONFIG_SYS_INIT_RAM_END 0x4000 /* End used area in RAM */ |
172 | 172 | ||
173 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data*/ | 173 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* num bytes initial data*/ |
174 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) | 174 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
175 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET | 175 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
176 | 176 | ||
177 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256kB for Mon */ | 177 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256kB for Mon */ |
178 | #define CONFIG_SYS_MALLOC_LEN (4 << 20) /* Reserve 4 MB for malloc */ | 178 | #define CONFIG_SYS_MALLOC_LEN (4 << 20) /* Reserve 4 MB for malloc */ |
179 | 179 | ||
180 | /* FPGA and NAND */ | 180 | /* FPGA and NAND */ |
181 | #define CONFIG_SYS_FPGA_BASE 0xc0000000 | 181 | #define CONFIG_SYS_FPGA_BASE 0xc0000000 |
182 | #define CONFIG_SYS_FPGA_SIZE 0x00100000 /* 1 MB */ | 182 | #define CONFIG_SYS_FPGA_SIZE 0x00100000 /* 1 MB */ |
183 | #define CONFIG_SYS_HMI_BASE 0xc0010000 | 183 | #define CONFIG_SYS_HMI_BASE 0xc0010000 |
184 | #define CONFIG_SYS_BR3_PRELIM 0xc0001881 /* UPMA, 32-bit */ | 184 | #define CONFIG_SYS_BR3_PRELIM 0xc0001881 /* UPMA, 32-bit */ |
185 | #define CONFIG_SYS_OR3_PRELIM 0xfff00000 /* 1 MB */ | 185 | #define CONFIG_SYS_OR3_PRELIM 0xfff00000 /* 1 MB */ |
186 | 186 | ||
187 | #define CONFIG_SYS_NAND_BASE (CONFIG_SYS_FPGA_BASE + 0x70) | 187 | #define CONFIG_SYS_NAND_BASE (CONFIG_SYS_FPGA_BASE + 0x70) |
188 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 | 188 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
189 | #define CONFIG_CMD_NAND | 189 | #define CONFIG_CMD_NAND |
190 | 190 | ||
191 | /* LIME GDC */ | 191 | /* LIME GDC */ |
192 | #define CONFIG_SYS_LIME_BASE 0xc8000000 | 192 | #define CONFIG_SYS_LIME_BASE 0xc8000000 |
193 | #define CONFIG_SYS_LIME_SIZE 0x04000000 /* 64 MB */ | 193 | #define CONFIG_SYS_LIME_SIZE 0x04000000 /* 64 MB */ |
194 | #define CONFIG_SYS_BR2_PRELIM 0xc80018a1 /* UPMB, 32-bit */ | 194 | #define CONFIG_SYS_BR2_PRELIM 0xc80018a1 /* UPMB, 32-bit */ |
195 | #define CONFIG_SYS_OR2_PRELIM 0xfc000000 /* 64 MB */ | 195 | #define CONFIG_SYS_OR2_PRELIM 0xfc000000 /* 64 MB */ |
196 | 196 | ||
197 | #define CONFIG_VIDEO | 197 | #define CONFIG_VIDEO |
198 | #define CONFIG_VIDEO_MB862xx | 198 | #define CONFIG_VIDEO_MB862xx |
199 | #define CONFIG_CFB_CONSOLE | 199 | #define CONFIG_CFB_CONSOLE |
200 | #define CONFIG_VIDEO_LOGO | 200 | #define CONFIG_VIDEO_LOGO |
201 | #define CONFIG_VIDEO_BMP_LOGO | 201 | #define CONFIG_VIDEO_BMP_LOGO |
202 | #define CONFIG_CONSOLE_EXTRA_INFO | 202 | #define CONFIG_CONSOLE_EXTRA_INFO |
203 | #define VIDEO_FB_16BPP_PIXEL_SWAP | 203 | #define VIDEO_FB_16BPP_PIXEL_SWAP |
204 | #define CONFIG_VGA_AS_SINGLE_DEVICE | 204 | #define CONFIG_VGA_AS_SINGLE_DEVICE |
205 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV | 205 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV |
206 | #define CONFIG_VIDEO_SW_CURSOR | 206 | #define CONFIG_VIDEO_SW_CURSOR |
207 | #define CONFIG_SPLASH_SCREEN | 207 | #define CONFIG_SPLASH_SCREEN |
208 | #define CONFIG_VIDEO_BMP_GZIP | 208 | #define CONFIG_VIDEO_BMP_GZIP |
209 | #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (2 << 20) /* decompressed img */ | 209 | #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (2 << 20) /* decompressed img */ |
210 | 210 | ||
211 | /* Serial Port */ | 211 | /* Serial Port */ |
212 | 212 | ||
213 | #define CONFIG_CONS_INDEX 1 | 213 | #define CONFIG_CONS_INDEX 1 |
214 | #undef CONFIG_SERIAL_SOFTWARE_FIFO | 214 | #undef CONFIG_SERIAL_SOFTWARE_FIFO |
215 | #define CONFIG_SYS_NS16550 | 215 | #define CONFIG_SYS_NS16550 |
216 | #define CONFIG_SYS_NS16550_SERIAL | 216 | #define CONFIG_SYS_NS16550_SERIAL |
217 | #define CONFIG_SYS_NS16550_REG_SIZE 1 | 217 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
218 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) | 218 | #define CONFIG_SYS_NS16550_CLK get_bus_freq(0) |
219 | 219 | ||
220 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) | 220 | #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) |
221 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) | 221 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) |
222 | 222 | ||
223 | #define CONFIG_BAUDRATE 115200 | 223 | #define CONFIG_BAUDRATE 115200 |
224 | 224 | ||
225 | #define CONFIG_SYS_BAUDRATE_TABLE \ | 225 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
226 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} | 226 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} |
227 | 227 | ||
228 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ | 228 | #define CONFIG_CMDLINE_EDITING 1 /* add command line history */ |
229 | #define CONFIG_SYS_HUSH_PARSER 1 /* Use the HUSH parser */ | 229 | #define CONFIG_SYS_HUSH_PARSER 1 /* Use the HUSH parser */ |
230 | #ifdef CONFIG_SYS_HUSH_PARSER | 230 | #ifdef CONFIG_SYS_HUSH_PARSER |
231 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " | 231 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
232 | #endif | 232 | #endif |
233 | 233 | ||
234 | 234 | ||
235 | /* | 235 | /* |
236 | * I2C | 236 | * I2C |
237 | */ | 237 | */ |
238 | #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ | 238 | #define CONFIG_FSL_I2C /* Use FSL common I2C driver */ |
239 | #define CONFIG_HARD_I2C /* I2C with hardware support */ | 239 | #define CONFIG_HARD_I2C /* I2C with hardware support */ |
240 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ | 240 | #undef CONFIG_SOFT_I2C /* I2C bit-banged */ |
241 | #define CONFIG_SYS_I2C_SPEED 102124 /* I2C speed and slave address */ | 241 | #define CONFIG_SYS_I2C_SPEED 102124 /* I2C speed and slave address */ |
242 | #define CONFIG_SYS_I2C_SLAVE 0x7F | 242 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
243 | #define CONFIG_SYS_I2C_OFFSET 0x3000 | 243 | #define CONFIG_SYS_I2C_OFFSET 0x3000 |
244 | 244 | ||
245 | #define CONFIG_I2C_MULTI_BUS | 245 | #define CONFIG_I2C_MULTI_BUS |
246 | #define CONFIG_I2C_CMD_TREE | ||
247 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 | 246 | #define CONFIG_SYS_I2C2_OFFSET 0x3100 |
248 | 247 | ||
249 | /* I2C RTC */ | 248 | /* I2C RTC */ |
250 | #define CONFIG_RTC_RX8025 /* Use Epson rx8025 rtc via i2c */ | 249 | #define CONFIG_RTC_RX8025 /* Use Epson rx8025 rtc via i2c */ |
251 | #define CONFIG_SYS_I2C_RTC_ADDR 0x32 /* at address 0x32 */ | 250 | #define CONFIG_SYS_I2C_RTC_ADDR 0x32 /* at address 0x32 */ |
252 | 251 | ||
253 | /* I2C W83782G HW-Monitoring IC */ | 252 | /* I2C W83782G HW-Monitoring IC */ |
254 | #define CONFIG_SYS_I2C_W83782G_ADDR 0x28 /* W83782G address */ | 253 | #define CONFIG_SYS_I2C_W83782G_ADDR 0x28 /* W83782G address */ |
255 | 254 | ||
256 | /* I2C temp sensor */ | 255 | /* I2C temp sensor */ |
257 | /* Socrates uses Maxim's DS75, which is compatible with LM75 */ | 256 | /* Socrates uses Maxim's DS75, which is compatible with LM75 */ |
258 | #define CONFIG_DTT_LM75 1 | 257 | #define CONFIG_DTT_LM75 1 |
259 | #define CONFIG_DTT_SENSORS {4} /* Sensor addresses */ | 258 | #define CONFIG_DTT_SENSORS {4} /* Sensor addresses */ |
260 | #define CONFIG_SYS_DTT_MAX_TEMP 125 | 259 | #define CONFIG_SYS_DTT_MAX_TEMP 125 |
261 | #define CONFIG_SYS_DTT_LOW_TEMP -55 | 260 | #define CONFIG_SYS_DTT_LOW_TEMP -55 |
262 | #define CONFIG_SYS_DTT_HYSTERESIS 3 | 261 | #define CONFIG_SYS_DTT_HYSTERESIS 3 |
263 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 | 262 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 |
264 | 263 | ||
265 | /* | 264 | /* |
266 | * General PCI | 265 | * General PCI |
267 | * Memory space is mapped 1-1. | 266 | * Memory space is mapped 1-1. |
268 | */ | 267 | */ |
269 | #define CONFIG_SYS_PCI_PHYS 0x80000000 /* 1G PCI TLB */ | 268 | #define CONFIG_SYS_PCI_PHYS 0x80000000 /* 1G PCI TLB */ |
270 | 269 | ||
271 | /* PCI is clocked by the external source at 33 MHz */ | 270 | /* PCI is clocked by the external source at 33 MHz */ |
272 | #define CONFIG_PCI_CLK_FREQ 33000000 | 271 | #define CONFIG_PCI_CLK_FREQ 33000000 |
273 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 | 272 | #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 |
274 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE | 273 | #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE |
275 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x20000000 /* 512M */ | 274 | #define CONFIG_SYS_PCI1_MEM_SIZE 0x20000000 /* 512M */ |
276 | #define CONFIG_SYS_PCI1_IO_BASE 0xE2000000 | 275 | #define CONFIG_SYS_PCI1_IO_BASE 0xE2000000 |
277 | #define CONFIG_SYS_PCI1_IO_PHYS CONFIG_SYS_PCI1_IO_BASE | 276 | #define CONFIG_SYS_PCI1_IO_PHYS CONFIG_SYS_PCI1_IO_BASE |
278 | #define CONFIG_SYS_PCI1_IO_SIZE 0x01000000 /* 16M */ | 277 | #define CONFIG_SYS_PCI1_IO_SIZE 0x01000000 /* 16M */ |
279 | 278 | ||
280 | #if defined(CONFIG_PCI) | 279 | #if defined(CONFIG_PCI) |
281 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ | 280 | #define CONFIG_PCI_PNP /* do pci plug-and-play */ |
282 | #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ | 281 | #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ |
283 | #endif /* CONFIG_PCI */ | 282 | #endif /* CONFIG_PCI */ |
284 | 283 | ||
285 | 284 | ||
286 | #define CONFIG_NET_MULTI 1 | 285 | #define CONFIG_NET_MULTI 1 |
287 | #define CONFIG_MII 1 /* MII PHY management */ | 286 | #define CONFIG_MII 1 /* MII PHY management */ |
288 | #define CONFIG_TSEC1 1 | 287 | #define CONFIG_TSEC1 1 |
289 | #define CONFIG_TSEC1_NAME "TSEC0" | 288 | #define CONFIG_TSEC1_NAME "TSEC0" |
290 | #define CONFIG_TSEC3 1 | 289 | #define CONFIG_TSEC3 1 |
291 | #define CONFIG_TSEC3_NAME "TSEC1" | 290 | #define CONFIG_TSEC3_NAME "TSEC1" |
292 | #undef CONFIG_MPC85XX_FEC | 291 | #undef CONFIG_MPC85XX_FEC |
293 | 292 | ||
294 | #define TSEC1_PHY_ADDR 0 | 293 | #define TSEC1_PHY_ADDR 0 |
295 | #define TSEC3_PHY_ADDR 1 | 294 | #define TSEC3_PHY_ADDR 1 |
296 | 295 | ||
297 | #define TSEC1_PHYIDX 0 | 296 | #define TSEC1_PHYIDX 0 |
298 | #define TSEC3_PHYIDX 0 | 297 | #define TSEC3_PHYIDX 0 |
299 | #define TSEC1_FLAGS TSEC_GIGABIT | 298 | #define TSEC1_FLAGS TSEC_GIGABIT |
300 | #define TSEC3_FLAGS TSEC_GIGABIT | 299 | #define TSEC3_FLAGS TSEC_GIGABIT |
301 | 300 | ||
302 | /* Options are: TSEC[0,1] */ | 301 | /* Options are: TSEC[0,1] */ |
303 | #define CONFIG_ETHPRIME "TSEC0" | 302 | #define CONFIG_ETHPRIME "TSEC0" |
304 | #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */ | 303 | #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */ |
305 | 304 | ||
306 | #define CONFIG_HAS_ETH0 | 305 | #define CONFIG_HAS_ETH0 |
307 | #define CONFIG_HAS_ETH1 | 306 | #define CONFIG_HAS_ETH1 |
308 | 307 | ||
309 | /* | 308 | /* |
310 | * Environment | 309 | * Environment |
311 | */ | 310 | */ |
312 | #define CONFIG_ENV_IS_IN_FLASH 1 | 311 | #define CONFIG_ENV_IS_IN_FLASH 1 |
313 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */ | 312 | #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */ |
314 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE) | 313 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE) |
315 | #define CONFIG_ENV_SIZE 0x4000 | 314 | #define CONFIG_ENV_SIZE 0x4000 |
316 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR-CONFIG_ENV_SECT_SIZE) | 315 | #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR-CONFIG_ENV_SECT_SIZE) |
317 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) | 316 | #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) |
318 | 317 | ||
319 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ | 318 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
320 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ | 319 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
321 | 320 | ||
322 | #define CONFIG_TIMESTAMP /* Print image info with ts */ | 321 | #define CONFIG_TIMESTAMP /* Print image info with ts */ |
323 | 322 | ||
324 | 323 | ||
325 | /* | 324 | /* |
326 | * BOOTP options | 325 | * BOOTP options |
327 | */ | 326 | */ |
328 | #define CONFIG_BOOTP_BOOTFILESIZE | 327 | #define CONFIG_BOOTP_BOOTFILESIZE |
329 | #define CONFIG_BOOTP_BOOTPATH | 328 | #define CONFIG_BOOTP_BOOTPATH |
330 | #define CONFIG_BOOTP_GATEWAY | 329 | #define CONFIG_BOOTP_GATEWAY |
331 | #define CONFIG_BOOTP_HOSTNAME | 330 | #define CONFIG_BOOTP_HOSTNAME |
332 | 331 | ||
333 | 332 | ||
334 | /* | 333 | /* |
335 | * Command line configuration. | 334 | * Command line configuration. |
336 | */ | 335 | */ |
337 | #include <config_cmd_default.h> | 336 | #include <config_cmd_default.h> |
338 | 337 | ||
339 | #define CONFIG_CMD_DATE | 338 | #define CONFIG_CMD_DATE |
340 | #define CONFIG_CMD_DHCP | 339 | #define CONFIG_CMD_DHCP |
341 | #define CONFIG_CMD_DTT | 340 | #define CONFIG_CMD_DTT |
342 | #undef CONFIG_CMD_EEPROM | 341 | #undef CONFIG_CMD_EEPROM |
343 | #define CONFIG_CMD_I2C | 342 | #define CONFIG_CMD_I2C |
344 | #define CONFIG_CMD_SDRAM | 343 | #define CONFIG_CMD_SDRAM |
345 | #define CONFIG_CMD_MII | 344 | #define CONFIG_CMD_MII |
346 | #define CONFIG_CMD_NFS | 345 | #define CONFIG_CMD_NFS |
347 | #define CONFIG_CMD_PING | 346 | #define CONFIG_CMD_PING |
348 | #define CONFIG_CMD_SNTP | 347 | #define CONFIG_CMD_SNTP |
349 | #define CONFIG_CMD_USB | 348 | #define CONFIG_CMD_USB |
350 | #define CONFIG_CMD_EXT2 /* EXT2 Support */ | 349 | #define CONFIG_CMD_EXT2 /* EXT2 Support */ |
351 | #define CONFIG_CMD_BMP | 350 | #define CONFIG_CMD_BMP |
352 | 351 | ||
353 | #if defined(CONFIG_PCI) | 352 | #if defined(CONFIG_PCI) |
354 | #define CONFIG_CMD_PCI | 353 | #define CONFIG_CMD_PCI |
355 | #endif | 354 | #endif |
356 | 355 | ||
357 | #undef CONFIG_WATCHDOG /* watchdog disabled */ | 356 | #undef CONFIG_WATCHDOG /* watchdog disabled */ |
358 | 357 | ||
359 | /* | 358 | /* |
360 | * Miscellaneous configurable options | 359 | * Miscellaneous configurable options |
361 | */ | 360 | */ |
362 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ | 361 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
363 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ | 362 | #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */ |
364 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ | 363 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
365 | 364 | ||
366 | #if defined(CONFIG_CMD_KGDB) | 365 | #if defined(CONFIG_CMD_KGDB) |
367 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ | 366 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
368 | #else | 367 | #else |
369 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ | 368 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
370 | #endif | 369 | #endif |
371 | 370 | ||
372 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buf Size */ | 371 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buf Size */ |
373 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ | 372 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
374 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ | 373 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
375 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ | 374 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */ |
376 | 375 | ||
377 | /* | 376 | /* |
378 | * For booting Linux, the board info and command line data | 377 | * For booting Linux, the board info and command line data |
379 | * have to be in the first 8 MB of memory, since this is | 378 | * have to be in the first 8 MB of memory, since this is |
380 | * the maximum mapped by the Linux kernel during initialization. | 379 | * the maximum mapped by the Linux kernel during initialization. |
381 | */ | 380 | */ |
382 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ | 381 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ |
383 | 382 | ||
384 | /* | 383 | /* |
385 | * Internal Definitions | 384 | * Internal Definitions |
386 | * | 385 | * |
387 | * Boot Flags | 386 | * Boot Flags |
388 | */ | 387 | */ |
389 | #define BOOTFLAG_COLD 0x01 /* Power-On: Boot from FLASH */ | 388 | #define BOOTFLAG_COLD 0x01 /* Power-On: Boot from FLASH */ |
390 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ | 389 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
391 | 390 | ||
392 | #if defined(CONFIG_CMD_KGDB) | 391 | #if defined(CONFIG_CMD_KGDB) |
393 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port*/ | 392 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port*/ |
394 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ | 393 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ |
395 | #endif | 394 | #endif |
396 | 395 | ||
397 | 396 | ||
398 | #define CONFIG_LOADADDR 200000 /* default addr for tftp & bootm*/ | 397 | #define CONFIG_LOADADDR 200000 /* default addr for tftp & bootm*/ |
399 | 398 | ||
400 | #define CONFIG_BOOTDELAY 1 /* -1 disables auto-boot */ | 399 | #define CONFIG_BOOTDELAY 1 /* -1 disables auto-boot */ |
401 | 400 | ||
402 | #define CONFIG_PREBOOT "echo;" \ | 401 | #define CONFIG_PREBOOT "echo;" \ |
403 | "echo Welcome on the ABB Socrates Board;" \ | 402 | "echo Welcome on the ABB Socrates Board;" \ |
404 | "echo" | 403 | "echo" |
405 | 404 | ||
406 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs */ | 405 | #undef CONFIG_BOOTARGS /* the boot command will set bootargs */ |
407 | 406 | ||
408 | #define CONFIG_EXTRA_ENV_SETTINGS \ | 407 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
409 | "netdev=eth0\0" \ | 408 | "netdev=eth0\0" \ |
410 | "consdev=ttyS0\0" \ | 409 | "consdev=ttyS0\0" \ |
411 | "uboot_file=/home/tftp/syscon3/u-boot.bin\0" \ | 410 | "uboot_file=/home/tftp/syscon3/u-boot.bin\0" \ |
412 | "bootfile=/home/tftp/syscon3/uImage\0" \ | 411 | "bootfile=/home/tftp/syscon3/uImage\0" \ |
413 | "fdt_file=/home/tftp/syscon3/socrates.dtb\0" \ | 412 | "fdt_file=/home/tftp/syscon3/socrates.dtb\0" \ |
414 | "initrd_file=/home/tftp/syscon3/uinitrd.gz\0" \ | 413 | "initrd_file=/home/tftp/syscon3/uinitrd.gz\0" \ |
415 | "uboot_addr=FFFA0000\0" \ | 414 | "uboot_addr=FFFA0000\0" \ |
416 | "kernel_addr=FE000000\0" \ | 415 | "kernel_addr=FE000000\0" \ |
417 | "fdt_addr=FE1E0000\0" \ | 416 | "fdt_addr=FE1E0000\0" \ |
418 | "ramdisk_addr=FE200000\0" \ | 417 | "ramdisk_addr=FE200000\0" \ |
419 | "fdt_addr_r=B00000\0" \ | 418 | "fdt_addr_r=B00000\0" \ |
420 | "kernel_addr_r=200000\0" \ | 419 | "kernel_addr_r=200000\0" \ |
421 | "ramdisk_addr_r=400000\0" \ | 420 | "ramdisk_addr_r=400000\0" \ |
422 | "rootpath=/opt/eldk/ppc_85xxDP\0" \ | 421 | "rootpath=/opt/eldk/ppc_85xxDP\0" \ |
423 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ | 422 | "ramargs=setenv bootargs root=/dev/ram rw\0" \ |
424 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ | 423 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
425 | "nfsroot=$serverip:$rootpath\0" \ | 424 | "nfsroot=$serverip:$rootpath\0" \ |
426 | "addcons=setenv bootargs $bootargs " \ | 425 | "addcons=setenv bootargs $bootargs " \ |
427 | "console=$consdev,$baudrate\0" \ | 426 | "console=$consdev,$baudrate\0" \ |
428 | "addip=setenv bootargs $bootargs " \ | 427 | "addip=setenv bootargs $bootargs " \ |
429 | "ip=$ipaddr:$serverip:$gatewayip:$netmask" \ | 428 | "ip=$ipaddr:$serverip:$gatewayip:$netmask" \ |
430 | ":$hostname:$netdev:off panic=1\0" \ | 429 | ":$hostname:$netdev:off panic=1\0" \ |
431 | "boot_nor=run ramargs addcons;" \ | 430 | "boot_nor=run ramargs addcons;" \ |
432 | "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ | 431 | "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ |
433 | "net_nfs=tftp ${kernel_addr_r} ${bootfile}; " \ | 432 | "net_nfs=tftp ${kernel_addr_r} ${bootfile}; " \ |
434 | "tftp ${fdt_addr_r} ${fdt_file}; " \ | 433 | "tftp ${fdt_addr_r} ${fdt_file}; " \ |
435 | "run nfsargs addip addcons;" \ | 434 | "run nfsargs addip addcons;" \ |
436 | "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ | 435 | "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ |
437 | "update_uboot=tftp 100000 ${uboot_file};" \ | 436 | "update_uboot=tftp 100000 ${uboot_file};" \ |
438 | "protect off fffa0000 ffffffff;" \ | 437 | "protect off fffa0000 ffffffff;" \ |
439 | "era fffa0000 ffffffff;" \ | 438 | "era fffa0000 ffffffff;" \ |
440 | "cp.b 100000 fffa0000 ${filesize};" \ | 439 | "cp.b 100000 fffa0000 ${filesize};" \ |
441 | "setenv filesize;saveenv\0" \ | 440 | "setenv filesize;saveenv\0" \ |
442 | "update_kernel=tftp 100000 ${bootfile};" \ | 441 | "update_kernel=tftp 100000 ${bootfile};" \ |
443 | "era fe000000 fe1dffff;" \ | 442 | "era fe000000 fe1dffff;" \ |
444 | "cp.b 100000 fe000000 ${filesize};" \ | 443 | "cp.b 100000 fe000000 ${filesize};" \ |
445 | "setenv filesize;saveenv\0" \ | 444 | "setenv filesize;saveenv\0" \ |
446 | "update_fdt=tftp 100000 ${fdt_file};" \ | 445 | "update_fdt=tftp 100000 ${fdt_file};" \ |
447 | "era fe1e0000 fe1fffff;" \ | 446 | "era fe1e0000 fe1fffff;" \ |
448 | "cp.b 100000 fe1e0000 ${filesize};" \ | 447 | "cp.b 100000 fe1e0000 ${filesize};" \ |
449 | "setenv filesize;saveenv\0" \ | 448 | "setenv filesize;saveenv\0" \ |
450 | "update_initrd=tftp 100000 ${initrd_file};" \ | 449 | "update_initrd=tftp 100000 ${initrd_file};" \ |
451 | "era fe200000 fe9fffff;" \ | 450 | "era fe200000 fe9fffff;" \ |
452 | "cp.b 100000 fe200000 ${filesize};" \ | 451 | "cp.b 100000 fe200000 ${filesize};" \ |
453 | "setenv filesize;saveenv\0" \ | 452 | "setenv filesize;saveenv\0" \ |
454 | "clean_data=era fea00000 fff5ffff\0" \ | 453 | "clean_data=era fea00000 fff5ffff\0" \ |
455 | "usbargs=setenv bootargs root=/dev/sda1 rw\0" \ | 454 | "usbargs=setenv bootargs root=/dev/sda1 rw\0" \ |
456 | "load_usb=usb start;" \ | 455 | "load_usb=usb start;" \ |
457 | "ext2load usb 0:1 ${kernel_addr_r} /boot/uImage\0" \ | 456 | "ext2load usb 0:1 ${kernel_addr_r} /boot/uImage\0" \ |
458 | "boot_usb=run load_usb usbargs addcons;" \ | 457 | "boot_usb=run load_usb usbargs addcons;" \ |
459 | "bootm ${kernel_addr_r} - ${fdt_addr};" \ | 458 | "bootm ${kernel_addr_r} - ${fdt_addr};" \ |
460 | "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ | 459 | "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ |
461 | "" | 460 | "" |
462 | #define CONFIG_BOOTCOMMAND "run boot_nor" | 461 | #define CONFIG_BOOTCOMMAND "run boot_nor" |
463 | 462 | ||
464 | /* pass open firmware flat tree */ | 463 | /* pass open firmware flat tree */ |
465 | #define CONFIG_OF_LIBFDT 1 | 464 | #define CONFIG_OF_LIBFDT 1 |
466 | #define CONFIG_OF_BOARD_SETUP 1 | 465 | #define CONFIG_OF_BOARD_SETUP 1 |
467 | 466 | ||
468 | /* USB support */ | 467 | /* USB support */ |
469 | #define CONFIG_USB_OHCI_NEW 1 | 468 | #define CONFIG_USB_OHCI_NEW 1 |
470 | #define CONFIG_PCI_OHCI 1 | 469 | #define CONFIG_PCI_OHCI 1 |
471 | #define CONFIG_PCI_OHCI_DEVNO 3 /* Number in PCI list */ | 470 | #define CONFIG_PCI_OHCI_DEVNO 3 /* Number in PCI list */ |
472 | #define CONFIG_PCI_EHCI_DEVNO (CONFIG_PCI_OHCI_DEVNO / 2) | 471 | #define CONFIG_PCI_EHCI_DEVNO (CONFIG_PCI_OHCI_DEVNO / 2) |
473 | #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15 | 472 | #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15 |
474 | #define CONFIG_SYS_USB_OHCI_SLOT_NAME "ohci_pci" | 473 | #define CONFIG_SYS_USB_OHCI_SLOT_NAME "ohci_pci" |
475 | #define CONFIG_SYS_OHCI_SWAP_REG_ACCESS 1 | 474 | #define CONFIG_SYS_OHCI_SWAP_REG_ACCESS 1 |
476 | #define CONFIG_DOS_PARTITION 1 | 475 | #define CONFIG_DOS_PARTITION 1 |
477 | #define CONFIG_USB_STORAGE 1 | 476 | #define CONFIG_USB_STORAGE 1 |
478 | 477 | ||
479 | #endif /* __CONFIG_H */ | 478 | #endif /* __CONFIG_H */ |
480 | 479 |