wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2001, 2002 |
| 3 | * Sangmoon Kim, Etin Systems, dogoil@etinsys.com. |
| 4 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | /* ------------------------------------------------------------------------- */ |
| 9 | |
| 10 | /* |
| 11 | * board/config.h - configuration options, board specific |
| 12 | */ |
| 13 | |
| 14 | #ifndef __CONFIG_H |
| 15 | #define __CONFIG_H |
| 16 | |
Wolfgang Denk | 291ba1b | 2010-10-06 09:05:45 +0200 | [diff] [blame] | 17 | #define CONFIG_SYS_TEXT_BASE 0xFFF00000 |
| 18 | |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 19 | /* Environments */ |
| 20 | |
| 21 | /* bootargs */ |
| 22 | #define CONFIG_BOOTARGS \ |
| 23 | "console=ttyS0,9600 init=/linuxrc " \ |
| 24 | "root=/dev/nfs rw nfsroot=192.168.0.1:" \ |
| 25 | "/tftpboot/target " \ |
| 26 | "ip=192.168.0.2:192.168.0.1:192.168.0.1:" \ |
| 27 | "255.255.255.0:debris:eth0:none " \ |
| 28 | "mtdparts=phys:12m(root),-(kernel)" |
| 29 | |
| 30 | /* bootcmd */ |
| 31 | #define CONFIG_BOOTCOMMAND \ |
| 32 | "tftp 800000 pImage; " \ |
| 33 | "setenv bootargs console=ttyS0,9600 init=/linuxrc " \ |
Wolfgang Denk | 86eb3b7 | 2005-11-20 21:40:11 +0100 | [diff] [blame] | 34 | "root=/dev/nfs rw nfsroot=${serverip}:${rootpath} " \ |
| 35 | "ip=${ipaddr}:${serverip}:${gatewayip}:" \ |
| 36 | "${netmask}:${hostname}:eth0:none " \ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 37 | "mtdparts=phys:12m(root),-(kernel); " \ |
| 38 | "bootm 800000" |
| 39 | |
| 40 | /* bootdelay */ |
| 41 | #define CONFIG_BOOTDELAY 5 /* autoboot 5s */ |
| 42 | |
| 43 | /* baudrate */ |
| 44 | #define CONFIG_BAUDRATE 9600 /* console baudrate = 9600bps */ |
| 45 | |
| 46 | /* loads_echo */ |
| 47 | #define CONFIG_LOADS_ECHO 0 /* echo off for serial download */ |
| 48 | |
| 49 | /* ethaddr */ |
| 50 | #undef CONFIG_ETHADDR |
| 51 | |
| 52 | /* eth2addr */ |
| 53 | #undef CONFIG_ETH2ADDR |
| 54 | |
| 55 | /* eth3addr */ |
| 56 | #undef CONFIG_ETH3ADDR |
| 57 | |
| 58 | /* ipaddr */ |
| 59 | #define CONFIG_IPADDR 192.168.0.2 |
| 60 | |
| 61 | /* serverip */ |
| 62 | #define CONFIG_SERVERIP 192.168.0.1 |
| 63 | |
| 64 | /* autoload */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 65 | #undef CONFIG_SYS_AUTOLOAD |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 66 | |
| 67 | /* rootpath */ |
Joe Hershberger | 257ff78 | 2011-10-13 13:03:47 +0000 | [diff] [blame] | 68 | #define CONFIG_ROOTPATH "/tftpboot/target" |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 69 | |
| 70 | /* gatewayip */ |
| 71 | #define CONFIG_GATEWAYIP 192.168.0.1 |
| 72 | |
| 73 | /* netmask */ |
| 74 | #define CONFIG_NETMASK 255.255.255.0 |
| 75 | |
| 76 | /* hostname */ |
| 77 | #define CONFIG_HOSTNAME debris |
| 78 | |
| 79 | /* bootfile */ |
Joe Hershberger | e4da248 | 2011-10-13 13:03:48 +0000 | [diff] [blame] | 80 | #define CONFIG_BOOTFILE "pImage" |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 81 | |
| 82 | /* loadaddr */ |
| 83 | #define CONFIG_LOADADDR 800000 |
| 84 | |
| 85 | /* preboot */ |
| 86 | #undef CONFIG_PREBOOT |
| 87 | |
| 88 | /* clocks_in_mhz */ |
| 89 | #undef CONFIG_CLOCKS_IN_MHZ |
| 90 | |
| 91 | |
| 92 | /* |
| 93 | * High Level Configuration Options |
| 94 | * (easy to change) |
| 95 | */ |
| 96 | |
| 97 | #define CONFIG_MPC824X 1 |
| 98 | #define CONFIG_MPC8245 1 |
| 99 | #define CONFIG_DEBRIS 1 |
| 100 | |
| 101 | #if 0 |
| 102 | #define USE_DINK32 1 |
| 103 | #else |
| 104 | #undef USE_DINK32 |
| 105 | #endif |
| 106 | |
| 107 | #define CONFIG_CONS_INDEX 1 |
| 108 | #define CONFIG_BAUDRATE 9600 |
| 109 | #define CONFIG_DRAM_SPEED 100 /* MHz */ |
| 110 | |
Jon Loeliger | b15a23b | 2007-07-04 22:32:03 -0500 | [diff] [blame] | 111 | |
| 112 | /* |
Jon Loeliger | e54e77a | 2007-07-10 09:29:01 -0500 | [diff] [blame] | 113 | * BOOTP options |
| 114 | */ |
| 115 | #define CONFIG_BOOTP_BOOTFILESIZE |
| 116 | #define CONFIG_BOOTP_BOOTPATH |
| 117 | #define CONFIG_BOOTP_GATEWAY |
| 118 | #define CONFIG_BOOTP_HOSTNAME |
| 119 | |
| 120 | |
| 121 | /* |
Jon Loeliger | b15a23b | 2007-07-04 22:32:03 -0500 | [diff] [blame] | 122 | * Command line configuration. |
| 123 | */ |
| 124 | #include <config_cmd_default.h> |
| 125 | |
| 126 | #define CONFIG_CMD_ASKENV |
| 127 | #define CONFIG_CMD_CACHE |
| 128 | #define CONFIG_CMD_DATE |
| 129 | #define CONFIG_CMD_DHCP |
| 130 | #define CONFIG_CMD_DIAG |
| 131 | #define CONFIG_CMD_EEPROM |
| 132 | #define CONFIG_CMD_ELF |
| 133 | #define CONFIG_CMD_I2C |
| 134 | #define CONFIG_CMD_JFFS2 |
Marek Vasut | a2e48d2 | 2012-03-31 07:47:12 +0000 | [diff] [blame] | 135 | #define CONFIG_CMD_KGDB |
Jon Loeliger | b15a23b | 2007-07-04 22:32:03 -0500 | [diff] [blame] | 136 | #define CONFIG_CMD_PCI |
| 137 | #define CONFIG_CMD_PING |
| 138 | #define CONFIG_CMD_SAVES |
| 139 | #define CONFIG_CMD_SDRAM |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 140 | |
| 141 | |
| 142 | /* |
| 143 | * Miscellaneous configurable options |
| 144 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 145 | #define CONFIG_SYS_LONGHELP 1 /* undef to save memory */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 146 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
| 147 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
| 148 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
| 149 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
| 150 | #define CONFIG_SYS_LOAD_ADDR 0x00100000 /* default load address */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 151 | |
| 152 | /*----------------------------------------------------------------------- |
| 153 | * PCI stuff |
| 154 | *----------------------------------------------------------------------- |
| 155 | */ |
| 156 | #define CONFIG_PCI /* include pci support */ |
Gabor Juhos | b445873 | 2013-05-30 07:06:12 +0000 | [diff] [blame] | 157 | #define CONFIG_PCI_INDIRECT_BRIDGE /* indirect PCI bridge support */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 158 | #define CONFIG_PCI_PNP |
| 159 | |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 160 | #define CONFIG_EEPRO100 |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 161 | #define CONFIG_SYS_RX_ETH_BUFFER 8 /* use 8 rx buffer on eepro100 */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 162 | #define CONFIG_EEPRO100_SROM_WRITE |
| 163 | |
| 164 | #define PCI_ENET0_IOADDR 0x80000000 |
| 165 | #define PCI_ENET0_MEMADDR 0x80000000 |
| 166 | #define PCI_ENET1_IOADDR 0x81000000 |
| 167 | #define PCI_ENET1_MEMADDR 0x81000000 |
| 168 | /*----------------------------------------------------------------------- |
| 169 | * Start addresses for the final memory configuration |
| 170 | * (Set up by the startup code) |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 171 | * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 172 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 173 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 |
| 174 | #define CONFIG_SYS_MAX_RAM_SIZE 0x20000000 |
wdenk | 78924a7 | 2004-04-18 21:45:42 +0000 | [diff] [blame] | 175 | #define CONFIG_VERY_BIG_RAM |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 176 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 177 | #define CONFIG_SYS_RESET_ADDRESS 0xFFF00100 |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 178 | |
| 179 | #if defined (USE_DINK32) |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 180 | #define CONFIG_SYS_MONITOR_LEN 0x00040000 |
| 181 | #define CONFIG_SYS_MONITOR_BASE 0x00090000 |
| 182 | #define CONFIG_SYS_RAMBOOT 1 |
| 183 | #define CONFIG_SYS_INIT_RAM_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) |
Wolfgang Denk | 1c2e98e | 2010-10-26 13:32:32 +0200 | [diff] [blame] | 184 | #define CONFIG_SYS_INIT_RAM_SIZE 0x10000 |
Wolfgang Denk | 0191e47 | 2010-10-26 14:34:52 +0200 | [diff] [blame] | 185 | #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] | 186 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 187 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 188 | #undef CONFIG_SYS_RAMBOOT |
| 189 | #define CONFIG_SYS_MONITOR_LEN 0x00040000 |
Wolfgang Denk | 0708bc6 | 2010-10-07 21:51:12 +0200 | [diff] [blame] | 190 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 191 | |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 192 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 193 | #define CONFIG_SYS_INIT_RAM_ADDR 0x40000000 |
Wolfgang Denk | 1c2e98e | 2010-10-26 13:32:32 +0200 | [diff] [blame] | 194 | #define CONFIG_SYS_INIT_RAM_SIZE 0x1000 |
Wolfgang Denk | 0191e47 | 2010-10-26 14:34:52 +0200 | [diff] [blame] | 195 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 196 | |
| 197 | #endif |
| 198 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 199 | #define CONFIG_SYS_FLASH_BASE 0x7C000000 |
| 200 | #define CONFIG_SYS_FLASH_SIZE (16*1024*1024) /* debris has tiny eeprom */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 201 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 202 | #define CONFIG_SYS_MALLOC_LEN (512 << 10) /* Reserve 512 kB for malloc() */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 203 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 204 | #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest works on */ |
| 205 | #define CONFIG_SYS_MEMTEST_END 0x04000000 /* 0 ... 32 MB in DRAM */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 206 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 207 | #define CONFIG_SYS_EUMB_ADDR 0xFC000000 |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 208 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 209 | #define CONFIG_SYS_FLASH_RANGE_BASE 0xFF000000 /* flash memory address range */ |
| 210 | #define CONFIG_SYS_FLASH_RANGE_SIZE 0x01000000 |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 211 | #define FLASH_BASE0_PRELIM 0x7C000000 /* debris flash */ |
| 212 | |
Wolfgang Denk | 47f5779 | 2005-08-08 01:03:24 +0200 | [diff] [blame] | 213 | /* |
| 214 | * JFFS2 partitions |
| 215 | * |
| 216 | */ |
| 217 | /* No command line, one static partition, whole device */ |
Stefan Roese | b1423dd | 2009-03-19 13:30:36 +0100 | [diff] [blame] | 218 | #undef CONFIG_CMD_MTDPARTS |
Wolfgang Denk | 47f5779 | 2005-08-08 01:03:24 +0200 | [diff] [blame] | 219 | #define CONFIG_JFFS2_DEV "nor0" |
| 220 | #define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF |
| 221 | #define CONFIG_JFFS2_PART_OFFSET 0x00000000 |
| 222 | |
| 223 | /* mtdparts command line support */ |
| 224 | |
| 225 | /* Use first bank for JFFS2, second bank contains U-Boot. |
| 226 | * |
| 227 | * Note: fake mtd_id's used, no linux mtd map file. |
| 228 | */ |
| 229 | /* |
Stefan Roese | b1423dd | 2009-03-19 13:30:36 +0100 | [diff] [blame] | 230 | #define CONFIG_CMD_MTDPARTS |
Wolfgang Denk | 47f5779 | 2005-08-08 01:03:24 +0200 | [diff] [blame] | 231 | #define MTDIDS_DEFAULT "nor0=debris-0" |
| 232 | #define MTDPARTS_DEFAULT "mtdparts=debris-0:-(jffs2)" |
| 233 | */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 234 | |
Jean-Christophe PLAGNIOL-VILLARD | fdb79c3 | 2008-09-10 22:47:59 +0200 | [diff] [blame] | 235 | #define CONFIG_ENV_IS_IN_NVRAM 1 |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 236 | #define CONFIG_ENV_OVERWRITE 1 |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 237 | #define CONFIG_SYS_NVRAM_ACCESS_ROUTINE 1 |
Jean-Christophe PLAGNIOL-VILLARD | 7e1cda6 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 238 | #define CONFIG_ENV_ADDR 0xFF000000 /* right at the start of NVRAM */ |
| 239 | #define CONFIG_ENV_SIZE 0x400 /* Size of the Environment - 8K */ |
| 240 | #define CONFIG_ENV_OFFSET 0 /* starting right at the beginning */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 241 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 242 | #define CONFIG_SYS_NVRAM_BASE_ADDR 0xff000000 |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 243 | |
| 244 | /* |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 245 | * CONFIG_SYS_NVRAM_BASE_ADDR + CONFIG_SYS_NVRAM_VXWORKS_OFFS = |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 246 | * NV_RAM_ADDRS + NV_BOOT_OFFSET + NV_ENET_OFFSET |
| 247 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 248 | #define CONFIG_SYS_NVRAM_VXWORKS_OFFS 0x6900 |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 249 | |
| 250 | /* |
| 251 | * select i2c support configuration |
| 252 | * |
| 253 | * Supported configurations are {none, software, hardware} drivers. |
| 254 | * If the software driver is chosen, there are some additional |
| 255 | * configuration items that the driver uses to drive the port pins. |
| 256 | */ |
| 257 | #define CONFIG_HARD_I2C 1 /* To enable I2C support */ |
Heiko Schocher | 479a4cf | 2013-01-29 08:53:15 +0100 | [diff] [blame] | 258 | #undef CONFIG_SYS_I2C_SOFT /* I2C bit-banged */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 259 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ |
| 260 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 261 | |
Heiko Schocher | 479a4cf | 2013-01-29 08:53:15 +0100 | [diff] [blame] | 262 | #ifdef CONFIG_SYS_I2C_SOFT |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 263 | #error "Soft I2C is not configured properly. Please review!" |
Heiko Schocher | 479a4cf | 2013-01-29 08:53:15 +0100 | [diff] [blame] | 264 | #define CONFIG_SYS_I2C |
| 265 | #define CONFIG_SYS_I2C_SOFT_SPEED 50000 |
| 266 | #define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 267 | #define I2C_PORT 3 /* Port A=0, B=1, C=2, D=3 */ |
| 268 | #define I2C_ACTIVE (iop->pdir |= 0x00010000) |
| 269 | #define I2C_TRISTATE (iop->pdir &= ~0x00010000) |
| 270 | #define I2C_READ ((iop->pdat & 0x00010000) != 0) |
| 271 | #define I2C_SDA(bit) if(bit) iop->pdat |= 0x00010000; \ |
| 272 | else iop->pdat &= ~0x00010000 |
| 273 | #define I2C_SCL(bit) if(bit) iop->pdat |= 0x00020000; \ |
| 274 | else iop->pdat &= ~0x00020000 |
| 275 | #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */ |
Heiko Schocher | 479a4cf | 2013-01-29 08:53:15 +0100 | [diff] [blame] | 276 | #endif /* CONFIG_SYS_I2C_SOFT */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 277 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 278 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 /* EEPROM IS24C02 */ |
| 279 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */ |
| 280 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 |
| 281 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 /* and takes up to 10 msec */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 282 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 283 | #define CONFIG_SYS_FLASH_BANKS { FLASH_BASE0_PRELIM } |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 284 | |
| 285 | /*----------------------------------------------------------------------- |
| 286 | * Definitions for initial stack pointer and data area (in DPRAM) |
| 287 | */ |
| 288 | |
| 289 | /* |
| 290 | * NS16550 Configuration |
| 291 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 292 | #define CONFIG_SYS_NS16550 |
| 293 | #define CONFIG_SYS_NS16550_SERIAL |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 294 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 295 | #define CONFIG_SYS_NS16550_REG_SIZE 1 |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 296 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 297 | #define CONFIG_SYS_NS16550_CLK 7372800 |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 298 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 299 | #define CONFIG_SYS_NS16550_COM1 0xFF080000 |
| 300 | #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_NS16550_COM1 + 8) |
| 301 | #define CONFIG_SYS_NS16550_COM3 (CONFIG_SYS_NS16550_COM1 + 16) |
| 302 | #define CONFIG_SYS_NS16550_COM4 (CONFIG_SYS_NS16550_COM1 + 24) |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 303 | |
| 304 | /* |
| 305 | * Low Level Configuration Settings |
| 306 | * (address mappings, register initial values, etc.) |
| 307 | * You should know what you are doing if you make changes here. |
| 308 | */ |
| 309 | |
| 310 | #define CONFIG_SYS_CLK_FREQ 33333333 /* external frequency to pll */ |
| 311 | #define CONFIG_PLL_PCI_TO_MEM_MULTIPLIER 3 |
| 312 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 313 | #define CONFIG_SYS_DLL_EXTEND 0x00 |
| 314 | #define CONFIG_SYS_PCI_HOLD_DEL 0x20 |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 315 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 316 | #define CONFIG_SYS_ROMNAL 15 /* rom/flash next access time */ |
| 317 | #define CONFIG_SYS_ROMFAL 31 /* rom/flash access time */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 318 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 319 | #define CONFIG_SYS_REFINT 430 /* # of clocks between CBR refresh cycles */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 320 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 321 | #define CONFIG_SYS_DBUS_SIZE2 1 /* set for 8-bit RCS1, clear for 32,64 */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 322 | |
| 323 | /* the following are for SDRAM only*/ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 324 | #define CONFIG_SYS_BSTOPRE 121 /* Burst To Precharge, sets open page interval */ |
| 325 | #define CONFIG_SYS_REFREC 8 /* Refresh to activate interval */ |
| 326 | #define CONFIG_SYS_RDLAT 4 /* data latency from read command */ |
| 327 | #define CONFIG_SYS_PRETOACT 3 /* Precharge to activate interval */ |
| 328 | #define CONFIG_SYS_ACTTOPRE 5 /* Activate to Precharge interval */ |
| 329 | #define CONFIG_SYS_ACTORW 3 /* Activate to R/W */ |
| 330 | #define CONFIG_SYS_SDMODE_CAS_LAT 3 /* SDMODE CAS latency */ |
| 331 | #define CONFIG_SYS_SDMODE_WRAP 0 /* SDMODE wrap type */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 332 | #if 0 |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 333 | #define CONFIG_SYS_SDMODE_BURSTLEN 2 /* OBSOLETE! SDMODE Burst length 2=4, 3=8 */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 334 | #endif |
| 335 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 336 | #define CONFIG_SYS_REGISTERD_TYPE_BUFFER 1 |
| 337 | #define CONFIG_SYS_EXTROM 1 |
| 338 | #define CONFIG_SYS_REGDIMM 0 |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 339 | |
| 340 | |
| 341 | /* memory bank settings*/ |
| 342 | /* |
| 343 | * only bits 20-29 are actually used from these vales to set the |
| 344 | * start/end address the upper two bits will be 0, and the lower 20 |
| 345 | * bits will be set to 0x00000 for a start address, or 0xfffff for an |
| 346 | * end address |
| 347 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 348 | #define CONFIG_SYS_BANK0_START 0x00000000 |
| 349 | #define CONFIG_SYS_BANK0_END (0x4000000 - 1) |
| 350 | #define CONFIG_SYS_BANK0_ENABLE 1 |
| 351 | #define CONFIG_SYS_BANK1_START 0x04000000 |
| 352 | #define CONFIG_SYS_BANK1_END (0x8000000 - 1) |
| 353 | #define CONFIG_SYS_BANK1_ENABLE 1 |
| 354 | #define CONFIG_SYS_BANK2_START 0x3ff00000 |
| 355 | #define CONFIG_SYS_BANK2_END 0x3fffffff |
| 356 | #define CONFIG_SYS_BANK2_ENABLE 0 |
| 357 | #define CONFIG_SYS_BANK3_START 0x3ff00000 |
| 358 | #define CONFIG_SYS_BANK3_END 0x3fffffff |
| 359 | #define CONFIG_SYS_BANK3_ENABLE 0 |
| 360 | #define CONFIG_SYS_BANK4_START 0x00000000 |
| 361 | #define CONFIG_SYS_BANK4_END 0x00000000 |
| 362 | #define CONFIG_SYS_BANK4_ENABLE 0 |
| 363 | #define CONFIG_SYS_BANK5_START 0x00000000 |
| 364 | #define CONFIG_SYS_BANK5_END 0x00000000 |
| 365 | #define CONFIG_SYS_BANK5_ENABLE 0 |
| 366 | #define CONFIG_SYS_BANK6_START 0x00000000 |
| 367 | #define CONFIG_SYS_BANK6_END 0x00000000 |
| 368 | #define CONFIG_SYS_BANK6_ENABLE 0 |
| 369 | #define CONFIG_SYS_BANK7_START 0x00000000 |
| 370 | #define CONFIG_SYS_BANK7_END 0x00000000 |
| 371 | #define CONFIG_SYS_BANK7_ENABLE 0 |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 372 | /* |
| 373 | * Memory bank enable bitmask, specifying which of the banks defined above |
| 374 | are actually present. MSB is for bank #7, LSB is for bank #0. |
| 375 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 376 | #define CONFIG_SYS_BANK_ENABLE 0x01 |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 377 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 378 | #define CONFIG_SYS_ODCR 0x75 /* configures line driver impedances, */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 379 | /* see 8240 book for bit definitions */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 380 | #define CONFIG_SYS_PGMAX 0x32 /* how long the 8240 retains the */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 381 | /* currently accessed page in memory */ |
| 382 | /* see 8240 book for details */ |
| 383 | |
| 384 | /* SDRAM 0 - 256MB */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 385 | #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE) |
| 386 | #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP) |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 387 | |
| 388 | /* stack in DCACHE @ 1GB (no backing mem) */ |
| 389 | #if defined(USE_DINK32) |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 390 | #define CONFIG_SYS_IBAT1L (0x40000000 | BATL_PP_00 ) |
| 391 | #define CONFIG_SYS_IBAT1U (0x40000000 | BATU_BL_128K ) |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 392 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 393 | #define CONFIG_SYS_IBAT1L (CONFIG_SYS_INIT_RAM_ADDR | BATL_PP_10 | BATL_MEMCOHERENCE) |
| 394 | #define CONFIG_SYS_IBAT1U (CONFIG_SYS_INIT_RAM_ADDR | BATU_BL_128K | BATU_VS | BATU_VP) |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 395 | #endif |
| 396 | |
| 397 | /* PCI memory */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 398 | #define CONFIG_SYS_IBAT2L (0x80000000 | BATL_PP_10 | BATL_CACHEINHIBIT) |
| 399 | #define CONFIG_SYS_IBAT2U (0x80000000 | BATU_BL_256M | BATU_VS | BATU_VP) |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 400 | |
| 401 | /* Flash, config addrs, etc */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 402 | #define CONFIG_SYS_IBAT3L (0xF0000000 | BATL_PP_10 | BATL_CACHEINHIBIT) |
| 403 | #define CONFIG_SYS_IBAT3U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP) |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 404 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 405 | #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L |
| 406 | #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U |
| 407 | #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L |
| 408 | #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U |
| 409 | #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L |
| 410 | #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U |
| 411 | #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L |
| 412 | #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 413 | |
| 414 | /* |
| 415 | * For booting Linux, the board info and command line data |
| 416 | * have to be in the first 8 MB of memory, since this is |
| 417 | * the maximum mapped by the Linux kernel during initialization. |
| 418 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 419 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 420 | /*----------------------------------------------------------------------- |
| 421 | * FLASH organization |
| 422 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 423 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ |
| 424 | #define CONFIG_SYS_MAX_FLASH_SECT 256 /* max number of sectors on one chip */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 425 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 426 | #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ |
| 427 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 428 | |
| 429 | /*----------------------------------------------------------------------- |
| 430 | * Cache Configuration |
| 431 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 432 | #define CONFIG_SYS_CACHELINE_SIZE 32 /* For MPC8240 CPU */ |
Jon Loeliger | b15a23b | 2007-07-04 22:32:03 -0500 | [diff] [blame] | 433 | #if defined(CONFIG_CMD_KGDB) |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 434 | # define CONFIG_SYS_CACHELINE_SHIFT 5 /* log base 2 of the above value */ |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 435 | #endif |
| 436 | |
wdenk | 9f83793 | 2003-10-09 19:00:25 +0000 | [diff] [blame] | 437 | /* values according to the manual */ |
| 438 | |
| 439 | #define CONFIG_DRAM_50MHZ 1 |
| 440 | #define CONFIG_SDRAM_50MHZ |
| 441 | |
| 442 | #define CONFIG_DISK_SPINUP_TIME 1000000 |
| 443 | |
| 444 | #endif /* __CONFIG_H */ |