wdenk | e221174 | 2002-11-02 23:30:20 +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 | * Configuation settings for the R&S Protocol Board board. |
| 10 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 11 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 12 | */ |
| 13 | |
| 14 | #ifndef __CONFIG_H |
| 15 | #define __CONFIG_H |
| 16 | |
| 17 | /* |
| 18 | * High Level Configuration Options |
| 19 | * (easy to change) |
| 20 | */ |
| 21 | |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 22 | #define CONFIG_RSD_PROTO 1 /* on a R&S Protocol Board */ |
Jon Loeliger | f5ad378 | 2005-07-23 10:37:35 -0500 | [diff] [blame] | 23 | #define CONFIG_CPM2 1 /* Has a CPM2 */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 24 | |
Wolfgang Denk | 291ba1b | 2010-10-06 09:05:45 +0200 | [diff] [blame] | 25 | #define CONFIG_SYS_TEXT_BASE 0xff000000 |
Wolfgang Denk | 341e5e7 | 2010-11-28 21:18:58 +0100 | [diff] [blame] | 26 | #define CONFIG_SYS_LDSCRIPT "board/rsdproto/u-boot.lds" |
Wolfgang Denk | 291ba1b | 2010-10-06 09:05:45 +0200 | [diff] [blame] | 27 | |
wdenk | da55c6e | 2004-01-20 23:12:12 +0000 | [diff] [blame] | 28 | #define CONFIG_MISC_INIT_F 1 /* Use misc_init_f() */ |
| 29 | |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 30 | /* |
| 31 | * select serial console configuration |
| 32 | * |
| 33 | * if either CONFIG_CONS_ON_SMC or CONFIG_CONS_ON_SCC is selected, then |
| 34 | * CONFIG_CONS_INDEX must be set to the channel number (1-2 for SMC, 1-4 |
| 35 | * for SCC). |
| 36 | * |
| 37 | * if CONFIG_CONS_NONE is defined, then the serial console routines must |
| 38 | * defined elsewhere. |
| 39 | */ |
| 40 | #undef CONFIG_CONS_ON_SMC /* define if console on SMC */ |
| 41 | #define CONFIG_CONS_ON_SCC /* define if console on SCC */ |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 42 | #undef CONFIG_CONS_NONE /* define if console on neither */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 43 | #define CONFIG_CONS_INDEX 1 /* which SMC/SCC channel for console */ |
| 44 | |
| 45 | /* |
| 46 | * select ethernet configuration |
| 47 | * |
| 48 | * if either CONFIG_ETHER_ON_SCC or CONFIG_ETHER_ON_FCC is selected, then |
| 49 | * CONFIG_ETHER_INDEX must be set to the channel number (1-4 for SCC, 1-3 |
| 50 | * for FCC) |
| 51 | * |
| 52 | * 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] | 53 | * defined elsewhere (as for the console), or CONFIG_CMD_NET must be unset. |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 54 | */ |
| 55 | #undef CONFIG_ETHER_ON_SCC /* define if ethernet on SCC */ |
| 56 | #define CONFIG_ETHER_ON_FCC /* define if ethernet on FCC */ |
| 57 | #undef CONFIG_ETHER_NONE /* define if ethernet on neither */ |
| 58 | #define CONFIG_ETHER_INDEX 2 /* which SCC/FCC channel for ethernet */ |
| 59 | |
| 60 | #if (CONFIG_ETHER_INDEX == 2) |
| 61 | |
| 62 | /* |
| 63 | * - Rx-CLK is CLK13 |
| 64 | * - Tx-CLK is CLK14 |
| 65 | * - Select bus for bd/buffers (see 28-13) |
| 66 | * - Enable Full Duplex in FSMR |
| 67 | */ |
Mike Frysinger | 109de97 | 2011-10-17 05:38:58 +0000 | [diff] [blame] | 68 | # define CONFIG_SYS_CMXFCR_MASK2 (CMXFCR_FC2 | CMXFCR_RF2CS_MSK | CMXFCR_TF2CS_MSK) |
| 69 | # 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] | 70 | # define CONFIG_SYS_CPMFCR_RAMTYPE (0) |
| 71 | # define CONFIG_SYS_FCC_PSMR (FCC_PSMR_FDE | FCC_PSMR_LPB) |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 72 | |
| 73 | #endif /* CONFIG_ETHER_INDEX */ |
| 74 | |
| 75 | |
| 76 | /* allow to overwrite serial and ethaddr */ |
| 77 | #define CONFIG_ENV_OVERWRITE |
| 78 | |
| 79 | /* enable I2C */ |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 80 | #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 81 | #define CONFIG_SYS_I2C_SPEED 50000 /* I2C speed and slave address */ |
| 82 | #define CONFIG_SYS_I2C_SLAVE 0x30 |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 83 | |
| 84 | |
| 85 | /* system clock rate (CLKIN) - equal to the 60x and local bus speed */ |
| 86 | #define CONFIG_8260_CLKIN 50000000 /* in Hz */ |
| 87 | |
| 88 | #define CONFIG_BAUDRATE 115200 |
| 89 | |
Jon Loeliger | 1e8100f | 2007-07-04 22:33:23 -0500 | [diff] [blame] | 90 | |
| 91 | /* |
Jon Loeliger | 5c4ddae | 2007-07-10 10:12:10 -0500 | [diff] [blame] | 92 | * BOOTP options |
| 93 | */ |
| 94 | #define CONFIG_BOOTP_BOOTFILESIZE |
| 95 | #define CONFIG_BOOTP_BOOTPATH |
| 96 | #define CONFIG_BOOTP_GATEWAY |
| 97 | #define CONFIG_BOOTP_HOSTNAME |
| 98 | |
| 99 | |
| 100 | /* |
Jon Loeliger | 1e8100f | 2007-07-04 22:33:23 -0500 | [diff] [blame] | 101 | * Command line configuration. |
| 102 | */ |
| 103 | #include <config_cmd_default.h> |
| 104 | |
| 105 | #undef CONFIG_CMD_KGDB |
| 106 | |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 107 | |
| 108 | /* Define this if you want to boot from 0x00000100. If you don't define |
| 109 | * this, you will need to program the bootloader to 0xfff00000, and |
| 110 | * get the hardware reset config words at 0xfe000000. The simplest |
| 111 | * way to do that is to program the bootloader at both addresses. |
| 112 | * It is suggested that you just let U-Boot live at 0x00000000. |
| 113 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 114 | #define CONFIG_SYS_RSD_BOOT_LOW 1 |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 115 | |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 116 | #define CONFIG_BOOTDELAY 5 |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 117 | #define CONFIG_BOOTARGS "devfs=mount root=ramfs" |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 118 | #define CONFIG_ETHADDR 08:00:3e:26:0a:5a |
| 119 | #define CONFIG_NETMASK 255.255.0.0 |
| 120 | |
Jon Loeliger | 1e8100f | 2007-07-04 22:33:23 -0500 | [diff] [blame] | 121 | #if defined(CONFIG_CMD_KGDB) |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 122 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 123 | #endif |
| 124 | |
| 125 | /* |
| 126 | * Miscellaneous configurable options |
| 127 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 128 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
Jon Loeliger | 1e8100f | 2007-07-04 22:33:23 -0500 | [diff] [blame] | 129 | #if defined(CONFIG_CMD_KGDB) |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 130 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 131 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 132 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 133 | #endif |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 134 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
| 135 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
| 136 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 137 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 138 | #define CONFIG_SYS_MEMTEST_START 0x00400000 /* memtest works on */ |
| 139 | #define CONFIG_SYS_MEMTEST_END 0x01c00000 /* 4 ... 28 MB in DRAM */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 140 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 141 | #define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 142 | |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 143 | /* |
| 144 | * Low Level Configuration Settings |
| 145 | * (address mappings, register initial values, etc.) |
| 146 | * You should know what you are doing if you make changes here. |
| 147 | */ |
| 148 | |
| 149 | /*----------------------------------------------------------------------- |
| 150 | * Physical Memory Map |
| 151 | */ |
| 152 | #define PHYS_SDRAM_60X 0x00000000 /* SDRAM (60x Bus) */ |
| 153 | #define PHYS_SDRAM_60X_SIZE 0x08000000 /* 128 MB */ |
| 154 | |
| 155 | #define PHYS_SDRAM_LOCAL 0x40000000 /* SDRAM (Local Bus) */ |
| 156 | #define PHYS_SDRAM_LOCAL_SIZE 0x04000000 /* 64 MB */ |
| 157 | |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 158 | #define PHYS_DPRAM_PCI 0xE8000000 /* DPRAM PPC/PCI */ |
| 159 | #define PHYS_DPRAM_PCI_SIZE 0x00020000 /* 128 KB */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 160 | |
| 161 | /*#define PHYS_DPRAM_PCI_SEM 0x04020000 / * DPRAM PPC/PCI Semaphore */ |
| 162 | /*#define PHYS_DPRAM_PCI_SEM_SIZE 0x00000001 / * 1 Byte */ |
| 163 | |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 164 | #define PHYS_DPRAM_SHARC 0xE8100000 /* DPRAM PPC/Sharc */ |
| 165 | #define PHYS_DPRAM_SHARC_SIZE 0x00040000 /* 256 KB */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 166 | |
| 167 | /*#define PHYS_DPRAM_SHARC_SEM 0x04140000 / * DPRAM PPC/Sharc Semaphore */ |
| 168 | /*#define PHYS_DPRAM_SHARC_SEM_SIZE 0x00000001 / * 1 Byte */ |
| 169 | |
| 170 | #define PHYS_VIRTEX_REGISTER 0xE8300000 /* FPGA implemented register */ |
| 171 | #define PHYS_VIRTEX_REGISTER_SIZE 0x00000100 |
| 172 | |
| 173 | #define PHYS_USB 0x04200000 /* USB Controller (60x Bus) */ |
| 174 | #define PHYS_USB_SIZE 0x00000002 /* 2 Bytes */ |
| 175 | |
| 176 | #define PHYS_IMMR 0xF0000000 /* Internal Memory Mapped Reg. */ |
| 177 | |
| 178 | #define PHYS_FLASH 0xFF000000 /* Flash (60x Bus) */ |
| 179 | #define PHYS_FLASH_SIZE 0x01000000 /* 16 MB */ |
| 180 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 181 | #define CONFIG_SYS_IMMR PHYS_IMMR |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 182 | |
| 183 | /*----------------------------------------------------------------------- |
| 184 | * Reset Address |
| 185 | * |
| 186 | * In order to reset the CPU, U-Boot jumps to a special address which |
| 187 | * causes a machine check exception. The default address for this is |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 188 | * CONFIG_SYS_MONITOR_BASE - sizeof (ulong), which might not always work, eg. when |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 189 | * testing the monitor in RAM using a JTAG debugger. |
| 190 | * |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 191 | * Just set CONFIG_SYS_RESET_ADDRESS to an address that you know is sure to |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 192 | * cause a bus error on your hardware. |
| 193 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 194 | #define CONFIG_SYS_RESET_ADDRESS 0x20000000 |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 195 | |
| 196 | /*----------------------------------------------------------------------- |
| 197 | * Hard Reset Configuration Words |
| 198 | */ |
| 199 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 200 | #if defined(CONFIG_SYS_RSD_BOOT_LOW) |
| 201 | # define CONFIG_SYS_RSD_HRCW_BOOT_FLAGS (HRCW_CIP | HRCW_BMS) |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 202 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 203 | # define CONFIG_SYS_RSD_HRCW_BOOT_FLAGS (0) |
| 204 | #endif /* defined(CONFIG_SYS_RSD_BOOT_LOW) */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 205 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 206 | /* get the HRCW ISB field from CONFIG_SYS_IMMR */ |
| 207 | #define CONFIG_SYS_RSD_HRCW_IMMR ( ((CONFIG_SYS_IMMR & 0x10000000) >> 10) |\ |
| 208 | ((CONFIG_SYS_IMMR & 0x01000000) >> 7) |\ |
| 209 | ((CONFIG_SYS_IMMR & 0x00100000) >> 4) ) |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 210 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 211 | #define CONFIG_SYS_HRCW_MASTER (HRCW_L2CPC10 | \ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 212 | HRCW_DPPC11 | \ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 213 | CONFIG_SYS_RSD_HRCW_IMMR |\ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 214 | HRCW_MMR00 | \ |
| 215 | HRCW_APPC10 | \ |
| 216 | HRCW_CS10PC00 | \ |
| 217 | HRCW_MODCK_H0000 |\ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 218 | CONFIG_SYS_RSD_HRCW_BOOT_FLAGS) |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 219 | |
| 220 | /* no slaves */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 221 | #define CONFIG_SYS_HRCW_SLAVE1 0 |
| 222 | #define CONFIG_SYS_HRCW_SLAVE2 0 |
| 223 | #define CONFIG_SYS_HRCW_SLAVE3 0 |
| 224 | #define CONFIG_SYS_HRCW_SLAVE4 0 |
| 225 | #define CONFIG_SYS_HRCW_SLAVE5 0 |
| 226 | #define CONFIG_SYS_HRCW_SLAVE6 0 |
| 227 | #define CONFIG_SYS_HRCW_SLAVE7 0 |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 228 | |
| 229 | /*----------------------------------------------------------------------- |
| 230 | * Definitions for initial stack pointer and data area (in DPRAM) |
| 231 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 232 | #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR |
Wolfgang Denk | 1c2e98e | 2010-10-26 13:32:32 +0200 | [diff] [blame] | 233 | #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] | 234 | #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] | 235 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 236 | |
| 237 | /*----------------------------------------------------------------------- |
| 238 | * Start addresses for the final memory configuration |
| 239 | * (Set up by the startup code) |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 240 | * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 |
| 241 | * Note also that the logic that sets CONFIG_SYS_RAMBOOT is platform dependend. |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 242 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 243 | #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_60X |
| 244 | #define CONFIG_SYS_FLASH_BASE PHYS_FLASH |
| 245 | /*#define CONFIG_SYS_MONITOR_BASE 0x200000 */ |
| 246 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE |
| 247 | #if CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE |
| 248 | #define CONFIG_SYS_RAMBOOT |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 249 | #endif |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 250 | #define CONFIG_SYS_MONITOR_LEN (160 << 10) /* Reserve 160 kB for Monitor */ |
| 251 | #define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 252 | |
| 253 | /* |
| 254 | * For booting Linux, the board info and command line data |
| 255 | * have to be in the first 8 MB of memory, since this is |
| 256 | * the maximum mapped by the Linux kernel during initialization. |
| 257 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 258 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 259 | |
| 260 | /*----------------------------------------------------------------------- |
| 261 | * FLASH and environment organization |
| 262 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 263 | #define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max number of memory banks */ |
| 264 | #define CONFIG_SYS_MAX_FLASH_SECT 63 /* max number of sectors on one chip */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 265 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 266 | #define CONFIG_SYS_FLASH_ERASE_TOUT 12000 /* Timeout for Flash Erase (in ms) */ |
| 267 | #define CONFIG_SYS_FLASH_WRITE_TOUT 3000 /* Timeout for Flash Write (in ms) */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 268 | |
| 269 | /* turn off NVRAM env feature */ |
| 270 | #undef CONFIG_NVRAM_ENV |
| 271 | |
Jean-Christophe PLAGNIOL-VILLARD | 53db4cd | 2008-09-10 22:48:04 +0200 | [diff] [blame] | 272 | #define CONFIG_ENV_IS_IN_FLASH 1 |
Jean-Christophe PLAGNIOL-VILLARD | 7e1cda6 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 273 | #define CONFIG_ENV_ADDR (PHYS_FLASH + 0x28000) /* Addr of Environment Sector */ |
| 274 | #define CONFIG_ENV_SECT_SIZE 0x8000 /* Total Size of Environment Sector */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 275 | |
| 276 | /*----------------------------------------------------------------------- |
| 277 | * Cache Configuration |
| 278 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 279 | #define CONFIG_SYS_CACHELINE_SIZE 32 /* For MPC8260 CPU */ |
Jon Loeliger | 1e8100f | 2007-07-04 22:33:23 -0500 | [diff] [blame] | 280 | #if defined(CONFIG_CMD_KGDB) |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 281 | #define CONFIG_SYS_CACHELINE_SHIFT 5 /* log base 2 of the above value */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 282 | #endif |
| 283 | |
| 284 | /*----------------------------------------------------------------------- |
| 285 | * HIDx - Hardware Implementation-dependent Registers 2-11 |
| 286 | *----------------------------------------------------------------------- |
| 287 | * HID0 also contains cache control - initially enable both caches and |
| 288 | * invalidate contents, then the final state leaves only the instruction |
| 289 | * cache enabled. Note that Power-On and Hard reset invalidate the caches, |
| 290 | * but Soft reset does not. |
| 291 | * |
| 292 | * HID1 has only read-only information - nothing to set. |
| 293 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 294 | #define CONFIG_SYS_HID0_INIT (HID0_ICE|HID0_DCE|HID0_ICFI|HID0_DCI|HID0_IFEM|HID0_ABE) |
| 295 | #define CONFIG_SYS_HID0_FINAL (HID0_ICE|HID0_IFEM|HID0_ABE|HID0_EMCP) |
| 296 | #define CONFIG_SYS_HID2 0 |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 297 | |
| 298 | /*----------------------------------------------------------------------- |
| 299 | * RMR - Reset Mode Register |
| 300 | *----------------------------------------------------------------------- |
| 301 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 302 | #define CONFIG_SYS_RMR 0 |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 303 | |
| 304 | /*----------------------------------------------------------------------- |
| 305 | * BCR - Bus Configuration 4-25 |
| 306 | *----------------------------------------------------------------------- |
| 307 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 308 | #define CONFIG_SYS_BCR 0x100c0000 |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 309 | |
| 310 | /*----------------------------------------------------------------------- |
| 311 | * SIUMCR - SIU Module Configuration 4-31 |
| 312 | *----------------------------------------------------------------------- |
| 313 | */ |
| 314 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 315 | #define CONFIG_SYS_SIUMCR (SIUMCR_DPPC11 | SIUMCR_L2CPC10 | SIUMCR_APPC10 | \ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 316 | SIUMCR_CS10PC01 | SIUMCR_BCTLC01) |
| 317 | |
| 318 | /*----------------------------------------------------------------------- |
| 319 | * SYPCR - System Protection Control 11-9 |
| 320 | * SYPCR can only be written once after reset! |
| 321 | *----------------------------------------------------------------------- |
| 322 | * Watchdog & Bus Monitor Timer max, 60x Bus Monitor enable |
| 323 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 324 | #define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_PBME | SYPCR_LBME | \ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 325 | SYPCR_SWRI | SYPCR_SWP) |
| 326 | |
| 327 | /*----------------------------------------------------------------------- |
| 328 | * TMCNTSC - Time Counter Status and Control 4-40 |
| 329 | *----------------------------------------------------------------------- |
| 330 | * Clear once per Second and Alarm Interrupt Status, Set 32KHz timersclk, |
| 331 | * and enable Time Counter |
| 332 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 333 | #define CONFIG_SYS_TMCNTSC (TMCNTSC_SEC | TMCNTSC_ALR | TMCNTSC_TCF | TMCNTSC_TCE) |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 334 | |
| 335 | /*----------------------------------------------------------------------- |
| 336 | * PISCR - Periodic Interrupt Status and Control 4-42 |
| 337 | *----------------------------------------------------------------------- |
| 338 | * Clear Periodic Interrupt Status, Set 32KHz timersclk, and enable |
| 339 | * Periodic timer |
| 340 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 341 | #define CONFIG_SYS_PISCR (PISCR_PS|PISCR_PTF|PISCR_PTE) |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 342 | |
| 343 | /*----------------------------------------------------------------------- |
| 344 | * SCCR - System Clock Control 9-8 |
| 345 | *----------------------------------------------------------------------- |
| 346 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 347 | #define CONFIG_SYS_SCCR 0x00000000 |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 348 | |
| 349 | /*----------------------------------------------------------------------- |
| 350 | * RCCR - RISC Controller Configuration 13-7 |
| 351 | *----------------------------------------------------------------------- |
| 352 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 353 | #define CONFIG_SYS_RCCR 0 |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 354 | |
| 355 | /* |
| 356 | * Init Memory Controller: |
| 357 | */ |
| 358 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 359 | #define CONFIG_SYS_PSDMR 0x494D2452 |
| 360 | #define CONFIG_SYS_LSDMR 0x49492552 |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 361 | |
| 362 | /* Flash */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 363 | #define CONFIG_SYS_BR0_PRELIM (PHYS_FLASH | BRx_V) |
| 364 | #define CONFIG_SYS_OR0_PRELIM (P2SZ_TO_AM(PHYS_FLASH_SIZE) | \ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 365 | ORxG_BCTLD | \ |
| 366 | ORxG_SCY_5_CLK) |
| 367 | |
| 368 | /* DPRAM to the PCI BUS on the protocol board */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 369 | #define CONFIG_SYS_BR1_PRELIM (PHYS_DPRAM_PCI | BRx_V) |
| 370 | #define CONFIG_SYS_OR1_PRELIM (P2SZ_TO_AM(PHYS_DPRAM_PCI_SIZE) | \ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 371 | ORxG_ACS_DIV4) |
| 372 | |
| 373 | /* 60x Bus SDRAM */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 374 | #define CONFIG_SYS_BR2_PRELIM (PHYS_SDRAM_60X | BRx_MS_SDRAM_P | BRx_V) |
| 375 | #define CONFIG_SYS_OR2_PRELIM (ORxS_SIZE_TO_AM(PHYS_SDRAM_60X_SIZE) | \ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 376 | ORxS_BPD_4 | \ |
| 377 | ORxS_ROWST_PBI1_A2 | \ |
| 378 | ORxS_NUMR_13 | \ |
| 379 | ORxS_IBID) |
| 380 | |
| 381 | /* Virtex-FPGA - Register */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 382 | #define CONFIG_SYS_BR3_PRELIM (PHYS_VIRTEX_REGISTER | BRx_V) |
| 383 | #define CONFIG_SYS_OR3_PRELIM (ORxS_SIZE_TO_AM(PHYS_VIRTEX_REGISTER_SIZE) | \ |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 384 | ORxG_SCY_1_CLK | \ |
| 385 | ORxG_ACS_DIV2 | \ |
| 386 | ORxG_CSNT ) |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 387 | |
| 388 | /* local bus SDRAM */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 389 | #define CONFIG_SYS_BR4_PRELIM (PHYS_SDRAM_LOCAL | BRx_PS_32 | BRx_MS_SDRAM_L | BRx_V) |
| 390 | #define CONFIG_SYS_OR4_PRELIM (ORxS_SIZE_TO_AM(PHYS_SDRAM_LOCAL_SIZE) | \ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 391 | ORxS_BPD_4 | \ |
| 392 | ORxS_ROWST_PBI1_A4 | \ |
| 393 | ORxS_NUMR_13) |
| 394 | |
| 395 | /* DPRAM to the Sharc-Bus on the protocol board */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 396 | #define CONFIG_SYS_BR5_PRELIM (PHYS_DPRAM_SHARC | BRx_V) |
| 397 | #define CONFIG_SYS_OR5_PRELIM (P2SZ_TO_AM(PHYS_DPRAM_SHARC_SIZE) | \ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 398 | ORxG_ACS_DIV4) |
| 399 | |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 400 | #endif /* __CONFIG_H */ |