Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 1 | /* |
| 2 | * ppmc7xx.h |
| 3 | * --------- |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 4 | * |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 5 | * Wind River PPMC 7xx/74xx board configuration file. |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 6 | * |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 7 | * By Richard Danter (richard.danter@windriver.com) |
| 8 | * Copyright (C) 2005 Wind River Systems |
| 9 | */ |
| 10 | |
| 11 | |
| 12 | #ifndef __CONFIG_H |
| 13 | #define __CONFIG_H |
| 14 | |
| 15 | #define CONFIG_PPMC7XX |
| 16 | |
| 17 | |
| 18 | /*=================================================================== |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 19 | * |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 20 | * User configurable settings - Modify to your preference |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 21 | * |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 22 | *=================================================================== |
| 23 | */ |
| 24 | |
| 25 | /* |
| 26 | * Debug |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 27 | * |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 28 | * DEBUG - Define this is you want extra debug info |
| 29 | * GTREGREAD - Required to build with debug |
| 30 | * do_bdinfo - Required to build with debug |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 31 | */ |
| 32 | |
| 33 | #undef DEBUG |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 34 | #ifdef DEBUG |
| 35 | #define GTREGREAD(x) 0xFFFFFFFF |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 36 | #define do_bdinfo(a,b,c,d) |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 37 | #endif |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 38 | |
| 39 | /* |
| 40 | * CPU type |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 41 | * |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 42 | * CONFIG_7xx - We have a 750 or 755 CPU |
| 43 | * CONFIG_74xx - We have a 7400 CPU |
| 44 | * CONFIG_ALTIVEC - We have altivec enabled CPU (only 7400) |
| 45 | * CONFIG_BUS_CLK - System bus clock in Hz |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 46 | */ |
| 47 | |
| 48 | #define CONFIG_7xx |
| 49 | #undef CONFIG_74xx |
| 50 | #undef CONFIG_ALTIVEC |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 51 | #define CONFIG_BUS_CLK 66000000 |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 52 | |
| 53 | |
| 54 | /* |
| 55 | * Monitor configuration |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 56 | * |
Jon Loeliger | 26a3456 | 2007-07-04 22:33:17 -0500 | [diff] [blame] | 57 | * List of command sets to include in shell |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 58 | * |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 59 | * The following command sets have been tested and known to work: |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 60 | * |
Jon Loeliger | 26a3456 | 2007-07-04 22:33:17 -0500 | [diff] [blame] | 61 | * CMD_CACHE - Cache control commands |
| 62 | * CMD_MEMORY - Memory display, change and test commands |
| 63 | * CMD_FLASH - Erase and program flash |
| 64 | * CMD_ENV - Environment commands |
| 65 | * CMD_RUN - Run commands stored in env vars |
| 66 | * CMD_ELF - Load ELF files |
| 67 | * CMD_NET - Networking/file download commands |
| 68 | * CMD_PIN - ICMP Echo Request command |
| 69 | * CMD_PCI - PCI Bus scanning command |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 70 | */ |
| 71 | |
Jon Loeliger | 26a3456 | 2007-07-04 22:33:17 -0500 | [diff] [blame] | 72 | /* |
Jon Loeliger | 079a136 | 2007-07-10 10:12:10 -0500 | [diff] [blame] | 73 | * BOOTP options |
| 74 | */ |
| 75 | #define CONFIG_BOOTP_BOOTFILESIZE |
| 76 | #define CONFIG_BOOTP_BOOTPATH |
| 77 | #define CONFIG_BOOTP_GATEWAY |
| 78 | #define CONFIG_BOOTP_HOSTNAME |
| 79 | |
| 80 | |
| 81 | /* |
Jon Loeliger | 26a3456 | 2007-07-04 22:33:17 -0500 | [diff] [blame] | 82 | * Command line configuration. |
| 83 | */ |
| 84 | #include <config_cmd_default.h> |
| 85 | |
| 86 | #define CONFIG_CMD_FLASH |
| 87 | #define CONFIG_CMD_ENV |
| 88 | #define CONFIG_CMD_RUN |
| 89 | #define CONFIG_CMD_ELF |
| 90 | #define CONFIG_CMD_NET |
| 91 | #define CONFIG_CMD_PING |
| 92 | #define CONFIG_CMD_PCI |
| 93 | |
| 94 | #undef CONFIG_CMD_KGDB |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 95 | |
| 96 | |
| 97 | /* |
| 98 | * Serial configuration |
| 99 | * |
| 100 | * CONFIG_CONS_INDEX - Serial console port number (COM1) |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 101 | * CONFIG_BAUDRATE - Serial speed |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 102 | */ |
| 103 | |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 104 | #define CONFIG_CONS_INDEX 1 |
| 105 | #define CONFIG_BAUDRATE 9600 |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 106 | |
| 107 | |
| 108 | /* |
| 109 | * PCI config |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 110 | * |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 111 | * CONFIG_PCI - Enable PCI bus |
| 112 | * CONFIG_PCI_PNP - Enable Plug & Play support |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 113 | * CONFIG_PCI_SCAN_SHOW - Enable display of devices at startup |
| 114 | */ |
| 115 | |
| 116 | #define CONFIG_PCI |
| 117 | #define CONFIG_PCI_PNP |
| 118 | #undef CONFIG_PCI_SCAN_SHOW |
| 119 | |
| 120 | |
| 121 | /* |
| 122 | * Network config |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 123 | * |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 124 | * CONFIG_NET_MULTI - Support for multiple network interfaces |
| 125 | * CONFIG_EEPRO100 - Intel 8255x Ethernet Controller |
| 126 | * CONFIG_EEPRO100_SROM_WRITE - Enable writing to network card ROM |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 127 | */ |
| 128 | |
| 129 | #define CONFIG_NET_MULTI |
| 130 | #define CONFIG_EEPRO100 |
| 131 | #define CONFIG_EEPRO100_SROM_WRITE |
| 132 | |
| 133 | |
| 134 | /* |
| 135 | * Enable extra init functions |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 136 | * |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 137 | * CONFIG_MISC_INIT_F - Call pre-relocation init functions |
| 138 | * CONFIG_MISC_INIT_R - Call post relocation init functions |
| 139 | */ |
| 140 | |
| 141 | #undef CONFIG_MISC_INIT_F |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 142 | #define CONFIG_MISC_INIT_R |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 143 | |
| 144 | |
| 145 | /* |
| 146 | * Boot config |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 147 | * |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 148 | * CONFIG_BOOTCOMMAND - Command(s) to execute to auto-boot |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 149 | * CONFIG_BOOTDELAY - How long to wait before auto-boot (in sec) |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 150 | */ |
| 151 | |
| 152 | #define CONFIG_BOOTCOMMAND \ |
| 153 | "bootp;" \ |
| 154 | "setenv bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath) " \ |
| 155 | "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off;" \ |
| 156 | "bootm" |
| 157 | #define CONFIG_BOOTDELAY 5 |
| 158 | |
| 159 | |
| 160 | /*=================================================================== |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 161 | * |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 162 | * Board configuration settings - You should not need to modify these |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 163 | * |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 164 | *=================================================================== |
| 165 | */ |
| 166 | |
| 167 | |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 168 | /* |
| 169 | * Memory map |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 170 | * |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 171 | * This board runs in a standard CHRP (Map-B) configuration. |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 172 | * |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 173 | * Type Start End Size Width Chip Sel |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 174 | * ----------- ----------- ----------- ------- ------- -------- |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 175 | * SDRAM 0x00000000 0x04000000 64MB 64b SDRAMCS0 |
| 176 | * User LED's 0x78000000 RCS3 |
| 177 | * UART 0x7C000000 RCS2 |
| 178 | * Mailbox 0xFF000000 RCS1 |
| 179 | * Flash 0xFFC00000 0xFFFFFFFF 4MB 64b RCS0 |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 180 | * |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 181 | * Flash sectors are laid out as follows. |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 182 | * |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 183 | * Sector Start End Size Comments |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 184 | * ------- ----------- ----------- ------- ----------- |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 185 | * 0 0xFFC00000 0xFFC3FFFF 256KB |
| 186 | * 1 0xFFC40000 0xFFC7FFFF 256KB |
| 187 | * 2 0xFFC80000 0xFFCBFFFF 256KB |
| 188 | * 3 0xFFCC0000 0xFFCFFFFF 256KB |
| 189 | * 4 0xFFD00000 0xFFD3FFFF 256KB |
| 190 | * 5 0xFFD40000 0xFFD7FFFF 256KB |
| 191 | * 6 0xFFD80000 0xFFDBFFFF 256KB |
| 192 | * 7 0xFFDC0000 0xFFDFFFFF 256KB |
| 193 | * 8 0xFFE00000 0xFFE3FFFF 256KB |
| 194 | * 9 0xFFE40000 0xFFE7FFFF 256KB |
| 195 | * 10 0xFFE80000 0xFFEBFFFF 256KB |
| 196 | * 11 0xFFEC0000 0xFFEFFFFF 256KB |
| 197 | * 12 0xFFF00000 0xFFF3FFFF 256KB U-Boot code here |
| 198 | * 13 0xFFF40000 0xFFF7FFFF 256KB |
| 199 | * 14 0xFFF80000 0xFFFBFFFF 256KB |
| 200 | * 15 0xFFFC0000 0xFFFDFFFF 128KB |
| 201 | * 16 0xFFFE0000 0xFFFE7FFF 32KB U-Boot env vars here |
| 202 | * 17 0xFFFE8000 0xFFFEFFFF 32KB U-Boot backup copy of env vars here |
| 203 | * 18 0xFFFF0000 0xFFFFFFFF 64KB |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 204 | */ |
| 205 | |
| 206 | |
| 207 | /* |
| 208 | * SDRAM config - see memory map details above. |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 209 | * |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 210 | * CFG_SDRAM_BASE - Start address of SDRAM, this _must_ be zero! |
| 211 | * CFG_SDRAM_SIZE - Total size of contiguous SDRAM bank(s) |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 212 | */ |
| 213 | |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 214 | #define CFG_SDRAM_BASE 0x00000000 |
| 215 | #define CFG_SDRAM_SIZE 0x04000000 |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 216 | |
| 217 | |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 218 | /* |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 219 | * Flash config - see memory map details above. |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 220 | * |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 221 | * CFG_FLASH_BASE - Start address of flash memory |
| 222 | * CFG_FLASH_SIZE - Total size of contiguous flash mem |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 223 | * CFG_FLASH_ERASE_TOUT - Erase timeout in ms |
| 224 | * CFG_FLASH_WRITE_TOUT - Write timeout in ms |
| 225 | * CFG_MAX_FLASH_BANKS - Number of banks of flash on board |
| 226 | * CFG_MAX_FLASH_SECT - Number of sectors in a bank |
| 227 | */ |
| 228 | |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 229 | #define CFG_FLASH_BASE 0xFFC00000 |
| 230 | #define CFG_FLASH_SIZE 0x00400000 |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 231 | #define CFG_FLASH_ERASE_TOUT 250000 |
| 232 | #define CFG_FLASH_WRITE_TOUT 5000 |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 233 | #define CFG_MAX_FLASH_BANKS 1 |
| 234 | #define CFG_MAX_FLASH_SECT 19 |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 235 | |
| 236 | |
| 237 | /* |
| 238 | * Monitor config - see memory map details above |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 239 | * |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 240 | * CFG_MONITOR_BASE - Base address of monitor code |
| 241 | * CFG_MALLOC_LEN - Size of malloc pool (128KB) |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 242 | */ |
| 243 | |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 244 | #define CFG_MONITOR_BASE TEXT_BASE |
| 245 | #define CFG_MALLOC_LEN 0x20000 |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 246 | |
| 247 | |
| 248 | /* |
| 249 | * Command shell settings |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 250 | * |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 251 | * CFG_BARGSIZE - Boot Argument buffer size |
| 252 | * CFG_BOOTMAPSZ - Size of app's mapped RAM at boot (Linux=8MB) |
| 253 | * CFG_CBSIZE - Console Buffer (input) size |
| 254 | * CFG_LOAD_ADDR - Default load address |
| 255 | * CFG_LONGHELP - Provide more detailed help |
| 256 | * CFG_MAXARGS - Number of args accepted by monitor commands |
| 257 | * CFG_MEMTEST_START - Start address of test to run on RAM |
| 258 | * CFG_MEMTEST_END - End address of RAM test |
| 259 | * CFG_PBSIZE - Print Buffer (output) size |
| 260 | * CFG_PROMPT - Prompt string |
| 261 | */ |
| 262 | |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 263 | #define CFG_BARGSIZE 1024 |
| 264 | #define CFG_BOOTMAPSZ 0x800000 |
| 265 | #define CFG_CBSIZE 1024 |
| 266 | #define CFG_LOAD_ADDR 0x100000 |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 267 | #define CFG_LONGHELP |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 268 | #define CFG_MAXARGS 16 |
| 269 | #define CFG_MEMTEST_START 0x00040000 |
| 270 | #define CFG_MEMTEST_END 0x00040100 |
| 271 | #define CFG_PBSIZE 1024 |
| 272 | #define CFG_PROMPT "=> " |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 273 | |
| 274 | |
| 275 | /* |
| 276 | * Environment config - see memory map details above |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 277 | * |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 278 | * CFG_ENV_IS_IN_FLASH - The env variables are stored in flash |
| 279 | * CFG_ENV_ADDR - Address of the sector containing env vars |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 280 | * CFG_ENV_SIZE - Ammount of RAM for env vars (used to save RAM, 4KB) |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 281 | * CFG_ENV_SECT_SIZE - Size of sector containing env vars (32KB) |
| 282 | */ |
| 283 | |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 284 | #define CFG_ENV_IS_IN_FLASH 1 |
| 285 | #define CFG_ENV_ADDR 0xFFFE0000 |
| 286 | #define CFG_ENV_SIZE 0x1000 |
| 287 | #define CFG_ENV_ADDR_REDUND 0xFFFE8000 |
| 288 | #define CFG_ENV_SIZE_REDUND 0x1000 |
| 289 | #define CFG_ENV_SECT_SIZE 0x8000 |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 290 | |
| 291 | |
| 292 | /* |
| 293 | * Initial RAM config |
| 294 | * |
| 295 | * Since the main system RAM is initialised very early, we place the INIT_RAM |
| 296 | * in the main system RAM just above the exception vectors. The contents are |
| 297 | * copied to top of RAM by the init code. |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 298 | * |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 299 | * CFG_INIT_RAM_ADDR - Address of Init RAM, above exception vect |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 300 | * CFG_INIT_RAM_END - Size of Init RAM |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 301 | * CFG_GBL_DATA_SIZE - Ammount of RAM to reserve for global data |
| 302 | * CFG_GBL_DATA_OFFSET - Start of global data, top of stack |
| 303 | */ |
| 304 | |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 305 | #define CFG_INIT_RAM_ADDR (CFG_SDRAM_BASE + 0x4000) |
| 306 | #define CFG_INIT_RAM_END 0x4000 |
| 307 | #define CFG_GBL_DATA_SIZE 128 |
| 308 | #define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE) |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 309 | |
| 310 | |
| 311 | /* |
| 312 | * Initial BAT config |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 313 | * |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 314 | * BAT0 - System SDRAM |
| 315 | * BAT1 - LED's and Serial Port |
| 316 | * BAT2 - PCI Memory |
| 317 | * BAT3 - PCI I/O including Flash Memory |
| 318 | */ |
| 319 | |
| 320 | #define CFG_IBAT0L (CFG_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) |
| 321 | #define CFG_IBAT0U (CFG_SDRAM_BASE | BATU_BL_64M | BATU_VS | BATU_VP) |
| 322 | #define CFG_DBAT0L CFG_IBAT0L |
| 323 | #define CFG_DBAT0U CFG_IBAT0U |
| 324 | |
| 325 | #define CFG_IBAT1L (0x70000000 | BATL_PP_RW | BATL_CACHEINHIBIT) |
| 326 | #define CFG_IBAT1U (0x70000000 | BATU_BL_256M | BATU_VS | BATU_VP) |
| 327 | #define CFG_DBAT1L (0x70000000 | BATL_PP_RW | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
| 328 | #define CFG_DBAT1U (0x70000000 | BATU_BL_256M | BATU_VS | BATU_VP) |
| 329 | |
| 330 | #define CFG_IBAT2L (0x80000000 | BATL_PP_RW | BATL_CACHEINHIBIT) |
| 331 | #define CFG_IBAT2U (0x80000000 | BATU_BL_256M | BATU_VS | BATU_VP) |
| 332 | #define CFG_DBAT2L (0x80000000 | BATL_PP_RW | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
| 333 | #define CFG_DBAT2U (0x80000000 | BATU_BL_256M | BATU_VS | BATU_VP) |
| 334 | |
| 335 | #define CFG_IBAT3L (0xF0000000 | BATL_PP_RW | BATL_CACHEINHIBIT) |
| 336 | #define CFG_IBAT3U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP) |
| 337 | #define CFG_DBAT3L (0xF0000000 | BATL_PP_RW | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) |
| 338 | #define CFG_DBAT3U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP) |
| 339 | |
| 340 | |
| 341 | /* |
| 342 | * Cache config |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 343 | * |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 344 | * CFG_CACHELINE_SIZE - Size of a cache line (CPU specific) |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 345 | * CFG_L2 - L2 cache enabled if defined |
| 346 | * L2_INIT - L2 cache init flags |
| 347 | * L2_ENABLE - L2 cache enable flags |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 348 | */ |
| 349 | |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 350 | #define CFG_CACHELINE_SIZE 32 |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 351 | #undef CFG_L2 |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 352 | #define L2_INIT 0 |
| 353 | #define L2_ENABLE 0 |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 354 | |
| 355 | |
| 356 | /* |
| 357 | * Clocks config |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 358 | * |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 359 | * CFG_BUS_HZ - Bus clock frequency in Hz |
| 360 | * CFG_BUS_CLK - As above (?) |
| 361 | * CFG_HZ - Decrementer freq in Hz |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 362 | */ |
| 363 | |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 364 | #define CFG_BUS_HZ CONFIG_BUS_CLK |
| 365 | #define CFG_BUS_CLK CONFIG_BUS_CLK |
| 366 | #define CFG_HZ 1000 |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 367 | |
| 368 | |
| 369 | /* |
| 370 | * Serial port config |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 371 | * |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 372 | * CFG_BAUDRATE_TABLE - List of valid baud rates |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 373 | * CFG_NS16550 - Include the NS16550 driver |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 374 | * CFG_NS16550_SERIAL - Include the serial (wrapper) driver |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 375 | * CFG_NS16550_CLK - Frequency of reference clock |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 376 | * CFG_NS16550_REG_SIZE - 64-bit accesses to 8-bit port |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 377 | * CFG_NS16550_COM1 - Base address of 1st serial port |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 378 | */ |
| 379 | |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 380 | #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 381 | #define CFG_NS16550 |
| 382 | #define CFG_NS16550_SERIAL |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 383 | #define CFG_NS16550_CLK 3686400 |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 384 | #define CFG_NS16550_REG_SIZE -8 |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 385 | #define CFG_NS16550_COM1 0x7C000000 |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 386 | |
| 387 | |
| 388 | /* |
| 389 | * PCI Config - Address Map B (CHRP) |
| 390 | */ |
| 391 | |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 392 | #define CFG_PCI_MEMORY_BUS 0x00000000 |
| 393 | #define CFG_PCI_MEMORY_PHYS 0x00000000 |
| 394 | #define CFG_PCI_MEMORY_SIZE 0x40000000 |
| 395 | #define CFG_PCI_MEM_BUS 0x80000000 |
| 396 | #define CFG_PCI_MEM_PHYS 0x80000000 |
| 397 | #define CFG_PCI_MEM_SIZE 0x7D000000 |
| 398 | #define CFG_ISA_MEM_BUS 0x00000000 |
| 399 | #define CFG_ISA_MEM_PHYS 0xFD000000 |
| 400 | #define CFG_ISA_MEM_SIZE 0x01000000 |
| 401 | #define CFG_PCI_IO_BUS 0x00800000 |
| 402 | #define CFG_PCI_IO_PHYS 0xFE800000 |
| 403 | #define CFG_PCI_IO_SIZE 0x00400000 |
| 404 | #define CFG_ISA_IO_BUS 0x00000000 |
| 405 | #define CFG_ISA_IO_PHYS 0xFE000000 |
| 406 | #define CFG_ISA_IO_SIZE 0x00800000 |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 407 | #define CFG_ISA_IO_BASE_ADDRESS CFG_ISA_IO_PHYS |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 408 | #define CFG_ISA_IO CFG_ISA_IO_PHYS |
| 409 | #define CFG_60X_PCI_IO_OFFSET CFG_ISA_IO_PHYS |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 410 | |
| 411 | |
| 412 | /* |
| 413 | * Extra init functions |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 414 | * |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 415 | * CFG_BOARD_ASM_INIT - Call assembly init code |
| 416 | */ |
| 417 | |
| 418 | #define CFG_BOARD_ASM_INIT |
| 419 | |
| 420 | |
| 421 | /* |
| 422 | * Boot flags |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 423 | * |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 424 | * BOOTFLAG_COLD - Indicates a power-on boot |
| 425 | * BOOTFLAG_WARM - Indicates a software reset |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 426 | */ |
Wolfgang Denk | b87dfd2 | 2006-07-19 13:50:38 +0200 | [diff] [blame] | 427 | |
Wolfgang Denk | cdd917a | 2007-08-02 00:48:45 +0200 | [diff] [blame] | 428 | #define BOOTFLAG_COLD 0x01 |
| 429 | #define BOOTFLAG_WARM 0x02 |
Heiko Schocher | f5e0d03 | 2006-06-19 11:02:41 +0200 | [diff] [blame] | 430 | |
| 431 | |
| 432 | #endif /* __CONFIG_H */ |