wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2001 |
| 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | * |
| 5 | * See file CREDITS for list of people who contributed to this |
| 6 | * project. |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License as |
| 10 | * published by the Free Software Foundation; either version 2 of |
| 11 | * the License, or (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 21 | * MA 02111-1307 USA |
| 22 | */ |
| 23 | |
| 24 | /* |
| 25 | * board/config.h - configuration options, board specific |
| 26 | */ |
| 27 | |
| 28 | #ifndef __CONFIG_H |
| 29 | #define __CONFIG_H |
| 30 | |
| 31 | /* |
| 32 | * High Level Configuration Options |
| 33 | * (easy to change) |
| 34 | */ |
| 35 | |
| 36 | #define CONFIG_405GP 1 /* This is a PPC405 CPU */ |
| 37 | #define CONFIG_4xx 1 /* ...member of PPC4xx family */ |
| 38 | #define CONFIG_ERIC 1 /* ...on a ERIC board */ |
| 39 | |
wdenk | c837dcb | 2004-01-20 23:12:12 +0000 | [diff] [blame] | 40 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* run board_early_init_f() */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 41 | |
| 42 | #define CONFIG_SYS_CLK_FREQ 33333333 /* external frequency to pll */ |
| 43 | |
| 44 | #if 1 |
Jean-Christophe PLAGNIOL-VILLARD | 5a1aceb | 2008-09-10 22:48:04 +0200 | [diff] [blame] | 45 | #define CONFIG_ENV_IS_IN_FLASH 1 /* use FLASH for environment vars */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 46 | #endif |
| 47 | #if 0 |
Jean-Christophe PLAGNIOL-VILLARD | 9314cee | 2008-09-10 22:47:59 +0200 | [diff] [blame] | 48 | #define CONFIG_ENV_IS_IN_NVRAM 1 /* use NVRAM for environment vars */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 49 | #endif |
| 50 | #if 0 |
Jean-Christophe PLAGNIOL-VILLARD | bb1f8b4 | 2008-09-05 09:19:30 +0200 | [diff] [blame] | 51 | #define CONFIG_ENV_IS_IN_EEPROM 1 /* use I2C RTC X1240 for environment vars */ |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 52 | #define CONFIG_ENV_OFFSET 0x000 /* environment starts at the beginning of the EEPROM */ |
| 53 | #define CONFIG_ENV_SIZE 0x800 /* 2048 bytes may be used for env vars */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 54 | #endif /* total size of a X1240 is 2048 bytes */ |
| 55 | |
| 56 | #define CONFIG_HARD_I2C 1 /* I2C with hardware support */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 57 | #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */ |
| 58 | #define CONFIG_SYS_I2C_SLAVE 0x7F |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 59 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 60 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 /* X1240 has two I2C slave addresses, one for EEPROM */ |
| 61 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* address length for the eeprom */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 62 | #define CONFIG_I2C_RTC 1 /* we have a Xicor X1240 RTC */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 63 | #define CONFIG_SYS_I2C_RTC_ADDR 0x6F /* and one for RTC */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 64 | |
Jean-Christophe PLAGNIOL-VILLARD | 5a1aceb | 2008-09-10 22:48:04 +0200 | [diff] [blame] | 65 | #ifdef CONFIG_ENV_IS_IN_FLASH |
Jean-Christophe PLAGNIOL-VILLARD | 9314cee | 2008-09-10 22:47:59 +0200 | [diff] [blame] | 66 | #undef CONFIG_ENV_IS_IN_NVRAM |
Jean-Christophe PLAGNIOL-VILLARD | bb1f8b4 | 2008-09-05 09:19:30 +0200 | [diff] [blame] | 67 | #undef CONFIG_ENV_IS_IN_EEPROM |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 68 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 9314cee | 2008-09-10 22:47:59 +0200 | [diff] [blame] | 69 | #ifdef CONFIG_ENV_IS_IN_NVRAM |
Jean-Christophe PLAGNIOL-VILLARD | 5a1aceb | 2008-09-10 22:48:04 +0200 | [diff] [blame] | 70 | #undef CONFIG_ENV_IS_IN_FLASH |
Jean-Christophe PLAGNIOL-VILLARD | bb1f8b4 | 2008-09-05 09:19:30 +0200 | [diff] [blame] | 71 | #undef CONFIG_ENV_IS_IN_EEPROM |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 72 | #else |
Jean-Christophe PLAGNIOL-VILLARD | bb1f8b4 | 2008-09-05 09:19:30 +0200 | [diff] [blame] | 73 | #ifdef CONFIG_ENV_IS_IN_EEPROM |
Jean-Christophe PLAGNIOL-VILLARD | 9314cee | 2008-09-10 22:47:59 +0200 | [diff] [blame] | 74 | #undef CONFIG_ENV_IS_IN_NVRAM |
Jean-Christophe PLAGNIOL-VILLARD | 5a1aceb | 2008-09-10 22:48:04 +0200 | [diff] [blame] | 75 | #undef CONFIG_ENV_IS_IN_FLASH |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 76 | #endif |
| 77 | #endif |
| 78 | #endif |
| 79 | |
| 80 | #define CONFIG_BAUDRATE 115200 |
| 81 | #define CONFIG_BOOTDELAY 3 /* autoboot after 3 seconds */ |
| 82 | |
| 83 | #if 1 |
| 84 | #define CONFIG_BOOTCOMMAND "bootm ffc00000" /* autoboot command */ |
| 85 | #else |
| 86 | #define CONFIG_BOOTCOMMAND "bootp" /* autoboot command */ |
| 87 | #endif |
| 88 | |
| 89 | #define CONFIG_BOOTARGS "console=ttyS0,115200 root=/dev/nfs " \ |
| 90 | "nfsroot=192.168.1.2:/eric_root_devel " \ |
| 91 | "ip=192.168.1.22:192.168.1.2" |
| 92 | |
| 93 | #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 94 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 95 | |
Ben Warren | 96e21f8 | 2008-10-27 23:50:15 -0700 | [diff] [blame] | 96 | #define CONFIG_PPC4xx_EMAC |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 97 | #define CONFIG_MII 1 /* MII PHY management */ |
| 98 | #define CONFIG_PHY_ADDR 1 /* PHY address */ |
Ben Warren | 18cc7af | 2009-04-28 16:50:53 -0700 | [diff] [blame] | 99 | #define CONFIG_NET_MULTI |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 100 | |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 101 | |
| 102 | /* |
Jon Loeliger | 1179943 | 2007-07-10 09:02:57 -0500 | [diff] [blame] | 103 | * BOOTP options |
| 104 | */ |
| 105 | #define CONFIG_BOOTP_BOOTFILESIZE |
| 106 | #define CONFIG_BOOTP_BOOTPATH |
| 107 | #define CONFIG_BOOTP_GATEWAY |
| 108 | #define CONFIG_BOOTP_HOSTNAME |
| 109 | |
| 110 | |
| 111 | /* |
Jon Loeliger | dcaa715 | 2007-07-07 20:56:05 -0500 | [diff] [blame] | 112 | * Command line configuration. |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 113 | */ |
Jon Loeliger | dcaa715 | 2007-07-07 20:56:05 -0500 | [diff] [blame] | 114 | #include <config_cmd_default.h> |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 115 | |
Jon Loeliger | dcaa715 | 2007-07-07 20:56:05 -0500 | [diff] [blame] | 116 | #define CONFIG_CMD_PCI |
| 117 | #define CONFIG_CMD_IRQ |
Mike Frysinger | bdab39d | 2009-01-28 19:08:14 -0500 | [diff] [blame] | 118 | #define CONFIG_CMD_SAVEENV |
Jon Loeliger | dcaa715 | 2007-07-07 20:56:05 -0500 | [diff] [blame] | 119 | #define CONFIG_CMD_FLASH |
| 120 | |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 121 | |
| 122 | #undef CONFIG_WATCHDOG /* watchdog disabled */ |
| 123 | |
| 124 | /* |
| 125 | * Miscellaneous configurable options |
| 126 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 127 | #undef CONFIG_SYS_LONGHELP /* undef to save memory */ |
| 128 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
Jon Loeliger | dcaa715 | 2007-07-07 20:56:05 -0500 | [diff] [blame] | 129 | #if defined(CONFIG_CMD_KGDB) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 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 | 6d0f6bc | 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 | 6d0f6bc | 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 | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 138 | #define CONFIG_SYS_MEMTEST_START 0x0400000 /* memtest works on */ |
| 139 | #define CONFIG_SYS_MEMTEST_END 0x0C00000 /* 4 ... 12 MB in DRAM */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 140 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 141 | #define CONFIG_SYS_EXT_SERIAL_CLOCK 14318180 |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 142 | |
| 143 | /* The following table includes the supported baudrates */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 144 | #define CONFIG_SYS_BAUDRATE_TABLE \ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 145 | { 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, \ |
| 146 | 57600, 115200, 230400, 460800, 921600 } |
| 147 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 148 | #define CONFIG_SYS_LOAD_ADDR 0x100000 /* default load address */ |
| 149 | #define CONFIG_SYS_EXTBDINFO 1 /* To use extended board_into (bd_t) */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 150 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 151 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 152 | |
| 153 | /*----------------------------------------------------------------------- |
| 154 | * PCI stuff |
| 155 | *----------------------------------------------------------------------- |
| 156 | */ |
| 157 | #define PCI_HOST_ADAPTER 0 /* configure ar pci adapter */ |
| 158 | #define PCI_HOST_FORCE 1 /* configure as pci host */ |
| 159 | #define PCI_HOST_AUTO 2 /* detected via arbiter enable */ |
| 160 | |
| 161 | #define CONFIG_PCI /* include pci support */ |
| 162 | #define CONFIG_PCI_HOST PCI_HOST_FORCE /* select pci host function */ |
| 163 | #undef CONFIG_PCI_PNP /* no pci plug-and-play */ |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 164 | /* resource configuration */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 165 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 166 | #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1743 /* PCI Vendor ID: Peppercon AG */ |
| 167 | #define CONFIG_SYS_PCI_SUBSYS_DEVICEID 0x0405 /* PCI Device ID: 405GP */ |
| 168 | #define CONFIG_SYS_PCI_PTM1LA 0xFFFC0000 /* point to flash */ |
| 169 | #define CONFIG_SYS_PCI_PTM1MS 0xFFFFF001 /* 4kB, enable hard-wired to 1 */ |
| 170 | #define CONFIG_SYS_PCI_PTM1PCI 0x00000000 /* Host: use this pci address */ |
| 171 | #define CONFIG_SYS_PCI_PTM2LA 0x00000000 /* disabled */ |
| 172 | #define CONFIG_SYS_PCI_PTM2MS 0x00000000 /* disabled */ |
| 173 | #define CONFIG_SYS_PCI_PTM2PCI 0x04000000 /* Host: use this pci address */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 174 | |
| 175 | /*----------------------------------------------------------------------- |
| 176 | * External peripheral base address |
| 177 | *----------------------------------------------------------------------- |
| 178 | */ |
| 179 | /* Bank 0 - Flash/SRAM 0xFF000000 16MB 16 Bit */ |
| 180 | /* Bank 1 - NVRAM/RTC 0xF0000000 1MB 8 Bit */ |
| 181 | /* Bank 2 - A/D converter 0xF0100000 1MB 8 Bit */ |
| 182 | /* Bank 3 - Ethernet PHY Reset 0xF0200000 1MB 8 Bit */ |
| 183 | /* Bank 4 - PC-MIP PRSNT1# 0xF0300000 1MB 8 Bit */ |
| 184 | /* Bank 5 - PC-MIP PRSNT2# 0xF0400000 1MB 8 Bit */ |
| 185 | /* Bank 6 - CPU LED0 0xF0500000 1MB 8 Bit */ |
| 186 | /* Bank 7 - CPU LED1 0xF0600000 1MB 8 Bit */ |
| 187 | |
| 188 | /* ----------------------------------------------------------------------- */ |
| 189 | /* Memory Bank 0 (Flash) initialization */ |
| 190 | /* ----------------------------------------------------------------------- */ |
| 191 | #define CS0_AP 0x9B015480 |
| 192 | #define CS0_CR 0xFF87A000 /* BAS=0xFF8,BS=(8MB),BU=0x3(R/W), BW=(16 bits) */ |
| 193 | /* ----------------------------------------------------------------------- */ |
| 194 | /* Memory Bank 1 (NVRAM/RTC) initialization */ |
| 195 | /* ----------------------------------------------------------------------- */ |
| 196 | #define CS1_AP 0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */ |
| 197 | #define CS1_CR 0xF0018000 /* BAS=0xF00,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */ |
| 198 | /* ----------------------------------------------------------------------- */ |
| 199 | /* Memory Bank 2 (A/D converter) initialization */ |
| 200 | /* ----------------------------------------------------------------------- */ |
| 201 | #define CS2_AP 0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */ |
| 202 | #define CS2_CR 0xF0118000 /* BAS=0xF01,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */ |
| 203 | /* ----------------------------------------------------------------------- */ |
| 204 | /* Memory Bank 3 (Ethernet PHY Reset) initialization */ |
| 205 | /* ----------------------------------------------------------------------- */ |
| 206 | #define CS3_AP 0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */ |
| 207 | #define CS3_CR 0xF0218000 /* BAS=0xF01,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */ |
| 208 | /* ----------------------------------------------------------------------- */ |
| 209 | /* Memory Bank 4 (PC-MIP PRSNT1#) initialization */ |
| 210 | /* ----------------------------------------------------------------------- */ |
| 211 | #define CS4_AP 0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */ |
| 212 | #define CS4_CR 0xF0318000 /* BAS=0xF01,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */ |
| 213 | /* ----------------------------------------------------------------------- */ |
| 214 | /* Memory Bank 5 (PC-MIP PRSNT2#) initialization */ |
| 215 | /* ----------------------------------------------------------------------- */ |
| 216 | #define CS5_AP 0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */ |
| 217 | #define CS5_CR 0xF0418000 /* BAS=0xF01,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */ |
| 218 | /* ----------------------------------------------------------------------- */ |
| 219 | /* Memory Bank 6 (CPU LED0) initialization */ |
| 220 | /* ----------------------------------------------------------------------- */ |
| 221 | #define CS6_AP 0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */ |
| 222 | #define CS6_CR 0xF0518000 /* BAS=0xF01,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */ |
| 223 | /* ----------------------------------------------------------------------- */ |
| 224 | /* Memory Bank 7 (CPU LED1) initialization */ |
| 225 | /* ----------------------------------------------------------------------- */ |
| 226 | #define CS7_AP 0x02815480 /* WT=1, OEN=0x1,WBN=0x1,WBF=0x1,TH=0x2,RE=0, */ |
| 227 | #define CS7_CR 0xF0618000 /* BAS=0xF01,BS=(1MB),BU=0x3(R/W), BW=(8 bits) */ |
| 228 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 229 | #define CONFIG_SYS_NVRAM_REG_BASE_ADDR 0xF0000000 |
| 230 | #define CONFIG_SYS_RTC_REG_BASE_ADDR (0xF0000000 + 0x7F8) |
| 231 | #define CONFIG_SYS_ADC_REG_BASE_ADDR 0xF0100000 |
| 232 | #define CONFIG_SYS_PHYRES_REG_BASE_ADDR 0xF0200000 |
| 233 | #define CONFIG_SYS_PRSNT1_REG_BASE_ADDR 0xF0300000 |
| 234 | #define CONFIG_SYS_PRSNT2_REG_BASE_ADDR 0xF0400000 |
| 235 | #define CONFIG_SYS_LED0_REG_BASE_ADDR 0xF0500000 |
| 236 | #define CONFIG_SYS_LED1_REG_BASE_ADDR 0xF0600000 |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 237 | |
| 238 | |
| 239 | /* SDRAM CONFIG */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 240 | #define CONFIG_SYS_SDRAM_MANUALLY 1 |
| 241 | #define CONFIG_SYS_SDRAM_SINGLE_BANK 1 |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 242 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 243 | #ifdef CONFIG_SYS_SDRAM_MANUALLY |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 244 | /*----------------------------------------------------------------------- |
| 245 | * Set MB0CF for bank 0. (0-32MB) Address Mode 4 since 12x8(2) |
| 246 | *----------------------------------------------------------------------*/ |
| 247 | #define MB0CF 0x00062001 /* 32MB @ 0 */ |
| 248 | /*----------------------------------------------------------------------- |
| 249 | * Set MB1CF for bank 1. (32MB-64MB) Address Mode 4 since 12x8(2) |
| 250 | *----------------------------------------------------------------------*/ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 251 | #ifdef CONFIG_SYS_SDRAM_SINGLE_BANK |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 252 | #define MB1CF 0x0 /* 0MB @ 32MB */ |
| 253 | #else |
| 254 | #define MB1CF 0x02062001 /* 32MB @ 32MB */ |
| 255 | #endif |
| 256 | /*----------------------------------------------------------------------- |
| 257 | * Set MB2CF for bank 2. off |
| 258 | *----------------------------------------------------------------------*/ |
| 259 | #define MB2CF 0x0 /* 0MB */ |
| 260 | /*----------------------------------------------------------------------- |
| 261 | * Set MB3CF for bank 3. off |
| 262 | *----------------------------------------------------------------------*/ |
| 263 | #define MB3CF 0x0 /* 0MB */ |
| 264 | |
| 265 | #define SDTR_100 0x0086400D |
| 266 | #define RTR_100 0x05F0 |
| 267 | #define SDTR_66 0x00854006 /* orig U-Boot-wallnut says 0x00854006 */ |
| 268 | #define RTR_66 0x03f8 |
| 269 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 270 | #endif /* CONFIG_SYS_SDRAM_MANUALLY */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 271 | |
| 272 | |
| 273 | /*----------------------------------------------------------------------- |
| 274 | * Start addresses for the final memory configuration |
| 275 | * (Set up by the startup code) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 276 | * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 277 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 278 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 |
| 279 | #define CONFIG_SYS_SDRAM_SIZE 32 |
| 280 | #define CONFIG_SYS_FLASH_BASE 0xFF800000 /* 8 MByte Flash */ |
| 281 | #define CONFIG_SYS_MONITOR_BASE 0xFFFE0000 /* last 128kByte within Flash */ |
| 282 | /*#define CONFIG_SYS_MONITOR_LEN (192 * 1024)*/ /* Reserve 196 kB for Monitor */ |
| 283 | #define CONFIG_SYS_MONITOR_LEN (128 * 1024) /* Reserve 128 kB for Monitor */ |
| 284 | #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserve 128 kB for malloc() */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 285 | |
| 286 | /* |
| 287 | * For booting Linux, the board info and command line data |
| 288 | * have to be in the first 8 MB of memory, since this is |
| 289 | * the maximum mapped by the Linux kernel during initialization. |
| 290 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 291 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 292 | /*----------------------------------------------------------------------- |
| 293 | * FLASH organization |
| 294 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 295 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ |
| 296 | #define CONFIG_SYS_MAX_FLASH_SECT 64 /* max number of sectors on one chip */ |
| 297 | #define CONFIG_SYS_FLASH_16BIT 1 /* Rom 16 bit data bus */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 298 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 299 | #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ |
| 300 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 301 | |
| 302 | /* BEG ENVIRONNEMENT FLASH */ |
Jean-Christophe PLAGNIOL-VILLARD | 5a1aceb | 2008-09-10 22:48:04 +0200 | [diff] [blame] | 303 | #ifdef CONFIG_ENV_IS_IN_FLASH |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 304 | #define CONFIG_ENV_SECT_SIZE (128*1024) |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 305 | |
| 306 | #if 0 /* force ENV to be NOT embedded */ |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 307 | #define CONFIG_ENV_ADDR 0xfffa0000 |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 308 | #else /* force ENV to be embedded */ |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 309 | #define CONFIG_ENV_SIZE (2 * 1024) /* Total Size of Environment Sector 2k */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 310 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN - CONFIG_ENV_SIZE - 0x10) /* let space for reset vector */ |
| 311 | /* #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE)*/ |
| 312 | #define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR - CONFIG_SYS_FLASH_BASE) |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 313 | #endif |
| 314 | |
| 315 | #endif |
| 316 | /* END ENVIRONNEMENT FLASH */ |
| 317 | /*----------------------------------------------------------------------- |
| 318 | * NVRAM organization |
| 319 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 320 | #define CONFIG_SYS_NVRAM_BASE_ADDR CONFIG_SYS_NVRAM_REG_BASE_ADDR /* NVRAM base address */ |
| 321 | #define CONFIG_SYS_NVRAM_SIZE 0x7F8 /* NVRAM size 2kByte - 8 Byte for RTC */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 322 | |
Jean-Christophe PLAGNIOL-VILLARD | 9314cee | 2008-09-10 22:47:59 +0200 | [diff] [blame] | 323 | #ifdef CONFIG_ENV_IS_IN_NVRAM |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 324 | #define CONFIG_ENV_SIZE 0x7F8 /* Size of Environment vars */ |
| 325 | #define CONFIG_ENV_ADDR \ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 326 | (CONFIG_SYS_NVRAM_BASE_ADDR+CONFIG_SYS_NVRAM_SIZE-CONFIG_ENV_SIZE) /* Env */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 327 | #endif |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 328 | |
| 329 | /* |
| 330 | * Init Memory Controller: |
| 331 | * |
| 332 | * BR0/1 and OR0/1 (FLASH) |
| 333 | */ |
| 334 | |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 335 | #define FLASH_BASE0_PRELIM 0xFF800000 /* FLASH bank #0 8MB */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 336 | #define FLASH_BASE1_PRELIM 0 /* FLASH bank #1 */ |
| 337 | |
| 338 | |
| 339 | /* Configuration Port location */ |
| 340 | /* #define CONFIG_PORT_ADDR 0xF0000500 */ |
| 341 | |
| 342 | /*----------------------------------------------------------------------- |
| 343 | * Definitions for initial stack pointer and data area (in DPRAM) |
| 344 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 345 | #define CONFIG_SYS_INIT_RAM_ADDR 0x00df0000 /* inside of SDRAM */ |
| 346 | #define CONFIG_SYS_INIT_RAM_END 0x0f00 /* End of used area in RAM */ |
| 347 | #define CONFIG_SYS_GBL_DATA_SIZE 64 /* size in bytes reserved for initial data */ |
| 348 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) |
| 349 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 350 | |
| 351 | /*----------------------------------------------------------------------- |
| 352 | * Definitions for Serial Presence Detect EEPROM address |
| 353 | * (to get SDRAM settings) |
| 354 | */ |
| 355 | #define SPD_EEPROM_ADDRESS 0x50 |
| 356 | |
| 357 | /* |
| 358 | * Internal Definitions |
| 359 | * |
| 360 | * Boot Flags |
| 361 | */ |
| 362 | #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */ |
| 363 | #define BOOTFLAG_WARM 0x02 /* Software reboot */ |
| 364 | |
Jon Loeliger | dcaa715 | 2007-07-07 20:56:05 -0500 | [diff] [blame] | 365 | #if defined(CONFIG_CMD_KGDB) |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 366 | #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ |
| 367 | #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */ |
| 368 | #endif |
| 369 | #endif /* __CONFIG_H */ |