DK1S10.h 19 KB

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