PCI5441.h 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. /*
  2. * (C) Copyright 2004, 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
  27. *----------------------------------------------------------------------*/
  28. #define CONFIG_PCI5441 1 /* PCI-5441 board */
  29. #define CONFIG_SYS_CLK_FREQ 50000000 /* 50 MHz core clk */
  30. #define CONFIG_SYS_RESET_ADDR 0x00000000 /* Hard-reset address */
  31. #define CONFIG_SYS_EXCEPTION_ADDR 0x01000020 /* Exception entry point*/
  32. #define CONFIG_SYS_NIOS_SYSID_BASE 0x00920828 /* System id address */
  33. #define CONFIG_BOARD_EARLY_INIT_F 1 /* enable early board-spec. init*/
  34. /*------------------------------------------------------------------------
  35. * CACHE -- the following will support II/s and II/f. The II/s does not
  36. * have dcache, so the cache instructions will behave as NOPs.
  37. *----------------------------------------------------------------------*/
  38. #define CONFIG_SYS_ICACHE_SIZE 4096 /* 4 KByte total */
  39. #define CONFIG_SYS_ICACHELINE_SIZE 32 /* 32 bytes/line */
  40. #define CONFIG_SYS_DCACHE_SIZE 2048 /* 2 KByte (II/f) */
  41. #define CONFIG_SYS_DCACHELINE_SIZE 4 /* 4 bytes/line (II/f) */
  42. /*------------------------------------------------------------------------
  43. * MEMORY BASE ADDRESSES
  44. *----------------------------------------------------------------------*/
  45. #define CONFIG_SYS_FLASH_BASE 0x00000000 /* FLASH base addr */
  46. #define CONFIG_SYS_FLASH_SIZE 0x00800000 /* 8 MByte */
  47. #define CONFIG_SYS_SDRAM_BASE 0x01000000 /* SDRAM base addr */
  48. #define CONFIG_SYS_SDRAM_SIZE 0x01000000 /* 16 MByte */
  49. /*------------------------------------------------------------------------
  50. * MEMORY ORGANIZATION
  51. * -Monitor at top.
  52. * -The heap is placed below the monitor.
  53. * -Global data is placed below the heap.
  54. * -The stack is placed below global data (&grows down).
  55. *----------------------------------------------------------------------*/
  56. #define CONFIG_SYS_MONITOR_LEN (128 * 1024) /* Reserve 128k */
  57. #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024)
  58. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
  59. #define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_MONITOR_BASE - CONFIG_SYS_MALLOC_LEN)
  60. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_MALLOC_BASE - GENERATED_GBL_DATA_SIZE)
  61. #define CONFIG_SYS_INIT_SP CONFIG_SYS_GBL_DATA_OFFSET
  62. /*------------------------------------------------------------------------
  63. * FLASH (AM29LV065D)
  64. *----------------------------------------------------------------------*/
  65. #define CONFIG_SYS_MAX_FLASH_SECT 128 /* Max # sects per bank */
  66. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* Max # of flash banks */
  67. #define CONFIG_SYS_FLASH_ERASE_TOUT 8000 /* Erase timeout (msec) */
  68. #define CONFIG_SYS_FLASH_WRITE_TOUT 100 /* Write timeout (msec) */
  69. #define CONFIG_SYS_FLASH_WORD_SIZE unsigned char /* flash word size */
  70. /*------------------------------------------------------------------------
  71. * ENVIRONMENT -- Put environment in sector CONFIG_SYS_MONITOR_LEN above
  72. * CONFIG_SYS_RESET_ADDR, since we assume the monitor is stored at the
  73. * reset address, no? This will keep the environment in user region
  74. * of flash. NOTE: the monitor length must be multiple of sector size
  75. * (which is common practice).
  76. *----------------------------------------------------------------------*/
  77. #define CONFIG_ENV_IS_IN_FLASH 1 /* Environment in flash */
  78. #define CONFIG_ENV_SIZE (64 * 1024) /* 64 KByte (1 sector) */
  79. #define CONFIG_ENV_OVERWRITE /* Serial change Ok */
  80. #define CONFIG_ENV_ADDR (CONFIG_SYS_RESET_ADDR + CONFIG_SYS_MONITOR_LEN)
  81. /*------------------------------------------------------------------------
  82. * CONSOLE
  83. *----------------------------------------------------------------------*/
  84. #define CONFIG_ALTERA_UART 1 /* Use altera uart */
  85. #if defined(CONFIG_ALTERA_JTAG_UART)
  86. #define CONFIG_SYS_NIOS_CONSOLE 0x00920820 /* JTAG UART base addr */
  87. #else
  88. #define CONFIG_SYS_NIOS_CONSOLE 0x009208a0 /* UART base addr */
  89. #endif
  90. #define CONFIG_SYS_NIOS_FIXEDBAUD 1 /* Baudrate is fixed */
  91. #define CONFIG_BAUDRATE 115200 /* Initial baudrate */
  92. #define CONFIG_SYS_BAUDRATE_TABLE {115200} /* It's fixed ;-) */
  93. #define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* Suppress console info*/
  94. /*------------------------------------------------------------------------
  95. * DEBUG
  96. *----------------------------------------------------------------------*/
  97. #undef CONFIG_ROM_STUBS /* Stubs not in ROM */
  98. /*------------------------------------------------------------------------
  99. * TIMEBASE --
  100. *
  101. * The high res timer defaults to 1 msec. Since it includes the period
  102. * registers, the interrupt frequency can be reduced using TMRCNT.
  103. * If the default period is acceptable, TMRCNT can be left undefined.
  104. * TMRMS represents the desired mecs per tick (msecs per interrupt).
  105. *----------------------------------------------------------------------*/
  106. #define CONFIG_SYS_HZ 1000 /* Always 1000 */
  107. #define CONFIG_SYS_LOW_RES_TIMER
  108. #define CONFIG_SYS_NIOS_TMRBASE 0x00920860 /* Tick timer base addr */
  109. #define CONFIG_SYS_NIOS_TMRIRQ 3 /* Timer IRQ num */
  110. #define CONFIG_SYS_NIOS_TMRMS 10 /* Desired period (msec)*/
  111. #define CONFIG_SYS_NIOS_TMRCNT \
  112. (CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
  113. /*
  114. * BOOTP options
  115. */
  116. #define CONFIG_BOOTP_BOOTFILESIZE
  117. #define CONFIG_BOOTP_BOOTPATH
  118. #define CONFIG_BOOTP_GATEWAY
  119. #define CONFIG_BOOTP_HOSTNAME
  120. /*
  121. * Command line configuration.
  122. */
  123. #define CONFIG_CMD_BDI
  124. #define CONFIG_CMD_ECHO
  125. #define CONFIG_CMD_SAVEENV
  126. #define CONFIG_CMD_FLASH
  127. #define CONFIG_CMD_IMI
  128. #define CONFIG_CMD_IRQ
  129. #define CONFIG_CMD_LOADS
  130. #define CONFIG_CMD_LOADB
  131. #define CONFIG_CMD_MEMORY
  132. #define CONFIG_CMD_MISC
  133. #define CONFIG_CMD_RUN
  134. #define CONFIG_CMD_SAVES
  135. /*------------------------------------------------------------------------
  136. * MISC
  137. *----------------------------------------------------------------------*/
  138. #define CONFIG_SYS_LONGHELP /* Provide extended help*/
  139. #define CONFIG_SYS_PROMPT "==> " /* Command prompt */
  140. #define CONFIG_SYS_CBSIZE 256 /* Console I/O buf size */
  141. #define CONFIG_SYS_MAXARGS 16 /* Max command args */
  142. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot arg buf size */
  143. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print buf size */
  144. #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE /* Default load address */
  145. #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE /* Start addr for test */
  146. #define CONFIG_SYS_MEMTEST_END CONFIG_SYS_INIT_SP - 0x00020000
  147. #endif /* __CONFIG_H */