MBX.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. /*
  2. * (C) Copyright 2000
  3. * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  4. * Marius Groeger <mgroeger@sysgo.de>
  5. *
  6. * Configuation settings for the MBX8xx board.
  7. *
  8. * -----------------------------------------------------------------
  9. * See file CREDITS for list of people who contributed to this
  10. * project.
  11. *
  12. * This program is free software; you can redistribute it and/or
  13. * modify it under the terms of the GNU General Public License as
  14. * published by the Free Software Foundation; either version 2 of
  15. * the License, or (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program; if not, write to the Free Software
  24. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  25. * MA 02111-1307 USA
  26. */
  27. /*
  28. * Changed 2002-10-01
  29. * Added PCMCIA defines mostly taken from other U-Boot boards that
  30. * have PCMCIA already working. If you find any bugs, incorrect assumptions
  31. * feel free to fix them yourself and submit a patch.
  32. * Rod Boyce <rod_boyce@stratexnet.com.
  33. */
  34. /*
  35. * board/config.h - configuration options, board specific
  36. */
  37. #ifndef __CONFIG_H
  38. #define __CONFIG_H
  39. /*
  40. * High Level Configuration Options
  41. * (easy to change)
  42. */
  43. #define CONFIG_MPC860 1 /* This is a MPC860 CPU */
  44. #define CONFIG_MBX 1 /* ...on an MBX module */
  45. #define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */
  46. #undef CONFIG_8xx_CONS_SMC2
  47. #undef CONFIG_8xx_CONS_NONE
  48. #define CONFIG_BAUDRATE 9600
  49. /* Define this to use the PCI bus */
  50. #undef CONFIG_USE_PCI
  51. #define CONFIG_CLOCKS_IN_MHZ 1 /* clocks passsed to Linux in MHz */
  52. #define CONFIG_8xx_GCLK_FREQ (50000000UL)
  53. #if 1
  54. #define CONFIG_BOOTDELAY -1 /* autoboot disabled */
  55. #else
  56. #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
  57. #endif
  58. #define CONFIG_BOOTCOMMAND "bootm 20000" /* autoboot command */
  59. #define CONFIG_BOOTARGS "root=/dev/nfs rw " \
  60. "nfsroot=10.0.0.2:/opt/eldk/ppc_8xx " \
  61. "nfsaddrs=10.0.0.99:10.0.0.2"
  62. #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
  63. #undef CFG_LOADS_BAUD_CHANGE /* don't allow baudrate change */
  64. #undef CONFIG_WATCHDOG /* watchdog disabled */
  65. /*
  66. * Command line configuration.
  67. */
  68. #define CONFIG_CMD_NET
  69. #define CONFIG_CMD_DFL
  70. #define CONFIG_CMD_SDRAM
  71. #define CONFIG_CMD_PCMCIA
  72. #define CONFIG_CMD_IDE
  73. #define CONFIG_DOS_PARTITION
  74. /*
  75. * Miscellaneous configurable options
  76. */
  77. #define CFG_LONGHELP /* undef to save memory */
  78. #define CFG_PROMPT "=> " /* Monitor Command Prompt */
  79. #undef CFG_HUSH_PARSER /* Hush parse for U-Boot */
  80. #ifdef CFG_HUSH_PARSER
  81. #define CFG_PROMPT_HUSH_PS2 "> "
  82. #endif
  83. #if defined(CONFIG_CMD_KGDB)
  84. #define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
  85. #else
  86. #define CFG_CBSIZE 256 /* Console I/O Buffer Size */
  87. #endif
  88. #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
  89. #define CFG_MAXARGS 16 /* max number of command args */
  90. #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
  91. #define CFG_MEMTEST_START 0x0400000 /* memtest works on */
  92. #define CFG_MEMTEST_END 0x0C00000 /* 4 ... 12 MB in DRAM */
  93. #define CFG_LOAD_ADDR 0x100000 /* default load address */
  94. #define CFG_HZ 1000 /* decrementer freq: 1 ms ticks */
  95. #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  96. /*
  97. * Low Level Configuration Settings
  98. * (address mappings, register initial values, etc.)
  99. * You should know what you are doing if you make changes here.
  100. */
  101. /*-----------------------------------------------------------------------
  102. * Physical memory map as defined by the MBX PGM
  103. */
  104. #define CFG_IMMR 0xFA200000 /* Internal Memory Mapped Register*/
  105. #define CFG_NVRAM_BASE 0xFA000000 /* NVRAM */
  106. #define CFG_NVRAM_OR 0xffe00000 /* w/o speed dependent flags!! */
  107. #define CFG_CSR_BASE 0xFA100000 /* Control/Status Registers */
  108. #define CFG_PCIMEM_BASE 0x80000000 /* PCI I/O and Memory Spaces */
  109. #define CFG_PCIMEM_OR 0xA0000108
  110. #define CFG_PCIBRIDGE_BASE 0xFA210000 /* PCI-Bus Bridge Registers */
  111. #define CFG_PCIBRIDGE_OR 0xFFFF0108
  112. /*-----------------------------------------------------------------------
  113. * Definitions for initial stack pointer and data area (in DPRAM)
  114. */
  115. #define CFG_INIT_RAM_ADDR CFG_IMMR
  116. #define CFG_INIT_RAM_END 0x2f00 /* End of used area in DPRAM */
  117. #define CFG_GBL_DATA_SIZE 64 /* size in bytes reserved for initial data */
  118. #define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
  119. #define CFG_INIT_VPD_SIZE 256 /* size in bytes reserved for vpd buffer */
  120. #define CFG_INIT_VPD_OFFSET (CFG_GBL_DATA_OFFSET - CFG_INIT_VPD_SIZE)
  121. #define CFG_INIT_SP_OFFSET (CFG_INIT_VPD_OFFSET-8)
  122. /*-----------------------------------------------------------------------
  123. * Offset in DPMEM where we keep the VPD data
  124. */
  125. #define CFG_DPRAMVPD (CFG_INIT_VPD_OFFSET - 0x2000)
  126. /*-----------------------------------------------------------------------
  127. * Start addresses for the final memory configuration
  128. * (Set up by the startup code)
  129. * Please note that CFG_SDRAM_BASE _must_ start at 0
  130. */
  131. #define CFG_SDRAM_BASE 0x00000000
  132. #define CFG_FLASH_BASE 0xfe000000
  133. #ifdef DEBUG
  134. #define CFG_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
  135. #else
  136. #define CFG_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
  137. #endif
  138. #undef CFG_MONITOR_BASE /* 0x200000 to run U-Boot from RAM */
  139. #define CFG_MONITOR_BASE CFG_FLASH_BASE
  140. #define CFG_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */
  141. /*
  142. * For booting Linux, the board info and command line data
  143. * have to be in the first 8 MB of memory, since this is
  144. * the maximum mapped by the Linux kernel during initialization.
  145. */
  146. #define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
  147. /*-----------------------------------------------------------------------
  148. * FLASH organization
  149. */
  150. #define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
  151. #define CFG_MAX_FLASH_SECT 16 /* max number of sectors on one chip */
  152. #define CFG_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
  153. #define CFG_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
  154. /*-----------------------------------------------------------------------
  155. * NVRAM Configuration
  156. *
  157. * Note: the MBX is special because there is already a firmware on this
  158. * board: EPPC-Bug from Motorola. To avoid collisions in NVRAM Usage, we
  159. * access the NVRAM at the offset 0x1000.
  160. */
  161. #define CFG_ENV_IS_IN_NVRAM 1 /* turn on NVRAM env feature */
  162. #define CFG_ENV_ADDR (CFG_NVRAM_BASE + 0x1000)
  163. #define CFG_ENV_SIZE 0x1000
  164. /*-----------------------------------------------------------------------
  165. * Cache Configuration
  166. */
  167. #define CFG_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */
  168. #if defined(CONFIG_CMD_KGDB)
  169. #define CFG_CACHELINE_SHIFT 4 /* log base 2 of the above value */
  170. #endif
  171. /*-----------------------------------------------------------------------
  172. * SYPCR - System Protection Control 11-9
  173. * SYPCR can only be written once after reset!
  174. *-----------------------------------------------------------------------
  175. * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
  176. */
  177. #if defined(CONFIG_WATCHDOG)
  178. #define CFG_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
  179. SYPCR_SWE | SYPCR_SWRI| SYPCR_SWP)
  180. #else
  181. #define CFG_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF)
  182. #endif
  183. /*-----------------------------------------------------------------------
  184. * SIUMCR - SIU Module Configuration 11-6
  185. *-----------------------------------------------------------------------
  186. * PCMCIA config., multi-function pin tri-state
  187. */
  188. /* #define CFG_SIUMCR (SIUMCR_DBGC11 | SIUMCR_DPC | SIUMCR_MLRC10 | SIUMCR_SEME) */
  189. #define CFG_SIUMCR (SIUMCR_DBGC11 | SIUMCR_DPC | SIUMCR_MLRC11 | SIUMCR_SEME | SIUMCR_BSC )
  190. /*-----------------------------------------------------------------------
  191. * TBSCR - Time Base Status and Control 11-26
  192. *-----------------------------------------------------------------------
  193. * Clear Reference Interrupt Status, Timebase freezing enabled
  194. */
  195. #define CFG_TBSCR (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF)
  196. /*-----------------------------------------------------------------------
  197. * PISCR - Periodic Interrupt Status and Control 11-31
  198. *-----------------------------------------------------------------------
  199. * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
  200. */
  201. #define CFG_PISCR (PISCR_PS | PISCR_PITF | PISCR_PTE)
  202. /*-----------------------------------------------------------------------
  203. * PLPRCR - PLL, Low-Power, and Reset Control Register 15-30
  204. *-----------------------------------------------------------------------
  205. * Reset PLL lock status sticky bit, timer expired status bit and timer
  206. * interrupt status bit - leave PLL multiplication factor unchanged !
  207. */
  208. #define CFG_PLPRCR (PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST)
  209. /*-----------------------------------------------------------------------
  210. * SCCR - System Clock and reset Control Register 15-27
  211. *-----------------------------------------------------------------------
  212. * Set clock output, timebase and RTC source and divider,
  213. * power management and some other internal clocks
  214. */
  215. #define SCCR_MASK (SCCR_RTDIV | SCCR_RTSEL)
  216. #define CFG_SCCR SCCR_TBS
  217. /*-----------------------------------------------------------------------
  218. * PCMCIA stuff
  219. *-----------------------------------------------------------------------
  220. *
  221. */
  222. #define CFG_PCMCIA_MEM_ADDR (0xE0000000)
  223. #define CFG_PCMCIA_MEM_SIZE ( 64 << 20 )
  224. #define CFG_PCMCIA_DMA_ADDR (0xE4000000)
  225. #define CFG_PCMCIA_DMA_SIZE ( 64 << 20 )
  226. #define CFG_PCMCIA_ATTRB_ADDR (0xE8000000)
  227. #define CFG_PCMCIA_ATTRB_SIZE ( 64 << 20 )
  228. #define CFG_PCMCIA_IO_ADDR (0xEC000000)
  229. #define CFG_PCMCIA_IO_SIZE ( 64 << 20 )
  230. #define CFG_PCMCIA_INTERRUPT SIU_LEVEL6
  231. #define CONFIG_PCMCIA_SLOT_A 1
  232. /*-----------------------------------------------------------------------
  233. * IDE/ATA stuff (Supports IDE harddisk on PCMCIA Adapter)
  234. *-----------------------------------------------------------------------
  235. */
  236. #define CONFIG_IDE_8xx_PCCARD 1 /* Use IDE with PC Card Adapter */
  237. #undef CONFIG_IDE_8xx_DIRECT /* Direct IDE not supported */
  238. #undef CONFIG_IDE_LED /* LED for ide not supported */
  239. #undef CONFIG_IDE_RESET /* reset for ide not supported */
  240. #define CFG_IDE_MAXBUS 1 /* max. 1 IDE bus */
  241. #define CFG_IDE_MAXDEVICE 1 /* max. 1 drive per IDE bus */
  242. #define CFG_ATA_IDE0_OFFSET 0x0000
  243. #define CFG_ATA_BASE_ADDR CFG_PCMCIA_MEM_ADDR
  244. /* Offset for data I/O */
  245. #define CFG_ATA_DATA_OFFSET (CFG_PCMCIA_MEM_SIZE + 0x320)
  246. /* Offset for normal register accesses */
  247. #define CFG_ATA_REG_OFFSET (2 * CFG_PCMCIA_MEM_SIZE + 0x320)
  248. /* Offset for alternate registers */
  249. #define CFG_ATA_ALT_OFFSET 0x0100
  250. /*-----------------------------------------------------------------------
  251. * Debug Entry Mode
  252. *-----------------------------------------------------------------------
  253. *
  254. */
  255. #define CFG_DER 0
  256. /*
  257. * Internal Definitions
  258. *
  259. * Boot Flags
  260. */
  261. #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
  262. #define BOOTFLAG_WARM 0x02 /* Software reboot */
  263. #endif /* __CONFIG_H */