CPCI440.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. /*
  2. * (C) Copyright 2002
  3. * Stefan Roese, esd gmbh germany, stefan.roese@esd-electronics.com
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. /************************************************************************
  24. * board/config_CPCI440.h - configuration for esd CPCI-440 board
  25. ***********************************************************************/
  26. #ifndef __CONFIG_H
  27. #define __CONFIG_H
  28. /*-----------------------------------------------------------------------
  29. * High Level Configuration Options
  30. *----------------------------------------------------------------------*/
  31. #define CONFIG_EBONY 1 /* Board is ebony */
  32. #define CONFIG_4xx 1 /* ... PPC4xx family */
  33. #define CONFIG_BOARD_PRE_INIT 1 /* Call board_pre_init */
  34. #undef CFG_DRAM_TEST /* Disable-takes long time! */
  35. #define CONFIG_SYS_CLK_FREQ 33333333 /* external freq to pll */
  36. /*-----------------------------------------------------------------------
  37. * Base addresses -- Note these are effective addresses where the
  38. * actual resources get mapped (not physical addresses)
  39. *----------------------------------------------------------------------*/
  40. #define CFG_SDRAM_BASE 0x00000000 /* _must_ be 0 */
  41. #define CFG_FLASH_BASE 0xff800000 /* start of FLASH */
  42. #define CFG_MONITOR_BASE 0xfffc0000 /* start of monitor */
  43. #define CFG_PERIPHERAL_BASE 0xe0000000 /* internal peripherals */
  44. #define CFG_ISRAM_BASE 0xc0000000 /* internal SRAM */
  45. #define CFG_FPGA_BASE (CFG_PERIPHERAL_BASE + 0x08300000)
  46. #define CFG_NVRAM_BASE_ADDR (CFG_PERIPHERAL_BASE + 0x08000000)
  47. /*-----------------------------------------------------------------------
  48. * Initial RAM & stack pointer (placed in internal SRAM)
  49. *----------------------------------------------------------------------*/
  50. #define CFG_INIT_RAM_ADDR CFG_ISRAM_BASE /* Initial RAM address */
  51. #define CFG_INIT_RAM_END 0x2000 /* End of used area in RAM */
  52. #define CFG_GBL_DATA_SIZE 128 /* num bytes initial data */
  53. #define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
  54. #define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
  55. #define CFG_MONITOR_LEN (192 * 1024) /* Reserve 192 kB for Mon */
  56. #define CFG_MALLOC_LEN (128 * 1024) /* Reserve 128 kB for malloc*/
  57. /*-----------------------------------------------------------------------
  58. * Serial Port
  59. *----------------------------------------------------------------------*/
  60. #undef CONFIG_SERIAL_SOFTWARE_FIFO
  61. #undef CFG_EXT_SERIAL_CLOCK /* (1843200 * 6) / * Ext clk @ 11.059 MHz */
  62. #define CONFIG_BAUDRATE 9600
  63. #define CFG_BAUDRATE_TABLE \
  64. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400}
  65. /*-----------------------------------------------------------------------
  66. * NVRAM/RTC
  67. *
  68. * NOTE: Upper 8 bytes of NVRAM is where the RTC registers are located.
  69. * The DS1743 code assumes this condition (i.e. -- it assumes the base
  70. * address for the RTC registers is:
  71. *
  72. * CFG_NVRAM_BASE_ADDR + CFG_NVRAM_SIZE
  73. *
  74. *----------------------------------------------------------------------*/
  75. #define CFG_NVRAM_SIZE (0x2000 - 8) /* NVRAM size(8k)- RTC regs */
  76. #define CONFIG_RTC_DS174x 1 /* DS1743 RTC */
  77. /*-----------------------------------------------------------------------
  78. * FLASH related
  79. *----------------------------------------------------------------------*/
  80. #if 1 /* test-only */
  81. #define CFG_FLASH_CFI 1 /* Flash is CFI conformant */
  82. #define CFG_MAX_FLASH_SECT 128 /* max number of sectors on one chip */
  83. #define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
  84. #define CFG_FLASH_INCREMENT 0 /* there is only one bank */
  85. #define CFG_FLASH_PROTECTION 1 /* use hardware protection */
  86. #define CFG_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */
  87. #undef CFG_FLASH_BASE
  88. #define CFG_FLASH_BASE 0xFF800000 /* test-only...*/
  89. #else /* test-only */
  90. #define CFG_MAX_FLASH_BANKS 3 /* number of banks */
  91. #define CFG_MAX_FLASH_SECT 32 /* sectors per device */
  92. #undef CFG_FLASH_CHECKSUM
  93. #define CFG_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
  94. #define CFG_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
  95. #endif
  96. /*-----------------------------------------------------------------------
  97. * Environment
  98. *----------------------------------------------------------------------*/
  99. #if 0 /* test-only */
  100. #define CFG_ENV_IS_IN_NVRAM 1 /* Environment uses NVRAM */
  101. #undef CFG_ENV_IS_IN_FLASH /* ... not in flash */
  102. #undef CFG_ENV_IS_IN_EEPROM /* ... not in EEPROM */
  103. #define CFG_ENV_SIZE 0x1000 /* Size of Environment vars */
  104. #define CFG_ENV_ADDR \
  105. (CFG_NVRAM_BASE_ADDR+CFG_NVRAM_SIZE-CFG_ENV_SIZE)
  106. #else
  107. #if 0 /* test-only */
  108. #define CFG_ENV_IS_IN_EEPROM 1 /* use EEPROM for environment vars */
  109. #define CFG_ENV_OFFSET 0x010 /* environment starts at the beginning of the EEPROM */
  110. #define CFG_ENV_SIZE 0x800 /* 2048 bytes may be used for env vars*/
  111. /* total size of a CAT24WC16 is 2048 bytes */
  112. #else
  113. #define CFG_ENV_IS_IN_FLASH 1
  114. #define CFG_ENV_OFFSET 0x8000 /* Offset of Environment Sector */
  115. #define CFG_ENV_SIZE 0x4000 /* Total Size of Environment Sector */
  116. #endif
  117. /*-----------------------------------------------------------------------
  118. * I2C EEPROM (CAT24WC16) for environment
  119. */
  120. #define CONFIG_HARD_I2C /* I2c with hardware support */
  121. #define CFG_I2C_SPEED 400000 /* I2C speed and slave address */
  122. #define CFG_I2C_SLAVE 0x7F
  123. #define CFG_I2C_EEPROM_ADDR 0x50 /* EEPROM CAT28WC08 */
  124. #define CFG_I2C_EEPROM_ADDR_LEN 1 /* Bytes of address */
  125. /* mask of address bits that overflow into the "EEPROM chip address" */
  126. #define CFG_I2C_EEPROM_ADDR_OVERFLOW 0x07
  127. #define CFG_EEPROM_PAGE_WRITE_BITS 4 /* The Catalyst CAT24WC08 has */
  128. /* 16 byte page write mode using*/
  129. /* last 4 bits of the address */
  130. #define CFG_EEPROM_PAGE_WRITE_DELAY_MS 10 /* and takes up to 10 msec */
  131. #define CFG_EEPROM_PAGE_WRITE_ENABLE
  132. #endif
  133. #define CONFIG_BOOTARGS "root=/dev/hda1 "
  134. #define CONFIG_BOOTCOMMAND "bootm ffc00000" /* autoboot command */
  135. #define CONFIG_BOOTDELAY -1 /* disable autoboot */
  136. #define CONFIG_BAUDRATE 9600
  137. #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
  138. #define CFG_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
  139. #define CONFIG_MII 1 /* MII PHY management */
  140. #define CONFIG_PHY_ADDR 1 /* PHY address */
  141. #if 0 /* test-only */
  142. #define CONFIG_COMMANDS (CONFIG_CMD_DFL | \
  143. CFG_CMD_IRQ | \
  144. CFG_CMD_I2C | \
  145. CFG_CMD_KGDB | \
  146. CFG_CMD_DHCP | \
  147. CFG_CMD_DATE | \
  148. CFG_CMD_BEDBUG | \
  149. CFG_CMD_ELF )
  150. #else
  151. #define CONFIG_COMMANDS ( CONFIG_CMD_DFL | \
  152. CFG_CMD_IRQ | \
  153. CFG_CMD_ELF | \
  154. CFG_CMD_DATE | \
  155. CFG_CMD_I2C | \
  156. CFG_CMD_EEPROM )
  157. /* test-only: support fehlt bisher... */
  158. /* CFG_CMD_IDE | \*/
  159. /* CFG_CMD_PCI | \*/
  160. #endif
  161. /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
  162. #include <cmd_confdefs.h>
  163. #undef CONFIG_WATCHDOG /* watchdog disabled */
  164. #undef CONFIG_SPD_EEPROM /* don't use SPD EEPROM for setup */
  165. /*
  166. * Miscellaneous configurable options
  167. */
  168. #define CFG_LONGHELP /* undef to save memory */
  169. #define CFG_PROMPT "=> " /* Monitor Command Prompt */
  170. #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
  171. #define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
  172. #else
  173. #define CFG_CBSIZE 256 /* Console I/O Buffer Size */
  174. #endif
  175. #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
  176. #define CFG_MAXARGS 16 /* max number of command args */
  177. #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
  178. #define CFG_MEMTEST_START 0x0400000 /* memtest works on */
  179. #define CFG_MEMTEST_END 0x0C00000 /* 4 ... 12 MB in DRAM */
  180. #define CFG_LOAD_ADDR 0x100000 /* default load address */
  181. #define CFG_EXTBDINFO 1 /* To use extended board_into (bd_t) */
  182. #define CFG_HZ 1000 /* decrementer freq: 1 ms ticks */
  183. #if 0 /* test-only */
  184. #define CONFIG_HARD_I2C 1 /* I2C with hardware support */
  185. #undef CONFIG_SOFT_I2C /* I2C bit-banged */
  186. #define CFG_I2C_SPEED 400000 /* I2C speed and slave address */
  187. #define CFG_I2C_SLAVE 0x7F
  188. #endif
  189. /*-----------------------------------------------------------------------
  190. * PCI stuff
  191. *-----------------------------------------------------------------------
  192. */
  193. #if 0
  194. #define PCI_HOST_ADAPTER 0 /* configure ar pci adapter */
  195. #define PCI_HOST_FORCE 1 /* configure as pci host */
  196. #define PCI_HOST_AUTO 2 /* detected via arbiter enable */
  197. #define CONFIG_PCI /* include pci support */
  198. #define CONFIG_PCI_HOST PCI_HOST_FORCE /* select pci host function */
  199. #define CONFIG_PCI_PNP /* do pci plug-and-play */
  200. /* resource configuration */
  201. #define CONFIG_PCI_SCAN_SHOW /* print pci devices @ startup */
  202. #define CONFIG_PCI_BOOTDELAY 0 /* enable pci bootdelay variable*/
  203. #define CFG_PCI_SUBSYS_VENDORID 0x0000 /* PCI Vendor ID: to-do!!! */
  204. #define CFG_PCI_SUBSYS_DEVICEID 0x0000 /* PCI Device ID: to-do!!! */
  205. #define CFG_PCI_PTM1LA 0x00000000 /* point to sdram */
  206. #define CFG_PCI_PTM1MS 0x80000001 /* 2GB, enable hard-wired to 1 */
  207. #define CFG_PCI_PTM1PCI 0x00000000 /* Host: use this pci address */
  208. #define CFG_PCI_PTM2LA 0x00000000 /* disabled */
  209. #define CFG_PCI_PTM2MS 0x00000000 /* disabled */
  210. #define CFG_PCI_PTM2PCI 0x04000000 /* Host: use this pci address */
  211. #endif
  212. /*
  213. * For booting Linux, the board info and command line data
  214. * have to be in the first 8 MB of memory, since this is
  215. * the maximum mapped by the Linux kernel during initialization.
  216. */
  217. #define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
  218. /*-----------------------------------------------------------------------
  219. * Cache Configuration
  220. */
  221. #define CFG_DCACHE_SIZE 32768 /* For IBM 440 CPUs */
  222. #define CFG_CACHELINE_SIZE 32 /* ... */
  223. #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
  224. #define CFG_CACHELINE_SHIFT 5 /* log base 2 of the above value */
  225. #endif
  226. /* Configuration Port location */
  227. #define CONFIG_PORT_ADDR 0xF0000500
  228. /*-----------------------------------------------------------------------
  229. * Definitions for Serial Presence Detect EEPROM address
  230. * (to get SDRAM settings)
  231. */
  232. #define SPD_EEPROM_ADDRESS 0x50
  233. /*
  234. * Internal Definitions
  235. *
  236. * Boot Flags
  237. */
  238. #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
  239. #define BOOTFLAG_WARM 0x02 /* Software reboot */
  240. #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
  241. #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
  242. #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
  243. #endif
  244. #endif /* __CONFIG_H */