DK1C20.h 19 KB

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