DK1C20.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554
  1. /*
  2. * (C) Copyright 2003, Psyent Corporation <www.psyent.com>
  3. * Scott McNutt <smcnutt@psyent.com>
  4. * Stephan Linz <linz@li-pro.net>
  5. *
  6. * CompactFlash/IDE:
  7. * (C) Copyright 2004, Shlomo Kut <skut@vyyo.com>
  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. #ifndef __CONFIG_H
  28. #define __CONFIG_H
  29. /***********************************************************************
  30. * Include the whole NIOS CPU configuration.
  31. *
  32. * !!! HAVE TO BE HERE !!! DON'T MOVE THIS PART !!!
  33. *
  34. ***********************************************************************/
  35. #if defined(CONFIG_NIOS_SAFE_32)
  36. #include <configs/DK1C20_safe_32.h>
  37. #elif defined(CONFIG_NIOS_STANDARD_32)
  38. #include <configs/DK1C20_standard_32.h>
  39. #else
  40. #error *** CONFIG_SYS_ERROR: you have to setup right NIOS CPU configuration
  41. #endif
  42. /*------------------------------------------------------------------------
  43. * BOARD/CPU -- TOP-LEVEL
  44. *----------------------------------------------------------------------*/
  45. #define CONFIG_NIOS 1 /* NIOS-32 core */
  46. #define CONFIG_DK1C20 1 /* Cyclone DK-1C20 board*/
  47. #define CONFIG_SYS_CLK_FREQ CONFIG_SYS_NIOS_CPU_CLK/* 50 MHz core clock */
  48. #define CONFIG_SYS_HZ 1000 /* 1 msec time tick */
  49. #undef CONFIG_SYS_CLKS_IN_HZ
  50. #define CONFIG_BOARD_EARLY_INIT_F 1 /* enable early board-spec. init*/
  51. /*------------------------------------------------------------------------
  52. * BASE ADDRESSES / SIZE (Flash, SRAM, SDRAM)
  53. *----------------------------------------------------------------------*/
  54. #if (CONFIG_SYS_NIOS_CPU_SDRAM_SIZE != 0)
  55. #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_NIOS_CPU_SDRAM_BASE
  56. #define CONFIG_SYS_SDRAM_SIZE CONFIG_SYS_NIOS_CPU_SDRAM_SIZE
  57. #else
  58. #error *** CONFIG_SYS_ERROR: you have to setup any SDRAM in NIOS CPU config
  59. #endif
  60. #define CONFIG_SYS_SRAM_BASE CONFIG_SYS_NIOS_CPU_SRAM_BASE
  61. #define CONFIG_SYS_SRAM_SIZE CONFIG_SYS_NIOS_CPU_SRAM_SIZE
  62. #define CONFIG_SYS_VECT_BASE CONFIG_SYS_NIOS_CPU_VEC_BASE
  63. /*------------------------------------------------------------------------
  64. * MEMORY ORGANIZATION - For the most part, you can put things pretty
  65. * much anywhere. This is pretty flexible for Nios. So here we make some
  66. * arbitrary choices & assume that the monitor is placed at the end of
  67. * a memory resource (so you must make sure TEXT_BASE is chosen
  68. * appropriately).
  69. *
  70. * -The heap is placed below the monitor.
  71. * -Global data is placed below the heap.
  72. * -The stack is placed below global data (&grows down).
  73. *----------------------------------------------------------------------*/
  74. #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256k */
  75. #define CONFIG_SYS_GBL_DATA_SIZE 128 /* Global data size rsvd*/
  76. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024)
  77. #define CONFIG_SYS_MONITOR_BASE TEXT_BASE
  78. #define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_MONITOR_BASE - CONFIG_SYS_MALLOC_LEN)
  79. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_MALLOC_BASE - CONFIG_SYS_GBL_DATA_SIZE)
  80. #define CONFIG_SYS_INIT_SP CONFIG_SYS_GBL_DATA_OFFSET
  81. /*------------------------------------------------------------------------
  82. * FLASH (AM29LV065D)
  83. *----------------------------------------------------------------------*/
  84. #if (CONFIG_SYS_NIOS_CPU_FLASH_SIZE != 0)
  85. #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_NIOS_CPU_FLASH_BASE
  86. #define CONFIG_SYS_FLASH_SIZE CONFIG_SYS_NIOS_CPU_FLASH_SIZE
  87. #define CONFIG_SYS_MAX_FLASH_SECT 128 /* Max # sects per bank */
  88. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* Max # of flash banks */
  89. #define CONFIG_SYS_FLASH_ERASE_TOUT 8000 /* Erase timeout (msec) */
  90. #define CONFIG_SYS_FLASH_WRITE_TOUT 100 /* Write timeout (msec) */
  91. #define CONFIG_SYS_FLASH_WORD_SIZE unsigned char /* flash word size */
  92. #else
  93. #error *** CONFIG_SYS_ERROR: you have to setup any Flash memory in NIOS CPU config
  94. #endif
  95. /*------------------------------------------------------------------------
  96. * ENVIRONMENT
  97. *----------------------------------------------------------------------*/
  98. #if (CONFIG_SYS_NIOS_CPU_FLASH_SIZE != 0)
  99. #define CONFIG_ENV_IS_IN_FLASH 1 /* Environment in flash */
  100. #define CONFIG_ENV_ADDR CONFIG_SYS_FLASH_BASE /* Mem addr of env */
  101. #define CONFIG_ENV_SIZE (64 * 1024) /* 64 KByte (1 sector) */
  102. #define CONFIG_ENV_OVERWRITE /* Serial/eth change Ok */
  103. #else
  104. #define CONFIG_ENV_IS_NOWHERE 1 /* NO Environment */
  105. #endif
  106. /*------------------------------------------------------------------------
  107. * CONSOLE
  108. *----------------------------------------------------------------------*/
  109. #if (CONFIG_SYS_NIOS_CPU_UART_NUMS != 0)
  110. #define CONFIG_SYS_NIOS_CONSOLE CONFIG_SYS_NIOS_CPU_UART0 /* 1st UART is Cons. */
  111. #if (CONFIG_SYS_NIOS_CPU_UART0_BR != 0)
  112. #define CONFIG_SYS_NIOS_FIXEDBAUD 1 /* Baudrate is fixed */
  113. #define CONFIG_BAUDRATE CONFIG_SYS_NIOS_CPU_UART0_BR
  114. #else
  115. #undef CONFIG_SYS_NIOS_FIXEDBAUD
  116. #define CONFIG_BAUDRATE 115200
  117. #endif
  118. #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  119. #else
  120. #error *** CONFIG_SYS_ERROR: you have to setup at least one UART in NIOS CPU config
  121. #endif
  122. /*------------------------------------------------------------------------
  123. * TIMER FOR TIMEBASE -- Nios doesn't have the equivalent of ppc PIT,
  124. * so an avalon bus timer is required.
  125. *----------------------------------------------------------------------*/
  126. #if (CONFIG_SYS_NIOS_CPU_TIMER_NUMS != 0)
  127. #if (CONFIG_SYS_NIOS_CPU_TICK_TIMER == 0)
  128. #define CONFIG_SYS_NIOS_TMRBASE CONFIG_SYS_NIOS_CPU_TIMER0 /* TIMER0 as tick */
  129. #define CONFIG_SYS_NIOS_TMRIRQ CONFIG_SYS_NIOS_CPU_TIMER0_IRQ
  130. #if (CONFIG_SYS_NIOS_CPU_TIMER0_FP == 1) /* fixed period */
  131. #if (CONFIG_SYS_NIOS_CPU_TIMER0_PER >= CONFIG_SYS_HZ)
  132. #define CONFIG_SYS_NIOS_TMRMS (CONFIG_SYS_NIOS_CPU_TIMER0_PER / CONFIG_SYS_HZ)
  133. #else
  134. #error *** CONFIG_SYS_ERROR: you have to use a timer periode greater than CONFIG_SYS_HZ
  135. #endif
  136. #undef CONFIG_SYS_NIOS_TMRCNT /* no preloadable counter value */
  137. #elif (CONFIG_SYS_NIOS_CPU_TIMER0_FP == 0) /* variable period */
  138. #if (CONFIG_SYS_HZ <= 1000)
  139. #define CONFIG_SYS_NIOS_TMRMS (1000 / CONFIG_SYS_HZ)
  140. #else
  141. #error *** CONFIG_SYS_ERROR: sorry, CONFIG_SYS_HZ have to be less than 1000
  142. #endif
  143. #define CONFIG_SYS_NIOS_TMRCNT (CONFIG_SYS_CLK_FREQ / CONFIG_SYS_HZ)
  144. #else
  145. #error *** CONFIG_SYS_ERROR: you have to define CONFIG_SYS_NIOS_CPU_TIMER0_FP correct
  146. #endif
  147. #elif (CONFIG_SYS_NIOS_CPU_TICK_TIMER == 1)
  148. #define CONFIG_SYS_NIOS_TMRBASE CONFIG_SYS_NIOS_CPU_TIMER1 /* TIMER1 as tick */
  149. #define CONFIG_SYS_NIOS_TMRIRQ CONFIG_SYS_NIOS_CPU_TIMER1_IRQ
  150. #if (CONFIG_SYS_NIOS_CPU_TIMER1_FP == 1) /* fixed period */
  151. #if (CONFIG_SYS_NIOS_CPU_TIMER1_PER >= CONFIG_SYS_HZ)
  152. #define CONFIG_SYS_NIOS_TMRMS (CONFIG_SYS_NIOS_CPU_TIMER1_PER / CONFIG_SYS_HZ)
  153. #else
  154. #error *** CONFIG_SYS_ERROR: you have to use a timer periode greater than CONFIG_SYS_HZ
  155. #endif
  156. #undef CONFIG_SYS_NIOS_TMRCNT /* no preloadable counter value */
  157. #elif (CONFIG_SYS_NIOS_CPU_TIMER1_FP == 0) /* variable period */
  158. #if (CONFIG_SYS_HZ <= 1000)
  159. #define CONFIG_SYS_NIOS_TMRMS (1000 / CONFIG_SYS_HZ)
  160. #else
  161. #error *** CONFIG_SYS_ERROR: sorry, CONFIG_SYS_HZ have to be less than 1000
  162. #endif
  163. #define CONFIG_SYS_NIOS_TMRCNT (CONFIG_SYS_CLK_FREQ / CONFIG_SYS_HZ)
  164. #else
  165. #error *** CONFIG_SYS_ERROR: you have to define CONFIG_SYS_NIOS_CPU_TIMER1_FP correct
  166. #endif
  167. #endif /* CONFIG_SYS_NIOS_CPU_TICK_TIMER */
  168. #else
  169. #error *** CONFIG_SYS_ERROR: you have to setup at least one TIMER in NIOS CPU config
  170. #endif
  171. /*------------------------------------------------------------------------
  172. * Ethernet
  173. *----------------------------------------------------------------------*/
  174. #if (CONFIG_SYS_NIOS_CPU_LAN_NUMS == 1)
  175. #if (CONFIG_SYS_NIOS_CPU_LAN0_TYPE == 0) /* LAN91C111 */
  176. #define CONFIG_DRIVER_SMC91111 /* Using SMC91c111 */
  177. #undef CONFIG_SMC91111_EXT_PHY /* Internal PHY */
  178. #define CONFIG_SMC91111_BASE (CONFIG_SYS_NIOS_CPU_LAN0_BASE + CONFIG_SYS_NIOS_CPU_LAN0_OFFS)
  179. #if (CONFIG_SYS_NIOS_CPU_LAN0_BUSW == 32)
  180. #define CONFIG_SMC_USE_32_BIT 1
  181. #else /* no */
  182. #undef CONFIG_SMC_USE_32_BIT
  183. #endif
  184. #elif (CONFIG_SYS_NIOS_CPU_LAN0_TYPE == 1) /* CS8900A */
  185. /********************************************/
  186. /* !!! CS8900 is __not__ tested on NIOS !!! */
  187. /********************************************/
  188. #define CONFIG_DRIVER_CS8900 /* Using CS8900 */
  189. #define CS8900_BASE (CONFIG_SYS_NIOS_CPU_LAN0_BASE + CONFIG_SYS_NIOS_CPU_LAN0_OFFS)
  190. #if (CONFIG_SYS_NIOS_CPU_LAN0_BUSW == 32)
  191. #undef CS8900_BUS16
  192. #define CS8900_BUS32 1
  193. #else /* no */
  194. #define CS8900_BUS16 1
  195. #undef CS8900_BUS32
  196. #endif
  197. #else
  198. #error *** CONFIG_SYS_ERROR: invalid LAN0 chip type, check your NIOS CPU config
  199. #endif
  200. #define CONFIG_ETHADDR 08:00:3e:26:0a:5b
  201. #define CONFIG_NETMASK 255.255.255.0
  202. #define CONFIG_IPADDR 192.168.2.21
  203. #define CONFIG_SERVERIP 192.168.2.16
  204. #else
  205. #error *** CONFIG_SYS_ERROR: you have to setup just one LAN only or expand your config.h
  206. #endif
  207. /*------------------------------------------------------------------------
  208. * STATUS LEDs
  209. *----------------------------------------------------------------------*/
  210. #if (CONFIG_SYS_NIOS_CPU_PIO_NUMS != 0)
  211. #if (CONFIG_SYS_NIOS_CPU_LED_PIO == 0)
  212. #error *** CONFIG_SYS_ERROR: status LEDs at PIO0 not supported, expand your config.h
  213. #elif (CONFIG_SYS_NIOS_CPU_LED_PIO == 1)
  214. #error *** CONFIG_SYS_ERROR: status LEDs at PIO1 not supported, expand your config.h
  215. #elif (CONFIG_SYS_NIOS_CPU_LED_PIO == 2)
  216. #define STATUS_LED_BASE CONFIG_SYS_NIOS_CPU_PIO2
  217. #define STATUS_LED_BITS CONFIG_SYS_NIOS_CPU_PIO2_BITS
  218. #define STATUS_LED_ACTIVE 1 /* LED on for bit == 1 */
  219. #if (CONFIG_SYS_NIOS_CPU_PIO2_TYPE == 1)
  220. #define STATUS_LED_WRONLY 1
  221. #else
  222. #undef STATUS_LED_WRONLY
  223. #endif
  224. #elif (CONFIG_SYS_NIOS_CPU_LED_PIO == 3)
  225. #error *** CONFIG_SYS_ERROR: status LEDs at PIO3 not supported, expand your config.h
  226. #elif (CONFIG_SYS_NIOS_CPU_LED_PIO == 4)
  227. #error *** CONFIG_SYS_ERROR: status LEDs at PIO4 not supported, expand your config.h
  228. #elif (CONFIG_SYS_NIOS_CPU_LED_PIO == 5)
  229. #error *** CONFIG_SYS_ERROR: status LEDs at PIO5 not supported, expand your config.h
  230. #elif (CONFIG_SYS_NIOS_CPU_LED_PIO == 6)
  231. #error *** CONFIG_SYS_ERROR: status LEDs at PIO6 not supported, expand your config.h
  232. #elif (CONFIG_SYS_NIOS_CPU_LED_PIO == 7)
  233. #error *** CONFIG_SYS_ERROR: status LEDs at PIO7 not supported, expand your config.h
  234. #elif (CONFIG_SYS_NIOS_CPU_LED_PIO == 8)
  235. #error *** CONFIG_SYS_ERROR: status LEDs at PIO8 not supported, expand your config.h
  236. #elif (CONFIG_SYS_NIOS_CPU_LED_PIO == 9)
  237. #error *** CONFIG_SYS_ERROR: status LEDs at PIO9 not supported, expand your config.h
  238. #else
  239. #error *** CONFIG_SYS_ERROR: you have to set CONFIG_SYS_NIOS_CPU_LED_PIO in right case
  240. #endif
  241. #define CONFIG_STATUS_LED 1 /* enable status led driver */
  242. #define STATUS_LED_BIT (1 << 0) /* LED[0] */
  243. #define STATUS_LED_STATE STATUS_LED_BLINKING
  244. #define STATUS_LED_BOOT_STATE STATUS_LED_OFF
  245. #define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 10) /* ca. 1 Hz */
  246. #define STATUS_LED_BOOT 0 /* boot LED */
  247. #if (STATUS_LED_BITS > 1)
  248. #define STATUS_LED_BIT1 (1 << 1) /* LED[1] */
  249. #define STATUS_LED_STATE1 STATUS_LED_OFF
  250. #define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ / 50) /* ca. 5 Hz */
  251. #define STATUS_LED_RED 1 /* fail LED */
  252. #endif
  253. #if (STATUS_LED_BITS > 2)
  254. #define STATUS_LED_BIT2 (1 << 2) /* LED[2] */
  255. #define STATUS_LED_STATE2 STATUS_LED_OFF
  256. #define STATUS_LED_PERIOD2 (CONFIG_SYS_HZ / 10) /* ca. 1 Hz */
  257. #define STATUS_LED_YELLOW 2 /* info LED */
  258. #endif
  259. #if (STATUS_LED_BITS > 3)
  260. #define STATUS_LED_BIT3 (1 << 3) /* LED[3] */
  261. #define STATUS_LED_STATE3 STATUS_LED_OFF
  262. #define STATUS_LED_PERIOD3 (CONFIG_SYS_HZ / 10) /* ca. 1 Hz */
  263. #define STATUS_LED_GREEN 3 /* info LED */
  264. #endif
  265. #define STATUS_LED_PAR 1 /* makes status_led.h happy */
  266. #endif /* CONFIG_SYS_NIOS_CPU_PIO_NUMS */
  267. /*------------------------------------------------------------------------
  268. * SEVEN SEGMENT LED DISPLAY
  269. *----------------------------------------------------------------------*/
  270. #if (CONFIG_SYS_NIOS_CPU_PIO_NUMS != 0)
  271. #if (CONFIG_SYS_NIOS_CPU_SEVENSEG_PIO == 0)
  272. #error *** CONFIG_SYS_ERROR: seven segment display at PIO0 not supported, expand your config.h
  273. #elif (CONFIG_SYS_NIOS_CPU_SEVENSEG_PIO == 1)
  274. #error *** CONFIG_SYS_ERROR: seven segment display at PIO1 not supported, expand your config.h
  275. #elif (CONFIG_SYS_NIOS_CPU_SEVENSEG_PIO == 2)
  276. #error *** CONFIG_SYS_ERROR: seven segment display at PIO2 not supported, expand your config.h
  277. #elif (CONFIG_SYS_NIOS_CPU_SEVENSEG_PIO == 3)
  278. #define SEVENSEG_BASE CONFIG_SYS_NIOS_CPU_PIO3
  279. #define SEVENSEG_BITS CONFIG_SYS_NIOS_CPU_PIO3_BITS
  280. #define SEVENSEG_ACTIVE 0 /* LED on for bit == 1 */
  281. #if (CONFIG_SYS_NIOS_CPU_PIO3_TYPE == 1)
  282. #define SEVENSEG_WRONLY 1
  283. #else
  284. #undef SEVENSEG_WRONLY
  285. #endif
  286. #elif (CONFIG_SYS_NIOS_CPU_SEVENSEG_PIO == 4)
  287. #error *** CONFIG_SYS_ERROR: seven segment display at PIO4 not supported, expand your config.h
  288. #elif (CONFIG_SYS_NIOS_CPU_SEVENSEG_PIO == 5)
  289. #error *** CONFIG_SYS_ERROR: seven segment display at PIO5 not supported, expand your config.h
  290. #elif (CONFIG_SYS_NIOS_CPU_SEVENSEG_PIO == 6)
  291. #error *** CONFIG_SYS_ERROR: seven segment display at PIO6 not supported, expand your config.h
  292. #elif (CONFIG_SYS_NIOS_CPU_SEVENSEG_PIO == 7)
  293. #error *** CONFIG_SYS_ERROR: seven segment display at PIO7 not supported, expand your config.h
  294. #elif (CONFIG_SYS_NIOS_CPU_SEVENSEG_PIO == 8)
  295. #error *** CONFIG_SYS_ERROR: seven segment display at PIO8 not supported, expand your config.h
  296. #elif (CONFIG_SYS_NIOS_CPU_SEVENSEG_PIO == 9)
  297. #error *** CONFIG_SYS_ERROR: seven segment display at PIO9 not supported, expand your config.h
  298. #else
  299. #error *** CONFIG_SYS_ERROR: you have to set CONFIG_SYS_NIOS_CPU_SEVENSEG_PIO in right case
  300. #endif
  301. #define CONFIG_SEVENSEG 1 /* enable seven segment led driver */
  302. /*
  303. * Dual 7-Segment Display pin assignment -- read more in your
  304. * "Nios Development Board Reference Manual"
  305. *
  306. *
  307. * (U8) HI:D[15..8] (U9) LO:D[7..0]
  308. * ______ ______
  309. * | D14 | | D6 |
  310. * | | | |
  311. * D9| |D13 D1| |D5
  312. * |______| |______| ___
  313. * | D8 | | D0 | | A |
  314. * | | | | F|___|B
  315. * D10| |D12 D2| |D4 | G |
  316. * |______| |______| E|___|C
  317. * D11 * D3 * D *
  318. * D15 D7 DP
  319. *
  320. */
  321. #define SEVENSEG_DIGIT_HI_LO_EQUAL 1 /* high nibble equal low nibble */
  322. #define SEVENSEG_DIGIT_A (1 << 6) /* bit 6 is segment A */
  323. #define SEVENSEG_DIGIT_B (1 << 5) /* bit 5 is segment B */
  324. #define SEVENSEG_DIGIT_C (1 << 4) /* bit 4 is segment C */
  325. #define SEVENSEG_DIGIT_D (1 << 3) /* bit 3 is segment D */
  326. #define SEVENSEG_DIGIT_E (1 << 2) /* bit 2 is segment E */
  327. #define SEVENSEG_DIGIT_F (1 << 1) /* bit 1 is segment F */
  328. #define SEVENSEG_DIGIT_G (1 << 0) /* bit 0 is segment G */
  329. #define SEVENSEG_DIGIT_DP (1 << 7) /* bit 7 is decimal point */
  330. #endif /* CONFIG_SYS_NIOS_CPU_PIO_NUMS */
  331. /*------------------------------------------------------------------------
  332. * ASMI - Active Serial Memory Interface.
  333. *
  334. * ASMI is for Cyclone devices only and only works when the configuration
  335. * is loaded via JTAG or ASMI. Please see doc/README.dk1c20 for details.
  336. *----------------------------------------------------------------------*/
  337. #define CONFIG_NIOS_ASMI /* Enable ASMI */
  338. #define CONFIG_SYS_NIOS_ASMIBASE CONFIG_SYS_NIOS_CPU_ASMI0 /* ASMI base address */
  339. /*
  340. * BOOTP options
  341. */
  342. #define CONFIG_BOOTP_BOOTFILESIZE
  343. #define CONFIG_BOOTP_BOOTPATH
  344. #define CONFIG_BOOTP_GATEWAY
  345. #define CONFIG_BOOTP_HOSTNAME
  346. /*
  347. * Command line configuration.
  348. */
  349. #include <config_cmd_default.h>
  350. #define CONFIG_CMD_CDP
  351. #define CONFIG_CMD_DHCP
  352. #define CONFIG_CMD_DIAG
  353. #define CONFIG_CMD_DISPLAY
  354. #define CONFIG_CMD_EXT2
  355. #define CONFIG_CMD_FAT
  356. #define CONFIG_CMD_IDE
  357. #define CONFIG_CMD_IMMAP
  358. #define CONFIG_CMD_IRQ
  359. #define CONFIG_CMD_PING
  360. #define CONFIG_CMD_PORTIO
  361. #define CONFIG_CMD_REGINFO
  362. #define CONFIG_CMD_SAVES
  363. #define CONFIG_CMD_SDRAM
  364. #define CONFIG_CMD_SNTP
  365. #undef CONFIG_CMD_NFS
  366. #undef CONFIG_CMD_XIMG
  367. /*------------------------------------------------------------------------
  368. * COMPACT FLASH
  369. *----------------------------------------------------------------------*/
  370. #if defined(CONFIG_CMD_IDE)
  371. #define CONFIG_IDE_PREINIT /* Implement id_preinit */
  372. #define CONFIG_SYS_IDE_MAXBUS 1 /* 1 IDE bus */
  373. #define CONFIG_SYS_IDE_MAXDEVICE 1 /* 1 drive per IDE bus */
  374. #define CONFIG_SYS_ATA_BASE_ADDR 0x00920a00 /* IDE/ATA base addr */
  375. #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000 /* IDE0 offset */
  376. #define CONFIG_SYS_ATA_DATA_OFFSET 0x0040 /* Data IO offset */
  377. #define CONFIG_SYS_ATA_REG_OFFSET 0x0040 /* Register offset */
  378. #define CONFIG_SYS_ATA_ALT_OFFSET 0x0100 /* Alternate reg offset */
  379. #define CONFIG_SYS_ATA_STRIDE 4 /* Width betwix addrs */
  380. #define CONFIG_DOS_PARTITION
  381. /* Board-specific cf regs */
  382. #define CONFIG_SYS_CF_PRESENT 0x009209b0 /* CF Present PIO base */
  383. #define CONFIG_SYS_CF_POWER 0x009209c0 /* CF Power FET PIO base*/
  384. #define CONFIG_SYS_CF_ATASEL 0x009209d0 /* CF ATASEL PIO base */
  385. #endif
  386. /*------------------------------------------------------------------------
  387. * KGDB
  388. *----------------------------------------------------------------------*/
  389. #if defined(CONFIG_CMD_KGDB)
  390. #define CONFIG_KGDB_BAUDRATE 9600
  391. #endif
  392. /*------------------------------------------------------------------------
  393. * MISC
  394. *----------------------------------------------------------------------*/
  395. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  396. #define CONFIG_SYS_PROMPT "DK1C20 > " /* Monitor Command Prompt */
  397. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  398. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
  399. #define CONFIG_SYS_MAXARGS 16 /* max number of command args*/
  400. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
  401. #if (CONFIG_SYS_SRAM_SIZE != 0)
  402. #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SRAM_BASE /* Default load address */
  403. #else
  404. #undef CONFIG_SYS_LOAD_ADDR
  405. #endif
  406. #if (CONFIG_SYS_SDRAM_SIZE != 0)
  407. #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE /* SDRAM til stack area */
  408. #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_INIT_SP - (1024 * 1024)) /* 1MB stack */
  409. #else
  410. #undef CONFIG_SYS_MEMTEST_START
  411. #undef CONFIG_SYS_MEMTEST_END
  412. #endif
  413. /*
  414. * JFFS2 partitions
  415. *
  416. */
  417. /* No command line, one static partition, whole device */
  418. #undef CONFIG_CMD_MTDPARTS
  419. #define CONFIG_JFFS2_DEV "nor0"
  420. #define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF
  421. #define CONFIG_JFFS2_PART_OFFSET 0x00000000
  422. /* mtdparts command line support */
  423. /*
  424. #define CONFIG_CMD_MTDPARTS
  425. #define MTDIDS_DEFAULT ""
  426. #define MTDPARTS_DEFAULT ""
  427. */
  428. #endif /* __CONFIG_H */