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