MVBC_P.h 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. /*
  2. * (C) Copyright 2003-2004
  3. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. *
  5. * (C) Copyright 2004-2008
  6. * Matrix-Vision GmbH, andre.schwarz@matrix-vision.de
  7. *
  8. * See file CREDITS for list of people who contributed to this
  9. * project.
  10. *
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License as
  13. * published by the Free Software Foundation; either version 2 of
  14. * the License, or (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  24. * MA 02111-1307 USA
  25. */
  26. #ifndef __CONFIG_H
  27. #define __CONFIG_H
  28. #include <version.h>
  29. #define CONFIG_MPC5xxx 1
  30. #define CONFIG_MPC5200 1
  31. #define CFG_MPC5XXX_CLKIN 33000000
  32. #define BOOTFLAG_COLD 0x01
  33. #define BOOTFLAG_WARM 0x02
  34. #define CONFIG_MISC_INIT_R 1
  35. #define CFG_CACHELINE_SIZE 32
  36. #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
  37. #define CFG_CACHELINE_SHIFT 5
  38. #endif
  39. #define CONFIG_PSC_CONSOLE 1
  40. #define CONFIG_BAUDRATE 115200
  41. #define CFG_BAUDRATE_TABLE {9600, 19200, 38400, 57600, 115200, 230400}
  42. #define CONFIG_PCI 1
  43. #define CONFIG_PCI_PNP 1
  44. #undef CONFIG_PCI_SCAN_SHOW
  45. #define CONFIG_PCIAUTO_SKIP_HOST_BRIDGE 1
  46. #define CONFIG_PCI_MEM_BUS 0x40000000
  47. #define CONFIG_PCI_MEM_PHYS CONFIG_PCI_MEM_BUS
  48. #define CONFIG_PCI_MEM_SIZE 0x10000000
  49. #define CONFIG_PCI_IO_BUS 0x50000000
  50. #define CONFIG_PCI_IO_PHYS CONFIG_PCI_IO_BUS
  51. #define CONFIG_PCI_IO_SIZE 0x01000000
  52. #define CFG_XLB_PIPELINING 1
  53. #define CONFIG_HIGH_BATS 1
  54. #define MV_CI mvBlueCOUGAR-P
  55. #define MV_VCI mvBlueCOUGAR-P
  56. #define MV_FPGA_DATA 0xff860000
  57. #define MV_FPGA_SIZE 0x0003c886
  58. #define MV_KERNEL_ADDR 0xffc00000
  59. #define MV_INITRD_ADDR 0xff900000
  60. #define MV_INITRD_LENGTH 0x00300000
  61. #define MV_SCRATCH_ADDR 0x00000000
  62. #define MV_SCRATCH_LENGTH MV_INITRD_LENGTH
  63. #define MV_AUTOSCR_ADDR 0xff840000
  64. #define MV_AUTOSCR_ADDR2 0xff850000
  65. #define MV_DTB_ADDR 0xfffc0000
  66. #define CONFIG_SHOW_BOOT_PROGRESS 1
  67. #define MV_KERNEL_ADDR_RAM 0x00100000
  68. #define MV_DTB_ADDR_RAM 0x00600000
  69. #define MV_INITRD_ADDR_RAM 0x01000000
  70. /* pass open firmware flat tree */
  71. #define CONFIG_OF_LIBFDT 1
  72. #define CONFIG_OF_BOARD_SETUP 1
  73. #define OF_CPU "PowerPC,5200@0"
  74. #define OF_SOC "soc5200@f0000000"
  75. #define OF_TBCLK (bd->bi_busfreq / 4)
  76. #define MV_DTB_NAME mvbc-p.dtb
  77. #define CONFIG_OF_STDOUT_VIA_ALIAS 1
  78. /*
  79. * Supported commands
  80. */
  81. #include <config_cmd_default.h>
  82. #define CONFIG_CMD_CACHE
  83. #define CONFIG_CMD_NET
  84. #define CONFIG_CMD_PING
  85. #define CONFIG_CMD_DHCP
  86. #define CONFIG_CMD_SDRAM
  87. #define CONFIG_CMD_PCI
  88. #define CONFIG_CMD_FPGA
  89. #undef CONFIG_WATCHDOG
  90. #define CONFIG_BOOTP_VENDOREX
  91. #define CONFIG_BOOTP_SUBNETMASK
  92. #define CONFIG_BOOTP_GATEWAY
  93. #define CONFIG_BOOTP_DNS
  94. #define CONFIG_BOOTP_DNS2
  95. #define CONFIG_BOOTP_HOSTNAME
  96. #define CONFIG_BOOTP_BOOTFILESIZE
  97. #define CONFIG_BOOTP_BOOTPATH
  98. #define CONFIG_BOOTP_NTPSERVER
  99. #define CONFIG_BOOTP_RANDOM_DELAY
  100. #define CONFIG_BOOTP_SEND_HOSTNAME
  101. /*
  102. * Autoboot
  103. */
  104. #define CONFIG_BOOTDELAY 2
  105. #define CONFIG_AUTOBOOT_KEYED
  106. #define CONFIG_AUTOBOOT_STOP_STR "s"
  107. #define CONFIG_ZERO_BOOTDELAY_CHECK
  108. #define CONFIG_RESET_TO_RETRY 1000
  109. #define CONFIG_BOOTCOMMAND "if imi ${autoscr_addr}; \
  110. then autoscr ${autoscr_addr}; \
  111. else autoscr ${autoscr_addr2}; \
  112. fi;"
  113. #define CONFIG_BOOTARGS "root=/dev/ram ro rootfstype=squashfs"
  114. #define CONFIG_ENV_OVERWRITE
  115. #define XMK_STR(x) #x
  116. #define MK_STR(x) XMK_STR(x)
  117. #define CONFIG_EXTRA_ENV_SETTINGS \
  118. "console_nr=0\0" \
  119. "console=yes\0" \
  120. "stdin=serial\0" \
  121. "stdout=serial\0" \
  122. "stderr=serial\0" \
  123. "fpga=0\0" \
  124. "fpgadata=" MK_STR(MV_FPGA_DATA) "\0" \
  125. "fpgadatasize=" MK_STR(MV_FPGA_SIZE) "\0" \
  126. "autoscr_addr=" MK_STR(MV_AUTOSCR_ADDR) "\0" \
  127. "autoscr_addr2=" MK_STR(MV_AUTOSCR_ADDR2) "\0" \
  128. "mv_kernel_addr=" MK_STR(MV_KERNEL_ADDR) "\0" \
  129. "mv_kernel_addr_ram=" MK_STR(MV_KERNEL_ADDR_RAM) "\0" \
  130. "mv_initrd_addr=" MK_STR(MV_INITRD_ADDR) "\0" \
  131. "mv_initrd_addr_ram=" MK_STR(MV_INITRD_ADDR_RAM) "\0" \
  132. "mv_initrd_length=" MK_STR(MV_INITRD_LENGTH) "\0" \
  133. "mv_dtb_addr=" MK_STR(MV_DTB_ADDR) "\0" \
  134. "mv_dtb_addr_ram=" MK_STR(MV_DTB_ADDR_RAM) "\0" \
  135. "dtb_name=" MK_STR(MV_DTB_NAME) "\0" \
  136. "mv_scratch_addr=" MK_STR(MV_SCRATCH_ADDR) "\0" \
  137. "mv_scratch_length=" MK_STR(MV_SCRATCH_LENGTH) "\0" \
  138. "mv_version=" U_BOOT_VERSION "\0" \
  139. "dhcp_client_id=" MK_STR(MV_CI) "\0" \
  140. "dhcp_vendor-class-identifier=" MK_STR(MV_VCI) "\0" \
  141. "netretry=no\0" \
  142. "use_static_ipaddr=no\0" \
  143. "static_ipaddr=192.168.90.10\0" \
  144. "static_netmask=255.255.255.0\0" \
  145. "static_gateway=0.0.0.0\0" \
  146. "initrd_name=uInitrd.mvbc-p-rfs\0" \
  147. "zcip=no\0" \
  148. "netboot=yes\0" \
  149. "mvtest=Ff\0" \
  150. "tried_bootfromflash=no\0" \
  151. "tried_bootfromnet=no\0" \
  152. "use_dhcp=yes\0" \
  153. "gev_start=yes\0" \
  154. "mvbcdma_debug=0\0" \
  155. "mvbcia_debug=0\0" \
  156. "propdev_debug=0\0" \
  157. "gevss_debug=0\0" \
  158. "watchdog=1\0" \
  159. ""
  160. #undef XMK_STR
  161. #undef MK_STR
  162. /*
  163. * IPB Bus clocking configuration.
  164. */
  165. #define CFG_IPBCLK_EQUALS_XLBCLK
  166. #define CFG_PCICLK_EQUALS_IPBCLK_DIV2
  167. /*
  168. * Flash configuration
  169. */
  170. #undef CONFIG_FLASH_16BIT
  171. #define CFG_FLASH_CFI
  172. #define CFG_FLASH_CFI_DRIVER
  173. #define CFG_FLASH_CFI_AMD_RESET 1
  174. #define CFG_FLASH_EMPTY_INFO
  175. #define CFG_FLASH_ERASE_TOUT 50000
  176. #define CFG_FLASH_WRITE_TOUT 1000
  177. #define CFG_MAX_FLASH_BANKS 1
  178. #define CFG_MAX_FLASH_SECT 256
  179. #define CFG_LOWBOOT
  180. #define CFG_FLASH_BASE TEXT_BASE
  181. #define CFG_FLASH_SIZE 0x00800000
  182. /*
  183. * Environment settings
  184. */
  185. #define CFG_ENV_IS_IN_FLASH
  186. #undef CFG_FLASH_PROTECTION
  187. #define CFG_ENV_ADDR 0xFFFE0000
  188. #define CFG_ENV_SIZE 0x10000
  189. #define CFG_ENV_SECT_SIZE 0x10000
  190. #define CFG_ENV_ADDR_REDUND (CFG_ENV_ADDR+CFG_ENV_SIZE)
  191. #define CFG_ENV_SIZE_REDUND CFG_ENV_SIZE
  192. /*
  193. * Memory map
  194. */
  195. #define CFG_MBAR 0xF0000000
  196. #define CFG_SDRAM_BASE 0x00000000
  197. #define CFG_DEFAULT_MBAR 0x80000000
  198. #define CFG_INIT_RAM_ADDR MPC5XXX_SRAM
  199. #define CFG_INIT_RAM_END MPC5XXX_SRAM_SIZE
  200. #define CFG_GBL_DATA_SIZE 128
  201. #define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
  202. #define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
  203. #define CFG_MONITOR_BASE TEXT_BASE
  204. #if (CFG_MONITOR_BASE < CFG_FLASH_BASE)
  205. #define CFG_RAMBOOT 1
  206. #endif
  207. /* CFG_MONITOR_LEN must be a multiple of CFG_ENV_SECT_SIZE */
  208. #define CFG_MONITOR_LEN (512 << 10)
  209. #define CFG_MALLOC_LEN (512 << 10)
  210. #define CFG_BOOTMAPSZ (8 << 20)
  211. /*
  212. * Ethernet configuration
  213. */
  214. #define CONFIG_NET_MULTI
  215. #define CONFIG_NET_RETRY_COUNT 5
  216. #define CONFIG_E1000
  217. #define CONFIG_E1000_FALLBACK_MAC 0xb6b445ebfbc0
  218. #undef CONFIG_MPC5xxx_FEC
  219. #undef CONFIG_PHY_ADDR
  220. #define CONFIG_NETDEV eth0
  221. /*
  222. * Miscellaneous configurable options
  223. */
  224. #define CFG_HUSH_PARSER
  225. #define CONFIG_CMDLINE_EDITING
  226. #define CFG_PROMPT_HUSH_PS2 "> "
  227. #undef CFG_LONGHELP
  228. #define CFG_PROMPT "=> "
  229. #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
  230. #define CFG_CBSIZE 1024
  231. #else
  232. #define CFG_CBSIZE 256
  233. #endif
  234. #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16)
  235. #define CFG_MAXARGS 16
  236. #define CFG_BARGSIZE CFG_CBSIZE
  237. #define CFG_MEMTEST_START 0x00800000
  238. #define CFG_MEMTEST_END 0x02f00000
  239. #define CFG_HZ 1000
  240. /* default load address */
  241. #define CFG_LOAD_ADDR 0x02000000
  242. /* default location for tftp and bootm */
  243. #define CONFIG_LOADADDR 0x00200000
  244. /*
  245. * Various low-level settings
  246. */
  247. #define CFG_GPS_PORT_CONFIG 0x20000004
  248. #define CFG_HID0_INIT (HID0_ICE | HID0_ICFI)
  249. #define CFG_HID0_FINAL HID0_ICE
  250. #define CFG_BOOTCS_START CFG_FLASH_BASE
  251. #define CFG_BOOTCS_SIZE CFG_FLASH_SIZE
  252. #define CFG_BOOTCS_CFG 0x00047800
  253. #define CFG_CS0_START CFG_FLASH_BASE
  254. #define CFG_CS0_SIZE CFG_FLASH_SIZE
  255. #define CFG_CS_BURST 0x000000f0
  256. #define CFG_CS_DEADCYCLE 0x33333303
  257. #define CFG_RESET_ADDRESS 0x00000100
  258. #undef FPGA_DEBUG
  259. #undef CFG_FPGA_PROG_FEEDBACK
  260. #define CONFIG_FPGA CFG_ALTERA_CYCLON2
  261. #define CONFIG_FPGA_ALTERA 1
  262. #define CONFIG_FPGA_CYCLON2 1
  263. #define CONFIG_FPGA_COUNT 1
  264. #endif