ppmc7xx.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. /*
  2. * ppmc7xx.h
  3. * ---------
  4. *
  5. * Wind River PPMC 7xx/74xx board configuration file.
  6. *
  7. * By Richard Danter (richard.danter@windriver.com)
  8. * Copyright (C) 2005 Wind River Systems
  9. */
  10. #ifndef __CONFIG_H
  11. #define __CONFIG_H
  12. #define CONFIG_PPMC7XX
  13. /*===================================================================
  14. *
  15. * User configurable settings - Modify to your preference
  16. *
  17. *===================================================================
  18. */
  19. /*
  20. * Debug
  21. *
  22. * DEBUG - Define this is you want extra debug info
  23. * GTREGREAD - Required to build with debug
  24. * do_bdinfo - Required to build with debug
  25. */
  26. #undef DEBUG
  27. #ifdef DEBUG
  28. #define GTREGREAD(x) 0xFFFFFFFF
  29. #define do_bdinfo(a,b,c,d)
  30. #endif
  31. /*
  32. * CPU type
  33. *
  34. * CONFIG_7xx - We have a 750 or 755 CPU
  35. * CONFIG_74xx - We have a 7400 CPU
  36. * CONFIG_ALTIVEC - We have altivec enabled CPU (only 7400)
  37. * CONFIG_BUS_CLK - System bus clock in Hz
  38. */
  39. #define CONFIG_7xx
  40. #undef CONFIG_74xx
  41. #undef CONFIG_ALTIVEC
  42. #define CONFIG_BUS_CLK 66000000
  43. /*
  44. * Monitor configuration
  45. *
  46. * List of command sets to include in shell
  47. *
  48. * The following command sets have been tested and known to work:
  49. *
  50. * CMD_CACHE - Cache control commands
  51. * CMD_MEMORY - Memory display, change and test commands
  52. * CMD_FLASH - Erase and program flash
  53. * CMD_ENV - Environment commands
  54. * CMD_RUN - Run commands stored in env vars
  55. * CMD_ELF - Load ELF files
  56. * CMD_NET - Networking/file download commands
  57. * CMD_PIN - ICMP Echo Request command
  58. * CMD_PCI - PCI Bus scanning command
  59. */
  60. /*
  61. * BOOTP options
  62. */
  63. #define CONFIG_BOOTP_BOOTFILESIZE
  64. #define CONFIG_BOOTP_BOOTPATH
  65. #define CONFIG_BOOTP_GATEWAY
  66. #define CONFIG_BOOTP_HOSTNAME
  67. /*
  68. * Command line configuration.
  69. */
  70. #include <config_cmd_default.h>
  71. #define CONFIG_CMD_FLASH
  72. #define CONFIG_CMD_ENV
  73. #define CONFIG_CMD_RUN
  74. #define CONFIG_CMD_ELF
  75. #define CONFIG_CMD_NET
  76. #define CONFIG_CMD_PING
  77. #define CONFIG_CMD_PCI
  78. #undef CONFIG_CMD_KGDB
  79. /*
  80. * Serial configuration
  81. *
  82. * CONFIG_CONS_INDEX - Serial console port number (COM1)
  83. * CONFIG_BAUDRATE - Serial speed
  84. */
  85. #define CONFIG_CONS_INDEX 1
  86. #define CONFIG_BAUDRATE 9600
  87. /*
  88. * PCI config
  89. *
  90. * CONFIG_PCI - Enable PCI bus
  91. * CONFIG_PCI_PNP - Enable Plug & Play support
  92. * CONFIG_PCI_SCAN_SHOW - Enable display of devices at startup
  93. */
  94. #define CONFIG_PCI
  95. #define CONFIG_PCI_PNP
  96. #undef CONFIG_PCI_SCAN_SHOW
  97. /*
  98. * Network config
  99. *
  100. * CONFIG_NET_MULTI - Support for multiple network interfaces
  101. * CONFIG_EEPRO100 - Intel 8255x Ethernet Controller
  102. * CONFIG_EEPRO100_SROM_WRITE - Enable writing to network card ROM
  103. */
  104. #define CONFIG_NET_MULTI
  105. #define CONFIG_EEPRO100
  106. #define CONFIG_EEPRO100_SROM_WRITE
  107. /*
  108. * Enable extra init functions
  109. *
  110. * CONFIG_MISC_INIT_F - Call pre-relocation init functions
  111. * CONFIG_MISC_INIT_R - Call post relocation init functions
  112. */
  113. #undef CONFIG_MISC_INIT_F
  114. #define CONFIG_MISC_INIT_R
  115. /*
  116. * Boot config
  117. *
  118. * CONFIG_BOOTCOMMAND - Command(s) to execute to auto-boot
  119. * CONFIG_BOOTDELAY - How long to wait before auto-boot (in sec)
  120. */
  121. #define CONFIG_BOOTCOMMAND \
  122. "bootp;" \
  123. "setenv bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath) " \
  124. "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off;" \
  125. "bootm"
  126. #define CONFIG_BOOTDELAY 5
  127. /*===================================================================
  128. *
  129. * Board configuration settings - You should not need to modify these
  130. *
  131. *===================================================================
  132. */
  133. /*
  134. * Memory map
  135. *
  136. * This board runs in a standard CHRP (Map-B) configuration.
  137. *
  138. * Type Start End Size Width Chip Sel
  139. * ----------- ----------- ----------- ------- ------- --------
  140. * SDRAM 0x00000000 0x04000000 64MB 64b SDRAMCS0
  141. * User LED's 0x78000000 RCS3
  142. * UART 0x7C000000 RCS2
  143. * Mailbox 0xFF000000 RCS1
  144. * Flash 0xFFC00000 0xFFFFFFFF 4MB 64b RCS0
  145. *
  146. * Flash sectors are laid out as follows.
  147. *
  148. * Sector Start End Size Comments
  149. * ------- ----------- ----------- ------- -----------
  150. * 0 0xFFC00000 0xFFC3FFFF 256KB
  151. * 1 0xFFC40000 0xFFC7FFFF 256KB
  152. * 2 0xFFC80000 0xFFCBFFFF 256KB
  153. * 3 0xFFCC0000 0xFFCFFFFF 256KB
  154. * 4 0xFFD00000 0xFFD3FFFF 256KB
  155. * 5 0xFFD40000 0xFFD7FFFF 256KB
  156. * 6 0xFFD80000 0xFFDBFFFF 256KB
  157. * 7 0xFFDC0000 0xFFDFFFFF 256KB
  158. * 8 0xFFE00000 0xFFE3FFFF 256KB
  159. * 9 0xFFE40000 0xFFE7FFFF 256KB
  160. * 10 0xFFE80000 0xFFEBFFFF 256KB
  161. * 11 0xFFEC0000 0xFFEFFFFF 256KB
  162. * 12 0xFFF00000 0xFFF3FFFF 256KB U-Boot code here
  163. * 13 0xFFF40000 0xFFF7FFFF 256KB
  164. * 14 0xFFF80000 0xFFFBFFFF 256KB
  165. * 15 0xFFFC0000 0xFFFDFFFF 128KB
  166. * 16 0xFFFE0000 0xFFFE7FFF 32KB U-Boot env vars here
  167. * 17 0xFFFE8000 0xFFFEFFFF 32KB U-Boot backup copy of env vars here
  168. * 18 0xFFFF0000 0xFFFFFFFF 64KB
  169. */
  170. /*
  171. * SDRAM config - see memory map details above.
  172. *
  173. * CFG_SDRAM_BASE - Start address of SDRAM, this _must_ be zero!
  174. * CFG_SDRAM_SIZE - Total size of contiguous SDRAM bank(s)
  175. */
  176. #define CFG_SDRAM_BASE 0x00000000
  177. #define CFG_SDRAM_SIZE 0x04000000
  178. /*
  179. * Flash config - see memory map details above.
  180. *
  181. * CFG_FLASH_BASE - Start address of flash memory
  182. * CFG_FLASH_SIZE - Total size of contiguous flash mem
  183. * CFG_FLASH_ERASE_TOUT - Erase timeout in ms
  184. * CFG_FLASH_WRITE_TOUT - Write timeout in ms
  185. * CFG_MAX_FLASH_BANKS - Number of banks of flash on board
  186. * CFG_MAX_FLASH_SECT - Number of sectors in a bank
  187. */
  188. #define CFG_FLASH_BASE 0xFFC00000
  189. #define CFG_FLASH_SIZE 0x00400000
  190. #define CFG_FLASH_ERASE_TOUT 250000
  191. #define CFG_FLASH_WRITE_TOUT 5000
  192. #define CFG_MAX_FLASH_BANKS 1
  193. #define CFG_MAX_FLASH_SECT 19
  194. /*
  195. * Monitor config - see memory map details above
  196. *
  197. * CFG_MONITOR_BASE - Base address of monitor code
  198. * CFG_MALLOC_LEN - Size of malloc pool (128KB)
  199. */
  200. #define CFG_MONITOR_BASE TEXT_BASE
  201. #define CFG_MALLOC_LEN 0x20000
  202. /*
  203. * Command shell settings
  204. *
  205. * CFG_BARGSIZE - Boot Argument buffer size
  206. * CFG_BOOTMAPSZ - Size of app's mapped RAM at boot (Linux=8MB)
  207. * CFG_CBSIZE - Console Buffer (input) size
  208. * CFG_LOAD_ADDR - Default load address
  209. * CFG_LONGHELP - Provide more detailed help
  210. * CFG_MAXARGS - Number of args accepted by monitor commands
  211. * CFG_MEMTEST_START - Start address of test to run on RAM
  212. * CFG_MEMTEST_END - End address of RAM test
  213. * CFG_PBSIZE - Print Buffer (output) size
  214. * CFG_PROMPT - Prompt string
  215. */
  216. #define CFG_BARGSIZE 1024
  217. #define CFG_BOOTMAPSZ 0x800000
  218. #define CFG_CBSIZE 1024
  219. #define CFG_LOAD_ADDR 0x100000
  220. #define CFG_LONGHELP
  221. #define CFG_MAXARGS 16
  222. #define CFG_MEMTEST_START 0x00040000
  223. #define CFG_MEMTEST_END 0x00040100
  224. #define CFG_PBSIZE 1024
  225. #define CFG_PROMPT "=> "
  226. /*
  227. * Environment config - see memory map details above
  228. *
  229. * CFG_ENV_IS_IN_FLASH - The env variables are stored in flash
  230. * CFG_ENV_ADDR - Address of the sector containing env vars
  231. * CFG_ENV_SIZE - Ammount of RAM for env vars (used to save RAM, 4KB)
  232. * CFG_ENV_SECT_SIZE - Size of sector containing env vars (32KB)
  233. */
  234. #define CFG_ENV_IS_IN_FLASH 1
  235. #define CFG_ENV_ADDR 0xFFFE0000
  236. #define CFG_ENV_SIZE 0x1000
  237. #define CFG_ENV_ADDR_REDUND 0xFFFE8000
  238. #define CFG_ENV_SIZE_REDUND 0x1000
  239. #define CFG_ENV_SECT_SIZE 0x8000
  240. /*
  241. * Initial RAM config
  242. *
  243. * Since the main system RAM is initialised very early, we place the INIT_RAM
  244. * in the main system RAM just above the exception vectors. The contents are
  245. * copied to top of RAM by the init code.
  246. *
  247. * CFG_INIT_RAM_ADDR - Address of Init RAM, above exception vect
  248. * CFG_INIT_RAM_END - Size of Init RAM
  249. * CFG_GBL_DATA_SIZE - Ammount of RAM to reserve for global data
  250. * CFG_GBL_DATA_OFFSET - Start of global data, top of stack
  251. */
  252. #define CFG_INIT_RAM_ADDR (CFG_SDRAM_BASE + 0x4000)
  253. #define CFG_INIT_RAM_END 0x4000
  254. #define CFG_GBL_DATA_SIZE 128
  255. #define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
  256. /*
  257. * Initial BAT config
  258. *
  259. * BAT0 - System SDRAM
  260. * BAT1 - LED's and Serial Port
  261. * BAT2 - PCI Memory
  262. * BAT3 - PCI I/O including Flash Memory
  263. */
  264. #define CFG_IBAT0L (CFG_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
  265. #define CFG_IBAT0U (CFG_SDRAM_BASE | BATU_BL_64M | BATU_VS | BATU_VP)
  266. #define CFG_DBAT0L CFG_IBAT0L
  267. #define CFG_DBAT0U CFG_IBAT0U
  268. #define CFG_IBAT1L (0x70000000 | BATL_PP_RW | BATL_CACHEINHIBIT)
  269. #define CFG_IBAT1U (0x70000000 | BATU_BL_256M | BATU_VS | BATU_VP)
  270. #define CFG_DBAT1L (0x70000000 | BATL_PP_RW | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  271. #define CFG_DBAT1U (0x70000000 | BATU_BL_256M | BATU_VS | BATU_VP)
  272. #define CFG_IBAT2L (0x80000000 | BATL_PP_RW | BATL_CACHEINHIBIT)
  273. #define CFG_IBAT2U (0x80000000 | BATU_BL_256M | BATU_VS | BATU_VP)
  274. #define CFG_DBAT2L (0x80000000 | BATL_PP_RW | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  275. #define CFG_DBAT2U (0x80000000 | BATU_BL_256M | BATU_VS | BATU_VP)
  276. #define CFG_IBAT3L (0xF0000000 | BATL_PP_RW | BATL_CACHEINHIBIT)
  277. #define CFG_IBAT3U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP)
  278. #define CFG_DBAT3L (0xF0000000 | BATL_PP_RW | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  279. #define CFG_DBAT3U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP)
  280. /*
  281. * Cache config
  282. *
  283. * CFG_CACHELINE_SIZE - Size of a cache line (CPU specific)
  284. * CFG_L2 - L2 cache enabled if defined
  285. * L2_INIT - L2 cache init flags
  286. * L2_ENABLE - L2 cache enable flags
  287. */
  288. #define CFG_CACHELINE_SIZE 32
  289. #undef CFG_L2
  290. #define L2_INIT 0
  291. #define L2_ENABLE 0
  292. /*
  293. * Clocks config
  294. *
  295. * CFG_BUS_HZ - Bus clock frequency in Hz
  296. * CFG_BUS_CLK - As above (?)
  297. * CFG_HZ - Decrementer freq in Hz
  298. */
  299. #define CFG_BUS_HZ CONFIG_BUS_CLK
  300. #define CFG_BUS_CLK CONFIG_BUS_CLK
  301. #define CFG_HZ 1000
  302. /*
  303. * Serial port config
  304. *
  305. * CFG_BAUDRATE_TABLE - List of valid baud rates
  306. * CFG_NS16550 - Include the NS16550 driver
  307. * CFG_NS16550_SERIAL - Include the serial (wrapper) driver
  308. * CFG_NS16550_CLK - Frequency of reference clock
  309. * CFG_NS16550_REG_SIZE - 64-bit accesses to 8-bit port
  310. * CFG_NS16550_COM1 - Base address of 1st serial port
  311. */
  312. #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  313. #define CFG_NS16550
  314. #define CFG_NS16550_SERIAL
  315. #define CFG_NS16550_CLK 3686400
  316. #define CFG_NS16550_REG_SIZE -8
  317. #define CFG_NS16550_COM1 0x7C000000
  318. /*
  319. * PCI Config - Address Map B (CHRP)
  320. */
  321. #define CFG_PCI_MEMORY_BUS 0x00000000
  322. #define CFG_PCI_MEMORY_PHYS 0x00000000
  323. #define CFG_PCI_MEMORY_SIZE 0x40000000
  324. #define CFG_PCI_MEM_BUS 0x80000000
  325. #define CFG_PCI_MEM_PHYS 0x80000000
  326. #define CFG_PCI_MEM_SIZE 0x7D000000
  327. #define CFG_ISA_MEM_BUS 0x00000000
  328. #define CFG_ISA_MEM_PHYS 0xFD000000
  329. #define CFG_ISA_MEM_SIZE 0x01000000
  330. #define CFG_PCI_IO_BUS 0x00800000
  331. #define CFG_PCI_IO_PHYS 0xFE800000
  332. #define CFG_PCI_IO_SIZE 0x00400000
  333. #define CFG_ISA_IO_BUS 0x00000000
  334. #define CFG_ISA_IO_PHYS 0xFE000000
  335. #define CFG_ISA_IO_SIZE 0x00800000
  336. #define CFG_ISA_IO_BASE_ADDRESS CFG_ISA_IO_PHYS
  337. #define CFG_ISA_IO CFG_ISA_IO_PHYS
  338. #define CFG_60X_PCI_IO_OFFSET CFG_ISA_IO_PHYS
  339. /*
  340. * Extra init functions
  341. *
  342. * CFG_BOARD_ASM_INIT - Call assembly init code
  343. */
  344. #define CFG_BOARD_ASM_INIT
  345. /*
  346. * Boot flags
  347. *
  348. * BOOTFLAG_COLD - Indicates a power-on boot
  349. * BOOTFLAG_WARM - Indicates a software reset
  350. */
  351. #define BOOTFLAG_COLD 0x01
  352. #define BOOTFLAG_WARM 0x02
  353. #endif /* __CONFIG_H */