ppmc7xx.h 11 KB

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