MPC8360ERDK.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  1. /*
  2. * Copyright (C) 2006 Freescale Semiconductor, Inc.
  3. * Dave Liu <daveliu@freescale.com>
  4. *
  5. * Copyright (C) 2007 Logic Product Development, Inc.
  6. * Peter Barada <peterb@logicpd.com>
  7. *
  8. * Copyright (C) 2007 MontaVista Software, Inc.
  9. * Anton Vorontsov <avorontsov@ru.mvista.com>
  10. *
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License as
  13. * published by the Free Software Foundation; either version 2 of
  14. * the License, or (at your option) any later version.
  15. */
  16. #ifndef __CONFIG_H
  17. #define __CONFIG_H
  18. /*
  19. * High Level Configuration Options
  20. */
  21. #define CONFIG_E300 1 /* E300 family */
  22. #define CONFIG_QE 1 /* Has QE */
  23. #define CONFIG_MPC83xx 1 /* MPC83xx family */
  24. #define CONFIG_MPC8360 1 /* MPC8360 CPU specific */
  25. #define CONFIG_MPC8360ERDK 1 /* MPC8360ERDK board specific */
  26. #define CONFIG_SYS_TEXT_BASE 0xFF800000
  27. /*
  28. * System Clock Setup
  29. */
  30. #ifdef CONFIG_CLKIN_33MHZ
  31. #define CONFIG_83XX_CLKIN 33333333
  32. #define CONFIG_SYS_CLK_FREQ 33333333
  33. #define CONFIG_PCI_33M 1
  34. #define HRCWL_CSB_TO_CLKIN_MPC8360ERDK HRCWL_CSB_TO_CLKIN_10X1
  35. #else
  36. #define CONFIG_83XX_CLKIN 66000000
  37. #define CONFIG_SYS_CLK_FREQ 66000000
  38. #define CONFIG_PCI_66M 1
  39. #define HRCWL_CSB_TO_CLKIN_MPC8360ERDK HRCWL_CSB_TO_CLKIN_5X1
  40. #endif /* CONFIG_CLKIN_33MHZ */
  41. /*
  42. * Hardware Reset Configuration Word
  43. */
  44. #define CONFIG_SYS_HRCW_LOW (\
  45. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  46. HRCWL_DDR_TO_SCB_CLK_1X1 |\
  47. HRCWL_CSB_TO_CLKIN_MPC8360ERDK |\
  48. HRCWL_CORE_TO_CSB_2X1 |\
  49. HRCWL_CE_TO_PLL_1X15)
  50. #define CONFIG_SYS_HRCW_HIGH (\
  51. HRCWH_PCI_HOST |\
  52. HRCWH_PCI1_ARBITER_ENABLE |\
  53. HRCWH_PCICKDRV_ENABLE |\
  54. HRCWH_CORE_ENABLE |\
  55. HRCWH_FROM_0X00000100 |\
  56. HRCWH_BOOTSEQ_DISABLE |\
  57. HRCWH_SW_WATCHDOG_DISABLE |\
  58. HRCWH_ROM_LOC_LOCAL_16BIT |\
  59. HRCWH_SECONDARY_DDR_DISABLE |\
  60. HRCWH_BIG_ENDIAN |\
  61. HRCWH_LALE_EARLY)
  62. /*
  63. * System IO Config
  64. */
  65. #define CONFIG_SYS_SICRH 0x00000000
  66. #define CONFIG_SYS_SICRL 0x40000000
  67. #define CONFIG_BOARD_EARLY_INIT_R
  68. /*
  69. * IMMR new address
  70. */
  71. #define CONFIG_SYS_IMMR 0xE0000000
  72. /*
  73. * DDR Setup
  74. */
  75. #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory */
  76. #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE
  77. #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE
  78. #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN \
  79. | DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05)
  80. #define CONFIG_SYS_83XX_DDR_USES_CS0
  81. #define CONFIG_DDR_ECC /* support DDR ECC function */
  82. #define CONFIG_DDR_ECC_CMD /* Use DDR ECC user commands */
  83. /*
  84. * DDRCDR - DDR Control Driver Register
  85. */
  86. #define CONFIG_SYS_DDRCDR_VALUE (DDRCDR_DHC_EN \
  87. | DDRCDR_ODT \
  88. | DDRCDR_Q_DRN)
  89. /* 0x80080001 */
  90. #undef CONFIG_SPD_EEPROM /* Do not use SPD EEPROM for DDR setup */
  91. /*
  92. * Manually set up DDR parameters
  93. */
  94. #define CONFIG_DDR_II
  95. #define CONFIG_SYS_DDR_SIZE 256 /* MB */
  96. #define CONFIG_SYS_DDR_CS0_BNDS 0x0000000f
  97. #define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN \
  98. | CSCONFIG_ROW_BIT_13 \
  99. | CSCONFIG_COL_BIT_10 \
  100. | CSCONFIG_ODT_WR_ONLY_CURRENT)
  101. #define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SDRAM_TYPE_DDR2 \
  102. | SDRAM_CFG_ECC_EN)
  103. #define CONFIG_SYS_DDR_SDRAM_CFG2 0x00001000
  104. #define CONFIG_SYS_DDR_CLK_CNTL (DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05)
  105. #define CONFIG_SYS_DDR_INTERVAL ((256 << SDRAM_INTERVAL_BSTOPRE_SHIFT) \
  106. | (1115 << SDRAM_INTERVAL_REFINT_SHIFT))
  107. #define CONFIG_SYS_DDR_MODE 0x47800432
  108. #define CONFIG_SYS_DDR_MODE2 0x8000c000
  109. #define CONFIG_SYS_DDR_TIMING_0 ((2 << TIMING_CFG0_MRS_CYC_SHIFT) | \
  110. (9 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) | \
  111. (3 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) | \
  112. (3 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) | \
  113. (0 << TIMING_CFG0_WWT_SHIFT) | \
  114. (0 << TIMING_CFG0_RRT_SHIFT) | \
  115. (0 << TIMING_CFG0_WRT_SHIFT) | \
  116. (0 << TIMING_CFG0_RWT_SHIFT))
  117. #define CONFIG_SYS_DDR_TIMING_1 ((TIMING_CFG1_CASLAT_30) | \
  118. (2 << TIMING_CFG1_WRTORD_SHIFT) | \
  119. (2 << TIMING_CFG1_ACTTOACT_SHIFT) | \
  120. (3 << TIMING_CFG1_WRREC_SHIFT) | \
  121. (10 << TIMING_CFG1_REFREC_SHIFT) | \
  122. (3 << TIMING_CFG1_ACTTORW_SHIFT) | \
  123. (8 << TIMING_CFG1_ACTTOPRE_SHIFT) | \
  124. (3 << TIMING_CFG1_PRETOACT_SHIFT))
  125. #define CONFIG_SYS_DDR_TIMING_2 ((9 << TIMING_CFG2_FOUR_ACT_SHIFT) | \
  126. (4 << TIMING_CFG2_CKE_PLS_SHIFT) | \
  127. (2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) | \
  128. (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) | \
  129. (2 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) | \
  130. (0 << TIMING_CFG2_ADD_LAT_SHIFT) | \
  131. (0 << TIMING_CFG2_CPO_SHIFT))
  132. #define CONFIG_SYS_DDR_TIMING_3 0x00000000
  133. /*
  134. * Memory test
  135. */
  136. #undef CONFIG_SYS_DRAM_TEST /* memory test, takes time */
  137. #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest region */
  138. #define CONFIG_SYS_MEMTEST_END 0x00100000
  139. /*
  140. * The reserved memory
  141. */
  142. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
  143. #define CONFIG_SYS_FLASH_BASE 0xFF800000 /* FLASH base address */
  144. #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
  145. #define CONFIG_SYS_RAMBOOT
  146. #else
  147. #undef CONFIG_SYS_RAMBOOT
  148. #endif
  149. #define CONFIG_SYS_MONITOR_LEN (384 * 1024) /* Reserve 384 kB for Mon */
  150. #define CONFIG_SYS_MALLOC_LEN (256 * 1024) /* Reserved for malloc */
  151. /*
  152. * Initial RAM Base Address Setup
  153. */
  154. #define CONFIG_SYS_INIT_RAM_LOCK 1
  155. #define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM address */
  156. #define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* Size of used area in RAM */
  157. #define CONFIG_SYS_GBL_DATA_OFFSET \
  158. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  159. /*
  160. * Local Bus Configuration & Clock Setup
  161. */
  162. #define CONFIG_SYS_LCRR_DBYP LCRR_DBYP
  163. #define CONFIG_SYS_LCRR_CLKDIV LCRR_CLKDIV_4
  164. #define CONFIG_SYS_LBC_LBCR 0x00000000
  165. /*
  166. * FLASH on the Local Bus
  167. */
  168. #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */
  169. #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */
  170. #define CONFIG_SYS_FLASH_SIZE 8 /* max FLASH size is 32M */
  171. #define CONFIG_SYS_FLASH_PROTECTION 1 /* Use intel Flash protection. */
  172. /* Window base at flash base */
  173. #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE
  174. #define CONFIG_SYS_LBLAWAR0_PRELIM (LBLAWAR_EN | LBLAWAR_32MB)
  175. #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE \
  176. | BR_PS_16 /* 16 bit port */ \
  177. | BR_MS_GPCM /* MSEL = GPCM */ \
  178. | BR_V) /* valid */
  179. #define CONFIG_SYS_OR0_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH_SIZE) \
  180. | OR_UPM_XAM \
  181. | OR_GPCM_CSNT \
  182. | OR_GPCM_ACS_DIV2 \
  183. | OR_GPCM_XACS \
  184. | OR_GPCM_SCY_15 \
  185. | OR_GPCM_TRLX_SET \
  186. | OR_GPCM_EHTR_SET \
  187. | OR_GPCM_EAD)
  188. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */
  189. #define CONFIG_SYS_MAX_FLASH_SECT 256 /* max sectors per device */
  190. #undef CONFIG_SYS_FLASH_CHECKSUM
  191. /*
  192. * NAND flash on the local bus
  193. */
  194. #define CONFIG_SYS_NAND_BASE 0x60000000
  195. #define CONFIG_CMD_NAND 1
  196. #define CONFIG_NAND_FSL_UPM 1
  197. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  198. #define CONFIG_MTD_NAND_VERIFY_WRITE
  199. #define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_NAND_BASE
  200. /*
  201. * [RFC] Comment said 4KB window; code said 256MB window; OR1 says 64MB
  202. * ... What's correct?
  203. */
  204. #define CONFIG_SYS_LBLAWAR1_PRELIM (LBLAWAR_EN | LBLAWAR_256MB)
  205. /* Port size 8 bit, UPMA */
  206. #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_NAND_BASE \
  207. | BR_PS_8 \
  208. | BR_MS_UPMA \
  209. | BR_V)
  210. /* 0x60000881 */
  211. #define CONFIG_SYS_OR1_PRELIM (OR_AM_64MB | OR_UPM_EAD)
  212. /* 0xFC000001 */
  213. /*
  214. * Fujitsu MB86277 (MINT) graphics controller
  215. */
  216. #define CONFIG_SYS_VIDEO_BASE 0x70000000
  217. #define CONFIG_SYS_LBLAWBAR2_PRELIM CONFIG_SYS_VIDEO_BASE
  218. #define CONFIG_SYS_LBLAWAR2_PRELIM (LBLAWAR_EN | LBLAWAR_64MB)
  219. /* Port size 32 bit, UPMB */
  220. #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_VIDEO_BASE \
  221. | BR_PS_32 \
  222. | BR_MS_UPMB \
  223. | BR_V)
  224. /* 0x000018a1 */
  225. #define CONFIG_SYS_OR2_PRELIM (OR_AM_64MB | OR_UPM_EAD)
  226. /* 0xFC000001 */
  227. /*
  228. * Serial Port
  229. */
  230. #define CONFIG_CONS_INDEX 1
  231. #define CONFIG_SYS_NS16550
  232. #define CONFIG_SYS_NS16550_SERIAL
  233. #define CONFIG_SYS_NS16550_REG_SIZE 1
  234. #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
  235. #define CONFIG_SYS_BAUDRATE_TABLE \
  236. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
  237. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500)
  238. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600)
  239. #define CONFIG_CMDLINE_EDITING 1 /* add command line history */
  240. #define CONFIG_AUTO_COMPLETE /* add autocompletion support */
  241. /* Use the HUSH parser */
  242. #define CONFIG_SYS_HUSH_PARSER
  243. /* Pass open firmware flat tree */
  244. #define CONFIG_OF_LIBFDT 1
  245. #define CONFIG_OF_BOARD_SETUP 1
  246. #define CONFIG_OF_STDOUT_VIA_ALIAS
  247. /* I2C */
  248. #define CONFIG_HARD_I2C /* I2C with hardware support */
  249. #undef CONFIG_SOFT_I2C /* I2C bit-banged */
  250. #define CONFIG_FSL_I2C
  251. #define CONFIG_I2C_MULTI_BUS
  252. #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */
  253. #define CONFIG_SYS_I2C_SLAVE 0x7F
  254. #define CONFIG_SYS_I2C_NOPROBES { {0, 0x52} } /* Don't probe these addrs */
  255. #define CONFIG_SYS_I2C_OFFSET 0x3000
  256. #define CONFIG_SYS_I2C2_OFFSET 0x3100
  257. /*
  258. * General PCI
  259. * Addresses are mapped 1-1.
  260. */
  261. #define CONFIG_PCI
  262. #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000
  263. #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE
  264. #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */
  265. #define CONFIG_SYS_PCI1_MMIO_BASE 0x90000000
  266. #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE
  267. #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */
  268. #define CONFIG_SYS_PCI1_IO_BASE 0xE0300000
  269. #define CONFIG_SYS_PCI1_IO_PHYS 0xE0300000
  270. #define CONFIG_SYS_PCI1_IO_SIZE 0x100000 /* 1M */
  271. #ifdef CONFIG_PCI
  272. #define CONFIG_PCI_PNP /* do pci plug-and-play */
  273. #undef CONFIG_EEPRO100
  274. #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  275. #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1957 /* Freescale */
  276. #endif /* CONFIG_PCI */
  277. /*
  278. * QE UEC ethernet configuration
  279. */
  280. #define CONFIG_UEC_ETH
  281. #define CONFIG_ETHPRIME "UEC0"
  282. #define CONFIG_UEC_ETH1 /* GETH1 */
  283. #ifdef CONFIG_UEC_ETH1
  284. #define CONFIG_SYS_UEC1_UCC_NUM 0 /* UCC1 */
  285. #define CONFIG_SYS_UEC1_RX_CLK QE_CLK_NONE
  286. #define CONFIG_SYS_UEC1_TX_CLK QE_CLK9
  287. #define CONFIG_SYS_UEC1_ETH_TYPE GIGA_ETH
  288. #define CONFIG_SYS_UEC1_PHY_ADDR 2
  289. #define CONFIG_SYS_UEC1_INTERFACE_TYPE PHY_INTERFACE_MODE_RGMII_RXID
  290. #define CONFIG_SYS_UEC1_INTERFACE_SPEED 1000
  291. #endif
  292. #define CONFIG_UEC_ETH2 /* GETH2 */
  293. #ifdef CONFIG_UEC_ETH2
  294. #define CONFIG_SYS_UEC2_UCC_NUM 1 /* UCC2 */
  295. #define CONFIG_SYS_UEC2_RX_CLK QE_CLK_NONE
  296. #define CONFIG_SYS_UEC2_TX_CLK QE_CLK4
  297. #define CONFIG_SYS_UEC2_ETH_TYPE GIGA_ETH
  298. #define CONFIG_SYS_UEC2_PHY_ADDR 4
  299. #define CONFIG_SYS_UEC2_INTERFACE_TYPE PHY_INTERFACE_MODE_RGMII_RXID
  300. #define CONFIG_SYS_UEC2_INTERFACE_SPEED 1000
  301. #endif
  302. /*
  303. * Environment
  304. */
  305. #ifndef CONFIG_SYS_RAMBOOT
  306. #define CONFIG_ENV_IS_IN_FLASH 1
  307. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
  308. #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */
  309. #define CONFIG_ENV_SIZE 0x20000
  310. #else /* CONFIG_SYS_RAMBOOT */
  311. #define CONFIG_SYS_NO_FLASH 1 /* Flash is not usable now */
  312. #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */
  313. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
  314. #define CONFIG_ENV_SIZE 0x2000
  315. #endif /* CONFIG_SYS_RAMBOOT */
  316. #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
  317. #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
  318. /*
  319. * BOOTP options
  320. */
  321. #define CONFIG_BOOTP_BOOTFILESIZE
  322. #define CONFIG_BOOTP_BOOTPATH
  323. #define CONFIG_BOOTP_GATEWAY
  324. #define CONFIG_BOOTP_HOSTNAME
  325. /*
  326. * Command line configuration.
  327. */
  328. #include <config_cmd_default.h>
  329. #define CONFIG_CMD_PING
  330. #define CONFIG_CMD_I2C
  331. #define CONFIG_CMD_ASKENV
  332. #define CONFIG_CMD_DHCP
  333. #if defined(CONFIG_PCI)
  334. #define CONFIG_CMD_PCI
  335. #endif
  336. #if defined(CONFIG_SYS_RAMBOOT)
  337. #undef CONFIG_CMD_SAVEENV
  338. #undef CONFIG_CMD_LOADS
  339. #endif
  340. #undef CONFIG_WATCHDOG /* watchdog disabled */
  341. /*
  342. * Miscellaneous configurable options
  343. */
  344. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  345. #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
  346. #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
  347. #if defined(CONFIG_CMD_KGDB)
  348. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  349. #else
  350. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  351. #endif
  352. /* Print Buffer Size */
  353. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
  354. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  355. /* Boot Argument Buffer Size */
  356. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  357. #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */
  358. /*
  359. * For booting Linux, the board info and command line data
  360. * have to be in the first 256 MB of memory, since this is
  361. * the maximum mapped by the Linux kernel during initialization.
  362. */
  363. #define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* Initial Memory map for Linux */
  364. /*
  365. * Core HID Setup
  366. */
  367. #define CONFIG_SYS_HID0_INIT 0x000000000
  368. #define CONFIG_SYS_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK | \
  369. HID0_ENABLE_INSTRUCTION_CACHE)
  370. #define CONFIG_SYS_HID2 HID2_HBE
  371. /*
  372. * MMU Setup
  373. */
  374. #define CONFIG_HIGH_BATS 1 /* High BATs supported */
  375. /* DDR: cache cacheable */
  376. #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE \
  377. | BATL_PP_RW \
  378. | BATL_MEMCOHERENCE)
  379. #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE \
  380. | BATU_BL_256M \
  381. | BATU_VS \
  382. | BATU_VP)
  383. #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L
  384. #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U
  385. /* IMMRBAR & PCI IO: cache-inhibit and guarded */
  386. #define CONFIG_SYS_IBAT1L (CONFIG_SYS_IMMR \
  387. | BATL_PP_RW \
  388. | BATL_CACHEINHIBIT \
  389. | BATL_GUARDEDSTORAGE)
  390. #define CONFIG_SYS_IBAT1U (CONFIG_SYS_IMMR \
  391. | BATU_BL_4M \
  392. | BATU_VS \
  393. | BATU_VP)
  394. #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L
  395. #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U
  396. /* NAND: cache-inhibit and guarded */
  397. #define CONFIG_SYS_IBAT2L (CONFIG_SYS_NAND_BASE \
  398. | BATL_PP_RW \
  399. | BATL_CACHEINHIBIT \
  400. | BATL_GUARDEDSTORAGE)
  401. #define CONFIG_SYS_IBAT2U (CONFIG_SYS_NAND_BASE \
  402. | BATU_BL_64M \
  403. | BATU_VS \
  404. | BATU_VP)
  405. #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L
  406. #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U
  407. /* FLASH: icache cacheable, but dcache-inhibit and guarded */
  408. #define CONFIG_SYS_IBAT3L (CONFIG_SYS_FLASH_BASE \
  409. | BATL_PP_RW \
  410. | BATL_MEMCOHERENCE)
  411. #define CONFIG_SYS_IBAT3U (CONFIG_SYS_FLASH_BASE \
  412. | BATU_BL_32M \
  413. | BATU_VS \
  414. | BATU_VP)
  415. #define CONFIG_SYS_DBAT3L (CONFIG_SYS_FLASH_BASE \
  416. | BATL_PP_RW \
  417. | BATL_CACHEINHIBIT \
  418. | BATL_GUARDEDSTORAGE)
  419. #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U
  420. /* Stack in dcache: cacheable, no memory coherence */
  421. #define CONFIG_SYS_IBAT4L (CONFIG_SYS_INIT_RAM_ADDR \
  422. | BATL_PP_RW)
  423. #define CONFIG_SYS_IBAT4U (CONFIG_SYS_INIT_RAM_ADDR \
  424. | BATU_BL_128K \
  425. | BATU_VS \
  426. | BATU_VP)
  427. #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L
  428. #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U
  429. #define CONFIG_SYS_IBAT5L (CONFIG_SYS_VIDEO_BASE \
  430. | BATL_PP_RW \
  431. | BATL_CACHEINHIBIT \
  432. | BATL_GUARDEDSTORAGE)
  433. #define CONFIG_SYS_IBAT5U (CONFIG_SYS_VIDEO_BASE \
  434. | BATU_BL_64M \
  435. | BATU_VS \
  436. | BATU_VP)
  437. #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L
  438. #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
  439. #ifdef CONFIG_PCI
  440. /* PCI MEM space: cacheable */
  441. #define CONFIG_SYS_IBAT6L (CONFIG_SYS_PCI1_MEM_PHYS \
  442. | BATL_PP_RW \
  443. | BATL_MEMCOHERENCE)
  444. #define CONFIG_SYS_IBAT6U (CONFIG_SYS_PCI1_MEM_PHYS \
  445. | BATU_BL_256M \
  446. | BATU_VS \
  447. | BATU_VP)
  448. #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L
  449. #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
  450. /* PCI MMIO space: cache-inhibit and guarded */
  451. #define CONFIG_SYS_IBAT7L (CONFIG_SYS_PCI1_MMIO_PHYS \
  452. | BATL_PP_RW \
  453. | BATL_CACHEINHIBIT \
  454. | BATL_GUARDEDSTORAGE)
  455. #define CONFIG_SYS_IBAT7U (CONFIG_SYS_PCI1_MMIO_PHYS \
  456. | BATU_BL_256M \
  457. | BATU_VS \
  458. | BATU_VP)
  459. #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
  460. #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
  461. #else /* CONFIG_PCI */
  462. #define CONFIG_SYS_IBAT6L (0)
  463. #define CONFIG_SYS_IBAT6U (0)
  464. #define CONFIG_SYS_IBAT7L (0)
  465. #define CONFIG_SYS_IBAT7U (0)
  466. #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L
  467. #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
  468. #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
  469. #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
  470. #endif /* CONFIG_PCI */
  471. #if defined(CONFIG_CMD_KGDB)
  472. #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */
  473. #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
  474. #endif
  475. /*
  476. * Environment Configuration
  477. */
  478. #define CONFIG_ENV_OVERWRITE
  479. #if defined(CONFIG_UEC_ETH)
  480. #define CONFIG_HAS_ETH0
  481. #define CONFIG_HAS_ETH1
  482. #define CONFIG_HAS_ETH2
  483. #define CONFIG_HAS_ETH3
  484. #endif
  485. #define CONFIG_BAUDRATE 115200
  486. #define CONFIG_LOADADDR a00000
  487. #define CONFIG_HOSTNAME mpc8360erdk
  488. #define CONFIG_BOOTFILE "uImage"
  489. #define CONFIG_ROOTPATH "/nfsroot/"
  490. #define CONFIG_BOOTDELAY 2 /* -1 disables auto-boot */
  491. #undef CONFIG_BOOTARGS /* the boot command will set bootargs */
  492. #define CONFIG_EXTRA_ENV_SETTINGS \
  493. "netdev=eth0\0" \
  494. "consoledev=ttyS0\0" \
  495. "loadaddr=a00000\0" \
  496. "fdtaddr=900000\0" \
  497. "fdtfile=mpc836x_rdk.dtb\0" \
  498. "fsfile=fs\0" \
  499. "ubootfile=u-boot.bin\0" \
  500. "mtdparts=mtdparts=60000000.nand-flash:4096k(kernel),128k(dtb),"\
  501. "-(rootfs)\0" \
  502. "setbootargs=setenv bootargs console=$consoledev,$baudrate " \
  503. "$mtdparts panic=1\0" \
  504. "adddhcpargs=setenv bootargs $bootargs ip=on\0" \
  505. "addnfsargs=setenv bootargs $bootargs ip=$ipaddr:$serverip:" \
  506. "$gatewayip:$netmask:$hostname:$netdev:off " \
  507. "root=/dev/nfs rw nfsroot=$serverip:$rootpath\0" \
  508. "addnandargs=setenv bootargs $bootargs root=/dev/mtdblock3 " \
  509. "rootfstype=jffs2 rw\0" \
  510. "tftp_get_uboot=tftp 100000 $ubootfile\0" \
  511. "tftp_get_kernel=tftp $loadaddr $bootfile\0" \
  512. "tftp_get_dtb=tftp $fdtaddr $fdtfile\0" \
  513. "tftp_get_fs=tftp c00000 $fsfile\0" \
  514. "nand_erase_kernel=nand erase 0 400000\0" \
  515. "nand_erase_dtb=nand erase 400000 20000\0" \
  516. "nand_erase_fs=nand erase 420000 3be0000\0" \
  517. "nand_write_kernel=nand write.jffs2 $loadaddr 0 400000\0" \
  518. "nand_write_dtb=nand write.jffs2 $fdtaddr 400000 20000\0" \
  519. "nand_write_fs=nand write.jffs2 c00000 420000 $filesize\0" \
  520. "nand_read_kernel=nand read.jffs2 $loadaddr 0 400000\0" \
  521. "nand_read_dtb=nand read.jffs2 $fdtaddr 400000 20000\0" \
  522. "nor_reflash=protect off ff800000 ff87ffff ; " \
  523. "erase ff800000 ff87ffff ; " \
  524. "cp.b 100000 ff800000 $filesize\0" \
  525. "nand_reflash_kernel=run tftp_get_kernel nand_erase_kernel " \
  526. "nand_write_kernel\0" \
  527. "nand_reflash_dtb=run tftp_get_dtb nand_erase_dtb nand_write_dtb\0"\
  528. "nand_reflash_fs=run tftp_get_fs nand_erase_fs nand_write_fs\0" \
  529. "nand_reflash=run nand_reflash_kernel nand_reflash_dtb " \
  530. "nand_reflash_fs\0" \
  531. "boot_m=bootm $loadaddr - $fdtaddr\0" \
  532. "dhcpboot=dhcp ; run setbootargs adddhcpargs tftp_get_dtb boot_m\0"\
  533. "nfsboot=run setbootargs addnfsargs tftp_get_kernel tftp_get_dtb "\
  534. "boot_m\0" \
  535. "nandboot=run setbootargs addnandargs nand_read_kernel nand_read_dtb "\
  536. "boot_m\0" \
  537. ""
  538. #define CONFIG_BOOTCOMMAND "run dhcpboot"
  539. #endif /* __CONFIG_H */