wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2003 |
| 3 | * EMK Elektronik GmbH <www.emk-elektronik.de> |
| 4 | * Reinhard Meyer <r.meyer@emk-elektronik.de> |
| 5 | * |
| 6 | * Configuation settings for the TOP860 board. |
| 7 | * |
| 8 | * ----------------------------------------------------------------- |
| 9 | * See file CREDITS for list of people who contributed to this |
| 10 | * project. |
| 11 | * |
| 12 | * This program is free software; you can redistribute it and/or |
| 13 | * modify it under the terms of the GNU General Public License as |
| 14 | * published by the Free Software Foundation; either version 2 of |
| 15 | * the License, or (at your option) any later version. |
| 16 | * |
| 17 | * This program is distributed in the hope that it will be useful, |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | * GNU General Public License for more details. |
| 21 | * |
| 22 | * You should have received a copy of the GNU General Public License |
| 23 | * along with this program; if not, write to the Free Software |
| 24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 25 | * MA 02111-1307 USA |
| 26 | */ |
| 27 | /* |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 28 | * TOP860 is a simple module: |
| 29 | * 16-bit wide FLASH on CS0 (2MB or more) |
| 30 | * 32-bit wide DRAM on CS2 (either 4MB or 16MB) |
| 31 | * FEC with Am79C874 100-Base-T and Fiber Optic |
| 32 | * Ports available, but we choose SMC1 for Console |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 33 | * 8k I2C EEPROM at address 0xae, 6k user available, 2k factory set |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 34 | * 32768Hz crystal PLL set for 49.152MHz Core and 24.576MHz Bus Clock |
| 35 | * |
| 36 | * This config has been copied from MBX.h / MBX860T.h |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 37 | */ |
| 38 | /* |
| 39 | * board/config.h - configuration options, board specific |
| 40 | */ |
| 41 | |
| 42 | #ifndef __CONFIG_H |
| 43 | #define __CONFIG_H |
| 44 | |
| 45 | /* |
| 46 | * High Level Configuration Options |
| 47 | * (easy to change) |
| 48 | */ |
| 49 | |
| 50 | /*----------------------------------------------------------------------- |
| 51 | * CPU and BOARD type |
| 52 | */ |
| 53 | #define CONFIG_MPC860 1 /* This is a MPC860 CPU */ |
| 54 | #define CONFIG_MPC860T 1 /* even better... an FEC! */ |
| 55 | #define CONFIG_TOP860 1 /* ...on a TOP860 module */ |
Wolfgang Denk | 291ba1b | 2010-10-06 09:05:45 +0200 | [diff] [blame] | 56 | |
| 57 | #define CONFIG_SYS_TEXT_BASE 0x80000000 |
| 58 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 59 | #undef CONFIG_WATCHDOG /* watchdog disabled */ |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 60 | #define CONFIG_IDENT_STRING " EMK TOP860" |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 61 | |
| 62 | /*----------------------------------------------------------------------- |
| 63 | * CLOCK settings |
| 64 | */ |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 65 | #define CONFIG_SYSCLK 49152000 |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 66 | #define CONFIG_SYS_XTAL 32768 |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 67 | #define CONFIG_EBDF 1 |
| 68 | #define CONFIG_COM 3 |
| 69 | #define CONFIG_RTC_MPC8xx |
| 70 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 71 | /*----------------------------------------------------------------------- |
| 72 | * Physical memory map as defined by EMK |
| 73 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 74 | #define CONFIG_SYS_IMMR 0xFFF00000 /* Internal Memory Mapped Register */ |
| 75 | #define CONFIG_SYS_FLASH_BASE 0x80000000 /* FLASH in final mapping */ |
| 76 | #define CONFIG_SYS_DRAM_BASE 0x00000000 /* DRAM in final mapping */ |
| 77 | #define CONFIG_SYS_FLASH_MAX 0x00400000 /* max FLASH to expect */ |
| 78 | #define CONFIG_SYS_DRAM_MAX 0x01000000 /* max DRAM to expect */ |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 79 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 80 | /*----------------------------------------------------------------------- |
| 81 | * derived values |
| 82 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 83 | #define CONFIG_SYS_MF (CONFIG_SYSCLK/CONFIG_SYS_XTAL) |
| 84 | #define CONFIG_SYS_CPUCLOCK CONFIG_SYSCLK |
| 85 | #define CONFIG_SYS_BRGCLOCK CONFIG_SYSCLK |
| 86 | #define CONFIG_SYS_BUSCLOCK (CONFIG_SYSCLK >> CONFIG_EBDF) |
| 87 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */ |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 88 | #define CONFIG_8xx_GCLK_FREQ CONFIG_SYSCLK |
| 89 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 90 | /*----------------------------------------------------------------------- |
| 91 | * FLASH organization |
| 92 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 93 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ |
| 94 | #define CONFIG_SYS_MAX_FLASH_SECT 128 /* max number of sectors on one chip */ |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 95 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 96 | #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */ |
| 97 | #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */ |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 98 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 99 | #define CONFIG_SYS_FLASH_CFI |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 100 | |
| 101 | /*----------------------------------------------------------------------- |
| 102 | * Command interpreter |
| 103 | */ |
| 104 | #define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */ |
| 105 | #undef CONFIG_8xx_CONS_SMC2 |
| 106 | #define CONFIG_BAUDRATE 9600 |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 107 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 108 | /* |
| 109 | * Allow partial commands to be matched to uniqueness. |
| 110 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 111 | #define CONFIG_SYS_MATCH_PARTIAL_CMD |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 112 | |
Jon Loeliger | 2161619 | 2007-07-08 15:31:57 -0500 | [diff] [blame] | 113 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 114 | /* |
Jon Loeliger | 2161619 | 2007-07-08 15:31:57 -0500 | [diff] [blame] | 115 | * Command line configuration. |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 116 | */ |
Jon Loeliger | 2161619 | 2007-07-08 15:31:57 -0500 | [diff] [blame] | 117 | #include <config_cmd_default.h> |
| 118 | |
| 119 | #define CONFIG_CMD_ASKENV |
| 120 | #define CONFIG_CMD_DHCP |
| 121 | #define CONFIG_CMD_I2C |
| 122 | #define CONFIG_CMD_EEPROM |
| 123 | #define CONFIG_CMD_REGINFO |
| 124 | #define CONFIG_CMD_IMMAP |
| 125 | #define CONFIG_CMD_ELF |
| 126 | #define CONFIG_CMD_DATE |
| 127 | #define CONFIG_CMD_MII |
| 128 | #define CONFIG_CMD_BEDBUG |
| 129 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 130 | |
Wolfgang Denk | 85c25df | 2009-04-01 23:34:12 +0200 | [diff] [blame] | 131 | #define CONFIG_SOURCE 1 |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 132 | #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 133 | #undef CONFIG_LOADS_ECHO /* NO echo on for serial download */ |
| 134 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 135 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 136 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
| 137 | #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */ |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 138 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 139 | #undef CONFIG_SYS_HUSH_PARSER /* Hush parse for U-Boot */ |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 140 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 141 | #ifdef CONFIG_SYS_HUSH_PARSER |
| 142 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 143 | #endif |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 144 | |
Jon Loeliger | 2161619 | 2007-07-08 15:31:57 -0500 | [diff] [blame] | 145 | #if defined(CONFIG_CMD_KGDB) |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 146 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 147 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 148 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 149 | #endif |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 150 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 151 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
| 152 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
| 153 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 154 | |
| 155 | /*----------------------------------------------------------------------- |
| 156 | * Memory Test Command |
| 157 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 158 | #define CONFIG_SYS_MEMTEST_START 0x0400000 /* memtest works on */ |
| 159 | #define CONFIG_SYS_MEMTEST_END 0x0C00000 /* 4 ... 12 MB in DRAM */ |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 160 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 161 | /*----------------------------------------------------------------------- |
| 162 | * Environment handler |
| 163 | * only the first 6k in EEPROM are available for user. Of that we use 256b |
| 164 | */ |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 165 | #define CONFIG_SOFT_I2C |
Jean-Christophe PLAGNIOL-VILLARD | e46af64 | 2008-09-05 09:19:30 +0200 | [diff] [blame] | 166 | #define CONFIG_ENV_IS_IN_EEPROM 1 /* turn on EEPROM env feature */ |
Jean-Christophe PLAGNIOL-VILLARD | 7e1cda6 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 167 | #define CONFIG_ENV_OFFSET 0x1000 |
| 168 | #define CONFIG_ENV_SIZE 0x0700 |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 169 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57 |
| 170 | #define CONFIG_SYS_FACT_OFFSET 0x1800 |
| 171 | #define CONFIG_SYS_FACT_SIZE 0x0800 |
| 172 | #define CONFIG_SYS_I2C_FACT_ADDR 0x57 |
| 173 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 |
| 174 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 |
| 175 | #define CONFIG_SYS_EEPROM_SIZE 0x2000 |
| 176 | #define CONFIG_SYS_I2C_SPEED 100000 |
| 177 | #define CONFIG_SYS_I2C_SLAVE 0xFE |
| 178 | #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 12 |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 179 | #define CONFIG_ENV_OVERWRITE |
| 180 | #define CONFIG_MISC_INIT_R |
| 181 | |
| 182 | #if defined (CONFIG_SOFT_I2C) |
| 183 | #define SDA 0x00010 |
| 184 | #define SCL 0x00020 |
Wolfgang Denk | 27a5b0b | 2005-10-13 01:45:54 +0200 | [diff] [blame] | 185 | #define __I2C_DIR immr->im_cpm.cp_pbdir |
| 186 | #define __I2C_DAT immr->im_cpm.cp_pbdat |
| 187 | #define __I2C_PAR immr->im_cpm.cp_pbpar |
| 188 | #define __I2C_ODR immr->im_cpm.cp_pbodr |
| 189 | #define I2C_INIT { __I2C_PAR &= ~(SDA|SCL); \ |
| 190 | __I2C_ODR &= ~(SDA|SCL); \ |
| 191 | __I2C_DAT |= (SDA|SCL); \ |
| 192 | __I2C_DIR|=(SDA|SCL); } |
| 193 | #define I2C_READ ((__I2C_DAT & SDA) ? 1 : 0) |
| 194 | #define I2C_SDA(x) { if (x) __I2C_DAT |= SDA; else __I2C_DAT &= ~SDA; } |
| 195 | #define I2C_SCL(x) { if (x) __I2C_DAT |= SCL; else __I2C_DAT &= ~SCL; } |
| 196 | #define I2C_DELAY { udelay(5); } |
| 197 | #define I2C_ACTIVE { __I2C_DIR |= SDA; } |
| 198 | #define I2C_TRISTATE { __I2C_DIR &= ~SDA; } |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 199 | #endif |
| 200 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 201 | #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 } |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 202 | |
| 203 | /*----------------------------------------------------------------------- |
| 204 | * defines we need to get FEC running |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 205 | */ |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 206 | #define CONFIG_NET_MULTI 1 /* the only way to get the FEC in */ |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 207 | #define CONFIG_FEC_ENET 1 /* Ethernet only via FEC */ |
| 208 | #define FEC_ENET 1 /* eth.c needs it that way... */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 209 | #define CONFIG_SYS_DISCOVER_PHY 1 |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 210 | #define CONFIG_MII 1 |
TsiChung Liew | b316245 | 2008-03-30 01:22:13 -0500 | [diff] [blame] | 211 | #define CONFIG_MII_INIT 1 |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 212 | #define CONFIG_PHY_ADDR 31 |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 213 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 214 | /*----------------------------------------------------------------------- |
| 215 | * adresses |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 216 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 217 | #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */ |
Wolfgang Denk | 0708bc6 | 2010-10-07 21:51:12 +0200 | [diff] [blame] | 218 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 219 | #define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */ |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 220 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 221 | /*----------------------------------------------------------------------- |
| 222 | * Start addresses for the final memory configuration |
| 223 | * (Set up by the startup code) |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 224 | * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0 |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 225 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 226 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 |
| 227 | #define CONFIG_SYS_FLASH_BASE 0x80000000 |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 228 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 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 0x2f00 /* Size of used area in DPRAM */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 234 | #define CONFIG_SYS_GBL_DATA_SIZE 64 /* size in bytes reserved for initial data */ |
Wolfgang Denk | 1c2e98e | 2010-10-26 13:32:32 +0200 | [diff] [blame^] | 235 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - CONFIG_SYS_GBL_DATA_SIZE) |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 236 | #define CONFIG_SYS_INIT_VPD_SIZE 256 /* size in bytes reserved for vpd buffer */ |
| 237 | #define CONFIG_SYS_INIT_VPD_OFFSET (CONFIG_SYS_GBL_DATA_OFFSET - CONFIG_SYS_INIT_VPD_SIZE) |
| 238 | #define CONFIG_SYS_INIT_SP_OFFSET (CONFIG_SYS_INIT_VPD_OFFSET-8) |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 239 | |
| 240 | /*----------------------------------------------------------------------- |
| 241 | * Cache Configuration |
| 242 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 243 | #define CONFIG_SYS_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */ |
Jon Loeliger | 2161619 | 2007-07-08 15:31:57 -0500 | [diff] [blame] | 244 | #if defined(CONFIG_CMD_KGDB) |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 245 | #define CONFIG_SYS_CACHELINE_SHIFT 4 /* log base 2 of the above value */ |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 246 | #endif |
| 247 | |
| 248 | /* Interrupt level assignments. |
| 249 | */ |
| 250 | #define FEC_INTERRUPT SIU_LEVEL1 /* FEC interrupt */ |
| 251 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 252 | /*----------------------------------------------------------------------- |
| 253 | * Debug Enable Register |
| 254 | *----------------------------------------------------------------------- |
| 255 | * |
| 256 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 257 | #define CONFIG_SYS_DER 0 /* used in start.S */ |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 258 | |
| 259 | /*----------------------------------------------------------------------- |
| 260 | * PLPRCR - PLL, Low-Power, and Reset Control Register 15-30 |
| 261 | *----------------------------------------------------------------------- |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 262 | * set up PLPRCR (PLL, Low-Power, and Reset Control Register) |
| 263 | * 12 MF calculated Multiplication factor |
| 264 | * 4 0 0000 |
| 265 | * 1 SPLSS 0 System PLL lock status sticky |
| 266 | * 1 TEXPS 1 Timer expired status |
| 267 | * 1 0 0 |
| 268 | * 1 TMIST 0 Timers interrupt status |
| 269 | * 1 0 0 |
| 270 | * 1 CSRC 0 Clock source (0=DFNH, 1=DFNL) |
| 271 | * 2 LPM 00 Low-power modes |
| 272 | * 1 CSR 0 Checkstop reset enable |
| 273 | * 1 LOLRE 0 Loss-of-lock reset enable |
| 274 | * 1 FIOPD 0 Force I/O pull down |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 275 | * 5 0 00000 |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 276 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 277 | #define CONFIG_SYS_PLPRCR (PLPRCR_TEXPS | ((CONFIG_SYS_MF-1)<<20)) |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 278 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 279 | /*----------------------------------------------------------------------- |
| 280 | * SYPCR - System Protection Control 11-9 |
| 281 | * SYPCR can only be written once after reset! |
| 282 | *----------------------------------------------------------------------- |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 283 | * set up SYPCR: |
| 284 | * 16 SWTC 0xffff Software watchdog timer count |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 285 | * 8 BMT 0xff Bus monitor timing |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 286 | * 1 BME 1 Bus monitor enable |
| 287 | * 3 0 000 |
| 288 | * 1 SWF 1 Software watchdog freeze |
| 289 | * 1 SWE 0/1 Software watchdog enable |
| 290 | * 1 SWRI 0/1 Software watchdog reset/interrupt select (1=HRESET) |
| 291 | * 1 SWP 0/1 Software watchdog prescale (1=/2048) |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 292 | */ |
| 293 | #if defined (CONFIG_WATCHDOG) |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 294 | #define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \ |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 295 | SYPCR_SWE | SYPCR_SWRI| SYPCR_SWP) |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 296 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 297 | #define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF) |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 298 | #endif |
| 299 | |
| 300 | /*----------------------------------------------------------------------- |
| 301 | * SIUMCR - SIU Module Configuration 11-6 |
| 302 | *----------------------------------------------------------------------- |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 303 | * set up SIUMCR |
| 304 | * 1 EARB 0 External arbitration |
| 305 | * 3 EARP 000 External arbitration request priority |
| 306 | * 4 0 0000 |
| 307 | * 1 DSHW 0 Data show cycles |
| 308 | * 2 DBGC 00 Debug pin configuration |
| 309 | * 2 DBPC 00 Debug port pins configuration |
| 310 | * 1 0 0 |
| 311 | * 1 FRC 0 FRZ pin configuration |
| 312 | * 1 DLK 0 Debug register lock |
| 313 | * 1 OPAR 0 Odd parity |
| 314 | * 1 PNCS 0 Parity enable for non memory controller regions |
| 315 | * 1 DPC 0 Data parity pins configuration |
| 316 | * 1 MPRE 0 Multiprocessor reservation enable |
| 317 | * 2 MLRC 11 Multi level reservation control (00=IRQ4, 01=3State, 10=KR/RETRY, 11=SPKROUT) |
| 318 | * 1 AEME 0 Async external master enable |
| 319 | * 1 SEME 0 Sync external master enable |
| 320 | * 1 BSC 0 Byte strobe configuration |
| 321 | * 1 GB5E 0 GPL_B5 enable |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 322 | * 1 B2DD 0 Bank 2 double drive |
| 323 | * 1 B3DD 0 Bank 3 double drive |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 324 | * 4 0 0000 |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 325 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 326 | #define CONFIG_SYS_SIUMCR (SIUMCR_MLRC11) |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 327 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 328 | /*----------------------------------------------------------------------- |
| 329 | * TBSCR - Time Base Status and Control 11-26 |
| 330 | *----------------------------------------------------------------------- |
| 331 | * Clear Reference Interrupt Status, Timebase freezing enabled |
| 332 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 333 | #define CONFIG_SYS_TBSCR (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF) |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 334 | |
| 335 | /*----------------------------------------------------------------------- |
| 336 | * PISCR - Periodic Interrupt Status and Control 11-31 |
| 337 | *----------------------------------------------------------------------- |
| 338 | * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled |
| 339 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 340 | #define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF | PISCR_PTE) |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 341 | |
| 342 | /*----------------------------------------------------------------------- |
| 343 | * SCCR - System Clock and reset Control Register 15-27 |
| 344 | *----------------------------------------------------------------------- |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 345 | * set up SCCR (System Clock and Reset Control Register) |
| 346 | * 1 0 0 |
| 347 | * 2 COM 11 Clock output module (00=full, 01=half, 11=off) |
| 348 | * 3 0 000 |
| 349 | * 1 TBS 1 Timebase source (0=OSCCLK, 1=GCLK2) |
| 350 | * 1 RTDIV 0 Real-time clock divide (0=/4, 1=/512) |
| 351 | * 1 RTSEL 0 Real-time clock select (0=OSCM, 1=EXTCLK) |
| 352 | * 1 CRQEN 0 CPM request enable |
| 353 | * 1 PRQEN 0 Power management request enable |
| 354 | * 2 0 00 |
| 355 | * 2 EBDF xx External bus division factor |
| 356 | * 2 0 00 |
| 357 | * 2 DFSYNC 00 Division factor for SYNCLK |
| 358 | * 2 DFBRG 00 Division factor for BRGCLK |
| 359 | * 3 DFNL 000 Division factor low frequency |
| 360 | * 3 DFNH 000 Division factor high frequency |
| 361 | * 5 0 00000 |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 362 | */ |
| 363 | #define SCCR_MASK 0 |
wdenk | c35ba4e | 2004-03-14 22:25:36 +0000 | [diff] [blame] | 364 | #ifdef CONFIG_EBDF |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 365 | #define CONFIG_SYS_SCCR (SCCR_COM11 | SCCR_TBS | SCCR_EBDF01) |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 366 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 367 | #define CONFIG_SYS_SCCR (SCCR_COM11 | SCCR_TBS) |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 368 | #endif |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 369 | |
| 370 | /*----------------------------------------------------------------------- |
| 371 | * Chip Select 0 - FLASH |
| 372 | *----------------------------------------------------------------------- |
| 373 | * Preliminary Values |
| 374 | */ |
| 375 | /* FLASH timing: CSNT=1 ACS=10 BIH=1 SCY=4 SETA=0 TLRX=1 EHTR=1 */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 376 | #define CONFIG_SYS_OR_TIMING_FLASH (OR_CSNT_SAM | OR_ACS_DIV4 | OR_BI | OR_SCY_4_CLK | OR_TRLX | OR_EHTR) |
| 377 | #define CONFIG_SYS_OR0_PRELIM (-CONFIG_SYS_FLASH_MAX | CONFIG_SYS_OR_TIMING_FLASH) |
| 378 | #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | BR_PS_16 | BR_V ) |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 379 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 380 | /*----------------------------------------------------------------------- |
| 381 | * misc |
| 382 | *----------------------------------------------------------------------- |
| 383 | * |
| 384 | */ |
| 385 | /* |
| 386 | * Set the autoboot delay in seconds. A delay of -1 disables autoboot |
| 387 | */ |
| 388 | #define CONFIG_BOOTDELAY 5 |
| 389 | |
| 390 | /* |
| 391 | * Pass the clock frequency to the Linux kernel in units of MHz |
| 392 | */ |
| 393 | #define CONFIG_CLOCKS_IN_MHZ |
| 394 | |
| 395 | #define CONFIG_PREBOOT \ |
| 396 | "echo;echo" |
| 397 | |
| 398 | #undef CONFIG_BOOTARGS |
| 399 | #define CONFIG_BOOTCOMMAND \ |
| 400 | "bootp;" \ |
Wolfgang Denk | 86eb3b7 | 2005-11-20 21:40:11 +0100 | [diff] [blame] | 401 | "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} " \ |
| 402 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \ |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 403 | "bootm" |
| 404 | |
| 405 | /* |
| 406 | * BOOTP options |
| 407 | */ |
Jon Loeliger | 530ca67 | 2007-07-09 21:38:02 -0500 | [diff] [blame] | 408 | #define CONFIG_BOOTP_SUBNETMASK |
| 409 | #define CONFIG_BOOTP_GATEWAY |
| 410 | #define CONFIG_BOOTP_HOSTNAME |
| 411 | #define CONFIG_BOOTP_BOOTPATH |
| 412 | #define CONFIG_BOOTP_BOOTFILESIZE |
wdenk | 9c53f40 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 413 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 414 | |
| 415 | /* |
| 416 | * Set default IP stuff just to get bootstrap entries into the |
Wolfgang Denk | 85c25df | 2009-04-01 23:34:12 +0200 | [diff] [blame] | 417 | * environment so that we can source the full default environment. |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 418 | */ |
| 419 | #define CONFIG_ETHADDR 9a:52:63:15:85:25 |
| 420 | #define CONFIG_SERVERIP 10.0.4.200 |
| 421 | #define CONFIG_IPADDR 10.0.4.111 |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 422 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 423 | #define CONFIG_SYS_LOAD_ADDR 0x00100000 /* default load address */ |
| 424 | #define CONFIG_SYS_TFTP_LOADADDR 0x00100000 |
wdenk | 21136db | 2003-07-16 21:53:01 +0000 | [diff] [blame] | 425 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 426 | /* |
| 427 | * For booting Linux, the board info and command line data |
| 428 | * have to be in the first 8 MB of memory, since this is |
| 429 | * the maximum mapped by the Linux kernel during initialization. |
| 430 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 431 | #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */ |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 432 | |
wdenk | b666c8f | 2003-03-06 00:58:30 +0000 | [diff] [blame] | 433 | #endif /* __CONFIG_H */ |