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 | |
Wolfgang Denk | 2ae1824 | 2010-10-06 09:05:45 +0200 | [diff] [blame] | 38 | #define CONFIG_SYS_TEXT_BASE 0x40000000 |
| 39 | |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 40 | #undef DEBUG_BOOTP_EXT /* Debug received vendor fields */ |
| 41 | |
wdenk | 78137c3 | 2003-09-15 18:00:00 +0000 | [diff] [blame] | 42 | #undef CONFIG_LOGBUFFER /* External logbuffer support */ |
| 43 | |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 44 | /***************************************************************************** |
| 45 | * |
| 46 | * These settings must match the way _your_ board is set up |
| 47 | * |
| 48 | *****************************************************************************/ |
| 49 | |
| 50 | /* What is the oscillator's (UX2) frequency in Hz? */ |
| 51 | #define CONFIG_8260_CLKIN 66666600 |
| 52 | |
| 53 | /*----------------------------------------------------------------------- |
| 54 | * MODCK_H & MODCLK[1-3] - Ref: Section 9.2 in MPC8206 User Manual |
| 55 | *----------------------------------------------------------------------- |
| 56 | * What should MODCK_H be? It is dependent on the oscillator |
| 57 | * frequency, MODCK[1-3], and desired CPM and core frequencies. |
| 58 | * Here are some example values (all frequencies are in MHz): |
| 59 | * |
| 60 | * MODCK_H MODCK[1-3] Osc CPM Core S2-6 S2-7 S2-8 |
| 61 | * ------- ---------- --- --- ---- ----- ----- ----- |
| 62 | * 0x1 0x5 33 100 133 Open Close Open |
| 63 | * 0x1 0x6 33 100 166 Open Open Close |
| 64 | * 0x1 0x7 33 100 200 Open Open Open |
| 65 | * |
| 66 | * 0x2 0x2 33 133 133 Close Open Close |
| 67 | * 0x2 0x3 33 133 166 Close Open Open |
| 68 | * 0x2 0x4 33 133 200 Open Close Close |
| 69 | * 0x2 0x5 33 133 233 Open Close Open |
| 70 | * 0x2 0x6 33 133 266 Open Open Close |
| 71 | * |
| 72 | * 0x5 0x5 66 133 133 Open Close Open |
| 73 | * 0x5 0x6 66 133 166 Open Open Close |
| 74 | * 0x5 0x7 66 133 200 Open Open Open |
| 75 | * 0x6 0x0 66 133 233 Close Close Close |
| 76 | * 0x6 0x1 66 133 266 Close Close Open |
| 77 | * 0x6 0x2 66 133 300 Close Open Close |
| 78 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 79 | #define CONFIG_SYS_SBC_MODCK_H 0x05 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 80 | |
| 81 | /* Define this if you want to boot from 0x00000100. If you don't define |
| 82 | * this, you will need to program the bootloader to 0xfff00000, and |
| 83 | * get the hardware reset config words at 0xfe000000. The simplest |
| 84 | * way to do that is to program the bootloader at both addresses. |
| 85 | * It is suggested that you just let U-Boot live at 0x00000000. |
| 86 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 87 | #define CONFIG_SYS_SBC_BOOT_LOW 1 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 88 | |
| 89 | /* What should the base address of the main FLASH be and how big is |
Wolfgang Denk | 14d0a02 | 2010-10-07 21:51:12 +0200 | [diff] [blame] | 90 | * it (in MBytes)? This must contain CONFIG_SYS_TEXT_BASE from board/sacsng/config.mk |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 91 | * The main FLASH is whichever is connected to *CS0. |
| 92 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 93 | #define CONFIG_SYS_FLASH0_BASE 0x40000000 |
| 94 | #define CONFIG_SYS_FLASH0_SIZE 2 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 95 | |
| 96 | /* What should the base address of the secondary FLASH be and how big |
| 97 | * is it (in Mbytes)? The secondary FLASH is whichever is connected |
| 98 | * to *CS6. |
| 99 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 100 | #define CONFIG_SYS_FLASH1_BASE 0x60000000 |
| 101 | #define CONFIG_SYS_FLASH1_SIZE 2 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 102 | |
| 103 | /* Define CONFIG_VERY_BIG_RAM to allow use of SDRAMs larger than 256MBytes |
| 104 | */ |
| 105 | #define CONFIG_VERY_BIG_RAM 1 |
| 106 | |
| 107 | /* What should be the base address of SDRAM DIMM and how big is |
| 108 | * it (in Mbytes)? This will normally auto-configure via the SPD. |
| 109 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 110 | #define CONFIG_SYS_SDRAM0_BASE 0x00000000 |
| 111 | #define CONFIG_SYS_SDRAM0_SIZE 64 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 112 | |
| 113 | /* |
| 114 | * Memory map example with 64 MB DIMM: |
| 115 | * |
| 116 | * 0x0000 0000 Exception Vector code, 8k |
| 117 | * : |
| 118 | * 0x0000 1FFF |
| 119 | * 0x0000 2000 Free for Application Use |
| 120 | * : |
| 121 | * : |
| 122 | * |
| 123 | * : |
| 124 | * : |
| 125 | * 0x03F5 FF30 Monitor Stack (Growing downward) |
| 126 | * Monitor Stack Buffer (0x80) |
| 127 | * 0x03F5 FFB0 Board Info Data |
| 128 | * 0x03F6 0000 Malloc Arena |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 129 | * : CONFIG_ENV_SECT_SIZE, 16k |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 130 | * : CONFIG_SYS_MALLOC_LEN, 128k |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 131 | * 0x03FC 0000 RAM Copy of Monitor Code |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 132 | * : CONFIG_SYS_MONITOR_LEN, 256k |
| 133 | * 0x03FF FFFF [End of RAM], CONFIG_SYS_SDRAM_SIZE - 1 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 134 | */ |
| 135 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 136 | #define CONFIG_POST (CONFIG_SYS_POST_MEMORY | \ |
| 137 | CONFIG_SYS_POST_CPU) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 138 | |
| 139 | |
| 140 | /* |
| 141 | * select serial console configuration |
| 142 | * |
| 143 | * if either CONFIG_CONS_ON_SMC or CONFIG_CONS_ON_SCC is selected, then |
| 144 | * CONFIG_CONS_INDEX must be set to the channel number (1-2 for SMC, 1-4 |
| 145 | * for SCC). |
| 146 | * |
| 147 | * if CONFIG_CONS_NONE is defined, then the serial console routines must |
| 148 | * defined elsewhere. |
| 149 | */ |
| 150 | #define CONFIG_CONS_ON_SMC 1 /* define if console on SMC */ |
| 151 | #undef CONFIG_CONS_ON_SCC /* define if console on SCC */ |
| 152 | #undef CONFIG_CONS_NONE /* define if console on neither */ |
| 153 | #define CONFIG_CONS_INDEX 1 /* which SMC/SCC channel for console */ |
| 154 | |
| 155 | /* |
| 156 | * select ethernet configuration |
| 157 | * |
| 158 | * if either CONFIG_ETHER_ON_SCC or CONFIG_ETHER_ON_FCC is selected, then |
| 159 | * CONFIG_ETHER_INDEX must be set to the channel number (1-4 for SCC, 1-3 |
| 160 | * for FCC) |
| 161 | * |
| 162 | * if CONFIG_ETHER_NONE is defined, then either the ethernet routines must be |
Jon Loeliger | 639221c | 2007-07-09 17:15:49 -0500 | [diff] [blame] | 163 | * defined elsewhere (as for the console), or CONFIG_CMD_NET must be unset. |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 164 | */ |
| 165 | |
| 166 | #undef CONFIG_ETHER_ON_SCC |
| 167 | #define CONFIG_ETHER_ON_FCC |
| 168 | #undef CONFIG_ETHER_NONE /* define if ethernet on neither */ |
| 169 | |
| 170 | #ifdef CONFIG_ETHER_ON_SCC |
| 171 | #define CONFIG_ETHER_INDEX 1 /* which SCC/FCC channel for ethernet */ |
| 172 | #endif /* CONFIG_ETHER_ON_SCC */ |
| 173 | |
| 174 | #ifdef CONFIG_ETHER_ON_FCC |
| 175 | #define CONFIG_ETHER_INDEX 2 /* which SCC/FCC channel for ethernet */ |
wdenk | 78137c3 | 2003-09-15 18:00:00 +0000 | [diff] [blame] | 176 | #undef CONFIG_ETHER_LOOPBACK_TEST /* Ethernet external loopback test */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 177 | #define CONFIG_MII /* MII PHY management */ |
| 178 | #define CONFIG_BITBANGMII /* bit-bang MII PHY management */ |
| 179 | /* |
| 180 | * Port pins used for bit-banged MII communictions (if applicable). |
| 181 | */ |
| 182 | |
| 183 | #define MDIO_PORT 2 /* Port A=0, B=1, C=2, D=3 */ |
Luigi 'Comio' Mantellini | be22544 | 2009-10-10 12:42:22 +0200 | [diff] [blame] | 184 | #define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ( \ |
| 185 | (immap_t *) CONFIG_SYS_IMMR, MDIO_PORT ) |
| 186 | #define MDC_DECLARE MDIO_DECLARE |
| 187 | |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 188 | #define MDIO_ACTIVE (iop->pdir |= 0x40000000) |
| 189 | #define MDIO_TRISTATE (iop->pdir &= ~0x40000000) |
| 190 | #define MDIO_READ ((iop->pdat & 0x40000000) != 0) |
| 191 | |
| 192 | #define MDIO(bit) if(bit) iop->pdat |= 0x40000000; \ |
| 193 | else iop->pdat &= ~0x40000000 |
| 194 | |
| 195 | #define MDC(bit) if(bit) iop->pdat |= 0x80000000; \ |
| 196 | else iop->pdat &= ~0x80000000 |
| 197 | |
| 198 | #define MIIDELAY udelay(50) |
| 199 | #endif /* CONFIG_ETHER_ON_FCC */ |
| 200 | |
| 201 | #if defined(CONFIG_ETHER_ON_SCC) && (CONFIG_ETHER_INDEX == 1) |
| 202 | |
| 203 | /* |
| 204 | * - RX clk is CLK11 |
| 205 | * - TX clk is CLK12 |
| 206 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 207 | # define CONFIG_SYS_CMXSCR_VALUE (CMXSCR_RS1CS_CLK11 | CMXSCR_TS1CS_CLK12) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 208 | |
| 209 | #elif defined(CONFIG_ETHER_ON_FCC) && (CONFIG_ETHER_INDEX == 2) |
| 210 | |
| 211 | /* |
| 212 | * - Rx-CLK is CLK13 |
| 213 | * - Tx-CLK is CLK14 |
| 214 | * - Select bus for bd/buffers (see 28-13) |
| 215 | * - Enable Full Duplex in FSMR |
| 216 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 217 | # define CONFIG_SYS_CMXFCR_MASK (CMXFCR_FC2|CMXFCR_RF2CS_MSK|CMXFCR_TF2CS_MSK) |
| 218 | # define CONFIG_SYS_CMXFCR_VALUE (CMXFCR_RF2CS_CLK13|CMXFCR_TF2CS_CLK14) |
| 219 | # define CONFIG_SYS_CPMFCR_RAMTYPE 0 |
| 220 | # define CONFIG_SYS_FCC_PSMR (FCC_PSMR_FDE | FCC_PSMR_LPB) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 221 | |
| 222 | #endif /* CONFIG_ETHER_ON_FCC, CONFIG_ETHER_INDEX */ |
| 223 | |
| 224 | #define CONFIG_SHOW_BOOT_PROGRESS 1 /* boot progress enabled */ |
| 225 | |
| 226 | /* |
| 227 | * Configure for RAM tests. |
| 228 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 229 | #undef CONFIG_SYS_DRAM_TEST /* calls other tests in board.c */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 230 | |
| 231 | |
| 232 | /* |
| 233 | * Status LED for power up status feedback. |
| 234 | */ |
| 235 | #define CONFIG_STATUS_LED 1 /* Status LED enabled */ |
| 236 | |
| 237 | #define STATUS_LED_PAR im_ioport.iop_ppara |
| 238 | #define STATUS_LED_DIR im_ioport.iop_pdira |
| 239 | #define STATUS_LED_ODR im_ioport.iop_podra |
| 240 | #define STATUS_LED_DAT im_ioport.iop_pdata |
| 241 | |
| 242 | #define STATUS_LED_BIT 0x00000800 /* LED 0 is on PA.20 */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 243 | #define STATUS_LED_PERIOD (CONFIG_SYS_HZ) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 244 | #define STATUS_LED_STATE STATUS_LED_OFF |
| 245 | #define STATUS_LED_BIT1 0x00001000 /* LED 1 is on PA.19 */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 246 | #define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 247 | #define STATUS_LED_STATE1 STATUS_LED_OFF |
| 248 | #define STATUS_LED_BIT2 0x00002000 /* LED 2 is on PA.18 */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 249 | #define STATUS_LED_PERIOD2 (CONFIG_SYS_HZ/2) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 250 | #define STATUS_LED_STATE2 STATUS_LED_ON |
| 251 | |
| 252 | #define STATUS_LED_ACTIVE 0 /* LED on for bit == 0 */ |
| 253 | |
| 254 | #define STATUS_LED_YELLOW 0 |
| 255 | #define STATUS_LED_GREEN 1 |
| 256 | #define STATUS_LED_RED 2 |
| 257 | #define STATUS_LED_BOOT 1 |
| 258 | |
| 259 | |
| 260 | /* |
wdenk | 1d0350e | 2002-11-11 21:14:20 +0000 | [diff] [blame] | 261 | * Select SPI support configuration |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 262 | */ |
wdenk | 1d0350e | 2002-11-11 21:14:20 +0000 | [diff] [blame] | 263 | #define CONFIG_SOFT_SPI /* Enable SPI driver */ |
| 264 | #define MAX_SPI_BYTES 4 /* Maximum number of bytes we can handle */ |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 265 | #undef DEBUG_SPI /* Disable SPI debugging */ |
| 266 | |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 267 | /* |
| 268 | * Software (bit-bang) SPI driver configuration |
| 269 | */ |
| 270 | #ifdef CONFIG_SOFT_SPI |
| 271 | |
| 272 | /* |
| 273 | * Software (bit-bang) SPI driver configuration |
| 274 | */ |
| 275 | #define I2C_SCLK 0x00002000 /* PD 18: Shift clock */ |
| 276 | #define I2C_MOSI 0x00004000 /* PD 17: Master Out, Slave In */ |
| 277 | #define I2C_MISO 0x00008000 /* PD 16: Master In, Slave Out */ |
| 278 | |
| 279 | #undef SPI_INIT /* no port initialization needed */ |
| 280 | #define SPI_READ ((immr->im_ioport.iop_pdatd & I2C_MISO) != 0) |
Wolfgang Denk | ced209c | 2008-07-03 22:39:21 +0200 | [diff] [blame] | 281 | #define SPI_SDA(bit) do { \ |
| 282 | if(bit) immr->im_ioport.iop_pdatd |= I2C_MOSI; \ |
| 283 | else immr->im_ioport.iop_pdatd &= ~I2C_MOSI; \ |
| 284 | } while (0) |
| 285 | #define SPI_SCL(bit) do { \ |
| 286 | if(bit) immr->im_ioport.iop_pdatd |= I2C_SCLK; \ |
| 287 | else immr->im_ioport.iop_pdatd &= ~I2C_SCLK; \ |
| 288 | } while (0) |
wdenk | 1d0350e | 2002-11-11 21:14:20 +0000 | [diff] [blame] | 289 | #define SPI_DELAY /* No delay is needed */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 290 | #endif /* CONFIG_SOFT_SPI */ |
| 291 | |
| 292 | |
| 293 | /* |
| 294 | * select I2C support configuration |
| 295 | * |
| 296 | * Supported configurations are {none, software, hardware} drivers. |
| 297 | * If the software driver is chosen, there are some additional |
| 298 | * configuration items that the driver uses to drive the port pins. |
| 299 | */ |
| 300 | #undef CONFIG_HARD_I2C /* I2C with hardware support */ |
| 301 | #define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 302 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ |
| 303 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 304 | |
| 305 | /* |
| 306 | * Software (bit-bang) I2C driver configuration |
| 307 | */ |
| 308 | #ifdef CONFIG_SOFT_I2C |
| 309 | #define I2C_PORT 3 /* Port A=0, B=1, C=2, D=3 */ |
| 310 | #define I2C_ACTIVE (iop->pdir |= 0x00010000) |
| 311 | #define I2C_TRISTATE (iop->pdir &= ~0x00010000) |
| 312 | #define I2C_READ ((iop->pdat & 0x00010000) != 0) |
| 313 | #define I2C_SDA(bit) if(bit) iop->pdat |= 0x00010000; \ |
| 314 | else iop->pdat &= ~0x00010000 |
| 315 | #define I2C_SCL(bit) if(bit) iop->pdat |= 0x00020000; \ |
| 316 | else iop->pdat &= ~0x00020000 |
| 317 | #define I2C_DELAY udelay(20) /* 1/4 I2C clock duration */ |
| 318 | #endif /* CONFIG_SOFT_I2C */ |
| 319 | |
| 320 | /* Define this to reserve an entire FLASH sector for |
| 321 | * environment variables. Otherwise, the environment will be |
| 322 | * put in the same sector as U-Boot, and changing variables |
| 323 | * will erase U-Boot temporarily |
| 324 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 325 | #define CONFIG_ENV_IN_OWN_SECT 1 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 326 | |
| 327 | /* Define this to contain any number of null terminated strings that |
| 328 | * will be part of the default enviroment compiled into the boot image. |
| 329 | */ |
| 330 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
wdenk | 78137c3 | 2003-09-15 18:00:00 +0000 | [diff] [blame] | 331 | "quiet=0\0" \ |
| 332 | "serverip=192.168.123.205\0" \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 333 | "ipaddr=192.168.123.203\0" \ |
| 334 | "checkhostname=VR8500\0" \ |
| 335 | "reprog="\ |
wdenk | 78137c3 | 2003-09-15 18:00:00 +0000 | [diff] [blame] | 336 | "bootp; " \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 337 | "tftpboot 0x140000 /bdi2000/u-boot.bin; " \ |
| 338 | "protect off 60000000 6003FFFF; " \ |
| 339 | "erase 60000000 6003FFFF; " \ |
Wolfgang Denk | fe126d8 | 2005-11-20 21:40:11 +0100 | [diff] [blame] | 340 | "cp.b 140000 60000000 ${filesize}; " \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 341 | "protect on 60000000 6003FFFF\0" \ |
| 342 | "copyenv="\ |
| 343 | "protect off 60040000 6004FFFF; " \ |
| 344 | "erase 60040000 6004FFFF; " \ |
| 345 | "cp.b 40040000 60040000 10000; " \ |
| 346 | "protect on 60040000 6004FFFF\0" \ |
| 347 | "copyprog="\ |
| 348 | "protect off 60000000 6003FFFF; " \ |
| 349 | "erase 60000000 6003FFFF; " \ |
| 350 | "cp.b 40000000 60000000 40000; " \ |
| 351 | "protect on 60000000 6003FFFF\0" \ |
| 352 | "zapenv="\ |
| 353 | "protect off 40040000 4004FFFF; " \ |
| 354 | "erase 40040000 4004FFFF; " \ |
| 355 | "protect on 40040000 4004FFFF\0" \ |
| 356 | "zapotherenv="\ |
| 357 | "protect off 60040000 6004FFFF; " \ |
| 358 | "erase 60040000 6004FFFF; " \ |
| 359 | "protect on 60040000 6004FFFF\0" \ |
| 360 | "root-on-initrd="\ |
| 361 | "setenv bootcmd "\ |
| 362 | "version\\;" \ |
| 363 | "echo\\;" \ |
| 364 | "bootp\\;" \ |
| 365 | "setenv bootargs root=/dev/ram0 rw quiet " \ |
Wolfgang Denk | fe126d8 | 2005-11-20 21:40:11 +0100 | [diff] [blame] | 366 | "ip=\\${ipaddr}:\\${serverip}:\\${gatewayip}:\\${netmask}:\\${hostname}::off\\;" \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 367 | "run boot-hook\\;" \ |
| 368 | "bootm\0" \ |
| 369 | "root-on-initrd-debug="\ |
| 370 | "setenv bootcmd "\ |
| 371 | "version\\;" \ |
| 372 | "echo\\;" \ |
| 373 | "bootp\\;" \ |
| 374 | "setenv bootargs root=/dev/ram0 rw debug " \ |
Wolfgang Denk | fe126d8 | 2005-11-20 21:40:11 +0100 | [diff] [blame] | 375 | "ip=\\${ipaddr}:\\${serverip}:\\${gatewayip}:\\${netmask}:\\${hostname}::off\\;" \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 376 | "run debug-hook\\;" \ |
| 377 | "run boot-hook\\;" \ |
| 378 | "bootm\0" \ |
| 379 | "root-on-nfs="\ |
| 380 | "setenv bootcmd "\ |
| 381 | "version\\;" \ |
| 382 | "echo\\;" \ |
| 383 | "bootp\\;" \ |
| 384 | "setenv bootargs root=/dev/nfs rw quiet " \ |
Wolfgang Denk | fe126d8 | 2005-11-20 21:40:11 +0100 | [diff] [blame] | 385 | "nfsroot=\\${serverip}:\\${rootpath} " \ |
| 386 | "ip=\\${ipaddr}:\\${serverip}:\\${gatewayip}:\\${netmask}:\\${hostname}::off\\;" \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 387 | "run boot-hook\\;" \ |
| 388 | "bootm\0" \ |
| 389 | "root-on-nfs-debug="\ |
| 390 | "setenv bootcmd "\ |
| 391 | "version\\;" \ |
| 392 | "echo\\;" \ |
| 393 | "bootp\\;" \ |
| 394 | "setenv bootargs root=/dev/nfs rw debug " \ |
Wolfgang Denk | fe126d8 | 2005-11-20 21:40:11 +0100 | [diff] [blame] | 395 | "nfsroot=\\${serverip}:\\${rootpath} " \ |
| 396 | "ip=\\${ipaddr}:\\${serverip}:\\${gatewayip}:\\${netmask}:\\${hostname}::off\\;" \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 397 | "run debug-hook\\;" \ |
| 398 | "run boot-hook\\;" \ |
| 399 | "bootm\0" \ |
| 400 | "debug-checkout="\ |
| 401 | "setenv checkhostname;" \ |
| 402 | "setenv ethaddr 00:09:70:00:00:01;" \ |
| 403 | "bootp;" \ |
Wolfgang Denk | fe126d8 | 2005-11-20 21:40:11 +0100 | [diff] [blame] | 404 | "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} debug " \ |
| 405 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;" \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 406 | "run debug-hook;" \ |
| 407 | "run boot-hook;" \ |
| 408 | "bootm\0" \ |
| 409 | "debug-hook="\ |
Wolfgang Denk | fe126d8 | 2005-11-20 21:40:11 +0100 | [diff] [blame] | 410 | "echo ipaddr ${ipaddr};" \ |
| 411 | "echo serverip ${serverip};" \ |
| 412 | "echo gatewayip ${gatewayip};" \ |
| 413 | "echo netmask ${netmask};" \ |
| 414 | "echo hostname ${hostname}\0" \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 415 | "ana=run adc ; run dac\0" \ |
| 416 | "adc=run adc-12 ; run adc-34\0" \ |
Peter Tyser | 0f89c54 | 2009-04-18 22:34:03 -0500 | [diff] [blame] | 417 | "adc-12=echo ### ADC-12 ; i2c md e 81 e\0" \ |
| 418 | "adc-34=echo ### ADC-34 ; i2c md f 81 e\0" \ |
| 419 | "dac=echo ### DAC ; i2c md 11 81 5\0" \ |
wdenk | 78137c3 | 2003-09-15 18:00:00 +0000 | [diff] [blame] | 420 | "boot-hook=echo\0" |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 421 | |
| 422 | /* What should the console's baud rate be? */ |
| 423 | #define CONFIG_BAUDRATE 9600 |
| 424 | |
| 425 | /* Ethernet MAC address */ |
| 426 | #define CONFIG_ETHADDR 00:09:70:00:00:00 |
| 427 | |
| 428 | /* The default Ethernet MAC address can be overwritten just once */ |
| 429 | #ifdef CONFIG_ETHADDR |
| 430 | #define CONFIG_OVERWRITE_ETHADDR_ONCE 1 |
| 431 | #endif |
| 432 | |
| 433 | /* |
| 434 | * Define this to do some miscellaneous board-specific initialization. |
| 435 | */ |
| 436 | #define CONFIG_MISC_INIT_R |
| 437 | |
| 438 | /* Set to a positive value to delay for running BOOTCOMMAND */ |
| 439 | #define CONFIG_BOOTDELAY 1 /* autoboot after 1 second */ |
| 440 | |
| 441 | /* Be selective on what keys can delay or stop the autoboot process |
| 442 | * To stop use: " " |
| 443 | */ |
| 444 | #define CONFIG_AUTOBOOT_KEYED |
Stefan Roese | f2302d4 | 2008-08-06 14:05:38 +0200 | [diff] [blame] | 445 | #define CONFIG_AUTOBOOT_PROMPT "Autobooting...\n" |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 446 | #define CONFIG_AUTOBOOT_STOP_STR " " |
| 447 | #undef CONFIG_AUTOBOOT_DELAY_STR |
| 448 | #define CONFIG_ZERO_BOOTDELAY_CHECK |
| 449 | #define DEBUG_BOOTKEYS 0 |
| 450 | |
| 451 | /* Define a command string that is automatically executed when no character |
| 452 | * is read on the console interface withing "Boot Delay" after reset. |
| 453 | */ |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 454 | #undef CONFIG_BOOT_ROOT_INITRD /* Use ram disk for the root file system */ |
wdenk | b79a11c | 2004-03-25 15:14:43 +0000 | [diff] [blame] | 455 | #define CONFIG_BOOT_ROOT_NFS /* Use a NFS mounted root file system */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 456 | |
wdenk | 42dfe7a | 2004-03-14 22:25:36 +0000 | [diff] [blame] | 457 | #ifdef CONFIG_BOOT_ROOT_INITRD |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 458 | #define CONFIG_BOOTCOMMAND \ |
| 459 | "version;" \ |
| 460 | "echo;" \ |
| 461 | "bootp;" \ |
| 462 | "setenv bootargs root=/dev/ram0 rw quiet " \ |
Wolfgang Denk | fe126d8 | 2005-11-20 21:40:11 +0100 | [diff] [blame] | 463 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;" \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 464 | "run boot-hook;" \ |
| 465 | "bootm" |
| 466 | #endif /* CONFIG_BOOT_ROOT_INITRD */ |
| 467 | |
wdenk | 42dfe7a | 2004-03-14 22:25:36 +0000 | [diff] [blame] | 468 | #ifdef CONFIG_BOOT_ROOT_NFS |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 469 | #define CONFIG_BOOTCOMMAND \ |
| 470 | "version;" \ |
| 471 | "echo;" \ |
| 472 | "bootp;" \ |
Wolfgang Denk | fe126d8 | 2005-11-20 21:40:11 +0100 | [diff] [blame] | 473 | "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} quiet " \ |
| 474 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off;" \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 475 | "run boot-hook;" \ |
| 476 | "bootm" |
| 477 | #endif /* CONFIG_BOOT_ROOT_NFS */ |
| 478 | |
| 479 | #define CONFIG_BOOTP_RANDOM_DELAY /* Randomize the BOOTP retry delay */ |
| 480 | |
Jon Loeliger | d3b8c1a | 2007-07-09 21:57:31 -0500 | [diff] [blame] | 481 | /* |
| 482 | * BOOTP options |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 483 | */ |
Jon Loeliger | d3b8c1a | 2007-07-09 21:57:31 -0500 | [diff] [blame] | 484 | #define CONFIG_BOOTP_SUBNETMASK |
| 485 | #define CONFIG_BOOTP_GATEWAY |
| 486 | #define CONFIG_BOOTP_HOSTNAME |
| 487 | #define CONFIG_BOOTP_BOOTPATH |
| 488 | #define CONFIG_BOOTP_BOOTFILESIZE |
| 489 | #define CONFIG_BOOTP_DNS |
| 490 | #define CONFIG_BOOTP_DNS2 |
| 491 | #define CONFIG_BOOTP_SEND_HOSTNAME |
| 492 | |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 493 | |
| 494 | /* undef this to save memory */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 495 | #define CONFIG_SYS_LONGHELP |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 496 | |
| 497 | /* Monitor Command Prompt */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 498 | #define CONFIG_SYS_PROMPT "=> " |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 499 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 500 | #undef CONFIG_SYS_HUSH_PARSER |
| 501 | #ifdef CONFIG_SYS_HUSH_PARSER |
| 502 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 503 | #endif |
| 504 | |
wdenk | 1d0350e | 2002-11-11 21:14:20 +0000 | [diff] [blame] | 505 | /* When CONFIG_TIMESTAMP is selected, the timestamp (date and time) |
| 506 | * of an image is printed by image commands like bootm or iminfo. |
| 507 | */ |
| 508 | #define CONFIG_TIMESTAMP |
| 509 | |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 510 | /* If this variable is defined, an environment variable named "ver" |
wdenk | 78137c3 | 2003-09-15 18:00:00 +0000 | [diff] [blame] | 511 | * is created by U-Boot showing the U-Boot version. |
| 512 | */ |
| 513 | #define CONFIG_VERSION_VARIABLE |
| 514 | |
Jon Loeliger | 46da1e9 | 2007-07-04 22:33:30 -0500 | [diff] [blame] | 515 | |
| 516 | /* |
| 517 | * Command line configuration. |
| 518 | */ |
| 519 | #include <config_cmd_default.h> |
| 520 | |
| 521 | #define CONFIG_CMD_ELF |
| 522 | #define CONFIG_CMD_ASKENV |
| 523 | #define CONFIG_CMD_I2C |
| 524 | #define CONFIG_CMD_SPI |
| 525 | #define CONFIG_CMD_SDRAM |
| 526 | #define CONFIG_CMD_REGINFO |
| 527 | #define CONFIG_CMD_IMMAP |
| 528 | #define CONFIG_CMD_IRQ |
| 529 | #define CONFIG_CMD_PING |
| 530 | |
| 531 | #undef CONFIG_CMD_KGDB |
| 532 | |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 533 | #ifdef CONFIG_ETHER_ON_FCC |
Jon Loeliger | 46da1e9 | 2007-07-04 22:33:30 -0500 | [diff] [blame] | 534 | #define CONFIG_CMD_MII |
| 535 | #endif |
| 536 | |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 537 | |
| 538 | /* Where do the internal registers live? */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 539 | #define CONFIG_SYS_IMMR 0xF0000000 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 540 | |
wdenk | 78137c3 | 2003-09-15 18:00:00 +0000 | [diff] [blame] | 541 | #undef CONFIG_WATCHDOG /* disable the watchdog */ |
| 542 | |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 543 | /***************************************************************************** |
| 544 | * |
| 545 | * You should not have to modify any of the following settings |
| 546 | * |
| 547 | *****************************************************************************/ |
| 548 | |
| 549 | #define CONFIG_MPC8260 1 /* This is an MPC8260 CPU */ |
| 550 | #define CONFIG_SBC8260 1 /* on an EST SBC8260 Board */ |
| 551 | #define CONFIG_SACSng 1 /* munged for the SACSng */ |
Jon Loeliger | 9c4c5ae | 2005-07-23 10:37:35 -0500 | [diff] [blame] | 552 | #define CONFIG_CPM2 1 /* Has a CPM2 */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 553 | |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 554 | /* |
| 555 | * Miscellaneous configurable options |
| 556 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 557 | #define CONFIG_SYS_BOOTM_HEADER_QUIET 1 /* Suppress the image header dump */ |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 558 | /* in the bootm command. */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 559 | #define CONFIG_SYS_BOOTM_PROGESS_QUIET 1 /* Suppress the progress displays, */ |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 560 | /* "## <message>" from the bootm cmd */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 561 | #define CONFIG_SYS_BOOTP_CHECK_HOSTNAME 1 /* If checkhostname environment is */ |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 562 | /* defined, then the hostname param */ |
| 563 | /* validated against checkhostname. */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 564 | #define CONFIG_SYS_BOOTP_RETRY_COUNT 0x40000000 /* # of timeouts before giving up */ |
| 565 | #define CONFIG_SYS_BOOTP_SHORT_RANDOM_DELAY 1 /* Use a short random delay value */ |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 566 | /* (limited to maximum of 1024 msec) */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 567 | #define CONFIG_SYS_CHK_FOR_ABORT_AT_LEAST_ONCE 1 |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 568 | /* Check for abort key presses */ |
| 569 | /* at least once in dependent of the */ |
| 570 | /* CONFIG_BOOTDELAY value. */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 571 | #define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* Don't print console @ startup */ |
| 572 | #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN 1 /* Echo the inverted Ethernet link */ |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 573 | /* state to the fault LED. */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 574 | #define CONFIG_SYS_FAULT_MII_ADDR 0x02 /* MII addr of the PHY to check for */ |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 575 | /* the Ethernet link state. */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 576 | #define CONFIG_SYS_STATUS_FLASH_UNTIL_TFTP_OK 1 /* Keeping the status LED flashing */ |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 577 | /* until the TFTP is successful. */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 578 | #define CONFIG_SYS_STATUS_OFF_AFTER_NETBOOT 1 /* After a successful netboot, */ |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 579 | /* turn off the STATUS LEDs. */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 580 | #define CONFIG_SYS_TFTP_BLINK_STATUS_ON_DATA_IN 1 /* Blink status LED based on */ |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 581 | /* incoming data. */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 582 | #define CONFIG_SYS_TFTP_BLOCKS_PER_HASH 100 /* For every XX blocks, output a '#' */ |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 583 | /* to signify that tftp is moving. */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 584 | #define CONFIG_SYS_TFTP_HASHES_PER_FLASH 200 /* For every '#' hashes, */ |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 585 | /* flash the status LED. */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 586 | #define CONFIG_SYS_TFTP_HASHES_PER_LINE 65 /* Only output XX '#'s per line */ |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 587 | /* during the tftp file transfer. */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 588 | #define CONFIG_SYS_TFTP_PROGESS_QUIET 1 /* Suppress the progress displays */ |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 589 | /* '#'s from the tftp command. */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 590 | #define CONFIG_SYS_TFTP_STATUS_QUIET 1 /* Suppress the status displays */ |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 591 | /* issued during the tftp command. */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 592 | #define CONFIG_SYS_TFTP_TIMEOUT_COUNT 5 /* How many timeouts TFTP will allow */ |
wdenk | 78137c3 | 2003-09-15 18:00:00 +0000 | [diff] [blame] | 593 | /* before it gives up. */ |
| 594 | |
Jon Loeliger | 46da1e9 | 2007-07-04 22:33:30 -0500 | [diff] [blame] | 595 | #if defined(CONFIG_CMD_KGDB) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 596 | # define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 597 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 598 | # define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 599 | #endif |
| 600 | |
| 601 | /* Print Buffer Size */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 602 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT)+16) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 603 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 604 | #define CONFIG_SYS_MAXARGS 32 /* max number of command args */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 605 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 606 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 607 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 608 | #define CONFIG_SYS_LOAD_ADDR 0x400000 /* default load address */ |
| 609 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 610 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 611 | #define CONFIG_SYS_ALT_MEMTEST /* Select full-featured memory test */ |
| 612 | #define CONFIG_SYS_MEMTEST_START 0x2000 /* memtest works from the end of */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 613 | /* the exception vector table */ |
| 614 | /* to the end of the DRAM */ |
| 615 | /* less monitor and malloc area */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 616 | #define CONFIG_SYS_STACK_USAGE 0x10000 /* Reserve 64k for the stack usage */ |
| 617 | #define CONFIG_SYS_MEM_END_USAGE ( CONFIG_SYS_MONITOR_LEN \ |
| 618 | + CONFIG_SYS_MALLOC_LEN \ |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 619 | + CONFIG_ENV_SECT_SIZE \ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 620 | + CONFIG_SYS_STACK_USAGE ) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 621 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 622 | #define CONFIG_SYS_MEMTEST_END ( CONFIG_SYS_SDRAM_SIZE * 1024 * 1024 \ |
| 623 | - CONFIG_SYS_MEM_END_USAGE ) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 624 | |
| 625 | /* valid baudrates */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 626 | #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 627 | |
| 628 | /* |
| 629 | * Low Level Configuration Settings |
| 630 | * (address mappings, register initial values, etc.) |
| 631 | * You should know what you are doing if you make changes here. |
| 632 | */ |
| 633 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 634 | #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_FLASH0_BASE |
| 635 | #define CONFIG_SYS_FLASH_SIZE CONFIG_SYS_FLASH0_SIZE |
| 636 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_SDRAM0_BASE |
| 637 | #define CONFIG_SYS_SDRAM_SIZE CONFIG_SYS_SDRAM0_SIZE |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 638 | |
| 639 | /*----------------------------------------------------------------------- |
| 640 | * Hard Reset Configuration Words |
| 641 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 642 | #if defined(CONFIG_SYS_SBC_BOOT_LOW) |
| 643 | # define CONFIG_SYS_SBC_HRCW_BOOT_FLAGS (HRCW_CIP | HRCW_BMS) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 644 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 645 | # define CONFIG_SYS_SBC_HRCW_BOOT_FLAGS (0) |
| 646 | #endif /* defined(CONFIG_SYS_SBC_BOOT_LOW) */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 647 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 648 | /* get the HRCW ISB field from CONFIG_SYS_IMMR */ |
| 649 | #define CONFIG_SYS_SBC_HRCW_IMMR ( ((CONFIG_SYS_IMMR & 0x10000000) >> 10) | \ |
| 650 | ((CONFIG_SYS_IMMR & 0x01000000) >> 7) | \ |
| 651 | ((CONFIG_SYS_IMMR & 0x00100000) >> 4) ) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 652 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 653 | #define CONFIG_SYS_HRCW_MASTER ( HRCW_BPS10 | \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 654 | HRCW_DPPC11 | \ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 655 | CONFIG_SYS_SBC_HRCW_IMMR | \ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 656 | HRCW_MMR00 | \ |
| 657 | HRCW_LBPC11 | \ |
| 658 | HRCW_APPC10 | \ |
| 659 | HRCW_CS10PC00 | \ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 660 | (CONFIG_SYS_SBC_MODCK_H & HRCW_MODCK_H1111) | \ |
| 661 | CONFIG_SYS_SBC_HRCW_BOOT_FLAGS ) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 662 | |
| 663 | /* no slaves */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 664 | #define CONFIG_SYS_HRCW_SLAVE1 0 |
| 665 | #define CONFIG_SYS_HRCW_SLAVE2 0 |
| 666 | #define CONFIG_SYS_HRCW_SLAVE3 0 |
| 667 | #define CONFIG_SYS_HRCW_SLAVE4 0 |
| 668 | #define CONFIG_SYS_HRCW_SLAVE5 0 |
| 669 | #define CONFIG_SYS_HRCW_SLAVE6 0 |
| 670 | #define CONFIG_SYS_HRCW_SLAVE7 0 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 671 | |
| 672 | /*----------------------------------------------------------------------- |
| 673 | * Definitions for initial stack pointer and data area (in DPRAM) |
| 674 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 675 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR |
| 676 | #define CONFIG_SYS_INIT_RAM_END 0x4000 /* End of used area in DPRAM */ |
| 677 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* bytes reserved for initial data */ |
| 678 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
| 679 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 680 | |
| 681 | /*----------------------------------------------------------------------- |
| 682 | * Start addresses for the final memory configuration |
| 683 | * (Set up by the startup code) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 684 | * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 |
| 685 | * Note also that the logic that sets CONFIG_SYS_RAMBOOT is platform dependent. |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 686 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 687 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH0_BASE |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 688 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 689 | #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE) |
| 690 | # define CONFIG_SYS_RAMBOOT |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 691 | #endif |
| 692 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 693 | #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */ |
| 694 | #define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 695 | |
| 696 | /* |
| 697 | * For booting Linux, the board info and command line data |
| 698 | * have to be in the first 8 MB of memory, since this is |
| 699 | * the maximum mapped by the Linux kernel during initialization. |
| 700 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 701 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 702 | |
| 703 | /*----------------------------------------------------------------------- |
| 704 | * FLASH and environment organization |
| 705 | */ |
| 706 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 707 | #define CONFIG_SYS_FLASH_CFI 1 /* Flash is CFI conformant */ |
| 708 | #undef CONFIG_SYS_FLASH_PROTECTION /* use hardware protection */ |
| 709 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max number of memory banks */ |
| 710 | #define CONFIG_SYS_MAX_FLASH_SECT (64+4) /* max number of sectors on one chip */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 711 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 712 | #define CONFIG_SYS_FLASH_ERASE_TOUT 8000 /* Timeout for Flash Erase (in ms) */ |
| 713 | #define CONFIG_SYS_FLASH_WRITE_TOUT 1 /* Timeout for Flash Write (in ms) */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 714 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 715 | #ifndef CONFIG_SYS_RAMBOOT |
Jean-Christophe PLAGNIOL-VILLARD | 5a1aceb | 2008-09-10 22:48:04 +0200 | [diff] [blame] | 716 | # define CONFIG_ENV_IS_IN_FLASH 1 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 717 | |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 718 | # ifdef CONFIG_ENV_IN_OWN_SECT |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 719 | # define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 720 | # define CONFIG_ENV_SECT_SIZE 0x10000 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 721 | # else |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 722 | # define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN - CONFIG_ENV_SECT_SIZE) |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 723 | # define CONFIG_ENV_SIZE 0x1000 /* Total Size of Environment Sector */ |
| 724 | # define CONFIG_ENV_SECT_SIZE 0x10000 /* see README - env sect real size */ |
| 725 | # endif /* CONFIG_ENV_IN_OWN_SECT */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 726 | |
| 727 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 9314cee | 2008-09-10 22:47:59 +0200 | [diff] [blame] | 728 | # define CONFIG_ENV_IS_IN_NVRAM 1 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 729 | # define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000) |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 730 | # define CONFIG_ENV_SIZE 0x200 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 731 | #endif /* CONFIG_SYS_RAMBOOT */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 732 | |
| 733 | /*----------------------------------------------------------------------- |
| 734 | * Cache Configuration |
| 735 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 736 | #define CONFIG_SYS_CACHELINE_SIZE 32 /* For MPC8260 CPU */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 737 | |
Jon Loeliger | 46da1e9 | 2007-07-04 22:33:30 -0500 | [diff] [blame] | 738 | #if defined(CONFIG_CMD_KGDB) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 739 | # define CONFIG_SYS_CACHELINE_SHIFT 5 /* log base 2 of the above value */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 740 | #endif |
| 741 | |
| 742 | /*----------------------------------------------------------------------- |
| 743 | * HIDx - Hardware Implementation-dependent Registers 2-11 |
| 744 | *----------------------------------------------------------------------- |
| 745 | * HID0 also contains cache control - initially enable both caches and |
| 746 | * invalidate contents, then the final state leaves only the instruction |
| 747 | * cache enabled. Note that Power-On and Hard reset invalidate the caches, |
| 748 | * but Soft reset does not. |
| 749 | * |
| 750 | * HID1 has only read-only information - nothing to set. |
| 751 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 752 | #define CONFIG_SYS_HID0_INIT (HID0_ICE |\ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 753 | HID0_DCE |\ |
| 754 | HID0_ICFI |\ |
| 755 | HID0_DCI |\ |
| 756 | HID0_IFEM |\ |
| 757 | HID0_ABE) |
| 758 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 759 | #define CONFIG_SYS_HID0_FINAL (HID0_ICE |\ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 760 | HID0_IFEM |\ |
| 761 | HID0_ABE |\ |
| 762 | HID0_EMCP) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 763 | #define CONFIG_SYS_HID2 0 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 764 | |
| 765 | /*----------------------------------------------------------------------- |
| 766 | * RMR - Reset Mode Register |
| 767 | *----------------------------------------------------------------------- |
| 768 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 769 | #define CONFIG_SYS_RMR 0 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 770 | |
| 771 | /*----------------------------------------------------------------------- |
| 772 | * BCR - Bus Configuration 4-25 |
| 773 | *----------------------------------------------------------------------- |
| 774 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 775 | #define CONFIG_SYS_BCR (BCR_ETM) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 776 | |
| 777 | /*----------------------------------------------------------------------- |
| 778 | * SIUMCR - SIU Module Configuration 4-31 |
| 779 | *----------------------------------------------------------------------- |
| 780 | */ |
| 781 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 782 | #define CONFIG_SYS_SIUMCR (SIUMCR_DPPC11 |\ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 783 | SIUMCR_L2CPC00 |\ |
| 784 | SIUMCR_APPC10 |\ |
| 785 | SIUMCR_MMR00) |
| 786 | |
| 787 | |
| 788 | /*----------------------------------------------------------------------- |
| 789 | * SYPCR - System Protection Control 11-9 |
| 790 | * SYPCR can only be written once after reset! |
| 791 | *----------------------------------------------------------------------- |
| 792 | * Watchdog & Bus Monitor Timer max, 60x Bus Monitor enable |
| 793 | */ |
wdenk | 78137c3 | 2003-09-15 18:00:00 +0000 | [diff] [blame] | 794 | #if defined(CONFIG_WATCHDOG) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 795 | #define CONFIG_SYS_SYPCR (SYPCR_SWTC |\ |
wdenk | 78137c3 | 2003-09-15 18:00:00 +0000 | [diff] [blame] | 796 | SYPCR_BMT |\ |
| 797 | SYPCR_PBME |\ |
| 798 | SYPCR_LBME |\ |
| 799 | SYPCR_SWRI |\ |
| 800 | SYPCR_SWP |\ |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 801 | SYPCR_SWE) |
wdenk | 78137c3 | 2003-09-15 18:00:00 +0000 | [diff] [blame] | 802 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 803 | #define CONFIG_SYS_SYPCR (SYPCR_SWTC |\ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 804 | SYPCR_BMT |\ |
| 805 | SYPCR_PBME |\ |
| 806 | SYPCR_LBME |\ |
| 807 | SYPCR_SWRI |\ |
| 808 | SYPCR_SWP) |
wdenk | 78137c3 | 2003-09-15 18:00:00 +0000 | [diff] [blame] | 809 | #endif /* CONFIG_WATCHDOG */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 810 | |
| 811 | /*----------------------------------------------------------------------- |
| 812 | * TMCNTSC - Time Counter Status and Control 4-40 |
| 813 | *----------------------------------------------------------------------- |
| 814 | * Clear once per Second and Alarm Interrupt Status, Set 32KHz timersclk, |
| 815 | * and enable Time Counter |
| 816 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 817 | #define CONFIG_SYS_TMCNTSC (TMCNTSC_SEC |\ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 818 | TMCNTSC_ALR |\ |
| 819 | TMCNTSC_TCF |\ |
| 820 | TMCNTSC_TCE) |
| 821 | |
| 822 | /*----------------------------------------------------------------------- |
| 823 | * PISCR - Periodic Interrupt Status and Control 4-42 |
| 824 | *----------------------------------------------------------------------- |
| 825 | * Clear Periodic Interrupt Status, Set 32KHz timersclk, and enable |
| 826 | * Periodic timer |
| 827 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 828 | #define CONFIG_SYS_PISCR (PISCR_PS |\ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 829 | PISCR_PTF |\ |
| 830 | PISCR_PTE) |
| 831 | |
| 832 | /*----------------------------------------------------------------------- |
| 833 | * SCCR - System Clock Control 9-8 |
| 834 | *----------------------------------------------------------------------- |
| 835 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 836 | #define CONFIG_SYS_SCCR 0 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 837 | |
| 838 | /*----------------------------------------------------------------------- |
| 839 | * RCCR - RISC Controller Configuration 13-7 |
| 840 | *----------------------------------------------------------------------- |
| 841 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 842 | #define CONFIG_SYS_RCCR 0 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 843 | |
| 844 | /* |
| 845 | * Initialize Memory Controller: |
| 846 | * |
| 847 | * Bank Bus Machine PortSz Device |
| 848 | * ---- --- ------- ------ ------ |
| 849 | * 0 60x GPCM 16 bit FLASH (primary flash - 2MB) |
| 850 | * 1 60x GPCM -- bit (Unused) |
| 851 | * 2 60x SDRAM 64 bit SDRAM (DIMM) |
| 852 | * 3 60x SDRAM 64 bit SDRAM (DIMM) |
| 853 | * 4 60x GPCM -- bit (Unused) |
| 854 | * 5 60x GPCM -- bit (Unused) |
| 855 | * 6 60x GPCM 16 bit FLASH (secondary flash - 2MB) |
| 856 | */ |
| 857 | |
| 858 | /*----------------------------------------------------------------------- |
| 859 | * BR0,BR1 - Base Register |
| 860 | * Ref: Section 10.3.1 on page 10-14 |
| 861 | * OR0,OR1 - Option Register |
| 862 | * Ref: Section 10.3.2 on page 10-18 |
| 863 | *----------------------------------------------------------------------- |
| 864 | */ |
| 865 | |
| 866 | /* Bank 0 - Primary FLASH |
| 867 | */ |
| 868 | |
| 869 | /* BR0 is configured as follows: |
| 870 | * |
| 871 | * - Base address of 0x40000000 |
| 872 | * - 16 bit port size |
| 873 | * - Data errors checking is disabled |
| 874 | * - Read and write access |
| 875 | * - GPCM 60x bus |
| 876 | * - Access are handled by the memory controller according to MSEL |
| 877 | * - Not used for atomic operations |
| 878 | * - No data pipelining is done |
| 879 | * - Valid |
| 880 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 881 | #define CONFIG_SYS_BR0_PRELIM ((CONFIG_SYS_FLASH0_BASE & BRx_BA_MSK) |\ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 882 | BRx_PS_16 |\ |
| 883 | BRx_MS_GPCM_P |\ |
| 884 | BRx_V) |
| 885 | |
| 886 | /* OR0 is configured as follows: |
| 887 | * |
| 888 | * - 4 MB |
| 889 | * - *BCTL0 is asserted upon access to the current memory bank |
| 890 | * - *CW / *WE are negated a quarter of a clock earlier |
| 891 | * - *CS is output at the same time as the address lines |
| 892 | * - Uses a clock cycle length of 5 |
| 893 | * - *PSDVAL is generated internally by the memory controller |
| 894 | * unless *GTA is asserted earlier externally. |
| 895 | * - Relaxed timing is generated by the GPCM for accesses |
| 896 | * initiated to this memory region. |
| 897 | * - One idle clock is inserted between a read access from the |
| 898 | * current bank and the next access. |
| 899 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 900 | #define CONFIG_SYS_OR0_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH0_SIZE) |\ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 901 | ORxG_CSNT |\ |
| 902 | ORxG_ACS_DIV1 |\ |
| 903 | ORxG_SCY_5_CLK |\ |
| 904 | ORxG_TRLX |\ |
| 905 | ORxG_EHTR) |
| 906 | |
| 907 | /*----------------------------------------------------------------------- |
| 908 | * BR2,BR3 - Base Register |
| 909 | * Ref: Section 10.3.1 on page 10-14 |
| 910 | * OR2,OR3 - Option Register |
| 911 | * Ref: Section 10.3.2 on page 10-16 |
| 912 | *----------------------------------------------------------------------- |
| 913 | */ |
| 914 | |
| 915 | /* Bank 2,3 - SDRAM DIMM |
| 916 | */ |
| 917 | |
| 918 | /* The BR2 is configured as follows: |
| 919 | * |
| 920 | * - Base address of 0x00000000 |
| 921 | * - 64 bit port size (60x bus only) |
| 922 | * - Data errors checking is disabled |
| 923 | * - Read and write access |
| 924 | * - SDRAM 60x bus |
| 925 | * - Access are handled by the memory controller according to MSEL |
| 926 | * - Not used for atomic operations |
| 927 | * - No data pipelining is done |
| 928 | * - Valid |
| 929 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 930 | #define CONFIG_SYS_BR2_PRELIM ((CONFIG_SYS_SDRAM0_BASE & BRx_BA_MSK) |\ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 931 | BRx_PS_64 |\ |
| 932 | BRx_MS_SDRAM_P |\ |
| 933 | BRx_V) |
| 934 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 935 | #define CONFIG_SYS_BR3_PRELIM ((CONFIG_SYS_SDRAM0_BASE & BRx_BA_MSK) |\ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 936 | BRx_PS_64 |\ |
| 937 | BRx_MS_SDRAM_P |\ |
| 938 | BRx_V) |
| 939 | |
| 940 | /* With a 64 MB DIMM, the OR2 is configured as follows: |
| 941 | * |
| 942 | * - 64 MB |
| 943 | * - 4 internal banks per device |
| 944 | * - Row start address bit is A8 with PSDMR[PBI] = 0 |
| 945 | * - 12 row address lines |
| 946 | * - Back-to-back page mode |
| 947 | * - Internal bank interleaving within save device enabled |
| 948 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 949 | #if (CONFIG_SYS_SDRAM0_SIZE == 64) |
| 950 | #define CONFIG_SYS_OR2_PRELIM (MEG_TO_AM(CONFIG_SYS_SDRAM0_SIZE) |\ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 951 | ORxS_BPD_4 |\ |
| 952 | ORxS_ROWST_PBI0_A8 |\ |
| 953 | ORxS_NUMR_12) |
| 954 | #else |
| 955 | #error "INVALID SDRAM CONFIGURATION" |
| 956 | #endif |
| 957 | |
| 958 | /*----------------------------------------------------------------------- |
| 959 | * PSDMR - 60x Bus SDRAM Mode Register |
| 960 | * Ref: Section 10.3.3 on page 10-21 |
| 961 | *----------------------------------------------------------------------- |
| 962 | */ |
| 963 | |
| 964 | /* Address that the DIMM SPD memory lives at. |
| 965 | */ |
| 966 | #define SDRAM_SPD_ADDR 0x50 |
| 967 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 968 | #if (CONFIG_SYS_SDRAM0_SIZE == 64) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 969 | /* With a 64 MB DIMM, the PSDMR is configured as follows: |
| 970 | * |
| 971 | * - Bank Based Interleaving, |
| 972 | * - Refresh Enable, |
| 973 | * - Address Multiplexing where A5 is output on A14 pin |
| 974 | * (A6 on A15, and so on), |
| 975 | * - use address pins A14-A16 as bank select, |
| 976 | * - A9 is output on SDA10 during an ACTIVATE command, |
| 977 | * - earliest timing for ACTIVATE command after REFRESH command is 7 clocks, |
| 978 | * - earliest timing for ACTIVATE or REFRESH command after PRECHARGE command |
| 979 | * is 3 clocks, |
| 980 | * - earliest timing for READ/WRITE command after ACTIVATE command is |
| 981 | * 2 clocks, |
| 982 | * - earliest timing for PRECHARGE after last data was read is 1 clock, |
| 983 | * - earliest timing for PRECHARGE after last data was written is 1 clock, |
| 984 | * - CAS Latency is 2. |
| 985 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 986 | #define CONFIG_SYS_PSDMR (PSDMR_RFEN |\ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 987 | PSDMR_SDAM_A14_IS_A5 |\ |
| 988 | PSDMR_BSMA_A14_A16 |\ |
| 989 | PSDMR_SDA10_PBI0_A9 |\ |
| 990 | PSDMR_RFRC_7_CLK |\ |
| 991 | PSDMR_PRETOACT_3W |\ |
| 992 | PSDMR_ACTTORW_2W |\ |
| 993 | PSDMR_LDOTOPRE_1C |\ |
| 994 | PSDMR_WRC_1C |\ |
| 995 | PSDMR_CL_2) |
| 996 | #else |
| 997 | #error "INVALID SDRAM CONFIGURATION" |
| 998 | #endif |
| 999 | |
| 1000 | /* |
| 1001 | * Shoot for approximately 1MHz on the prescaler. |
| 1002 | */ |
| 1003 | #if (CONFIG_8260_CLKIN >= (60 * 1000 * 1000)) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 1004 | #define CONFIG_SYS_MPTPR MPTPR_PTP_DIV64 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 1005 | #elif (CONFIG_8260_CLKIN >= (30 * 1000 * 1000)) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 1006 | #define CONFIG_SYS_MPTPR MPTPR_PTP_DIV32 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 1007 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 1008 | #warning "Unconfigured bus clock freq: check CONFIG_SYS_MPTPR and CONFIG_SYS_PSRT are OK" |
| 1009 | #define CONFIG_SYS_MPTPR MPTPR_PTP_DIV32 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 1010 | #endif |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 1011 | #define CONFIG_SYS_PSRT 14 |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 1012 | |
| 1013 | |
| 1014 | /*----------------------------------------------------------------------- |
| 1015 | * BR6 - Base Register |
| 1016 | * Ref: Section 10.3.1 on page 10-14 |
| 1017 | * OR6 - Option Register |
| 1018 | * Ref: Section 10.3.2 on page 10-18 |
| 1019 | *----------------------------------------------------------------------- |
| 1020 | */ |
| 1021 | |
| 1022 | /* Bank 6 - Secondary FLASH |
| 1023 | * |
| 1024 | * The secondary FLASH is connected to *CS6 |
| 1025 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 1026 | #if (defined(CONFIG_SYS_FLASH1_BASE) && defined(CONFIG_SYS_FLASH1_SIZE)) |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 1027 | |
| 1028 | /* BR6 is configured as follows: |
| 1029 | * |
| 1030 | * - Base address of 0x60000000 |
| 1031 | * - 16 bit port size |
| 1032 | * - Data errors checking is disabled |
| 1033 | * - Read and write access |
| 1034 | * - GPCM 60x bus |
| 1035 | * - Access are handled by the memory controller according to MSEL |
| 1036 | * - Not used for atomic operations |
| 1037 | * - No data pipelining is done |
| 1038 | * - Valid |
| 1039 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 1040 | # define CONFIG_SYS_BR6_PRELIM ((CONFIG_SYS_FLASH1_BASE & BRx_BA_MSK) |\ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 1041 | BRx_PS_16 |\ |
| 1042 | BRx_MS_GPCM_P |\ |
| 1043 | BRx_V) |
| 1044 | |
| 1045 | /* OR6 is configured as follows: |
| 1046 | * |
| 1047 | * - 2 MB |
| 1048 | * - *BCTL0 is asserted upon access to the current memory bank |
| 1049 | * - *CW / *WE are negated a quarter of a clock earlier |
| 1050 | * - *CS is output at the same time as the address lines |
| 1051 | * - Uses a clock cycle length of 5 |
| 1052 | * - *PSDVAL is generated internally by the memory controller |
| 1053 | * unless *GTA is asserted earlier externally. |
| 1054 | * - Relaxed timing is generated by the GPCM for accesses |
| 1055 | * initiated to this memory region. |
| 1056 | * - One idle clock is inserted between a read access from the |
| 1057 | * current bank and the next access. |
| 1058 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 1059 | # define CONFIG_SYS_OR6_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH1_SIZE) |\ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 1060 | ORxG_CSNT |\ |
| 1061 | ORxG_ACS_DIV1 |\ |
| 1062 | ORxG_SCY_5_CLK |\ |
| 1063 | ORxG_TRLX |\ |
| 1064 | ORxG_EHTR) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 1065 | #endif /* (defined(CONFIG_SYS_FLASH1_BASE) && defined(CONFIG_SYS_FLASH1_SIZE)) */ |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 1066 | |
wdenk | fe8c280 | 2002-11-03 00:38:21 +0000 | [diff] [blame] | 1067 | #endif /* __CONFIG_H */ |