wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2000 |
| 3 | * Murray Jensen <Murray.Jensen@cmst.csiro.au> |
| 4 | * |
| 5 | * (C) Copyright 2000 |
| 6 | * Sysgo Real-Time Solutions, GmbH <www.elinos.com> |
| 7 | * Marius Groeger <mgroeger@sysgo.de> |
| 8 | * |
| 9 | * (C) Copyright 2001 |
| 10 | * Advent Networks, Inc. <http://www.adventnetworks.com> |
| 11 | * Jay Monkman <jtm@smoothsmoothie.com> |
| 12 | * |
| 13 | * Configuration settings for the WindRiver SBC8260 board. |
| 14 | * See http://www.windriver.com/products/html/sbc8260.html |
| 15 | * |
| 16 | * See file CREDITS for list of people who contributed to this |
| 17 | * project. |
| 18 | * |
| 19 | * This program is free software; you can redistribute it and/or |
| 20 | * modify it under the terms of the GNU General Public License as |
| 21 | * published by the Free Software Foundation; either version 2 of |
| 22 | * the License, or (at your option) any later version. |
| 23 | * |
| 24 | * This program is distributed in the hope that it will be useful, |
| 25 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 26 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 27 | * GNU General Public License for more details. |
| 28 | * |
| 29 | * You should have received a copy of the GNU General Public License |
| 30 | * along with this program; if not, write to the Free Software |
| 31 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 32 | * MA 02111-1307 USA |
| 33 | */ |
| 34 | |
| 35 | #ifndef __CONFIG_H |
| 36 | #define __CONFIG_H |
| 37 | |
| 38 | /* Enable debug prints */ |
| 39 | #undef DEBUG /* General debug */ |
| 40 | #undef DEBUG_BOOTP_EXT /* Debug received vendor fields */ |
| 41 | |
| 42 | /***************************************************************************** |
| 43 | * |
| 44 | * These settings must match the way _your_ board is set up |
| 45 | * |
| 46 | *****************************************************************************/ |
| 47 | |
| 48 | /* What is the oscillator's (UX2) frequency in Hz? */ |
| 49 | #define CONFIG_8260_CLKIN (66 * 1000 * 1000) |
| 50 | |
| 51 | /*----------------------------------------------------------------------- |
| 52 | * MODCK_H & MODCLK[1-3] - Ref: Section 9.2 in MPC8206 User Manual |
| 53 | *----------------------------------------------------------------------- |
| 54 | * What should MODCK_H be? It is dependent on the oscillator |
| 55 | * frequency, MODCK[1-3], and desired CPM and core frequencies. |
| 56 | * Here are some example values (all frequencies are in MHz): |
| 57 | * |
| 58 | * MODCK_H MODCK[1-3] Osc CPM Core S2-6 S2-7 S2-8 |
| 59 | * ------- ---------- --- --- ---- ----- ----- ----- |
| 60 | * 0x1 0x5 33 100 133 Open Close Open |
| 61 | * 0x1 0x6 33 100 166 Open Open Close |
| 62 | * 0x1 0x7 33 100 200 Open Open Open |
| 63 | * |
| 64 | * 0x2 0x2 33 133 133 Close Open Close |
| 65 | * 0x2 0x3 33 133 166 Close Open Open |
| 66 | * 0x2 0x4 33 133 200 Open Close Close |
| 67 | * 0x2 0x5 33 133 233 Open Close Open |
| 68 | * 0x2 0x6 33 133 266 Open Open Close |
| 69 | * |
| 70 | * 0x5 0x5 66 133 133 Open Close Open |
| 71 | * 0x5 0x6 66 133 166 Open Open Close |
| 72 | * 0x5 0x7 66 133 200 Open Open Open |
| 73 | * 0x6 0x0 66 133 233 Close Close Close |
| 74 | * 0x6 0x1 66 133 266 Close Close Open |
| 75 | * 0x6 0x2 66 133 300 Close Open Close |
| 76 | */ |
| 77 | #define CFG_SBC_MODCK_H 0x05 |
| 78 | |
| 79 | /* Define this if you want to boot from 0x00000100. If you don't define |
| 80 | * this, you will need to program the bootloader to 0xfff00000, and |
| 81 | * get the hardware reset config words at 0xfe000000. The simplest |
| 82 | * way to do that is to program the bootloader at both addresses. |
| 83 | * It is suggested that you just let U-Boot live at 0x00000000. |
| 84 | */ |
| 85 | #define CFG_SBC_BOOT_LOW 1 |
| 86 | |
| 87 | /* What should the base address of the main FLASH be and how big is |
| 88 | * it (in MBytes)? This must contain TEXT_BASE from board/sbc8260/config.mk |
| 89 | * The main FLASH is whichever is connected to *CS0. U-Boot expects |
| 90 | * this to be the SIMM. |
| 91 | */ |
| 92 | #define CFG_FLASH0_BASE 0x40000000 |
| 93 | #define CFG_FLASH0_SIZE 4 |
| 94 | |
| 95 | /* What should the base address of the secondary FLASH be and how big |
| 96 | * is it (in Mbytes)? The secondary FLASH is whichever is connected |
| 97 | * to *CS6. U-Boot expects this to be the on board FLASH. If you don't |
| 98 | * want it enabled, don't define these constants. |
| 99 | */ |
| 100 | #define CFG_FLASH1_BASE 0x60000000 |
| 101 | #define CFG_FLASH1_SIZE 2 |
| 102 | |
| 103 | /* What should be the base address of SDRAM DIMM and how big is |
| 104 | * it (in Mbytes)? |
| 105 | */ |
| 106 | #define CFG_SDRAM0_BASE 0x00000000 |
| 107 | #define CFG_SDRAM0_SIZE 64 |
| 108 | |
| 109 | /* What should be the base address of the LEDs and switch S0? |
| 110 | * If you don't want them enabled, don't define this. |
| 111 | */ |
| 112 | #define CFG_LED_BASE 0xa0000000 |
| 113 | |
| 114 | |
| 115 | /* |
| 116 | * SBC8260 with 16 MB DIMM: |
| 117 | * |
| 118 | * 0x0000 0000 Exception Vector code, 8k |
| 119 | * : |
| 120 | * 0x0000 1FFF |
| 121 | * 0x0000 2000 Free for Application Use |
| 122 | * : |
| 123 | * : |
| 124 | * |
| 125 | * : |
| 126 | * : |
| 127 | * 0x00F5 FF30 Monitor Stack (Growing downward) |
| 128 | * Monitor Stack Buffer (0x80) |
| 129 | * 0x00F5 FFB0 Board Info Data |
| 130 | * 0x00F6 0000 Malloc Arena |
| 131 | * : CFG_ENV_SECT_SIZE, 256k |
| 132 | * : CFG_MALLOC_LEN, 128k |
| 133 | * 0x00FC 0000 RAM Copy of Monitor Code |
| 134 | * : CFG_MONITOR_LEN, 256k |
| 135 | * 0x00FF FFFF [End of RAM], CFG_SDRAM_SIZE - 1 |
| 136 | */ |
| 137 | |
| 138 | /* |
| 139 | * SBC8260 with 64 MB DIMM: |
| 140 | * |
| 141 | * 0x0000 0000 Exception Vector code, 8k |
| 142 | * : |
| 143 | * 0x0000 1FFF |
| 144 | * 0x0000 2000 Free for Application Use |
| 145 | * : |
| 146 | * : |
| 147 | * |
| 148 | * : |
| 149 | * : |
| 150 | * 0x03F5 FF30 Monitor Stack (Growing downward) |
| 151 | * Monitor Stack Buffer (0x80) |
| 152 | * 0x03F5 FFB0 Board Info Data |
| 153 | * 0x03F6 0000 Malloc Arena |
| 154 | * : CFG_ENV_SECT_SIZE, 256k |
| 155 | * : CFG_MALLOC_LEN, 128k |
| 156 | * 0x03FC 0000 RAM Copy of Monitor Code |
| 157 | * : CFG_MONITOR_LEN, 256k |
| 158 | * 0x03FF FFFF [End of RAM], CFG_SDRAM_SIZE - 1 |
| 159 | */ |
| 160 | |
| 161 | |
| 162 | /* |
| 163 | * select serial console configuration |
| 164 | * |
| 165 | * if either CONFIG_CONS_ON_SMC or CONFIG_CONS_ON_SCC is selected, then |
| 166 | * CONFIG_CONS_INDEX must be set to the channel number (1-2 for SMC, 1-4 |
| 167 | * for SCC). |
| 168 | * |
| 169 | * if CONFIG_CONS_NONE is defined, then the serial console routines must |
| 170 | * defined elsewhere. |
| 171 | */ |
| 172 | #define CONFIG_CONS_ON_SMC 1 /* define if console on SMC */ |
| 173 | #undef CONFIG_CONS_ON_SCC /* define if console on SCC */ |
| 174 | #undef CONFIG_CONS_NONE /* define if console on neither */ |
| 175 | #define CONFIG_CONS_INDEX 1 /* which SMC/SCC channel for console */ |
| 176 | |
| 177 | /* |
| 178 | * select ethernet configuration |
| 179 | * |
| 180 | * if either CONFIG_ETHER_ON_SCC or CONFIG_ETHER_ON_FCC is selected, then |
| 181 | * CONFIG_ETHER_INDEX must be set to the channel number (1-4 for SCC, 1-3 |
| 182 | * for FCC) |
| 183 | * |
| 184 | * if CONFIG_ETHER_NONE is defined, then either the ethernet routines must be |
| 185 | * defined elsewhere (as for the console), or CFG_CMD_NET must be removed |
| 186 | * from CONFIG_COMMANDS to remove support for networking. |
| 187 | */ |
| 188 | |
| 189 | #undef CONFIG_ETHER_ON_SCC |
| 190 | #define CONFIG_ETHER_ON_FCC |
| 191 | #undef CONFIG_ETHER_NONE /* define if ethernet on neither */ |
| 192 | |
| 193 | #ifdef CONFIG_ETHER_ON_SCC |
| 194 | #define CONFIG_ETHER_INDEX 1 /* which SCC/FCC channel for ethernet */ |
| 195 | #endif /* CONFIG_ETHER_ON_SCC */ |
| 196 | |
| 197 | #ifdef CONFIG_ETHER_ON_FCC |
| 198 | #define CONFIG_ETHER_INDEX 2 /* which SCC/FCC channel for ethernet */ |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 199 | #undef CONFIG_ETHER_LOOPBACK_TEST /* Ethernet external loopback test */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 200 | #define CONFIG_MII /* MII PHY management */ |
| 201 | #define CONFIG_BITBANGMII /* bit-bang MII PHY management */ |
| 202 | /* |
| 203 | * Port pins used for bit-banged MII communictions (if applicable). |
| 204 | */ |
| 205 | #define MDIO_PORT 2 /* Port C */ |
| 206 | #define MDIO_ACTIVE (iop->pdir |= 0x00400000) |
| 207 | #define MDIO_TRISTATE (iop->pdir &= ~0x00400000) |
| 208 | #define MDIO_READ ((iop->pdat & 0x00400000) != 0) |
| 209 | |
| 210 | #define MDIO(bit) if(bit) iop->pdat |= 0x00400000; \ |
| 211 | else iop->pdat &= ~0x00400000 |
| 212 | |
| 213 | #define MDC(bit) if(bit) iop->pdat |= 0x00200000; \ |
| 214 | else iop->pdat &= ~0x00200000 |
| 215 | |
| 216 | #define MIIDELAY udelay(1) |
| 217 | #endif /* CONFIG_ETHER_ON_FCC */ |
| 218 | |
| 219 | #if defined(CONFIG_ETHER_ON_SCC) && (CONFIG_ETHER_INDEX == 1) |
| 220 | |
| 221 | /* |
| 222 | * - RX clk is CLK11 |
| 223 | * - TX clk is CLK12 |
| 224 | */ |
| 225 | # define CFG_CMXSCR_VALUE (CMXSCR_RS1CS_CLK11 | CMXSCR_TS1CS_CLK12) |
| 226 | |
| 227 | #elif defined(CONFIG_ETHER_ON_FCC) && (CONFIG_ETHER_INDEX == 2) |
| 228 | |
| 229 | /* |
| 230 | * - Rx-CLK is CLK13 |
| 231 | * - Tx-CLK is CLK14 |
| 232 | * - Select bus for bd/buffers (see 28-13) |
| 233 | * - Enable Full Duplex in FSMR |
| 234 | */ |
| 235 | # define CFG_CMXFCR_MASK (CMXFCR_FC2|CMXFCR_RF2CS_MSK|CMXFCR_TF2CS_MSK) |
| 236 | # define CFG_CMXFCR_VALUE (CMXFCR_RF2CS_CLK13|CMXFCR_TF2CS_CLK14) |
| 237 | # define CFG_CPMFCR_RAMTYPE 0 |
| 238 | # define CFG_FCC_PSMR (FCC_PSMR_FDE | FCC_PSMR_LPB) |
| 239 | |
| 240 | #endif /* CONFIG_ETHER_ON_FCC, CONFIG_ETHER_INDEX */ |
| 241 | |
| 242 | /* |
wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 243 | * Select SPI support configuration |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 244 | */ |
wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 245 | #undef CONFIG_SPI /* Disable SPI driver */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 246 | |
| 247 | /* |
wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 248 | * Select i2c support configuration |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 249 | * |
| 250 | * Supported configurations are {none, software, hardware} drivers. |
| 251 | * If the software driver is chosen, there are some additional |
| 252 | * configuration items that the driver uses to drive the port pins. |
| 253 | */ |
| 254 | #undef CONFIG_HARD_I2C /* I2C with hardware support */ |
| 255 | #define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ |
| 256 | #define CFG_I2C_SPEED 400000 /* I2C speed and slave address */ |
| 257 | #define CFG_I2C_SLAVE 0x7F |
| 258 | |
| 259 | /* |
| 260 | * Software (bit-bang) I2C driver configuration |
| 261 | */ |
| 262 | #ifdef CONFIG_SOFT_I2C |
| 263 | #define I2C_PORT 3 /* Port A=0, B=1, C=2, D=3 */ |
| 264 | #define I2C_ACTIVE (iop->pdir |= 0x00010000) |
| 265 | #define I2C_TRISTATE (iop->pdir &= ~0x00010000) |
| 266 | #define I2C_READ ((iop->pdat & 0x00010000) != 0) |
| 267 | #define I2C_SDA(bit) if(bit) iop->pdat |= 0x00010000; \ |
| 268 | else iop->pdat &= ~0x00010000 |
| 269 | #define I2C_SCL(bit) if(bit) iop->pdat |= 0x00020000; \ |
| 270 | else iop->pdat &= ~0x00020000 |
| 271 | #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ |
| 272 | #endif /* CONFIG_SOFT_I2C */ |
| 273 | |
| 274 | |
| 275 | /* Define this to reserve an entire FLASH sector (256 KB) for |
| 276 | * environment variables. Otherwise, the environment will be |
| 277 | * put in the same sector as U-Boot, and changing variables |
| 278 | * will erase U-Boot temporarily |
| 279 | */ |
| 280 | #define CFG_ENV_IN_OWN_SECT 1 |
| 281 | |
| 282 | /* Define to allow the user to overwrite serial and ethaddr */ |
| 283 | #define CONFIG_ENV_OVERWRITE |
| 284 | |
| 285 | /* What should the console's baud rate be? */ |
| 286 | #define CONFIG_BAUDRATE 9600 |
| 287 | |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 288 | /* Ethernet MAC address |
wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 289 | * Note: We are using the EST Corporation OUI (00:a0:1e:xx:xx:xx) |
| 290 | * http://standards.ieee.org/regauth/oui/index.shtml |
| 291 | */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 292 | #define CONFIG_ETHADDR 00:a0:1e:a8:7b:cb |
| 293 | |
| 294 | /* |
| 295 | * Define this to set the last octet of the ethernet address from the |
| 296 | * DS0-DS7 switch and light the LEDs with the result. The DS0-DS7 |
| 297 | * switch and the LEDs are backwards with respect to each other. DS7 |
| 298 | * is on the board edge side of both the LED strip and the DS0-DS7 |
| 299 | * switch. |
| 300 | */ |
wdenk | 2582f6b | 2002-11-11 21:14:20 +0000 | [diff] [blame] | 301 | #undef CONFIG_MISC_INIT_R |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 302 | |
| 303 | /* Set to a positive value to delay for running BOOTCOMMAND */ |
| 304 | #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ |
| 305 | |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 306 | /* Be selective on what keys can delay or stop the autoboot process |
| 307 | * To stop use: " " |
| 308 | */ |
wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 309 | #undef CONFIG_AUTOBOOT_KEYED |
| 310 | #ifdef CONFIG_AUTOBOOT_KEYED |
| 311 | # define CONFIG_AUTOBOOT_PROMPT "Autobooting in %d seconds, press \" \" to stop\n" |
| 312 | # define CONFIG_AUTOBOOT_STOP_STR " " |
| 313 | # undef CONFIG_AUTOBOOT_DELAY_STR |
| 314 | # define DEBUG_BOOTKEYS 0 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 315 | #endif |
| 316 | |
wdenk | 2582f6b | 2002-11-11 21:14:20 +0000 | [diff] [blame] | 317 | /* Define this to contain any number of null terminated strings that |
| 318 | * will be part of the default enviroment compiled into the boot image. |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 319 | * |
wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 320 | * Variable Usage |
| 321 | * -------------- ------------------------------------------------------- |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 322 | * serverip server IP address |
wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 323 | * ipaddr my IP address |
| 324 | * reprog Reload flash with a new copy of U-Boot |
| 325 | * zapenv Erase the environment area in flash |
| 326 | * root-on-initrd Set the bootcmd variable to allow booting of an initial |
| 327 | * ram disk. |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 328 | * root-on-nfs Set the bootcmd variable to allow booting of a NFS |
wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 329 | * mounted root filesystem. |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 330 | * boot-hook Convenient stub to do something useful before the |
wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 331 | * bootm command is executed. |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 332 | * |
wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 333 | * Example usage of root-on-initrd and root-on-nfs : |
| 334 | * |
| 335 | * Note: The lines have been wrapped to improved its readability. |
| 336 | * |
| 337 | * => printenv bootcmd |
| 338 | * bootcmd=version;echo;bootp;setenv bootargs root=/dev/nfs rw |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 339 | * nfsroot=$(serverip):$(rootpath) |
wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 340 | * ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off;run boot-hook;bootm |
| 341 | * |
| 342 | * => run root-on-initrd |
| 343 | * => printenv bootcmd |
| 344 | * bootcmd=version;echo;bootp;setenv bootargs root=/dev/ram0 rw |
| 345 | * ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off;run boot-hook;bootm |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 346 | * |
wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 347 | * => run root-on-nfs |
| 348 | * => printenv bootcmd |
| 349 | * bootcmd=version;echo;bootp;setenv bootargs root=/dev/nfs rw |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 350 | * nfsroot=$(serverip):$(rootpath) |
wdenk | 452cfd6 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 351 | * ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off;run boot-hook;bootm |
| 352 | * |
wdenk | 2582f6b | 2002-11-11 21:14:20 +0000 | [diff] [blame] | 353 | */ |
| 354 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 355 | "serverip=192.168.123.205\0\0" \ |
| 356 | "ipaddr=192.168.123.213\0" \ |
wdenk | 2582f6b | 2002-11-11 21:14:20 +0000 | [diff] [blame] | 357 | "reprog="\ |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 358 | "bootp;" \ |
| 359 | "tftpboot 0x140000 /bdi2000/u-boot.bin;" \ |
| 360 | "protect off 1:0;" \ |
| 361 | "erase 1:0;" \ |
| 362 | "cp.b 140000 40000000 $(filesize);" \ |
wdenk | 2582f6b | 2002-11-11 21:14:20 +0000 | [diff] [blame] | 363 | "protect on 1:0\0" \ |
| 364 | "zapenv="\ |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 365 | "protect off 1:1;" \ |
| 366 | "erase 1:1;" \ |
wdenk | 2582f6b | 2002-11-11 21:14:20 +0000 | [diff] [blame] | 367 | "protect on 1:1\0" \ |
| 368 | "root-on-initrd="\ |
| 369 | "setenv bootcmd "\ |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 370 | "version;" \ |
| 371 | "echo;" \ |
| 372 | "bootp;" \ |
wdenk | 2582f6b | 2002-11-11 21:14:20 +0000 | [diff] [blame] | 373 | "setenv bootargs root=/dev/ram0 rw " \ |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 374 | "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off;" \ |
| 375 | "run boot-hook;" \ |
wdenk | 2582f6b | 2002-11-11 21:14:20 +0000 | [diff] [blame] | 376 | "bootm\0" \ |
| 377 | "root-on-nfs="\ |
| 378 | "setenv bootcmd "\ |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 379 | "version;" \ |
| 380 | "echo;" \ |
| 381 | "bootp;" \ |
wdenk | 2582f6b | 2002-11-11 21:14:20 +0000 | [diff] [blame] | 382 | "setenv bootargs root=/dev/nfs rw " \ |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 383 | "nfsroot=$(serverip):$(rootpath) " \ |
| 384 | "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off;" \ |
| 385 | "run boot-hook;" \ |
wdenk | 2582f6b | 2002-11-11 21:14:20 +0000 | [diff] [blame] | 386 | "bootm\0" \ |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 387 | "boot-hook=echo\0" |
wdenk | 2582f6b | 2002-11-11 21:14:20 +0000 | [diff] [blame] | 388 | |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 389 | /* Define a command string that is automatically executed when no character |
| 390 | * is read on the console interface withing "Boot Delay" after reset. |
| 391 | */ |
| 392 | #define CONFIG_BOOT_ROOT_INITRD 0 /* Use ram disk for the root file system */ |
| 393 | #define CONFIG_BOOT_ROOT_NFS 1 /* Use a NFS mounted root file system */ |
| 394 | |
| 395 | #if CONFIG_BOOT_ROOT_INITRD |
| 396 | #define CONFIG_BOOTCOMMAND \ |
| 397 | "version;" \ |
| 398 | "echo;" \ |
| 399 | "bootp;" \ |
| 400 | "setenv bootargs root=/dev/ram0 rw " \ |
| 401 | "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off;" \ |
| 402 | "bootm" |
| 403 | #endif /* CONFIG_BOOT_ROOT_INITRD */ |
| 404 | |
| 405 | #if CONFIG_BOOT_ROOT_NFS |
| 406 | #define CONFIG_BOOTCOMMAND \ |
| 407 | "version;" \ |
| 408 | "echo;" \ |
| 409 | "bootp;" \ |
| 410 | "setenv bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath) " \ |
| 411 | "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off;" \ |
| 412 | "bootm" |
| 413 | #endif /* CONFIG_BOOT_ROOT_NFS */ |
| 414 | |
| 415 | /* Add support for a few extra bootp options like: |
| 416 | * - File size |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 417 | * - DNS (up to 2 servers) |
| 418 | * - Send hostname to DHCP server |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 419 | */ |
| 420 | #define CONFIG_BOOTP_MASK (CONFIG_BOOTP_DEFAULT | \ |
| 421 | CONFIG_BOOTP_BOOTFILESIZE | \ |
wdenk | 504331b | 2003-09-18 18:55:25 +0000 | [diff] [blame] | 422 | CONFIG_BOOTP_DNS | \ |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 423 | CONFIG_BOOTP_DNS2 | \ |
| 424 | CONFIG_BOOTP_SEND_HOSTNAME) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 425 | |
| 426 | /* undef this to save memory */ |
| 427 | #define CFG_LONGHELP |
| 428 | |
| 429 | /* Monitor Command Prompt */ |
| 430 | #define CFG_PROMPT "=> " |
| 431 | |
wdenk | 2582f6b | 2002-11-11 21:14:20 +0000 | [diff] [blame] | 432 | #undef CFG_HUSH_PARSER |
| 433 | #ifdef CFG_HUSH_PARSER |
| 434 | #define CFG_PROMPT_HUSH_PS2 "> " |
| 435 | #endif |
| 436 | |
| 437 | /* When CONFIG_TIMESTAMP is selected, the timestamp (date and time) |
| 438 | * of an image is printed by image commands like bootm or iminfo. |
| 439 | */ |
| 440 | #define CONFIG_TIMESTAMP |
| 441 | |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 442 | /* If this variable is defined, an environment variable named "ver" |
| 443 | * is created by U-Boot showing the U-Boot version. |
| 444 | */ |
| 445 | #define CONFIG_VERSION_VARIABLE |
| 446 | |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 447 | /* What U-Boot subsytems do you want enabled? */ |
| 448 | #ifdef CONFIG_ETHER_ON_FCC |
| 449 | # define CONFIG_COMMANDS (((CONFIG_CMD_DFL & ~(CFG_CMD_KGDB))) | \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 450 | CFG_CMD_ASKENV | \ |
| 451 | CFG_CMD_ECHO | \ |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 452 | CFG_CMD_ELF | \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 453 | CFG_CMD_I2C | \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 454 | CFG_CMD_IMMAP | \ |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 455 | CFG_CMD_MII | \ |
| 456 | CFG_CMD_PING | \ |
| 457 | CFG_CMD_REGINFO | \ |
| 458 | CFG_CMD_SDRAM ) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 459 | #else |
| 460 | # define CONFIG_COMMANDS (((CONFIG_CMD_DFL & ~(CFG_CMD_KGDB))) | \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 461 | CFG_CMD_ASKENV | \ |
| 462 | CFG_CMD_ECHO | \ |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 463 | CFG_CMD_ELF | \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 464 | CFG_CMD_I2C | \ |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 465 | CFG_CMD_IMMAP | \ |
| 466 | CFG_CMD_PING | \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 467 | CFG_CMD_REGINFO | \ |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 468 | CFG_CMD_SDRAM ) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 469 | #endif /* CONFIG_ETHER_ON_FCC */ |
| 470 | |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 471 | #undef CONFIG_WATCHDOG /* disable the watchdog */ |
| 472 | |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 473 | /* Where do the internal registers live? */ |
| 474 | #define CFG_IMMR 0xF0000000 |
| 475 | |
| 476 | /***************************************************************************** |
| 477 | * |
| 478 | * You should not have to modify any of the following settings |
| 479 | * |
| 480 | *****************************************************************************/ |
| 481 | |
| 482 | #define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */ |
| 483 | #define CONFIG_SBC8260 1 /* on an EST SBC8260 Board */ |
| 484 | |
| 485 | /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */ |
| 486 | #include <cmd_confdefs.h> |
| 487 | |
| 488 | /* |
| 489 | * Miscellaneous configurable options |
| 490 | */ |
| 491 | #if (CONFIG_COMMANDS & CFG_CMD_KGDB) |
| 492 | # define CFG_CBSIZE 1024 /* Console I/O Buffer Size */ |
| 493 | #else |
| 494 | # define CFG_CBSIZE 256 /* Console I/O Buffer Size */ |
| 495 | #endif |
| 496 | |
| 497 | /* Print Buffer Size */ |
| 498 | #define CFG_PBSIZE (CFG_CBSIZE + sizeof(CFG_PROMPT)+16) |
| 499 | |
| 500 | #define CFG_MAXARGS 32 /* max number of command args */ |
| 501 | |
| 502 | #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ |
| 503 | |
wdenk | 2582f6b | 2002-11-11 21:14:20 +0000 | [diff] [blame] | 504 | #define CFG_LOAD_ADDR 0x400000 /* default load address */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 505 | #define CFG_HZ 1000 /* decrementer freq: 1 ms ticks */ |
| 506 | |
wdenk | 2582f6b | 2002-11-11 21:14:20 +0000 | [diff] [blame] | 507 | #define CFG_ALT_MEMTEST /* Select full-featured memory test */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 508 | #define CFG_MEMTEST_START 0x2000 /* memtest works from the end of */ |
| 509 | /* the exception vector table */ |
| 510 | /* to the end of the DRAM */ |
| 511 | /* less monitor and malloc area */ |
| 512 | #define CFG_STACK_USAGE 0x10000 /* Reserve 64k for the stack usage */ |
| 513 | #define CFG_MEM_END_USAGE ( CFG_MONITOR_LEN \ |
| 514 | + CFG_MALLOC_LEN \ |
| 515 | + CFG_ENV_SECT_SIZE \ |
| 516 | + CFG_STACK_USAGE ) |
| 517 | |
| 518 | #define CFG_MEMTEST_END ( CFG_SDRAM_SIZE * 1024 * 1024 \ |
| 519 | - CFG_MEM_END_USAGE ) |
| 520 | |
| 521 | /* valid baudrates */ |
| 522 | #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } |
| 523 | |
| 524 | /* |
| 525 | * Low Level Configuration Settings |
| 526 | * (address mappings, register initial values, etc.) |
| 527 | * You should know what you are doing if you make changes here. |
| 528 | */ |
| 529 | |
| 530 | #define CFG_FLASH_BASE CFG_FLASH0_BASE |
| 531 | #define CFG_FLASH_SIZE CFG_FLASH0_SIZE |
| 532 | #define CFG_SDRAM_BASE CFG_SDRAM0_BASE |
| 533 | #define CFG_SDRAM_SIZE CFG_SDRAM0_SIZE |
| 534 | |
| 535 | /*----------------------------------------------------------------------- |
| 536 | * Hard Reset Configuration Words |
| 537 | */ |
| 538 | #if defined(CFG_SBC_BOOT_LOW) |
| 539 | # define CFG_SBC_HRCW_BOOT_FLAGS (HRCW_CIP | HRCW_BMS) |
| 540 | #else |
| 541 | # define CFG_SBC_HRCW_BOOT_FLAGS (0) |
| 542 | #endif /* defined(CFG_SBC_BOOT_LOW) */ |
| 543 | |
| 544 | /* get the HRCW ISB field from CFG_IMMR */ |
| 545 | #define CFG_SBC_HRCW_IMMR ( ((CFG_IMMR & 0x10000000) >> 10) | \ |
| 546 | ((CFG_IMMR & 0x01000000) >> 7) | \ |
| 547 | ((CFG_IMMR & 0x00100000) >> 4) ) |
| 548 | |
| 549 | #define CFG_HRCW_MASTER ( HRCW_BPS11 | \ |
| 550 | HRCW_DPPC11 | \ |
| 551 | CFG_SBC_HRCW_IMMR | \ |
| 552 | HRCW_MMR00 | \ |
| 553 | HRCW_LBPC11 | \ |
| 554 | HRCW_APPC10 | \ |
| 555 | HRCW_CS10PC00 | \ |
| 556 | (CFG_SBC_MODCK_H & HRCW_MODCK_H1111) | \ |
| 557 | CFG_SBC_HRCW_BOOT_FLAGS ) |
| 558 | |
| 559 | /* no slaves */ |
| 560 | #define CFG_HRCW_SLAVE1 0 |
| 561 | #define CFG_HRCW_SLAVE2 0 |
| 562 | #define CFG_HRCW_SLAVE3 0 |
| 563 | #define CFG_HRCW_SLAVE4 0 |
| 564 | #define CFG_HRCW_SLAVE5 0 |
| 565 | #define CFG_HRCW_SLAVE6 0 |
| 566 | #define CFG_HRCW_SLAVE7 0 |
| 567 | |
| 568 | /*----------------------------------------------------------------------- |
| 569 | * Definitions for initial stack pointer and data area (in DPRAM) |
| 570 | */ |
| 571 | #define CFG_INIT_RAM_ADDR CFG_IMMR |
| 572 | #define CFG_INIT_RAM_END 0x4000 /* End of used area in DPRAM */ |
| 573 | #define CFG_GBL_DATA_SIZE 128 /* bytes reserved for initial data */ |
| 574 | #define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE) |
| 575 | #define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET |
| 576 | |
| 577 | /*----------------------------------------------------------------------- |
| 578 | * Start addresses for the final memory configuration |
| 579 | * (Set up by the startup code) |
| 580 | * Please note that CFG_SDRAM_BASE _must_ start at 0 |
| 581 | * Note also that the logic that sets CFG_RAMBOOT is platform dependent. |
| 582 | */ |
| 583 | #define CFG_MONITOR_BASE CFG_FLASH0_BASE |
| 584 | |
| 585 | #if (CFG_MONITOR_BASE < CFG_FLASH_BASE) |
| 586 | # define CFG_RAMBOOT |
| 587 | #endif |
| 588 | |
| 589 | #define CFG_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */ |
| 590 | #define CFG_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */ |
| 591 | |
| 592 | /* |
| 593 | * For booting Linux, the board info and command line data |
| 594 | * have to be in the first 8 MB of memory, since this is |
| 595 | * the maximum mapped by the Linux kernel during initialization. |
| 596 | */ |
| 597 | #define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ |
| 598 | |
| 599 | /*----------------------------------------------------------------------- |
| 600 | * FLASH and environment organization |
| 601 | */ |
| 602 | #define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ |
| 603 | #define CFG_MAX_FLASH_SECT 16 /* max number of sectors on one chip */ |
| 604 | |
| 605 | #define CFG_FLASH_ERASE_TOUT 8000 /* Timeout for Flash Erase (in ms) */ |
| 606 | #define CFG_FLASH_WRITE_TOUT 1 /* Timeout for Flash Write (in ms) */ |
| 607 | |
| 608 | #ifndef CFG_RAMBOOT |
| 609 | # define CFG_ENV_IS_IN_FLASH 1 |
| 610 | |
| 611 | # ifdef CFG_ENV_IN_OWN_SECT |
| 612 | # define CFG_ENV_ADDR (CFG_MONITOR_BASE + 0x40000) |
| 613 | # define CFG_ENV_SECT_SIZE 0x40000 |
| 614 | # else |
| 615 | # define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_MONITOR_LEN - CFG_ENV_SECT_SIZE) |
| 616 | # define CFG_ENV_SIZE 0x1000 /* Total Size of Environment Sector */ |
| 617 | # define CFG_ENV_SECT_SIZE 0x10000 /* see README - env sect real size */ |
| 618 | # endif /* CFG_ENV_IN_OWN_SECT */ |
| 619 | |
| 620 | #else |
| 621 | # define CFG_ENV_IS_IN_NVRAM 1 |
| 622 | # define CFG_ENV_ADDR (CFG_MONITOR_BASE - 0x1000) |
| 623 | # define CFG_ENV_SIZE 0x200 |
| 624 | #endif /* CFG_RAMBOOT */ |
| 625 | |
| 626 | /*----------------------------------------------------------------------- |
| 627 | * Cache Configuration |
| 628 | */ |
| 629 | #define CFG_CACHELINE_SIZE 32 /* For MPC8260 CPU */ |
| 630 | |
| 631 | #if (CONFIG_COMMANDS & CFG_CMD_KGDB) |
| 632 | # define CFG_CACHELINE_SHIFT 5 /* log base 2 of the above value */ |
| 633 | #endif |
| 634 | |
| 635 | /*----------------------------------------------------------------------- |
| 636 | * HIDx - Hardware Implementation-dependent Registers 2-11 |
| 637 | *----------------------------------------------------------------------- |
| 638 | * HID0 also contains cache control - initially enable both caches and |
| 639 | * invalidate contents, then the final state leaves only the instruction |
| 640 | * cache enabled. Note that Power-On and Hard reset invalidate the caches, |
| 641 | * but Soft reset does not. |
| 642 | * |
| 643 | * HID1 has only read-only information - nothing to set. |
| 644 | */ |
| 645 | #define CFG_HID0_INIT (HID0_ICE |\ |
| 646 | HID0_DCE |\ |
| 647 | HID0_ICFI |\ |
| 648 | HID0_DCI |\ |
| 649 | HID0_IFEM |\ |
| 650 | HID0_ABE) |
| 651 | |
| 652 | #define CFG_HID0_FINAL (HID0_ICE |\ |
| 653 | HID0_IFEM |\ |
| 654 | HID0_ABE |\ |
| 655 | HID0_EMCP) |
| 656 | #define CFG_HID2 0 |
| 657 | |
| 658 | /*----------------------------------------------------------------------- |
| 659 | * RMR - Reset Mode Register |
| 660 | *----------------------------------------------------------------------- |
| 661 | */ |
| 662 | #define CFG_RMR 0 |
| 663 | |
| 664 | /*----------------------------------------------------------------------- |
| 665 | * BCR - Bus Configuration 4-25 |
| 666 | *----------------------------------------------------------------------- |
| 667 | */ |
| 668 | #define CFG_BCR (BCR_ETM) |
| 669 | |
| 670 | /*----------------------------------------------------------------------- |
| 671 | * SIUMCR - SIU Module Configuration 4-31 |
| 672 | *----------------------------------------------------------------------- |
| 673 | */ |
| 674 | |
| 675 | #define CFG_SIUMCR (SIUMCR_DPPC11 |\ |
| 676 | SIUMCR_L2CPC00 |\ |
| 677 | SIUMCR_APPC10 |\ |
| 678 | SIUMCR_MMR00) |
| 679 | |
| 680 | |
| 681 | /*----------------------------------------------------------------------- |
| 682 | * SYPCR - System Protection Control 11-9 |
| 683 | * SYPCR can only be written once after reset! |
| 684 | *----------------------------------------------------------------------- |
| 685 | * Watchdog & Bus Monitor Timer max, 60x Bus Monitor enable |
| 686 | */ |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 687 | #if defined(CONFIG_WATCHDOG) |
| 688 | #define CFG_SYPCR (SYPCR_SWTC |\ |
| 689 | SYPCR_BMT |\ |
| 690 | SYPCR_PBME |\ |
| 691 | SYPCR_LBME |\ |
| 692 | SYPCR_SWRI |\ |
| 693 | SYPCR_SWP |\ |
| 694 | SYPCR_SWE) |
| 695 | #else |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 696 | #define CFG_SYPCR (SYPCR_SWTC |\ |
| 697 | SYPCR_BMT |\ |
| 698 | SYPCR_PBME |\ |
| 699 | SYPCR_LBME |\ |
| 700 | SYPCR_SWRI |\ |
| 701 | SYPCR_SWP) |
wdenk | 8706ea8 | 2003-09-18 10:02:25 +0000 | [diff] [blame] | 702 | #endif /* CONFIG_WATCHDOG */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 703 | |
| 704 | /*----------------------------------------------------------------------- |
| 705 | * TMCNTSC - Time Counter Status and Control 4-40 |
| 706 | *----------------------------------------------------------------------- |
| 707 | * Clear once per Second and Alarm Interrupt Status, Set 32KHz timersclk, |
| 708 | * and enable Time Counter |
| 709 | */ |
| 710 | #define CFG_TMCNTSC (TMCNTSC_SEC |\ |
| 711 | TMCNTSC_ALR |\ |
| 712 | TMCNTSC_TCF |\ |
| 713 | TMCNTSC_TCE) |
| 714 | |
| 715 | /*----------------------------------------------------------------------- |
| 716 | * PISCR - Periodic Interrupt Status and Control 4-42 |
| 717 | *----------------------------------------------------------------------- |
| 718 | * Clear Periodic Interrupt Status, Set 32KHz timersclk, and enable |
| 719 | * Periodic timer |
| 720 | */ |
| 721 | #define CFG_PISCR (PISCR_PS |\ |
| 722 | PISCR_PTF |\ |
| 723 | PISCR_PTE) |
| 724 | |
| 725 | /*----------------------------------------------------------------------- |
| 726 | * SCCR - System Clock Control 9-8 |
| 727 | *----------------------------------------------------------------------- |
| 728 | */ |
| 729 | #define CFG_SCCR 0 |
| 730 | |
| 731 | /*----------------------------------------------------------------------- |
| 732 | * RCCR - RISC Controller Configuration 13-7 |
| 733 | *----------------------------------------------------------------------- |
| 734 | */ |
| 735 | #define CFG_RCCR 0 |
| 736 | |
| 737 | /* |
| 738 | * Initialize Memory Controller: |
| 739 | * |
| 740 | * Bank Bus Machine PortSz Device |
| 741 | * ---- --- ------- ------ ------ |
| 742 | * 0 60x GPCM 32 bit FLASH (SIMM - 4MB) * |
| 743 | * 1 60x GPCM 32 bit FLASH (SIMM - Unused) |
| 744 | * 2 60x SDRAM 64 bit SDRAM (DIMM - 16MB or 64MB) |
| 745 | * 3 60x SDRAM 64 bit SDRAM (DIMM - Unused) |
| 746 | * 4 Local SDRAM 32 bit SDRAM (on board - 4MB) |
| 747 | * 5 60x GPCM 8 bit EEPROM (8KB) |
| 748 | * 6 60x GPCM 8 bit FLASH (on board - 2MB) * |
| 749 | * 7 60x GPCM 8 bit LEDs, switches |
| 750 | * |
| 751 | * (*) This configuration requires the SBC8260 be configured |
| 752 | * so that *CS0 goes to the FLASH SIMM, and *CS6 goes to |
| 753 | * the on board FLASH. In other words, JP24 should have |
| 754 | * pins 1 and 2 jumpered and pins 3 and 4 jumpered. |
| 755 | * |
| 756 | */ |
| 757 | |
| 758 | /*----------------------------------------------------------------------- |
| 759 | * BR0,BR1 - Base Register |
| 760 | * Ref: Section 10.3.1 on page 10-14 |
| 761 | * OR0,OR1 - Option Register |
| 762 | * Ref: Section 10.3.2 on page 10-18 |
| 763 | *----------------------------------------------------------------------- |
| 764 | */ |
| 765 | |
| 766 | /* Bank 0,1 - FLASH SIMM |
| 767 | * |
| 768 | * This expects the FLASH SIMM to be connected to *CS0 |
| 769 | * It consists of 4 AM29F080B parts. |
| 770 | * |
| 771 | * Note: For the 4 MB SIMM, *CS1 is unused. |
| 772 | */ |
| 773 | |
| 774 | /* BR0 is configured as follows: |
| 775 | * |
| 776 | * - Base address of 0x40000000 |
| 777 | * - 32 bit port size |
| 778 | * - Data errors checking is disabled |
| 779 | * - Read and write access |
| 780 | * - GPCM 60x bus |
| 781 | * - Access are handled by the memory controller according to MSEL |
| 782 | * - Not used for atomic operations |
| 783 | * - No data pipelining is done |
| 784 | * - Valid |
| 785 | */ |
| 786 | #define CFG_BR0_PRELIM ((CFG_FLASH0_BASE & BRx_BA_MSK) |\ |
| 787 | BRx_PS_32 |\ |
| 788 | BRx_MS_GPCM_P |\ |
| 789 | BRx_V) |
| 790 | |
| 791 | /* OR0 is configured as follows: |
| 792 | * |
| 793 | * - 4 MB |
| 794 | * - *BCTL0 is asserted upon access to the current memory bank |
| 795 | * - *CW / *WE are negated a quarter of a clock earlier |
| 796 | * - *CS is output at the same time as the address lines |
| 797 | * - Uses a clock cycle length of 5 |
| 798 | * - *PSDVAL is generated internally by the memory controller |
| 799 | * unless *GTA is asserted earlier externally. |
| 800 | * - Relaxed timing is generated by the GPCM for accesses |
| 801 | * initiated to this memory region. |
| 802 | * - One idle clock is inserted between a read access from the |
| 803 | * current bank and the next access. |
| 804 | */ |
| 805 | #define CFG_OR0_PRELIM (MEG_TO_AM(CFG_FLASH0_SIZE) |\ |
| 806 | ORxG_CSNT |\ |
| 807 | ORxG_ACS_DIV1 |\ |
| 808 | ORxG_SCY_5_CLK |\ |
| 809 | ORxG_TRLX |\ |
| 810 | ORxG_EHTR) |
| 811 | |
| 812 | /*----------------------------------------------------------------------- |
| 813 | * BR2,BR3 - Base Register |
| 814 | * Ref: Section 10.3.1 on page 10-14 |
| 815 | * OR2,OR3 - Option Register |
| 816 | * Ref: Section 10.3.2 on page 10-16 |
| 817 | *----------------------------------------------------------------------- |
| 818 | */ |
| 819 | |
| 820 | /* Bank 2,3 - SDRAM DIMM |
| 821 | * |
| 822 | * 16MB DIMM: P/N |
| 823 | * 64MB DIMM: P/N 1W-8864X8-4-P1-EST |
| 824 | * |
| 825 | * Note: *CS3 is unused for this DIMM |
| 826 | */ |
| 827 | |
| 828 | /* With a 16 MB or 64 MB DIMM, the BR2 is configured as follows: |
| 829 | * |
| 830 | * - Base address of 0x00000000 |
| 831 | * - 64 bit port size (60x bus only) |
| 832 | * - Data errors checking is disabled |
| 833 | * - Read and write access |
| 834 | * - SDRAM 60x bus |
| 835 | * - Access are handled by the memory controller according to MSEL |
| 836 | * - Not used for atomic operations |
| 837 | * - No data pipelining is done |
| 838 | * - Valid |
| 839 | */ |
| 840 | #define CFG_BR2_PRELIM ((CFG_SDRAM0_BASE & BRx_BA_MSK) |\ |
| 841 | BRx_PS_64 |\ |
| 842 | BRx_MS_SDRAM_P |\ |
| 843 | BRx_V) |
| 844 | |
| 845 | #define CFG_BR3_PRELIM ((CFG_SDRAM0_BASE & BRx_BA_MSK) |\ |
| 846 | BRx_PS_64 |\ |
| 847 | BRx_MS_SDRAM_P |\ |
| 848 | BRx_V) |
| 849 | |
| 850 | /* With a 16 MB DIMM, the OR2 is configured as follows: |
| 851 | * |
| 852 | * - 16 MB |
| 853 | * - 2 internal banks per device |
| 854 | * - Row start address bit is A9 with PSDMR[PBI] = 0 |
| 855 | * - 11 row address lines |
| 856 | * - Back-to-back page mode |
| 857 | * - Internal bank interleaving within save device enabled |
| 858 | */ |
| 859 | #if (CFG_SDRAM0_SIZE == 16) |
| 860 | #define CFG_OR2_PRELIM (MEG_TO_AM(CFG_SDRAM0_SIZE) |\ |
| 861 | ORxS_BPD_2 |\ |
| 862 | ORxS_ROWST_PBI0_A9 |\ |
| 863 | ORxS_NUMR_11) |
| 864 | #endif |
| 865 | |
| 866 | /* With a 64 MB DIMM, the OR2 is configured as follows: |
| 867 | * |
| 868 | * - 64 MB |
| 869 | * - 4 internal banks per device |
| 870 | * - Row start address bit is A8 with PSDMR[PBI] = 0 |
| 871 | * - 12 row address lines |
| 872 | * - Back-to-back page mode |
| 873 | * - Internal bank interleaving within save device enabled |
| 874 | */ |
| 875 | #if (CFG_SDRAM0_SIZE == 64) |
| 876 | #define CFG_OR2_PRELIM (MEG_TO_AM(CFG_SDRAM0_SIZE) |\ |
| 877 | ORxS_BPD_4 |\ |
| 878 | ORxS_ROWST_PBI0_A8 |\ |
| 879 | ORxS_NUMR_12) |
| 880 | #endif |
| 881 | |
| 882 | /*----------------------------------------------------------------------- |
| 883 | * PSDMR - 60x Bus SDRAM Mode Register |
| 884 | * Ref: Section 10.3.3 on page 10-21 |
| 885 | *----------------------------------------------------------------------- |
| 886 | */ |
| 887 | |
| 888 | /* Address that the DIMM SPD memory lives at. |
| 889 | */ |
| 890 | #define SDRAM_SPD_ADDR 0x54 |
| 891 | |
| 892 | #if (CFG_SDRAM0_SIZE == 16) |
| 893 | /* With a 16 MB DIMM, the PSDMR is configured as follows: |
| 894 | * |
| 895 | * - Bank Based Interleaving, |
| 896 | * - Refresh Enable, |
| 897 | * - Address Multiplexing where A5 is output on A14 pin |
| 898 | * (A6 on A15, and so on), |
| 899 | * - use address pins A16-A18 as bank select, |
| 900 | * - A9 is output on SDA10 during an ACTIVATE command, |
| 901 | * - earliest timing for ACTIVATE command after REFRESH command is 7 clocks, |
| 902 | * - earliest timing for ACTIVATE or REFRESH command after PRECHARGE command |
| 903 | * is 3 clocks, |
| 904 | * - earliest timing for READ/WRITE command after ACTIVATE command is |
| 905 | * 2 clocks, |
| 906 | * - earliest timing for PRECHARGE after last data was read is 1 clock, |
| 907 | * - earliest timing for PRECHARGE after last data was written is 1 clock, |
| 908 | * - CAS Latency is 2. |
| 909 | */ |
| 910 | #define CFG_PSDMR (PSDMR_RFEN |\ |
| 911 | PSDMR_SDAM_A14_IS_A5 |\ |
| 912 | PSDMR_BSMA_A16_A18 |\ |
| 913 | PSDMR_SDA10_PBI0_A9 |\ |
| 914 | PSDMR_RFRC_7_CLK |\ |
| 915 | PSDMR_PRETOACT_3W |\ |
| 916 | PSDMR_ACTTORW_2W |\ |
| 917 | PSDMR_LDOTOPRE_1C |\ |
| 918 | PSDMR_WRC_1C |\ |
| 919 | PSDMR_CL_2) |
| 920 | #endif |
| 921 | |
| 922 | #if (CFG_SDRAM0_SIZE == 64) |
| 923 | /* With a 64 MB DIMM, the PSDMR is configured as follows: |
| 924 | * |
| 925 | * - Bank Based Interleaving, |
| 926 | * - Refresh Enable, |
| 927 | * - Address Multiplexing where A5 is output on A14 pin |
| 928 | * (A6 on A15, and so on), |
| 929 | * - use address pins A14-A16 as bank select, |
| 930 | * - A9 is output on SDA10 during an ACTIVATE command, |
| 931 | * - earliest timing for ACTIVATE command after REFRESH command is 7 clocks, |
| 932 | * - earliest timing for ACTIVATE or REFRESH command after PRECHARGE command |
| 933 | * is 3 clocks, |
| 934 | * - earliest timing for READ/WRITE command after ACTIVATE command is |
| 935 | * 2 clocks, |
| 936 | * - earliest timing for PRECHARGE after last data was read is 1 clock, |
| 937 | * - earliest timing for PRECHARGE after last data was written is 1 clock, |
| 938 | * - CAS Latency is 2. |
| 939 | */ |
| 940 | #define CFG_PSDMR (PSDMR_RFEN |\ |
| 941 | PSDMR_SDAM_A14_IS_A5 |\ |
| 942 | PSDMR_BSMA_A14_A16 |\ |
| 943 | PSDMR_SDA10_PBI0_A9 |\ |
| 944 | PSDMR_RFRC_7_CLK |\ |
| 945 | PSDMR_PRETOACT_3W |\ |
| 946 | PSDMR_ACTTORW_2W |\ |
| 947 | PSDMR_LDOTOPRE_1C |\ |
| 948 | PSDMR_WRC_1C |\ |
| 949 | PSDMR_CL_2) |
| 950 | #endif |
| 951 | |
| 952 | /* |
| 953 | * Shoot for approximately 1MHz on the prescaler. |
| 954 | */ |
| 955 | #if (CONFIG_8260_CLKIN == (66 * 1000 * 1000)) |
| 956 | #define CFG_MPTPR MPTPR_PTP_DIV64 |
| 957 | #elif (CONFIG_8260_CLKIN == (33 * 1000 * 1000)) |
| 958 | #define CFG_MPTPR MPTPR_PTP_DIV32 |
| 959 | #else |
| 960 | #warning "Unconfigured bus clock freq: check CFG_MPTPR and CFG_PSRT are OK" |
| 961 | #define CFG_MPTPR MPTPR_PTP_DIV32 |
| 962 | #endif |
| 963 | #define CFG_PSRT 14 |
| 964 | |
| 965 | |
| 966 | /* Bank 4 - On board SDRAM |
| 967 | * |
| 968 | * This is not implemented yet. |
| 969 | */ |
| 970 | |
| 971 | /*----------------------------------------------------------------------- |
| 972 | * BR6 - Base Register |
| 973 | * Ref: Section 10.3.1 on page 10-14 |
| 974 | * OR6 - Option Register |
| 975 | * Ref: Section 10.3.2 on page 10-18 |
| 976 | *----------------------------------------------------------------------- |
| 977 | */ |
| 978 | |
| 979 | /* Bank 6 - On board FLASH |
| 980 | * |
| 981 | * This expects the on board FLASH SIMM to be connected to *CS6 |
| 982 | * It consists of 1 AM29F016A part. |
| 983 | */ |
| 984 | #if (defined(CFG_FLASH1_BASE) && defined(CFG_FLASH1_SIZE)) |
| 985 | |
| 986 | /* BR6 is configured as follows: |
| 987 | * |
| 988 | * - Base address of 0x60000000 |
| 989 | * - 8 bit port size |
| 990 | * - Data errors checking is disabled |
| 991 | * - Read and write access |
| 992 | * - GPCM 60x bus |
| 993 | * - Access are handled by the memory controller according to MSEL |
| 994 | * - Not used for atomic operations |
| 995 | * - No data pipelining is done |
| 996 | * - Valid |
| 997 | */ |
| 998 | # define CFG_BR6_PRELIM ((CFG_FLASH1_BASE & BRx_BA_MSK) |\ |
| 999 | BRx_PS_8 |\ |
| 1000 | BRx_MS_GPCM_P |\ |
| 1001 | BRx_V) |
| 1002 | |
| 1003 | /* OR6 is configured as follows: |
| 1004 | * |
| 1005 | * - 2 MB |
| 1006 | * - *BCTL0 is asserted upon access to the current memory bank |
| 1007 | * - *CW / *WE are negated a quarter of a clock earlier |
| 1008 | * - *CS is output at the same time as the address lines |
| 1009 | * - Uses a clock cycle length of 5 |
| 1010 | * - *PSDVAL is generated internally by the memory controller |
| 1011 | * unless *GTA is asserted earlier externally. |
| 1012 | * - Relaxed timing is generated by the GPCM for accesses |
| 1013 | * initiated to this memory region. |
| 1014 | * - One idle clock is inserted between a read access from the |
| 1015 | * current bank and the next access. |
| 1016 | */ |
| 1017 | # define CFG_OR6_PRELIM (MEG_TO_AM(CFG_FLASH1_SIZE) |\ |
| 1018 | ORxG_CSNT |\ |
| 1019 | ORxG_ACS_DIV1 |\ |
| 1020 | ORxG_SCY_5_CLK |\ |
| 1021 | ORxG_TRLX |\ |
| 1022 | ORxG_EHTR) |
| 1023 | #endif /* (defined(CFG_FLASH1_BASE) && defined(CFG_FLASH1_SIZE)) */ |
| 1024 | |
| 1025 | /*----------------------------------------------------------------------- |
| 1026 | * BR7 - Base Register |
| 1027 | * Ref: Section 10.3.1 on page 10-14 |
| 1028 | * OR7 - Option Register |
| 1029 | * Ref: Section 10.3.2 on page 10-18 |
| 1030 | *----------------------------------------------------------------------- |
| 1031 | */ |
| 1032 | |
| 1033 | /* Bank 7 - LEDs and switches |
| 1034 | * |
| 1035 | * LEDs are at 0x00001 (write only) |
| 1036 | * switches are at 0x00001 (read only) |
| 1037 | */ |
| 1038 | #ifdef CFG_LED_BASE |
| 1039 | |
| 1040 | /* BR7 is configured as follows: |
| 1041 | * |
| 1042 | * - Base address of 0xA0000000 |
| 1043 | * - 8 bit port size |
| 1044 | * - Data errors checking is disabled |
| 1045 | * - Read and write access |
| 1046 | * - GPCM 60x bus |
| 1047 | * - Access are handled by the memory controller according to MSEL |
| 1048 | * - Not used for atomic operations |
| 1049 | * - No data pipelining is done |
| 1050 | * - Valid |
| 1051 | */ |
| 1052 | # define CFG_BR7_PRELIM ((CFG_LED_BASE & BRx_BA_MSK) |\ |
| 1053 | BRx_PS_8 |\ |
| 1054 | BRx_MS_GPCM_P |\ |
| 1055 | BRx_V) |
| 1056 | |
| 1057 | /* OR7 is configured as follows: |
| 1058 | * |
| 1059 | * - 1 byte |
| 1060 | * - *BCTL0 is asserted upon access to the current memory bank |
| 1061 | * - *CW / *WE are negated a quarter of a clock earlier |
| 1062 | * - *CS is output at the same time as the address lines |
| 1063 | * - Uses a clock cycle length of 15 |
| 1064 | * - *PSDVAL is generated internally by the memory controller |
| 1065 | * unless *GTA is asserted earlier externally. |
| 1066 | * - Relaxed timing is generated by the GPCM for accesses |
| 1067 | * initiated to this memory region. |
| 1068 | * - One idle clock is inserted between a read access from the |
| 1069 | * current bank and the next access. |
| 1070 | */ |
| 1071 | # define CFG_OR7_PRELIM (ORxG_AM_MSK |\ |
| 1072 | ORxG_CSNT |\ |
| 1073 | ORxG_ACS_DIV1 |\ |
| 1074 | ORxG_SCY_15_CLK |\ |
| 1075 | ORxG_TRLX |\ |
| 1076 | ORxG_EHTR) |
| 1077 | #endif /* CFG_LED_BASE */ |
| 1078 | |
| 1079 | /* |
| 1080 | * Internal Definitions |
| 1081 | * |
| 1082 | * Boot Flags |
| 1083 | */ |
| 1084 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
| 1085 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
| 1086 | |
| 1087 | #endif /* __CONFIG_H */ |