GTH.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389
  1. /*
  2. * Parameters for GTH board
  3. * Based on FADS860T
  4. * by thomas.lange@corelatus.com
  5. * A collection of structures, addresses, and values associated with
  6. * the Motorola 860T FADS board. Copied from the MBX stuff.
  7. * Magnus Damm added defines for 8xxrom and extended bd_info.
  8. * Helmut Buchsbaum added bitvalues for BCSRx
  9. *
  10. * Copyright (c) 1998 Dan Malek (dmalek@jlc.net)
  11. */
  12. /*
  13. * ff000000 -> ff00ffff : IMAP internal in the cpu
  14. * e0000000 -> ennnnnnn : pcmcia
  15. * 98000000 -> 983nnnnn : FPGA 4MB
  16. * 90000000 -> 903nnnnn : FPGA 4MB
  17. * 80000000 -> 80nnnnnn : flash connected to CS0, final ( real ) location
  18. * 00000000 -> nnnnnnnn : sdram
  19. */
  20. /* ------------------------------------------------------------------------- */
  21. /*
  22. * board/config.h - configuration options, board specific
  23. */
  24. #ifndef __CONFIG_H
  25. #define __CONFIG_H
  26. /*
  27. * High Level Configuration Options
  28. * (easy to change)
  29. */
  30. #include <mpc8xx_irq.h>
  31. #define CONFIG_MPC860 1
  32. #define CONFIG_MPC860T 1
  33. #define CONFIG_GTH 1
  34. #define CONFIG_MISC_INIT_R 1
  35. #define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */
  36. #undef CONFIG_8xx_CONS_SMC2
  37. #undef CONFIG_8xx_CONS_NONE
  38. #define CONFIG_BAUDRATE 9600
  39. #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
  40. #define MPC8XX_FACT 3 /* Multiply by 3 */
  41. #define MPC8XX_XIN 16384000 /* 16.384 MHz */
  42. #define MPC8XX_HZ ((MPC8XX_XIN) * (MPC8XX_FACT))
  43. #define CONFIG_BOOTDELAY 1 /* autoboot after 0 seconds */
  44. #define CONFIG_ENV_OVERWRITE 1 /* Allow change of ethernet address */
  45. #define CONFIG_BOOT_RETRY_TIME 5 /* Retry boot in 5 secs */
  46. #define CONFIG_RESET_TO_RETRY 1 /* If timeout waiting for command, perform a reset */
  47. /* Only interrupt boot if space is pressed */
  48. /* If a long serial cable is connected but */
  49. /* other end is dead, garbage will be read */
  50. #define CONFIG_AUTOBOOT_KEYED 1
  51. #define CONFIG_AUTOBOOT_PROMPT \
  52. "Press space to abort autoboot in %d second\n", bootdelay
  53. #define CONFIG_AUTOBOOT_DELAY_STR "d"
  54. #define CONFIG_AUTOBOOT_STOP_STR " "
  55. #if 0
  56. /* Net boot */
  57. /* Loads a tftp image and starts it */
  58. #define CONFIG_BOOTCOMMAND "bootp;bootm 100000" /* autoboot command */
  59. #define CONFIG_BOOTARGS "panic=1"
  60. #else
  61. /* Compact flash boot */
  62. #define CONFIG_BOOTARGS "panic=1 root=/dev/hda7"
  63. #define CONFIG_BOOTCOMMAND "disk 100000 0:5;bootm 100000"
  64. #endif
  65. /* Enable watchdog */
  66. #define CONFIG_WATCHDOG 1
  67. /* choose SCC1 ethernet (10BASET on motherboard)
  68. * or FEC ethernet (10/100 on daughterboard)
  69. */
  70. #if 1
  71. #define CONFIG_SCC1_ENET 1 /* use SCC1 ethernet */
  72. #undef CONFIG_FEC_ENET /* disable FEC ethernet */
  73. #define CONFIG_SYS_DISCOVER_PHY
  74. #else
  75. #undef CONFIG_SCC1_ENET /* disable SCC1 ethernet */
  76. #define CONFIG_FEC_ENET 1 /* use FEC ethernet */
  77. #define CONFIG_SYS_DISCOVER_PHY
  78. #endif
  79. #if defined(CONFIG_SCC1_ENET) && defined(CONFIG_FEC_ENET)
  80. #error Both CONFIG_SCC1_ENET and CONFIG_FEC_ENET configured
  81. #endif
  82. /*
  83. * BOOTP options
  84. */
  85. #define CONFIG_BOOTP_BOOTFILESIZE
  86. #define CONFIG_BOOTP_BOOTPATH
  87. #define CONFIG_BOOTP_GATEWAY
  88. #define CONFIG_BOOTP_HOSTNAME
  89. /*
  90. * Command line configuration.
  91. */
  92. #include <config_cmd_default.h>
  93. #define CONFIG_CMD_IDE
  94. #define CONFIG_MAC_PARTITION
  95. #define CONFIG_DOS_PARTITION
  96. /*
  97. * Miscellaneous configurable options
  98. */
  99. #define CONFIG_SYS_PROMPT "=>" /* Monitor Command Prompt */
  100. #if defined(CONFIG_CMD_KGDB)
  101. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  102. #else
  103. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  104. #endif
  105. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
  106. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  107. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
  108. #define CONFIG_SYS_MEMTEST_START 0x0100000 /* memtest works on */
  109. #define CONFIG_SYS_MEMTEST_END 0x0400000 /* 1 ... 4 MB in DRAM */
  110. /* Default location to load data from net */
  111. #define CONFIG_SYS_LOAD_ADDR 0x100000
  112. #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1 ms ticks */
  113. #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400 }
  114. /*
  115. * Low Level Configuration Settings
  116. * (address mappings, register initial values, etc.)
  117. * You should know what you are doing if you make changes here.
  118. */
  119. /*-----------------------------------------------------------------------
  120. * Internal Memory Mapped Register
  121. */
  122. #define CONFIG_SYS_IMMR 0xFF000000
  123. #define CONFIG_SYS_IMMR_SIZE ((uint)(64 * 1024))
  124. /*-----------------------------------------------------------------------
  125. * Definitions for initial stack pointer and data area (in DPRAM)
  126. */
  127. #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR
  128. #define CONFIG_SYS_INIT_RAM_END 0x2F00 /* End of used area in DPRAM */
  129. #define CONFIG_SYS_GBL_DATA_SIZE 64 /* size in bytes reserved for initial data */
  130. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
  131. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  132. /*-----------------------------------------------------------------------
  133. * Start addresses for the final memory configuration
  134. * (Set up by the startup code)
  135. * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
  136. */
  137. #define CONFIG_SYS_SDRAM_BASE 0x00000000
  138. #define CONFIG_SYS_FLASH_BASE 0x80000000
  139. #define CONFIG_SYS_FLASH_SIZE ((uint)(8 * 1024 * 1024)) /* max 8Mbyte */
  140. #define CONFIG_SYS_MONITOR_LEN (384 << 10) /* Reserve 384 kB for Monitor */
  141. #define CONFIG_SYS_MONITOR_BASE TEXT_BASE
  142. #define CONFIG_SYS_MALLOC_LEN (384 << 10) /* Reserve 384 kB for malloc() */
  143. /*
  144. * For booting Linux, the board info and command line data
  145. * have to be in the first 8 MB of memory, since this is
  146. * the maximum mapped by the Linux kernel during initialization.
  147. */
  148. #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
  149. /*-----------------------------------------------------------------------
  150. * FLASH organization
  151. */
  152. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
  153. #define CONFIG_SYS_MAX_FLASH_SECT 8 /* max number of sectors on one chip */
  154. #define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
  155. #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
  156. #define CONFIG_ENV_IS_IN_FLASH 1
  157. #undef CONFIG_ENV_IS_IN_EEPROM
  158. #define CONFIG_ENV_OFFSET 0x000E0000
  159. #define CONFIG_ENV_SIZE 0x4000 /* Total Size of Environment Sector */
  160. #define CONFIG_ENV_SECT_SIZE 0x50000 /* see README - env sector total size */
  161. /*-----------------------------------------------------------------------
  162. * Cache Configuration
  163. */
  164. #define CONFIG_SYS_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */
  165. #if defined(CONFIG_CMD_KGDB)
  166. #define CONFIG_SYS_CACHELINE_SHIFT 4 /* log base 2 of the above value */
  167. #endif
  168. /*-----------------------------------------------------------------------
  169. * SYPCR - System Protection Control 11-9
  170. * SYPCR can only be written once after reset!
  171. *-----------------------------------------------------------------------
  172. * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
  173. */
  174. #if defined(CONFIG_WATCHDOG)
  175. #define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | \
  176. SYPCR_SWE | SYPCR_SWRI| SYPCR_SWP)
  177. #else
  178. #define CONFIG_SYS_SYPCR (SYPCR_SWTC | SYPCR_BMT | SYPCR_BME | SYPCR_SWF | SYPCR_SWP)
  179. #endif
  180. /*-----------------------------------------------------------------------
  181. * SIUMCR - SIU Module Configuration 11-6
  182. *-----------------------------------------------------------------------
  183. * PCMCIA config., multi-function pin tri-state
  184. */
  185. #define CONFIG_SYS_SIUMCR (SIUMCR_DBGC00 | SIUMCR_DBPC00 | SIUMCR_MLRC01)
  186. /*-----------------------------------------------------------------------
  187. * TBSCR - Time Base Status and Control 11-26
  188. *-----------------------------------------------------------------------
  189. * Clear Reference Interrupt Status, Timebase freezing enabled
  190. */
  191. #define CONFIG_SYS_TBSCR (TBSCR_REFA | TBSCR_REFB | TBSCR_TBF)
  192. /*----------------------------------------------------------------------
  193. * RTCSC - Real-Time Clock Status and Control Register 11-27
  194. *-----------------------------------------------------------------------
  195. */
  196. /*FIXME dont use for now */
  197. /*#define CONFIG_SYS_RTCSC (RTCSC_SEC | RTCSC_ALR | RTCSC_RTF| RTCSC_RTE) */
  198. /*#define CONFIG_SYS_RTCSC (RTCSC_RTF) */
  199. /*-----------------------------------------------------------------------
  200. * PISCR - Periodic Interrupt Status and Control 11-31
  201. *-----------------------------------------------------------------------
  202. * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
  203. */
  204. #define CONFIG_SYS_PISCR (PISCR_PS | PISCR_PITF)
  205. /* PITE */
  206. /*-----------------------------------------------------------------------
  207. * PLPRCR - PLL, Low-Power, and Reset Control Register 15-30
  208. *-----------------------------------------------------------------------
  209. * set the PLL, the low-power modes and the reset control (15-29)
  210. */
  211. #define CONFIG_SYS_PLPRCR (((MPC8XX_FACT-1) << PLPRCR_MF_SHIFT) | \
  212. PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST)
  213. /*-----------------------------------------------------------------------
  214. * SCCR - System Clock and reset Control Register 15-27
  215. *-----------------------------------------------------------------------
  216. * Set clock output, timebase and RTC source and divider,
  217. * power management and some other internal clocks
  218. */
  219. /* FIXME check values */
  220. #define SCCR_MASK SCCR_EBDF11
  221. #define CONFIG_SYS_SCCR (SCCR_TBS|SCCR_RTSEL|SCCR_COM00|SCCR_DFSYNC00|SCCR_DFBRG00|SCCR_DFNL000|SCCR_DFNH000|SCCR_DFLCD000|SCCR_DFALCD00)
  222. /*-----------------------------------------------------------------------
  223. *
  224. *-----------------------------------------------------------------------
  225. *
  226. */
  227. #define CONFIG_SYS_DER 0
  228. /* Because of the way the 860 starts up and assigns CS0 the
  229. * entire address space, we have to set the memory controller
  230. * differently. Normally, you write the option register
  231. * first, and then enable the chip select by writing the
  232. * base register. For CS0, you must write the base register
  233. * first, followed by the option register.
  234. */
  235. /*
  236. * Init Memory Controller:
  237. *
  238. * BR0/1 and OR0/1 (FLASH)
  239. */
  240. /* the other CS:s are determined by looking at parameters in BCSRx */
  241. #define FLASH_BASE0_PRELIM CONFIG_SYS_FLASH_BASE /* FLASH bank #0 */
  242. #define CONFIG_SYS_REMAP_OR_AM 0xFF800000 /* 4 MB OR addr mask */
  243. #define CONFIG_SYS_PRELIM_OR_AM 0xFF800000 /* OR addr mask */
  244. #define FPGA_2_BASE 0x90000000
  245. #define FPGA_3_BASE 0x98000000
  246. /* FLASH timing: ACS = 10, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 0 */
  247. #define CONFIG_SYS_OR_TIMING_FLASH (OR_CSNT_SAM | OR_ACS_DIV4 | OR_BI | OR_SCY_3_CLK | OR_TRLX)
  248. #define CONFIG_SYS_OR0_REMAP (CONFIG_SYS_REMAP_OR_AM | CONFIG_SYS_OR_TIMING_FLASH)
  249. #define CONFIG_SYS_OR0_PRELIM (CONFIG_SYS_PRELIM_OR_AM | CONFIG_SYS_OR_TIMING_FLASH) /* 1 Mbyte until detected and only 1 Mbyte is needed*/
  250. #define CONFIG_SYS_BR0_PRELIM ((FLASH_BASE0_PRELIM & BR_BA_MSK) | BR_V | BR_PS_16 )
  251. /*
  252. * Internal Definitions
  253. *
  254. * Boot Flags
  255. */
  256. #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
  257. #define BOOTFLAG_WARM 0x02 /* Software reboot */
  258. #define CONFIG_ETHADDR DE:AD:BE:EF:00:01 /* Ethernet address */
  259. #ifdef CONFIG_MPC860T
  260. /* Interrupt level assignments.
  261. */
  262. #define FEC_INTERRUPT SIU_LEVEL1 /* FEC interrupt */
  263. #endif /* CONFIG_MPC860T */
  264. /* We don't use the 8259.
  265. */
  266. #define NR_8259_INTS 0
  267. /* Machine type
  268. */
  269. #define _MACH_8xx (_MACH_gth)
  270. #ifdef CONFIG_MPC860
  271. #define PCMCIA_SLOT_A 1
  272. #define CONFIG_PCMCIA_SLOT_A 1
  273. #endif
  274. #define CONFIG_SYS_PCMCIA_MEM_ADDR (0xE0000000)
  275. #define CONFIG_SYS_PCMCIA_MEM_SIZE ( 64 << 20 )
  276. #define CONFIG_SYS_PCMCIA_DMA_ADDR (0xE4000000)
  277. #define CONFIG_SYS_PCMCIA_DMA_SIZE ( 64 << 20 )
  278. #define CONFIG_SYS_PCMCIA_ATTRB_ADDR (0xE8000000)
  279. #define CONFIG_SYS_PCMCIA_ATTRB_SIZE ( 64 << 20 )
  280. #define CONFIG_SYS_PCMCIA_IO_ADDR (0xEC000000)
  281. #define CONFIG_SYS_PCMCIA_IO_SIZE ( 64 << 20 )
  282. #define CONFIG_IDE_8xx_PCCARD 1 /* Use IDE with PC Card Adapter */
  283. #undef CONFIG_IDE_8xx_DIRECT /* Direct IDE not supported */
  284. #undef CONFIG_IDE_LED /* LED for ide not supported */
  285. #undef CONFIG_IDE_RESET /* reset for ide not supported */
  286. #define CONFIG_SYS_IDE_MAXBUS 1 /* max. 1 IDE bus */
  287. #define CONFIG_SYS_IDE_MAXDEVICE 1 /* max. 1 drive per IDE bus */
  288. #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000
  289. #define CONFIG_SYS_ATA_BASE_ADDR CONFIG_SYS_PCMCIA_MEM_ADDR
  290. /* Offset for data I/O */
  291. #define CONFIG_SYS_ATA_DATA_OFFSET (CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320)
  292. /* Offset for normal register accesses */
  293. #define CONFIG_SYS_ATA_REG_OFFSET (2 * CONFIG_SYS_PCMCIA_MEM_SIZE + 0x320)
  294. /* Offset for alternate registers */
  295. #define CONFIG_SYS_ATA_ALT_OFFSET 0x0100
  296. #define CONFIG_8xx_GCLK_FREQ MPC8XX_HZ /* Force it - dont measure it */
  297. #define PA_FRONT_LED ((u16)0x4) /* PA 13 */
  298. #define PA_FL_CONFIG ((u16)0x20) /* PA 10 */
  299. #define PA_FL_CE ((u16)0x1000) /* PA 3 */
  300. #define PB_ID_GND ((u32)1) /* PB 31 */
  301. #define PB_REV_1 ((u32)2) /* PB 30 */
  302. #define PB_REV_0 ((u32)4) /* PB 29 */
  303. #define PB_BLUE_LED ((u32)0x400) /* PB 21 */
  304. #define PB_EEPROM ((u32)0x800) /* PB 20 */
  305. #define PB_ID_3 ((u32)0x2000) /* PB 18 */
  306. #define PB_ID_2 ((u32)0x4000) /* PB 17 */
  307. #define PB_ID_1 ((u32)0x8000) /* PB 16 */
  308. #define PB_ID_0 ((u32)0x10000) /* PB 15 */
  309. /* NOTE. This is reset for 100Mbit port only */
  310. #define PC_ENET100_RESET ((ushort)0x0080) /* PC 8 */
  311. #endif /* __CONFIG_H */