wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2004, Li-Pro.Net <www.li-pro.net> |
| 3 | * Stephan Linz <linz@li-pro.net> |
| 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 | #ifndef __CONFIG_H |
| 25 | #define __CONFIG_H |
| 26 | |
| 27 | /*********************************************************************** |
| 28 | * Include the whole NIOS CPU configuration. |
| 29 | * |
| 30 | * !!! HAVE TO BE HERE !!! DON'T MOVE THIS PART !!! |
| 31 | * |
| 32 | ***********************************************************************/ |
| 33 | |
| 34 | #if defined(CONFIG_NIOS_BASE_32) |
| 35 | #include <configs/ADNPESC1_base_32.h> |
| 36 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 37 | #error *** CONFIG_SYS_ERROR: you have to setup right NIOS CPU configuration |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 38 | #endif |
| 39 | |
| 40 | /*------------------------------------------------------------------------ |
| 41 | * BOARD/CPU -- TOP-LEVEL |
| 42 | *----------------------------------------------------------------------*/ |
| 43 | #define CONFIG_NIOS 1 /* NIOS-32 core */ |
| 44 | #define CONFIG_ADNPESC1 1 /* SSV ADNP/ESC1 board */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 45 | #define CONFIG_SYS_CLK_FREQ CONFIG_SYS_NIOS_CPU_CLK/* 50 MHz core clock */ |
| 46 | #define CONFIG_SYS_HZ 1000 /* 1 msec time tick */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 47 | #define CONFIG_BOARD_EARLY_INIT_F 1 /* enable early board-spec. init*/ |
| 48 | |
| 49 | /*------------------------------------------------------------------------ |
| 50 | * BASE ADDRESSES / SIZE (Flash, SRAM, SDRAM) |
| 51 | *----------------------------------------------------------------------*/ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 52 | #if (CONFIG_SYS_NIOS_CPU_SDRAM_SIZE != 0) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 53 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 54 | #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_NIOS_CPU_SDRAM_BASE |
| 55 | #define CONFIG_SYS_SDRAM_SIZE CONFIG_SYS_NIOS_CPU_SDRAM_SIZE |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 56 | |
| 57 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 58 | #error *** CONFIG_SYS_ERROR: you have to setup any SDRAM in NIOS CPU config |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 59 | #endif |
| 60 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 61 | #if defined(CONFIG_SYS_NIOS_CPU_SRAM_BASE) && defined(CONFIG_SYS_NIOS_CPU_SRAM_SIZE) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 62 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 63 | #define CONFIG_SYS_SRAM_BASE CONFIG_SYS_NIOS_CPU_SRAM_BASE |
| 64 | #define CONFIG_SYS_SRAM_SIZE CONFIG_SYS_NIOS_CPU_SRAM_SIZE |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 65 | |
| 66 | #else |
| 67 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 68 | #undef CONFIG_SYS_SRAM_BASE |
| 69 | #undef CONFIG_SYS_SRAM_SIZE |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 70 | |
| 71 | #endif |
| 72 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 73 | #define CONFIG_SYS_VECT_BASE CONFIG_SYS_NIOS_CPU_VEC_BASE |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 74 | |
| 75 | /*------------------------------------------------------------------------ |
| 76 | * MEMORY ORGANIZATION - For the most part, you can put things pretty |
| 77 | * much anywhere. This is pretty flexible for Nios. So here we make some |
| 78 | * arbitrary choices & assume that the monitor is placed at the end of |
| 79 | * a memory resource (so you must make sure TEXT_BASE is chosen |
| 80 | * appropriately -- this is very important if you plan to move your |
| 81 | * memory to another place as configured at this time !!!). |
| 82 | * |
Wolfgang Denk | a1be476 | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 83 | * -The heap is placed below the monitor. |
| 84 | * -Global data is placed below the heap. |
| 85 | * -The stack is placed below global data (&grows down). |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 86 | *----------------------------------------------------------------------*/ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 87 | #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256k */ |
| 88 | #define CONFIG_SYS_GBL_DATA_SIZE 128 /* Global data size rsvd*/ |
| 89 | #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 90 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 91 | #define CONFIG_SYS_MONITOR_BASE TEXT_BASE |
| 92 | #define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_MONITOR_BASE - CONFIG_SYS_MALLOC_LEN) |
| 93 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_MALLOC_BASE - CONFIG_SYS_GBL_DATA_SIZE) |
| 94 | #define CONFIG_SYS_INIT_SP CONFIG_SYS_GBL_DATA_OFFSET |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 95 | |
| 96 | /*------------------------------------------------------------------------ |
| 97 | * FLASH (AM29LV065D) |
| 98 | *----------------------------------------------------------------------*/ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 99 | #if (CONFIG_SYS_NIOS_CPU_FLASH_SIZE != 0) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 100 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 101 | #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_NIOS_CPU_FLASH_BASE |
| 102 | #define CONFIG_SYS_FLASH_SIZE CONFIG_SYS_NIOS_CPU_FLASH_SIZE |
| 103 | #define CONFIG_SYS_MAX_FLASH_SECT 128 /* Max # sects per bank */ |
| 104 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* Max # of flash banks */ |
| 105 | #define CONFIG_SYS_FLASH_ERASE_TOUT 8000 /* Erase timeout (msec) */ |
| 106 | #define CONFIG_SYS_FLASH_WRITE_TOUT 100 /* Write timeout (msec) */ |
| 107 | #define CONFIG_SYS_FLASH_WORD_SIZE unsigned short /* flash word size */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 108 | |
| 109 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 110 | #error *** CONFIG_SYS_ERROR: you have to setup any Flash memory in NIOS CPU config |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 111 | #endif |
| 112 | |
| 113 | /*------------------------------------------------------------------------ |
| 114 | * ENVIRONMENT |
| 115 | *----------------------------------------------------------------------*/ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 116 | #if (CONFIG_SYS_NIOS_CPU_FLASH_SIZE != 0) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 117 | |
Jean-Christophe PLAGNIOL-VILLARD | 53db4cd | 2008-09-10 22:48:04 +0200 | [diff] [blame] | 118 | #define CONFIG_ENV_IS_IN_FLASH 1 /* Environment in flash */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 119 | |
| 120 | /* Mem addr of environment */ |
| 121 | #if defined(CONFIG_NIOS_BASE_32) |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 122 | #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 123 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 124 | #error *** CONFIG_SYS_ERROR: you have to setup the environment base address CONFIG_ENV_ADDR |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 125 | #endif |
| 126 | |
Jean-Christophe PLAGNIOL-VILLARD | 7e1cda6 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 127 | #define CONFIG_ENV_SIZE (64 * 1024) /* 64 KByte (1 sector) */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 128 | #define CONFIG_ENV_OVERWRITE /* Serial/eth change Ok */ |
| 129 | |
| 130 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 68a8756 | 2008-09-10 22:48:00 +0200 | [diff] [blame] | 131 | #define CONFIG_ENV_IS_NOWHERE 1 /* NO Environment */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 132 | #endif |
| 133 | |
| 134 | /*------------------------------------------------------------------------ |
| 135 | * NIOS APPLICATION CODE BASE AREA |
| 136 | *----------------------------------------------------------------------*/ |
Jean-Christophe PLAGNIOL-VILLARD | 7e1cda6 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 137 | #if ((CONFIG_ENV_ADDR + CONFIG_ENV_SIZE) == 0x1050000) |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 138 | #define CONFIG_SYS_ADNPESC1_UPDATE_LOAD_ADDR "0x2000100" |
| 139 | #define CONFIG_SYS_ADNPESC1_NIOS_APPL_ENTRY "0x1050000" |
| 140 | #define CONFIG_SYS_ADNPESC1_NIOS_APPL_IDENT "0x105000c" |
| 141 | #define CONFIG_SYS_ADNPESC1_NIOS_APPL_END "0x11fffff" |
| 142 | #define CONFIG_SYS_ADNPESC1_FILESYSTEM_BASE "0x1200000" |
| 143 | #define CONFIG_SYS_ADNPESC1_FILESYSTEM_END "0x17fffff" |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 144 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 145 | #error *** CONFIG_SYS_ERROR: missing right appl.code base configuration, expand your config.h |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 146 | #endif |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 147 | #define CONFIG_SYS_ADNPESC1_NIOS_IDENTIFIER "Nios" |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 148 | |
| 149 | /*------------------------------------------------------------------------ |
| 150 | * BOOT ENVIRONMENT |
| 151 | *----------------------------------------------------------------------*/ |
| 152 | #ifdef CONFIG_DNPEVA2 /* DNP/EVA2 base board */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 153 | #define CONFIG_SYS_ADNPESC1_SLED_BOOT_OFF "sled boot off; " |
| 154 | #define CONFIG_SYS_ADNPESC1_SLED_RED_BLINK "sled red blink; " |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 155 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 156 | #define CONFIG_SYS_ADNPESC1_SLED_BOOT_OFF |
| 157 | #define CONFIG_SYS_ADNPESC1_SLED_RED_BLINK |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 158 | #endif |
| 159 | |
| 160 | #define CONFIG_BOOTDELAY 5 |
| 161 | #define CONFIG_BOOTCOMMAND \ |
| 162 | "if itest.s *$appl_ident_addr == \"$appl_ident_str\"; " \ |
| 163 | "then " \ |
| 164 | "wd off; " \ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 165 | CONFIG_SYS_ADNPESC1_SLED_BOOT_OFF \ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 166 | "go $appl_entry_addr; " \ |
| 167 | "else " \ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 168 | CONFIG_SYS_ADNPESC1_SLED_RED_BLINK \ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 169 | "echo *** missing \"$appl_ident_str\" at $appl_ident_addr; "\ |
| 170 | "echo *** invalid application at $appl_entry_addr; " \ |
| 171 | "echo *** stop bootup...; " \ |
| 172 | "fi" |
| 173 | |
| 174 | /*------------------------------------------------------------------------ |
| 175 | * EXTRA ENVIRONMENT |
| 176 | *----------------------------------------------------------------------*/ |
| 177 | #ifdef CONFIG_DNPEVA2 /* DNP/EVA2 base board */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 178 | #define CONFIG_SYS_ADNPESC1_SLED_YELLO_ON "sled yellow on; " |
| 179 | #define CONFIG_SYS_ADNPESC1_SLED_YELLO_OFF "sled yellow off; " |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 180 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 181 | #define CONFIG_SYS_ADNPESC1_SLED_YELLO_ON |
| 182 | #define CONFIG_SYS_ADNPESC1_SLED_YELLO_OFF |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 183 | #endif |
| 184 | |
| 185 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 186 | "update_allowed=0\0" \ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 187 | "update_load_addr=" CONFIG_SYS_ADNPESC1_UPDATE_LOAD_ADDR "\0" \ |
| 188 | "appl_entry_addr=" CONFIG_SYS_ADNPESC1_NIOS_APPL_ENTRY "\0" \ |
| 189 | "appl_end_addr=" CONFIG_SYS_ADNPESC1_NIOS_APPL_END "\0" \ |
| 190 | "appl_ident_addr=" CONFIG_SYS_ADNPESC1_NIOS_APPL_IDENT "\0" \ |
| 191 | "appl_ident_str=" CONFIG_SYS_ADNPESC1_NIOS_IDENTIFIER "\0" \ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 192 | "appl_name=ADNPESC1/base32/linux.bin\0" \ |
| 193 | "appl_update=" \ |
| 194 | "if itest.b $update_allowed != 0; " \ |
| 195 | "then " \ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 196 | CONFIG_SYS_ADNPESC1_SLED_YELLO_ON \ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 197 | "tftp $update_load_addr $appl_name; " \ |
| 198 | "protect off $appl_entry_addr $appl_end_addr; " \ |
| 199 | "era $appl_entry_addr $appl_end_addr; " \ |
| 200 | "cp.b $update_load_addr $appl_entry_addr $filesize; "\ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 201 | CONFIG_SYS_ADNPESC1_SLED_YELLO_OFF \ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 202 | "else " \ |
| 203 | "echo *** update not allowed (update_allowed=$update_allowed); "\ |
| 204 | "fi\0" \ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 205 | "fs_base_addr=" CONFIG_SYS_ADNPESC1_FILESYSTEM_BASE "\0" \ |
| 206 | "fs_end_addr=" CONFIG_SYS_ADNPESC1_FILESYSTEM_END "\0" \ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 207 | "fs_name=ADNPESC1/base32/romfs.img\0" \ |
| 208 | "fs_update=" \ |
| 209 | "if itest.b $update_allowed != 0; " \ |
| 210 | "then " \ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 211 | CONFIG_SYS_ADNPESC1_SLED_YELLO_ON \ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 212 | "tftp $update_load_addr $fs_name; " \ |
| 213 | "protect off $fs_base_addr $fs_end_addr; " \ |
| 214 | "era $fs_base_addr $fs_end_addr; " \ |
| 215 | "cp.b $update_load_addr $fs_base_addr $filesize; "\ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 216 | CONFIG_SYS_ADNPESC1_SLED_YELLO_OFF \ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 217 | "else " \ |
| 218 | "echo *** update not allowed (update_allowed=$update_allowed); "\ |
| 219 | "fi\0" \ |
| 220 | "uboot_name=ADNPESC1/base32/u-boot.bin\0" \ |
| 221 | "uboot_loadnrun=" \ |
| 222 | "if ping $serverip; " \ |
| 223 | "then " \ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 224 | CONFIG_SYS_ADNPESC1_SLED_YELLO_ON \ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 225 | "tftp $update_load_addr $uboot_name; " \ |
| 226 | "wd off; " \ |
| 227 | "go $update_load_addr; " \ |
| 228 | "else " \ |
| 229 | "echo *** missing connection to $serverip; " \ |
| 230 | "echo *** check your network and try again...; "\ |
| 231 | "fi\0" |
| 232 | |
| 233 | /*------------------------------------------------------------------------ |
| 234 | * CONSOLE |
| 235 | *----------------------------------------------------------------------*/ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 236 | #if (CONFIG_SYS_NIOS_CPU_UART_NUMS != 0) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 237 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 238 | #define CONFIG_SYS_NIOS_CONSOLE CONFIG_SYS_NIOS_CPU_UART0 /* 1st UART is Cons. */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 239 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 240 | #if (CONFIG_SYS_NIOS_CPU_UART0_BR != 0) |
| 241 | #define CONFIG_SYS_NIOS_FIXEDBAUD 1 /* Baudrate is fixed */ |
| 242 | #define CONFIG_BAUDRATE CONFIG_SYS_NIOS_CPU_UART0_BR |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 243 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 244 | #undef CONFIG_SYS_NIOS_FIXEDBAUD |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 245 | #define CONFIG_BAUDRATE 115200 |
| 246 | #endif |
| 247 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 248 | #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 249 | |
| 250 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 251 | #error *** CONFIG_SYS_ERROR: you have to setup at least one UART in NIOS CPU config |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 252 | #endif |
| 253 | |
| 254 | /*------------------------------------------------------------------------ |
| 255 | * TIMER FOR TIMEBASE -- Nios doesn't have the equivalent of ppc PIT, |
| 256 | * so an avalon bus timer is required. |
| 257 | *----------------------------------------------------------------------*/ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 258 | #if (CONFIG_SYS_NIOS_CPU_TIMER_NUMS != 0) && defined(CONFIG_SYS_NIOS_CPU_TICK_TIMER) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 259 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 260 | #if (CONFIG_SYS_NIOS_CPU_TICK_TIMER == 0) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 261 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 262 | #define CONFIG_SYS_NIOS_TMRBASE CONFIG_SYS_NIOS_CPU_TIMER0 /* TIMER0 as tick */ |
| 263 | #define CONFIG_SYS_NIOS_TMRIRQ CONFIG_SYS_NIOS_CPU_TIMER0_IRQ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 264 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 265 | #if (CONFIG_SYS_NIOS_CPU_TIMER0_FP == 1) /* fixed period */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 266 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 267 | #if (CONFIG_SYS_NIOS_CPU_TIMER0_PER >= CONFIG_SYS_HZ) |
| 268 | #define CONFIG_SYS_NIOS_TMRMS (CONFIG_SYS_NIOS_CPU_TIMER0_PER / CONFIG_SYS_HZ) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 269 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 270 | #error *** CONFIG_SYS_ERROR: you have to use a timer periode greater than CONFIG_SYS_HZ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 271 | #endif |
| 272 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 273 | #undef CONFIG_SYS_NIOS_TMRCNT /* no preloadable counter value */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 274 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 275 | #elif (CONFIG_SYS_NIOS_CPU_TIMER0_FP == 0) /* variable period */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 276 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 277 | #if (CONFIG_SYS_HZ <= 1000) |
| 278 | #define CONFIG_SYS_NIOS_TMRMS (1000 / CONFIG_SYS_HZ) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 279 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 280 | #error *** CONFIG_SYS_ERROR: sorry, CONFIG_SYS_HZ have to be less than 1000 |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 281 | #endif |
| 282 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 283 | #define CONFIG_SYS_NIOS_TMRCNT (CONFIG_SYS_CLK_FREQ / CONFIG_SYS_HZ) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 284 | |
| 285 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 286 | #error *** CONFIG_SYS_ERROR: you have to define CONFIG_SYS_NIOS_CPU_TIMER0_FP correct |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 287 | #endif |
| 288 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 289 | #elif (CONFIG_SYS_NIOS_CPU_TICK_TIMER == 1) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 290 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 291 | #define CONFIG_SYS_NIOS_TMRBASE CONFIG_SYS_NIOS_CPU_TIMER1 /* TIMER1 as tick */ |
| 292 | #define CONFIG_SYS_NIOS_TMRIRQ CONFIG_SYS_NIOS_CPU_TIMER1_IRQ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 293 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 294 | #if (CONFIG_SYS_NIOS_CPU_TIMER1_FP == 1) /* fixed period */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 295 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 296 | #if (CONFIG_SYS_NIOS_CPU_TIMER1_PER >= CONFIG_SYS_HZ) |
| 297 | #define CONFIG_SYS_NIOS_TMRMS (CONFIG_SYS_NIOS_CPU_TIMER1_PER / CONFIG_SYS_HZ) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 298 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 299 | #error *** CONFIG_SYS_ERROR: you have to use a timer periode greater than CONFIG_SYS_HZ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 300 | #endif |
| 301 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 302 | #undef CONFIG_SYS_NIOS_TMRCNT /* no preloadable counter value */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 303 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 304 | #elif (CONFIG_SYS_NIOS_CPU_TIMER1_FP == 0) /* variable period */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 305 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 306 | #if (CONFIG_SYS_HZ <= 1000) |
| 307 | #define CONFIG_SYS_NIOS_TMRMS (1000 / CONFIG_SYS_HZ) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 308 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 309 | #error *** CONFIG_SYS_ERROR: sorry, CONFIG_SYS_HZ have to be less than 1000 |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 310 | #endif |
| 311 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 312 | #define CONFIG_SYS_NIOS_TMRCNT (CONFIG_SYS_CLK_FREQ / CONFIG_SYS_HZ) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 313 | |
| 314 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 315 | #error *** CONFIG_SYS_ERROR: you have to define CONFIG_SYS_NIOS_CPU_TIMER1_FP correct |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 316 | #endif |
| 317 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 318 | #endif /* CONFIG_SYS_NIOS_CPU_TICK_TIMER */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 319 | |
| 320 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 321 | #error *** CONFIG_SYS_ERROR: you have to setup at least one TIMER in NIOS CPU config |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 322 | #endif |
| 323 | |
| 324 | /*------------------------------------------------------------------------ |
| 325 | * WATCHDOG (or better MAX823 supervisory circuite access) |
| 326 | *----------------------------------------------------------------------*/ |
| 327 | #define CONFIG_HW_WATCHDOG 1 /* board specific WD */ |
| 328 | |
| 329 | #ifdef CONFIG_HW_WATCHDOG |
| 330 | |
| 331 | /* MAX823 supervisor -- watchdog enable port at: */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 332 | #if (CONFIG_SYS_NIOS_CPU_WDENA_PIO == 0) |
| 333 | #define CONFIG_HW_WDENA_BASE CONFIG_SYS_NIOS_CPU_PIO0 /* PIO0 */ |
| 334 | #elif (CONFIG_SYS_NIOS_CPU_WDENA_PIO == 1) |
| 335 | #define CONFIG_HW_WDENA_BASE CONFIG_SYS_NIOS_CPU_PIO1 /* PIO1 */ |
| 336 | #elif (CONFIG_SYS_NIOS_CPU_WDENA_PIO == 2) |
| 337 | #define CONFIG_HW_WDENA_BASE CONFIG_SYS_NIOS_CPU_PIO2 /* PIO2 */ |
| 338 | #elif (CONFIG_SYS_NIOS_CPU_WDENA_PIO == 3) |
| 339 | #define CONFIG_HW_WDENA_BASE CONFIG_SYS_NIOS_CPU_PIO3 /* PIO3 */ |
| 340 | #elif (CONFIG_SYS_NIOS_CPU_WDENA_PIO == 4) |
| 341 | #define CONFIG_HW_WDENA_BASE CONFIG_SYS_NIOS_CPU_PIO4 /* PIO4 */ |
| 342 | #elif (CONFIG_SYS_NIOS_CPU_WDENA_PIO == 5) |
| 343 | #define CONFIG_HW_WDENA_BASE CONFIG_SYS_NIOS_CPU_PIO5 /* PIO5 */ |
| 344 | #elif (CONFIG_SYS_NIOS_CPU_WDENA_PIO == 6) |
| 345 | #define CONFIG_HW_WDENA_BASE CONFIG_SYS_NIOS_CPU_PIO6 /* PIO6 */ |
| 346 | #elif (CONFIG_SYS_NIOS_CPU_WDENA_PIO == 7) |
| 347 | #define CONFIG_HW_WDENA_BASE CONFIG_SYS_NIOS_CPU_PIO7 /* PIO7 */ |
| 348 | #elif (CONFIG_SYS_NIOS_CPU_WDENA_PIO == 8) |
| 349 | #define CONFIG_HW_WDENA_BASE CONFIG_SYS_NIOS_CPU_PIO8 /* PIO8 */ |
| 350 | #elif (CONFIG_SYS_NIOS_CPU_WDENA_PIO == 9) |
| 351 | #define CONFIG_HW_WDENA_BASE CONFIG_SYS_NIOS_CPU_PIO9 /* PIO9 */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 352 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 353 | #error *** CONFIG_SYS_ERROR: you have to setup at least one WDENA_PIO in NIOS CPU config |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 354 | #endif |
| 355 | |
| 356 | /* MAX823 supervisor -- watchdog trigger port at: */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 357 | #if (CONFIG_SYS_NIOS_CPU_WDTOG_PIO == 0) |
| 358 | #define CONFIG_HW_WDTOG_BASE CONFIG_SYS_NIOS_CPU_PIO0 /* PIO0 */ |
| 359 | #elif (CONFIG_SYS_NIOS_CPU_WDTOG_PIO == 1) |
| 360 | #define CONFIG_HW_WDTOG_BASE CONFIG_SYS_NIOS_CPU_PIO1 /* PIO1 */ |
| 361 | #elif (CONFIG_SYS_NIOS_CPU_WDTOG_PIO == 2) |
| 362 | #define CONFIG_HW_WDTOG_BASE CONFIG_SYS_NIOS_CPU_PIO2 /* PIO2 */ |
| 363 | #elif (CONFIG_SYS_NIOS_CPU_WDTOG_PIO == 3) |
| 364 | #define CONFIG_HW_WDTOG_BASE CONFIG_SYS_NIOS_CPU_PIO3 /* PIO3 */ |
| 365 | #elif (CONFIG_SYS_NIOS_CPU_WDTOG_PIO == 4) |
| 366 | #define CONFIG_HW_WDTOG_BASE CONFIG_SYS_NIOS_CPU_PIO4 /* PIO4 */ |
| 367 | #elif (CONFIG_SYS_NIOS_CPU_WDTOG_PIO == 5) |
| 368 | #define CONFIG_HW_WDTOG_BASE CONFIG_SYS_NIOS_CPU_PIO5 /* PIO5 */ |
| 369 | #elif (CONFIG_SYS_NIOS_CPU_WDTOG_PIO == 6) |
| 370 | #define CONFIG_HW_WDTOG_BASE CONFIG_SYS_NIOS_CPU_PIO6 /* PIO6 */ |
| 371 | #elif (CONFIG_SYS_NIOS_CPU_WDTOG_PIO == 7) |
| 372 | #define CONFIG_HW_WDTOG_BASE CONFIG_SYS_NIOS_CPU_PIO7 /* PIO7 */ |
| 373 | #elif (CONFIG_SYS_NIOS_CPU_WDTOG_PIO == 8) |
| 374 | #define CONFIG_HW_WDTOG_BASE CONFIG_SYS_NIOS_CPU_PIO8 /* PIO8 */ |
| 375 | #elif (CONFIG_SYS_NIOS_CPU_WDTOG_PIO == 9) |
| 376 | #define CONFIG_HW_WDTOG_BASE CONFIG_SYS_NIOS_CPU_PIO9 /* PIO9 */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 377 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 378 | #error *** CONFIG_SYS_ERROR: you have to setup at least one WDTOG_PIO in NIOS CPU config |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 379 | #endif |
| 380 | |
| 381 | #if defined(CONFIG_NIOS_BASE_32) /* NIOS CPU specifics */ |
| 382 | #define CONFIG_HW_WDENA_BIT 0 /* WD enable @ Bit 0 */ |
| 383 | #define CONFIG_HW_WDTOG_BIT 0 /* WD trigger @ Bit 0 */ |
| 384 | #define CONFIG_HW_WDPORT_WRONLY 1 /* each WD port wr/only*/ |
| 385 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 386 | #error *** CONFIG_SYS_ERROR: missing watchdog bit configuration, expand your config.h |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 387 | #endif |
| 388 | |
| 389 | #endif /* CONFIG_HW_WATCHDOG */ |
| 390 | |
| 391 | /*------------------------------------------------------------------------ |
| 392 | * SERIAL PERIPHAREL INTERFACE |
| 393 | *----------------------------------------------------------------------*/ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 394 | #if (CONFIG_SYS_NIOS_CPU_SPI_NUMS == 1) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 395 | |
| 396 | #define CONFIG_NIOS_SPI 1 /* SPI support active */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 397 | #define CONFIG_SYS_NIOS_SPIBASE CONFIG_SYS_NIOS_CPU_SPI0 |
| 398 | #define CONFIG_SYS_NIOS_SPIBITS CONFIG_SYS_NIOS_CPU_SPI0_BITS |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 399 | |
| 400 | #define CONFIG_RTC_DS1306 1 /* Dallas 1306 real time clock */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 401 | #define CONFIG_SYS_SPI_RTC_DEVID 0 /* as 1st SPI device */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 402 | |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 403 | #else |
| 404 | #undef CONFIG_NIOS_SPI /* NO SPI support */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 405 | #endif |
| 406 | |
| 407 | /*------------------------------------------------------------------------ |
| 408 | * Ethernet -- needs work! |
| 409 | *----------------------------------------------------------------------*/ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 410 | #if (CONFIG_SYS_NIOS_CPU_LAN_NUMS == 1) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 411 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 412 | #if (CONFIG_SYS_NIOS_CPU_LAN0_TYPE == 0) /* LAN91C111 */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 413 | |
| 414 | #define CONFIG_DRIVER_SMC91111 /* Using SMC91c111 */ |
| 415 | #undef CONFIG_SMC91111_EXT_PHY /* Internal PHY */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 416 | #define CONFIG_SMC91111_BASE (CONFIG_SYS_NIOS_CPU_LAN0_BASE + CONFIG_SYS_NIOS_CPU_LAN0_OFFS) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 417 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 418 | #if (CONFIG_SYS_NIOS_CPU_LAN0_BUSW == 32) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 419 | #define CONFIG_SMC_USE_32_BIT 1 |
| 420 | #else /* no */ |
| 421 | #undef CONFIG_SMC_USE_32_BIT |
| 422 | #endif |
| 423 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 424 | #elif (CONFIG_SYS_NIOS_CPU_LAN0_TYPE == 1) /* CS8900A */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 425 | |
| 426 | /********************************************/ |
| 427 | /* !!! CS8900 is __not__ tested on NIOS !!! */ |
| 428 | /********************************************/ |
| 429 | #define CONFIG_DRIVER_CS8900 /* Using CS8900 */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 430 | #define CS8900_BASE (CONFIG_SYS_NIOS_CPU_LAN0_BASE + CONFIG_SYS_NIOS_CPU_LAN0_OFFS) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 431 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 432 | #if (CONFIG_SYS_NIOS_CPU_LAN0_BUSW == 32) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 433 | #undef CS8900_BUS16 |
| 434 | #define CS8900_BUS32 1 |
| 435 | #else /* no */ |
| 436 | #define CS8900_BUS16 1 |
| 437 | #undef CS8900_BUS32 |
| 438 | #endif |
| 439 | |
| 440 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 441 | #error *** CONFIG_SYS_ERROR: invalid LAN0 chip type, check your NIOS CPU config |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 442 | #endif |
| 443 | |
| 444 | #define CONFIG_ETHADDR 02:80:ae:20:60:6f |
| 445 | #define CONFIG_NETMASK 255.255.255.248 |
| 446 | #define CONFIG_IPADDR 192.168.161.84 |
| 447 | #define CONFIG_SERVERIP 192.168.161.85 |
| 448 | |
| 449 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 450 | #error *** CONFIG_SYS_ERROR: you have to setup just one LAN only or expand your config.h |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 451 | #endif |
| 452 | |
| 453 | /*------------------------------------------------------------------------ |
| 454 | * STATUS LEDs |
| 455 | *----------------------------------------------------------------------*/ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 456 | #if (CONFIG_SYS_NIOS_CPU_PIO_NUMS != 0) && defined(CONFIG_SYS_NIOS_CPU_LED_PIO) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 457 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 458 | #if (CONFIG_SYS_NIOS_CPU_LED_PIO == 0) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 459 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 460 | #define STATUS_LED_BASE CONFIG_SYS_NIOS_CPU_PIO0 |
| 461 | #define STATUS_LED_BITS CONFIG_SYS_NIOS_CPU_PIO0_BITS |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 462 | #define STATUS_LED_ACTIVE 1 /* LED on for bit == 1 */ |
| 463 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 464 | #if (CONFIG_SYS_NIOS_CPU_PIO0_TYPE == 1) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 465 | #define STATUS_LED_WRONLY 1 |
| 466 | #else |
| 467 | #undef STATUS_LED_WRONLY |
| 468 | #endif |
| 469 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 470 | #elif (CONFIG_SYS_NIOS_CPU_LED_PIO == 1) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 471 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 472 | #define STATUS_LED_BASE CONFIG_SYS_NIOS_CPU_PIO1 |
| 473 | #define STATUS_LED_BITS CONFIG_SYS_NIOS_CPU_PIO1_BITS |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 474 | #define STATUS_LED_ACTIVE 1 /* LED on for bit == 1 */ |
| 475 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 476 | #if (CONFIG_SYS_NIOS_CPU_PIO1_TYPE == 1) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 477 | #define STATUS_LED_WRONLY 1 |
| 478 | #else |
| 479 | #undef STATUS_LED_WRONLY |
| 480 | #endif |
| 481 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 482 | #elif (CONFIG_SYS_NIOS_CPU_LED_PIO == 2) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 483 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 484 | #define STATUS_LED_BASE CONFIG_SYS_NIOS_CPU_PIO2 |
| 485 | #define STATUS_LED_BITS CONFIG_SYS_NIOS_CPU_PIO2_BITS |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 486 | #define STATUS_LED_ACTIVE 1 /* LED on for bit == 1 */ |
| 487 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 488 | #if (CONFIG_SYS_NIOS_CPU_PIO2_TYPE == 1) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 489 | #define STATUS_LED_WRONLY 1 |
| 490 | #else |
| 491 | #undef STATUS_LED_WRONLY |
| 492 | #endif |
| 493 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 494 | #elif (CONFIG_SYS_NIOS_CPU_LED_PIO == 3) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 495 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 496 | #error *** CONFIG_SYS_ERROR: status LEDs at PIO3 not supported, expand your config.h |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 497 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 498 | #elif (CONFIG_SYS_NIOS_CPU_LED_PIO == 4) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 499 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 500 | #error *** CONFIG_SYS_ERROR: status LEDs at PIO4 not supported, expand your config.h |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 501 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 502 | #elif (CONFIG_SYS_NIOS_CPU_LED_PIO == 5) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 503 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 504 | #error *** CONFIG_SYS_ERROR: status LEDs at PIO5 not supported, expand your config.h |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 505 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 506 | #elif (CONFIG_SYS_NIOS_CPU_LED_PIO == 6) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 507 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 508 | #error *** CONFIG_SYS_ERROR: status LEDs at PIO6 not supported, expand your config.h |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 509 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 510 | #elif (CONFIG_SYS_NIOS_CPU_LED_PIO == 7) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 511 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 512 | #error *** CONFIG_SYS_ERROR: status LEDs at PIO7 not supported, expand your config.h |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 513 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 514 | #elif (CONFIG_SYS_NIOS_CPU_LED_PIO == 8) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 515 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 516 | #error *** CONFIG_SYS_ERROR: status LEDs at PIO8 not supported, expand your config.h |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 517 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 518 | #elif (CONFIG_SYS_NIOS_CPU_LED_PIO == 9) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 519 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 520 | #error *** CONFIG_SYS_ERROR: status LEDs at PIO9 not supported, expand your config.h |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 521 | |
| 522 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 523 | #error *** CONFIG_SYS_ERROR: you have to set CONFIG_SYS_NIOS_CPU_LED_PIO in right case |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 524 | #endif |
| 525 | |
| 526 | #define CONFIG_STATUS_LED 1 /* enable status led driver */ |
| 527 | |
| 528 | #define STATUS_LED_BIT (1 << 0) /* LED[0] */ |
| 529 | #define STATUS_LED_STATE STATUS_LED_BLINKING |
| 530 | #define STATUS_LED_BOOT_STATE STATUS_LED_OFF |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 531 | #define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2) /* ca. 1 Hz */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 532 | #define STATUS_LED_BOOT 0 /* boot LED */ |
| 533 | |
| 534 | #if (STATUS_LED_BITS > 1) |
| 535 | #define STATUS_LED_BIT1 (1 << 1) /* LED[1] */ |
| 536 | #define STATUS_LED_STATE1 STATUS_LED_OFF |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 537 | #define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ / 10) /* ca. 5 Hz */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 538 | #define STATUS_LED_RED 1 /* fail LED */ |
| 539 | #endif |
| 540 | |
| 541 | #if (STATUS_LED_BITS > 2) |
| 542 | #define STATUS_LED_BIT2 (1 << 2) /* LED[2] */ |
| 543 | #define STATUS_LED_STATE2 STATUS_LED_OFF |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 544 | #define STATUS_LED_PERIOD2 (CONFIG_SYS_HZ / 2) /* ca. 1 Hz */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 545 | #define STATUS_LED_YELLOW 2 /* info LED */ |
| 546 | #endif |
| 547 | |
| 548 | #if (STATUS_LED_BITS > 3) |
| 549 | #define STATUS_LED_BIT3 (1 << 3) /* LED[3] */ |
| 550 | #define STATUS_LED_STATE3 STATUS_LED_OFF |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 551 | #define STATUS_LED_PERIOD3 (CONFIG_SYS_HZ / 2) /* ca. 1 Hz */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 552 | #define STATUS_LED_GREEN 3 /* info LED */ |
| 553 | #endif |
| 554 | |
| 555 | #define STATUS_LED_PAR 1 /* makes status_led.h happy */ |
| 556 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 557 | #endif /* CONFIG_SYS_NIOS_CPU_PIO_NUMS */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 558 | |
| 559 | /*------------------------------------------------------------------------ |
| 560 | * Diagnostics / Power On Self Tests |
| 561 | *----------------------------------------------------------------------*/ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 562 | #define CONFIG_POST CONFIG_SYS_POST_RTC |
| 563 | #define CONFIG_SYS_NIOS_POST_WORD_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 564 | |
Jon Loeliger | f5709d1 | 2007-07-10 09:02:57 -0500 | [diff] [blame] | 565 | /* |
| 566 | * BOOTP options |
| 567 | */ |
| 568 | #define CONFIG_BOOTP_BOOTFILESIZE |
| 569 | #define CONFIG_BOOTP_BOOTPATH |
| 570 | #define CONFIG_BOOTP_GATEWAY |
| 571 | #define CONFIG_BOOTP_HOSTNAME |
| 572 | |
Jon Loeliger | ea240f4 | 2007-07-05 19:13:52 -0500 | [diff] [blame] | 573 | /* |
| 574 | * Command line configuration. |
| 575 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 5c97fa7 | 2007-10-24 18:16:01 +0200 | [diff] [blame] | 576 | #include <config_cmd_default.h> |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 577 | |
Jean-Christophe PLAGNIOL-VILLARD | 5c97fa7 | 2007-10-24 18:16:01 +0200 | [diff] [blame] | 578 | #define CONFIG_CMD_BSP |
| 579 | #define CONFIG_CMD_CDP |
| 580 | #define CONFIG_CMD_DHCP |
| 581 | #define CONFIG_CMD_DIAG |
| 582 | #define CONFIG_CMD_DISPLAY |
| 583 | #define CONFIG_CMD_EXT2 |
| 584 | #define CONFIG_CMD_IMMAP |
| 585 | #define CONFIG_CMD_IRQ |
| 586 | #define CONFIG_CMD_PING |
| 587 | #define CONFIG_CMD_PORTIO |
| 588 | #define CONFIG_CMD_REGINFO |
| 589 | #define CONFIG_CMD_REISER |
| 590 | #define CONFIG_CMD_SAVES |
| 591 | #define CONFIG_CMD_SDRAM |
| 592 | #define CONFIG_CMD_SNTP |
| 593 | |
Jon Loeliger | ea240f4 | 2007-07-05 19:13:52 -0500 | [diff] [blame] | 594 | #undef CONFIG_CMD_NFS |
Jon Loeliger | ea240f4 | 2007-07-05 19:13:52 -0500 | [diff] [blame] | 595 | #undef CONFIG_CMD_XIMG |
| 596 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 597 | #if (CONFIG_SYS_NIOS_CPU_SPI_NUMS == 1) |
Jean-Christophe PLAGNIOL-VILLARD | 5c97fa7 | 2007-10-24 18:16:01 +0200 | [diff] [blame] | 598 | #define CONFIG_CMD_DATE |
| 599 | #define CONFIG_CMD_SPI |
Jon Loeliger | ea240f4 | 2007-07-05 19:13:52 -0500 | [diff] [blame] | 600 | #endif |
| 601 | |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 602 | /*------------------------------------------------------------------------ |
| 603 | * KGDB |
| 604 | *----------------------------------------------------------------------*/ |
Jon Loeliger | ea240f4 | 2007-07-05 19:13:52 -0500 | [diff] [blame] | 605 | #if defined(CONFIG_CMD_KGDB) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 606 | #define CONFIG_KGDB_BAUDRATE 9600 |
| 607 | #endif |
| 608 | |
| 609 | /*------------------------------------------------------------------------ |
| 610 | * MISC |
| 611 | *----------------------------------------------------------------------*/ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 612 | #define CONFIG_SYS_LONGHELP /* undef to save memory */ |
| 613 | #define CONFIG_SYS_HUSH_PARSER 1 /* use "hush" command parser |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 614 | undef to save memory */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 615 | #define CONFIG_SYS_PROMPT "ADNPESC1 > " /* Monitor Command Prompt */ |
| 616 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
| 617 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
| 618 | #define CONFIG_SYS_MAXARGS 64 /* max number of command args*/ |
| 619 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 620 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 621 | #ifdef CONFIG_SYS_HUSH_PARSER |
| 622 | #define CONFIG_SYS_PROMPT_HUSH_PS2 "[]> " |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 623 | #endif |
| 624 | |
| 625 | /* Default load address */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 626 | #if (CONFIG_SYS_SRAM_SIZE != 0) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 627 | |
| 628 | /* default in SRAM */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 629 | #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SRAM_BASE |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 630 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 631 | #elif (CONFIG_SYS_SDRAM_SIZE != 0) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 632 | |
| 633 | /* default in SDRAM */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 634 | #if (CONFIG_SYS_SDRAM_BASE == CONFIG_SYS_NIOS_CPU_VEC_BASE) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 635 | #if 1 |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 636 | #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_NIOS_CPU_VEC_SIZE) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 637 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 638 | #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + 0x400000) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 639 | #endif |
| 640 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 641 | #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 642 | #endif |
| 643 | |
| 644 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 645 | #undef CONFIG_SYS_LOAD_ADDR /* force error break */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 646 | #endif |
| 647 | |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 648 | /* MEM test area */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 649 | #if (CONFIG_SYS_SDRAM_SIZE != 0) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 650 | |
| 651 | /* SDRAM begin to stack area (1MB stack) */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 652 | #if (CONFIG_SYS_SDRAM_BASE == CONFIG_SYS_NIOS_CPU_VEC_BASE) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 653 | #if 0 |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 654 | #define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_NIOS_CPU_VEC_SIZE) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 655 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 656 | #define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + 0x400000) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 657 | #endif |
| 658 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 659 | #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 660 | #endif |
| 661 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 662 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_INIT_SP - (1024 * 1024)) |
| 663 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_INIT_SP - (1024 * 1024)) |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 664 | |
| 665 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 666 | #undef CONFIG_SYS_MEMTEST_START /* force error break */ |
| 667 | #undef CONFIG_SYS_MEMTEST_END |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 668 | #endif |
| 669 | |
Wolfgang Denk | 47f5779 | 2005-08-08 01:03:24 +0200 | [diff] [blame] | 670 | /* |
| 671 | * JFFS2 partitions |
| 672 | * |
| 673 | */ |
| 674 | /* No command line, one static partition */ |
Stefan Roese | b1423dd | 2009-03-19 13:30:36 +0100 | [diff] [blame] | 675 | #undef CONFIG_CMD_MTDPARTS |
Wolfgang Denk | 47f5779 | 2005-08-08 01:03:24 +0200 | [diff] [blame] | 676 | #define CONFIG_JFFS2_DEV "nor" |
| 677 | #define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF |
| 678 | #define CONFIG_JFFS2_PART_OFFSET 0x00000000 |
| 679 | |
| 680 | /* mtdparts command line support */ |
| 681 | /* |
Stefan Roese | b1423dd | 2009-03-19 13:30:36 +0100 | [diff] [blame] | 682 | #define CONFIG_CMD_MTDPARTS |
Wolfgang Denk | 47f5779 | 2005-08-08 01:03:24 +0200 | [diff] [blame] | 683 | #define MTDIDS_DEFAULT "" |
| 684 | #define MTDPARTS_DEFAULT "" |
| 685 | */ |
wdenk | e28cf63 | 2004-03-14 15:20:55 +0000 | [diff] [blame] | 686 | |
| 687 | #endif /* __CONFIG_H */ |