ppmc7xx.h 11 KB

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