DK1C20.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. /*
  2. * (C) Copyright 2003, Psyent Corporation <www.psyent.com>
  3. * Scott McNutt <smcnutt@psyent.com>
  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. * BOARD/CPU -- TOP-LEVEL
  27. *----------------------------------------------------------------------*/
  28. #define CONFIG_NIOS 1 /* NIOS-32 core */
  29. #define CONFIG_DK1C20 1 /* Cyclone DK-1C20 board*/
  30. #define CONFIG_SYS_CLK_FREQ 50000000 /* 50 MHz core clock */
  31. /*------------------------------------------------------------------------
  32. * BASE ADDRESSES
  33. *----------------------------------------------------------------------*/
  34. #define CFG_FLASH_BASE 0x00000000 /* Flash memory base */
  35. #define CFG_SRAM_BASE 0x00800000 /* External SRAM */
  36. #define CFG_SRAM_SIZE 0x00100000 /* 1 MByte */
  37. #define CFG_SDRAM_BASE 0x01000000 /* SDRAM base addr */
  38. #define CFG_SDRAM_SIZE 0x01000000 /* 16 MByte */
  39. #define CFG_VECT_BASE 0x008fff00 /* Vector table addr */
  40. /*------------------------------------------------------------------------
  41. * MEMORY ORGANIZATION - For the most part, you can put things pretty
  42. * much anywhere. This is pretty flexible for Nios. So here we make some
  43. * arbitrary choices & assume that the monitor is placed at the end of
  44. * a memory resource (so you must make sure TEXT_BASE is chosen
  45. * appropriately).
  46. *
  47. * -The heap is placed below the monitor.
  48. * -Global data is placed below the heap.
  49. * -The stack is placed below global data (&grows down).
  50. *----------------------------------------------------------------------*/
  51. #define CFG_MONITOR_LEN (256 * 1024) /* Reserve 256k */
  52. #define CFG_ENV_SIZE 0x10000 /* 64 KByte (1 sector) */
  53. #define CFG_GBL_DATA_SIZE 128 /* Global data size rsvd*/
  54. #define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024)
  55. #define CFG_MONITOR_BASE TEXT_BASE
  56. #define CFG_MALLOC_BASE (CFG_MONITOR_BASE - CFG_MALLOC_LEN)
  57. #define CFG_GBL_DATA_OFFSET (CFG_MALLOC_BASE -CFG_GBL_DATA_SIZE)
  58. #define CFG_INIT_SP CFG_GBL_DATA_OFFSET
  59. /*------------------------------------------------------------------------
  60. * FLASH
  61. *----------------------------------------------------------------------*/
  62. #define CFG_MAX_FLASH_SECT 128 /* Max # sects per bank */
  63. #define CFG_MAX_FLASH_BANKS 1 /* Max # of flash banks */
  64. #define CFG_FLASH_ERASE_TOUT 8000 /* Erase timeout (msec) */
  65. #define CFG_FLASH_WRITE_TOUT 100 /* Write timeout (msec) */
  66. /*------------------------------------------------------------------------
  67. * ENVIRONMENT
  68. *----------------------------------------------------------------------*/
  69. #define CFG_ENV_IS_IN_FLASH 1 /* Environment in flash */
  70. #define CFG_ENV_ADDR 0x00000000 /* Mem addr of env */
  71. #define CONFIG_ENV_OVERWRITE /* Serial/eth change Ok */
  72. /*------------------------------------------------------------------------
  73. * CONSOLE
  74. *----------------------------------------------------------------------*/
  75. #define CFG_NIOS_CONSOLE 0x00920900 /* Cons uart base addr */
  76. #define CFG_NIOS_FIXEDBAUD 1 /* Baudrate is fixed */
  77. #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  78. #define CONFIG_BAUDRATE 115200
  79. /*------------------------------------------------------------------------
  80. * TIMER FOR TIMEBASE -- Nios doesn't have the equivalent of ppc PIT,
  81. * so an avalon bus timer is required.
  82. *----------------------------------------------------------------------*/
  83. #define CFG_NIOS_TMRBASE 0x009209e0
  84. #define CFG_NIOS_TMRIRQ 50
  85. #define CFG_NIOS_TMRMS 10
  86. /*------------------------------------------------------------------------
  87. * Ethernet -- needs work!
  88. *----------------------------------------------------------------------*/
  89. #if 0
  90. #define CONFIG_DRIVER_SMC91111 /* Using SMC91c111 */
  91. #define CONFIG_SMC91111_BASE 0x00910000 /* Base address */
  92. #undef CONFIG_SMC91111_EXT_PHY /* No external PHY */
  93. #define CONFIG_SMC_USE_32_BIT 1 /* 32-bit i/f */
  94. #endif
  95. #define CONFIG_ETHADDR 08:00:3e:26:0a:5b
  96. #define CONFIG_NETMASK 255.255.255.0
  97. #define CONFIG_IPADDR 192.168.2.21
  98. #define CONFIG_SERVERIP 192.168.2.16
  99. /*------------------------------------------------------------------------
  100. * COMMANDS
  101. *----------------------------------------------------------------------*/
  102. #define CONFIG_COMMANDS (CFG_CMD_ALL & ~( \
  103. CFG_CMD_ASKENV | \
  104. CFG_CMD_BEDBUG | \
  105. CFG_CMD_BMP | \
  106. CFG_CMD_BSP | \
  107. CFG_CMD_CACHE | \
  108. CFG_CMD_DATE | \
  109. CFG_CMD_DOC | \
  110. CFG_CMD_DTT | \
  111. CFG_CMD_EEPROM | \
  112. CFG_CMD_ELF | \
  113. CFG_CMD_FAT | \
  114. CFG_CMD_FDC | \
  115. CFG_CMD_FDOS | \
  116. CFG_CMD_HWFLOW | \
  117. CFG_CMD_IDE | \
  118. CFG_CMD_I2C | \
  119. CFG_CMD_JFFS2 | \
  120. CFG_CMD_KGDB | \
  121. CFG_CMD_NAND | \
  122. CFG_CMD_NET | \
  123. CFG_CMD_MMC | \
  124. CFG_CMD_MII | \
  125. CFG_CMD_PCI | \
  126. CFG_CMD_PCMCIA | \
  127. CFG_CMD_SCSI | \
  128. CFG_CMD_SPI | \
  129. CFG_CMD_VFD | \
  130. CFG_CMD_USB ) )
  131. #include <cmd_confdefs.h>
  132. /*------------------------------------------------------------------------
  133. * KGDB
  134. *----------------------------------------------------------------------*/
  135. #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
  136. #define CONFIG_KGDB_BAUDRATE 9600
  137. #endif
  138. /*------------------------------------------------------------------------
  139. * MISC
  140. *----------------------------------------------------------------------*/
  141. #define CFG_LONGHELP /* undef to save memory */
  142. #define CFG_PROMPT "==> " /* Monitor Command Prompt */
  143. #define CFG_CBSIZE 256 /* Console I/O Buffer Size */
  144. #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
  145. #define CFG_MAXARGS 16 /* max number of command args */
  146. #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
  147. #undef CFG_CLKS_IN_HZ
  148. #define CFG_HZ 1562500
  149. #define CFG_LOAD_ADDR 0x00800000 /* Default load address */
  150. #define CFG_MEMTEST_START 0x00000000
  151. #define CFG_MEMTEST_END 0x00000000
  152. #endif /* __CONFIG_H */