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