AmigaOneG3SE.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. /*
  2. * (C) Copyright 2002
  3. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  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. *
  25. * Configuration settings for the AmigaOneG3SE board.
  26. *
  27. */
  28. /* ------------------------------------------------------------------------- */
  29. /*
  30. * board/config.h - configuration options, board specific
  31. */
  32. #ifndef __CONFIG_H
  33. #define __CONFIG_H
  34. /*
  35. * High Level Configuration Options
  36. * (easy to change)
  37. */
  38. #define CONFIG_AMIGAONEG3SE 1
  39. #define CONFIG_BOARD_EARLY_INIT_F 1
  40. #define CONFIG_MISC_INIT_R 1
  41. #define CONFIG_VERY_BIG_RAM 1
  42. #define CONFIG_CONS_INDEX 1
  43. #define CONFIG_BAUDRATE 9600
  44. #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  45. #undef CONFIG_CLOCKS_IN_MHZ /* clocks passed to Linux in Hz */
  46. #define CONFIG_BOOTARGS "root=/dev/ram rw ramdisk_size=4096"
  47. /*
  48. * BOOTP options
  49. */
  50. #define CONFIG_BOOTP_SUBNETMASK
  51. #define CONFIG_BOOTP_GATEWAY
  52. #define CONFIG_BOOTP_HOSTNAME
  53. #define CONFIG_BOOTP_BOOTPATH
  54. #define CONFIG_BOOTP_BOOTFILESIZE
  55. #define CONFIG_MAC_PARTITION
  56. #define CONFIG_DOS_PARTITION
  57. #define CONFIG_AMIGA_PARTITION
  58. /*
  59. * Command line configuration.
  60. */
  61. #include <config_cmd_default.h>
  62. #define CONFIG_CMD_ASKENV
  63. #define CONFIG_CMD_BSP
  64. #define CONFIG_CMD_DATE
  65. #define CONFIG_CMD_DHCP
  66. #define CONFIG_CMD_ELF
  67. #define CONFIG_CMD_NET
  68. #define CONFIG_CMD_IDE
  69. #define CONFIG_CMD_FDC
  70. #define CONFIG_CMD_CACHE
  71. #define CONFIG_CMD_CONSOLE|
  72. #define CONFIG_CMD_USB
  73. #define CONFIG_CMD_BSP
  74. #define CONFIG_CMD_PCI
  75. #define CONFIG_PCI 1
  76. /* #define CONFIG_PCI_SCAN_SHOW 1 */
  77. #define CONFIG_PCI_PNP 1 /* PCI plug-and-play */
  78. #define atoi(x) simple_strtoul(x,NULL,10)
  79. /*
  80. * Miscellaneous configurable options
  81. */
  82. #define CFG_LONGHELP /* undef to save memory */
  83. #define CFG_PROMPT "] " /* Monitor Command Prompt */
  84. #define CFG_HUSH_PARSER 1 /* use "hush" command parser */
  85. /* #undef CFG_HUSH_PARSER */
  86. #ifdef CFG_HUSH_PARSER
  87. #define CFG_PROMPT_HUSH_PS2 "> "
  88. #endif
  89. #define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
  90. /* Print Buffer Size
  91. */
  92. #define CFG_PBSIZE (CFG_CBSIZE + sizeof(CFG_PROMPT) + 16)
  93. #define CFG_MAXARGS 64 /* max number of command args */
  94. #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
  95. #define CFG_LOAD_ADDR 0x00500000 /* Default load address */
  96. /*-----------------------------------------------------------------------
  97. * Start addresses for the final memory configuration
  98. * (Set up by the startup code)
  99. * Please note that CFG_SDRAM_BASE _must_ start at 0
  100. */
  101. #define CFG_SDRAM_BASE 0x00000000
  102. #define CFG_FLASH_BASE 0xFFF00000
  103. #define CFG_FLASH_MAX_SIZE 0x00080000
  104. /* Maximum amount of RAM.
  105. */
  106. #define CFG_MAX_RAM_SIZE 0x80000000 /* 2G */
  107. #define CFG_RESET_ADDRESS 0xFFF00100
  108. #define CFG_MONITOR_BASE TEXT_BASE
  109. #define CFG_MONITOR_LEN (768 << 10) /* Reserve 512 kB for Monitor */
  110. #define CFG_MALLOC_LEN (2500 << 10) /* Reserve 128 kB for malloc() */
  111. #if CFG_MONITOR_BASE >= CFG_SDRAM_BASE && \
  112. CFG_MONITOR_BASE < CFG_SDRAM_BASE + CFG_MAX_RAM_SIZE
  113. #define CFG_RAMBOOT
  114. #else
  115. #undef CFG_RAMBOOT
  116. #endif
  117. #define CFG_MEMTEST_START 0x00004000 /* memtest works on */
  118. #define CFG_MEMTEST_END 0x02000000 /* 0 ... 32 MB in DRAM */
  119. /*-----------------------------------------------------------------------
  120. * Definitions for initial stack pointer and data area
  121. */
  122. /* Size in bytes reserved for initial data
  123. */
  124. /* HJF: used to be 0x400000 */
  125. #define CFG_INIT_RAM_ADDR 0x40000000
  126. #define CFG_INIT_RAM_END 0x8000
  127. #define CFG_GBL_DATA_SIZE 128
  128. #define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
  129. #define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
  130. #define CFG_INIT_RAM_LOCK
  131. /*
  132. * Temporary buffer for serial data until the real serial driver
  133. * is initialised (memtest will destroy this buffer)
  134. */
  135. #define CFG_SCONSOLE_ADDR CFG_INIT_RAM_ADDR
  136. #define CFG_SCONSOLE_SIZE 0x0002000
  137. /* SDRAM 0 - 256MB
  138. */
  139. /*HJF: #define CFG_IBAT0L (CFG_SDRAM_BASE | BATL_PP_RW | BATL_CACHEINHIBIT)
  140. #define CFG_IBAT0U (CFG_SDRAM_BASE | BATU_BL_4M | BATU_VS | BATU_VP)
  141. #define CFG_DBAT0L (CFG_SDRAM_BASE | BATL_PP_RW | BATL_CACHEINHIBIT)
  142. #define CFG_DBAT0U CFG_IBAT0U*/
  143. #define CFG_DBAT0L (CFG_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
  144. #define CFG_DBAT0U (CFG_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
  145. #define CFG_IBAT0L (CFG_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
  146. #define CFG_IBAT0U (CFG_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
  147. /* PCI Range
  148. */
  149. #define CFG_DBAT1L (0x80000000 | BATL_PP_RW | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  150. #define CFG_DBAT1U (0x80000000 | BATU_BL_256M | BATU_VS | BATU_VP)
  151. #define CFG_IBAT1L (0x80000000 | BATL_PP_RW | BATL_CACHEINHIBIT)
  152. #define CFG_IBAT1U (0x80000000 | BATU_BL_256M | BATU_VS | BATU_VP)
  153. /* HJF:
  154. #define CFG_IBAT1L ((CFG_SDRAM_BASE+CFG_INIT_RAM_ADDR) | BATL_PP_RW)
  155. #define CFG_IBAT1U ((CFG_SDRAM_BASE+CFG_INIT_RAM_ADDR) | BATU_BL_256M | BATU_VS | BATU_VP)
  156. #define CFG_DBAT1L ((CFG_SDRAM_BASE+CFG_INIT_RAM_ADDR + 0x20000) | BATL_PP_RW )
  157. #define CFG_DBAT1U ((CFG_SDRAM_BASE+CFG_INIT_RAM_ADDR + 0x20000) | BATU_BL_256M | BATU_VS | BATU_VP)
  158. */
  159. /* Init RAM in the CPU DCache (no backing memory)
  160. */
  161. #define CFG_DBAT2L (CFG_INIT_RAM_ADDR | BATL_PP_RW | BATL_MEMCOHERENCE)
  162. #define CFG_DBAT2U (CFG_INIT_RAM_ADDR | BATU_BL_128K | BATU_VS | BATU_VP)
  163. /* This used to be commented out */
  164. #define CFG_IBAT2L CFG_DBAT2L
  165. /* This here too */
  166. #define CFG_IBAT2U CFG_DBAT2U
  167. /* I/O and PCI memory at 0xf0000000
  168. */
  169. #define CFG_DBAT3L (0xf0000000 | BATL_PP_RW | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  170. #define CFG_DBAT3U (0xf0000000 | BATU_BL_256M | BATU_VS | BATU_VP)
  171. #define CFG_IBAT3L (0xf0000000 | BATL_PP_RW | BATL_CACHEINHIBIT)
  172. #define CFG_IBAT3U (0xf0000000 | BATU_BL_256M | BATU_VS | BATU_VP)
  173. /*
  174. * Low Level Configuration Settings
  175. * (address mappings, register initial values, etc.)
  176. */
  177. #define CFG_HZ 1000
  178. #define CFG_BUS_HZ 133000000 /* bus speed - 100 mhz */
  179. #define CFG_CPU_CLK 133000000
  180. #define CFG_BUS_CLK 133000000
  181. /*
  182. * For booting Linux, the board info and command line data
  183. * have to be in the first 8 MB of memory, since this is
  184. * the maximum mapped by the Linux kernel during initialization.
  185. */
  186. #define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
  187. /*-----------------------------------------------------------------------
  188. * FLASH organization
  189. */
  190. #define CFG_MAX_FLASH_BANKS 1 /* Max number of flash banks */
  191. #define CFG_MAX_FLASH_SECT 8 /* Max number of sectors in one bank */
  192. #define CFG_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
  193. #define CFG_FLASH_WRITE_TOUT 1000 /* Timeout for Flash Write (in ms) */
  194. /*
  195. * Environment is stored in NVRAM.
  196. */
  197. #define CFG_ENV_IS_IN_NVRAM 1
  198. #define CFG_ENV_ADDR 0xFD0E0000 /* This should be 0xFD0E0000, but we skip bytes to
  199. * protect softex's settings for now.
  200. * Original 768 bytes where not enough.
  201. */
  202. #define CFG_ENV_SIZE 0x8000 /* Size of the Environment. See comment above */
  203. #define CFG_CONSOLE_IS_IN_ENV 1 /* stdin/stdout/stderr are in environment */
  204. #define CFG_CONSOLE_OVERWRITE_ROUTINE 1
  205. #define CONFIG_ENV_OVERWRITE 1
  206. /*-----------------------------------------------------------------------
  207. * Cache Configuration
  208. */
  209. #define CFG_CACHELINE_SIZE 32
  210. #if defined(CONFIG_CMD_KGDB)
  211. # define CFG_CACHELINE_SHIFT 5 /* log base 2 of the above value */
  212. #endif
  213. /*
  214. * L2 cache
  215. */
  216. #define CFG_L2
  217. #define L2_INIT (L2CR_L2SIZ_2M | L2CR_L2CLK_3 | L2CR_L2RAM_BURST | \
  218. L2CR_L2OH_5 | L2CR_L2CTL | L2CR_L2WT)
  219. #define L2_ENABLE (L2_INIT | L2CR_L2E)
  220. /*
  221. * Internal Definitions
  222. *
  223. * Boot Flags
  224. */
  225. #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
  226. #define BOOTFLAG_WARM 0x02 /* Software reboot */
  227. /*-----------------------------------------------------------------------
  228. * IDE ATAPI Configuration
  229. */
  230. #define CONFIG_ATAPI 1
  231. #define CFG_IDE_MAXBUS 2
  232. #define CFG_IDE_MAXDEVICE 4
  233. #define CONFIG_ISO_PARTITION 1
  234. #define CFG_ATA_BASE_ADDR 0xFE000000 /* was: via_get_base_addr() */
  235. #define CFG_ATA_IDE0_OFFSET 0x1F0
  236. #define CFG_ATA_IDE1_OFFSET 0x170
  237. #define CFG_ATA_REG_OFFSET 0
  238. #define CFG_ATA_DATA_OFFSET 0
  239. #define CFG_ATA_ALT_OFFSET 0x0200
  240. /*-----------------------------------------------------------------------
  241. * Disk-On-Chip configuration
  242. */
  243. #define CFG_MAX_DOC_DEVICE 1 /* Max number of DOC devices */
  244. #define CFG_DOC_SUPPORT_2000
  245. #undef CFG_DOC_SUPPORT_MILLENNIUM
  246. /*-----------------------------------------------------------------------
  247. RTC
  248. */
  249. #define CONFIG_RTC_MC146818
  250. /*-----------------------------------------------------------------------
  251. * NS16550 Configuration
  252. */
  253. #define CFG_NS16550
  254. #define CFG_NS16550_COM1 0xFE0003F8
  255. #define CFG_NS16550_COM2 0xFE0002F8
  256. #define CFG_NS16550_REG_SIZE 1
  257. /* base address for ISA I/O
  258. */
  259. #define CFG_ISA_IO_BASE_ADDRESS 0xFE000000
  260. /* ISA Interrupt stuff (taken from JWL) */
  261. #define ISA_INT1_OCW1 0x21
  262. #define ISA_INT2_OCW1 0xA1
  263. #define ISA_INT1_OCW2 0x20
  264. #define ISA_INT2_OCW2 0xA0
  265. #define ISA_INT1_OCW3 0x20
  266. #define ISA_INT2_OCW3 0xA0
  267. #define ISA_INT1_ICW1 0x20
  268. #define ISA_INT2_ICW1 0xA0
  269. #define ISA_INT1_ICW2 0x21
  270. #define ISA_INT2_ICW2 0xA1
  271. #define ISA_INT1_ICW3 0x21
  272. #define ISA_INT2_ICW3 0xA1
  273. #define ISA_INT1_ICW4 0x21
  274. #define ISA_INT2_ICW4 0xA1
  275. /*
  276. * misc
  277. */
  278. #define CONFIG_NET_MULTI
  279. #define CFG_BOARD_ASM_INIT
  280. #define CONFIG_LAST_STAGE_INIT
  281. /* #define CONFIG_ETHADDR 00:09:D2:10:00:76 */
  282. /* #define CONFIG_IPADDR 192.168.0.2 */
  283. /* #define CONFIG_NETMASK 255.255.255.240 */
  284. /* #define CONFIG_GATEWAYIP 192.168.0.3 */
  285. #define CONFIG_3COM
  286. /* #define CONFIG_BOOTP_RANDOM_DELAY */
  287. /*
  288. * USB configuration
  289. */
  290. #define CONFIG_USB_UHCI 1
  291. #define CONFIG_USB_STORAGE 1
  292. #define CONFIG_USB_KEYBOARD 1
  293. #define CFG_DEVICE_DEREGISTER 1 /* needed by CONFIG_USB_KEYBOARD */
  294. /*
  295. * Autoboot stuff
  296. */
  297. #define CONFIG_BOOTDELAY 5 /* Boot automatically after five seconds */
  298. #define CONFIG_PREBOOT ""
  299. #define CONFIG_BOOTCOMMAND "fdcboot; diskboot"
  300. #define CONFIG_MENUPROMPT \
  301. "Press any key to interrupt autoboot: %2d ", bootdelay
  302. #define CONFIG_MENUKEY ' '
  303. #define CONFIG_MENUCOMMAND "menu"
  304. /* #define CONFIG_AUTOBOOT_KEYED */
  305. /*
  306. * Extra ENV stuff
  307. */
  308. #define CONFIG_EXTRA_ENV_SETTINGS \
  309. "stdout=vga\0" \
  310. "stdin=ps2kbd\0" \
  311. "ide_doreset=on\0" \
  312. "ide_maxbus=2\0" \
  313. "ide_cd_timeout=30\0" \
  314. "menucmd=menu\0" \
  315. "pci_irqa=9\0" \
  316. "pci_irqa_select=edge\0" \
  317. "pci_irqb=10\0" \
  318. "pci_irqb_select=edge\0" \
  319. "pci_irqc=11\0" \
  320. "pci_irqc_select=edge\0" \
  321. "pci_irqd=7\0" \
  322. "pci_irqd_select=edge\0"
  323. /* #define CONFIG_MII 1 */
  324. /* #define CONFIG_BITBANGMII 1 */
  325. #endif /* __CONFIG_H */