MPC832XEMDS.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  1. /*
  2. * Copyright (C) 2006 Freescale Semiconductor, Inc.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef __CONFIG_H
  7. #define __CONFIG_H
  8. /*
  9. * High Level Configuration Options
  10. */
  11. #define CONFIG_E300 1 /* E300 family */
  12. #define CONFIG_QE 1 /* Has QE */
  13. #define CONFIG_MPC832x 1 /* MPC832x CPU specific */
  14. #define CONFIG_MPC832XEMDS 1 /* MPC832XEMDS board specific */
  15. #define CONFIG_SYS_TEXT_BASE 0xFE000000
  16. /*
  17. * System Clock Setup
  18. */
  19. #ifdef CONFIG_PCISLAVE
  20. #define CONFIG_83XX_PCICLK 66000000 /* in HZ */
  21. #else
  22. #define CONFIG_83XX_CLKIN 66000000 /* in Hz */
  23. #endif
  24. #ifndef CONFIG_SYS_CLK_FREQ
  25. #define CONFIG_SYS_CLK_FREQ 66000000
  26. #endif
  27. /*
  28. * Hardware Reset Configuration Word
  29. */
  30. #define CONFIG_SYS_HRCW_LOW (\
  31. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  32. HRCWL_DDR_TO_SCB_CLK_2X1 |\
  33. HRCWL_VCO_1X2 |\
  34. HRCWL_CSB_TO_CLKIN_2X1 |\
  35. HRCWL_CORE_TO_CSB_2X1 |\
  36. HRCWL_CE_PLL_VCO_DIV_2 |\
  37. HRCWL_CE_PLL_DIV_1X1 |\
  38. HRCWL_CE_TO_PLL_1X3)
  39. #ifdef CONFIG_PCISLAVE
  40. #define CONFIG_SYS_HRCW_HIGH (\
  41. HRCWH_PCI_AGENT |\
  42. HRCWH_PCI1_ARBITER_DISABLE |\
  43. HRCWH_CORE_ENABLE |\
  44. HRCWH_FROM_0XFFF00100 |\
  45. HRCWH_BOOTSEQ_DISABLE |\
  46. HRCWH_SW_WATCHDOG_DISABLE |\
  47. HRCWH_ROM_LOC_LOCAL_16BIT |\
  48. HRCWH_BIG_ENDIAN |\
  49. HRCWH_LALE_NORMAL)
  50. #else
  51. #define CONFIG_SYS_HRCW_HIGH (\
  52. HRCWH_PCI_HOST |\
  53. HRCWH_PCI1_ARBITER_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_BIG_ENDIAN |\
  60. HRCWH_LALE_NORMAL)
  61. #endif
  62. /*
  63. * System IO Config
  64. */
  65. #define CONFIG_SYS_SICRL 0x00000000
  66. #define CONFIG_BOARD_EARLY_INIT_F /* call board_pre_init */
  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_DDRCDR 0x73000002 /* DDR II voltage is 1.8V */
  79. #undef CONFIG_SPD_EEPROM
  80. #if defined(CONFIG_SPD_EEPROM)
  81. /* Determine DDR configuration from I2C interface
  82. */
  83. #define SPD_EEPROM_ADDRESS 0x51 /* DDR SODIMM */
  84. #else
  85. /* Manually set up DDR parameters
  86. */
  87. #define CONFIG_SYS_DDR_SIZE 128 /* MB */
  88. #define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN \
  89. | CSCONFIG_AP \
  90. | CSCONFIG_ODT_WR_CFG \
  91. | CSCONFIG_ROW_BIT_13 \
  92. | CSCONFIG_COL_BIT_10)
  93. /* 0x80840102 */
  94. #define CONFIG_SYS_DDR_TIMING_0 ((0 << TIMING_CFG0_RWT_SHIFT) \
  95. | (0 << TIMING_CFG0_WRT_SHIFT) \
  96. | (0 << TIMING_CFG0_RRT_SHIFT) \
  97. | (0 << TIMING_CFG0_WWT_SHIFT) \
  98. | (2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) \
  99. | (2 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) \
  100. | (8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) \
  101. | (2 << TIMING_CFG0_MRS_CYC_SHIFT))
  102. /* 0x00220802 */
  103. #define CONFIG_SYS_DDR_TIMING_1 ((3 << TIMING_CFG1_PRETOACT_SHIFT) \
  104. | (9 << TIMING_CFG1_ACTTOPRE_SHIFT) \
  105. | (3 << TIMING_CFG1_ACTTORW_SHIFT) \
  106. | (5 << TIMING_CFG1_CASLAT_SHIFT) \
  107. | (13 << TIMING_CFG1_REFREC_SHIFT) \
  108. | (3 << TIMING_CFG1_WRREC_SHIFT) \
  109. | (2 << TIMING_CFG1_ACTTOACT_SHIFT) \
  110. | (2 << TIMING_CFG1_WRTORD_SHIFT))
  111. /* 0x3935D322 */
  112. #define CONFIG_SYS_DDR_TIMING_2 ((0 << TIMING_CFG2_ADD_LAT_SHIFT) \
  113. | (31 << TIMING_CFG2_CPO_SHIFT) \
  114. | (2 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) \
  115. | (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) \
  116. | (2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) \
  117. | (3 << TIMING_CFG2_CKE_PLS_SHIFT) \
  118. | (10 << TIMING_CFG2_FOUR_ACT_SHIFT))
  119. /* 0x0F9048CA */
  120. #define CONFIG_SYS_DDR_TIMING_3 0x00000000
  121. #define CONFIG_SYS_DDR_CLK_CNTL DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05
  122. /* 0x02000000 */
  123. #define CONFIG_SYS_DDR_MODE ((0x4440 << SDRAM_MODE_ESD_SHIFT) \
  124. | (0x0232 << SDRAM_MODE_SD_SHIFT))
  125. /* 0x44400232 */
  126. #define CONFIG_SYS_DDR_MODE2 0x8000c000
  127. #define CONFIG_SYS_DDR_INTERVAL ((800 << SDRAM_INTERVAL_REFINT_SHIFT) \
  128. | (100 << SDRAM_INTERVAL_BSTOPRE_SHIFT))
  129. /* 0x03200064 */
  130. #define CONFIG_SYS_DDR_CS0_BNDS 0x00000007
  131. #define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SREN \
  132. | SDRAM_CFG_SDRAM_TYPE_DDR2 \
  133. | SDRAM_CFG_32_BE)
  134. /* 0x43080000 */
  135. #define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000
  136. #endif
  137. /*
  138. * Memory test
  139. */
  140. #undef CONFIG_SYS_DRAM_TEST /* memory test, takes time */
  141. #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest region */
  142. #define CONFIG_SYS_MEMTEST_END 0x00100000
  143. /*
  144. * The reserved memory
  145. */
  146. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
  147. #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
  148. #define CONFIG_SYS_RAMBOOT
  149. #else
  150. #undef CONFIG_SYS_RAMBOOT
  151. #endif
  152. /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */
  153. #define CONFIG_SYS_MONITOR_LEN (512 * 1024) /* Reserve 512 kB for Mon */
  154. #define CONFIG_SYS_MALLOC_LEN (256 * 1024) /* Reserved for malloc */
  155. /*
  156. * Initial RAM Base Address Setup
  157. */
  158. #define CONFIG_SYS_INIT_RAM_LOCK 1
  159. #define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM addr */
  160. #define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* Size of used area in RAM */
  161. #define CONFIG_SYS_GBL_DATA_OFFSET \
  162. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  163. /*
  164. * Local Bus Configuration & Clock Setup
  165. */
  166. #define CONFIG_SYS_LCRR_DBYP LCRR_DBYP
  167. #define CONFIG_SYS_LCRR_CLKDIV LCRR_CLKDIV_2
  168. #define CONFIG_SYS_LBC_LBCR 0x00000000
  169. /*
  170. * FLASH on the Local Bus
  171. */
  172. #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */
  173. #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */
  174. #define CONFIG_SYS_FLASH_BASE 0xFE000000 /* FLASH base address */
  175. #define CONFIG_SYS_FLASH_SIZE 16 /* FLASH size is 16M */
  176. #define CONFIG_SYS_FLASH_PROTECTION 1 /* Use h/w Flash protection. */
  177. /* Window base at flash base */
  178. #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE
  179. #define CONFIG_SYS_LBLAWAR0_PRELIM (LBLAWAR_EN | LBLAWAR_32MB)
  180. #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE \
  181. | BR_PS_16 /* 16 bit port */ \
  182. | BR_MS_GPCM /* MSEL = GPCM */ \
  183. | BR_V) /* valid */
  184. #define CONFIG_SYS_OR0_PRELIM (MEG_TO_AM(CONFIG_SYS_FLASH_SIZE) \
  185. | OR_GPCM_XAM \
  186. | OR_GPCM_CSNT \
  187. | OR_GPCM_ACS_DIV2 \
  188. | OR_GPCM_XACS \
  189. | OR_GPCM_SCY_15 \
  190. | OR_GPCM_TRLX_SET \
  191. | OR_GPCM_EHTR_SET \
  192. | OR_GPCM_EAD)
  193. /* 0xfe006ff7 */
  194. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */
  195. #define CONFIG_SYS_MAX_FLASH_SECT 128 /* sectors per device */
  196. #undef CONFIG_SYS_FLASH_CHECKSUM
  197. /*
  198. * BCSR on the Local Bus
  199. */
  200. #define CONFIG_SYS_BCSR 0xF8000000
  201. /* Access window base at BCSR base */
  202. #define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_BCSR
  203. #define CONFIG_SYS_LBLAWAR1_PRELIM (LBLAWAR_EN | LBLAWAR_32KB)
  204. #define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_BCSR \
  205. | BR_PS_8 \
  206. | BR_MS_GPCM \
  207. | BR_V)
  208. #define CONFIG_SYS_OR1_PRELIM (OR_AM_32KB \
  209. | OR_GPCM_XAM \
  210. | OR_GPCM_CSNT \
  211. | OR_GPCM_XACS \
  212. | OR_GPCM_SCY_15 \
  213. | OR_GPCM_TRLX_SET \
  214. | OR_GPCM_EHTR_SET \
  215. | OR_GPCM_EAD)
  216. /* 0xFFFFE9F7 */
  217. /*
  218. * Windows to access PIB via local bus
  219. */
  220. /* PIB window base 0xF8008000 */
  221. #define CONFIG_SYS_PIB_BASE 0xF8008000
  222. #define CONFIG_SYS_PIB_WINDOW_SIZE (32 * 1024)
  223. #define CONFIG_SYS_LBLAWBAR3_PRELIM CONFIG_SYS_PIB_BASE
  224. #define CONFIG_SYS_LBLAWAR3_PRELIM (LBLAWAR_EN | LBLAWAR_64KB)
  225. /*
  226. * CS2 on Local Bus, to PIB
  227. */
  228. #define CONFIG_SYS_BR2_PRELIM (CONFIG_SYS_PIB_BASE \
  229. | BR_PS_8 \
  230. | BR_MS_GPCM \
  231. | BR_V)
  232. /* 0xF8008801 */
  233. #define CONFIG_SYS_OR2_PRELIM (P2SZ_TO_AM(CONFIG_SYS_PIB_WINDOW_SIZE) \
  234. | OR_GPCM_XAM \
  235. | OR_GPCM_CSNT \
  236. | OR_GPCM_XACS \
  237. | OR_GPCM_SCY_15 \
  238. | OR_GPCM_TRLX_SET \
  239. | OR_GPCM_EHTR_SET \
  240. | OR_GPCM_EAD)
  241. /* 0xffffe9f7 */
  242. /*
  243. * CS3 on Local Bus, to PIB
  244. */
  245. #define CONFIG_SYS_BR3_PRELIM ((CONFIG_SYS_PIB_BASE + \
  246. CONFIG_SYS_PIB_WINDOW_SIZE) \
  247. | BR_PS_8 \
  248. | BR_MS_GPCM \
  249. | BR_V)
  250. /* 0xF8010801 */
  251. #define CONFIG_SYS_OR3_PRELIM (P2SZ_TO_AM(CONFIG_SYS_PIB_WINDOW_SIZE) \
  252. | OR_GPCM_XAM \
  253. | OR_GPCM_CSNT \
  254. | OR_GPCM_XACS \
  255. | OR_GPCM_SCY_15 \
  256. | OR_GPCM_TRLX_SET \
  257. | OR_GPCM_EHTR_SET \
  258. | OR_GPCM_EAD)
  259. /* 0xffffe9f7 */
  260. /*
  261. * Serial Port
  262. */
  263. #define CONFIG_CONS_INDEX 1
  264. #define CONFIG_SYS_NS16550_SERIAL
  265. #define CONFIG_SYS_NS16550_REG_SIZE 1
  266. #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
  267. #define CONFIG_SYS_BAUDRATE_TABLE \
  268. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
  269. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500)
  270. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600)
  271. #define CONFIG_CMDLINE_EDITING 1 /* add command line history */
  272. #define CONFIG_AUTO_COMPLETE /* add autocompletion support */
  273. /* I2C */
  274. #define CONFIG_SYS_I2C
  275. #define CONFIG_SYS_I2C_FSL
  276. #define CONFIG_SYS_FSL_I2C_SPEED 400000
  277. #define CONFIG_SYS_FSL_I2C_SLAVE 0x7F
  278. #define CONFIG_SYS_FSL_I2C_OFFSET 0x3000
  279. #define CONFIG_SYS_I2C_NOPROBES { {0, 0x51} }
  280. /*
  281. * Config on-board RTC
  282. */
  283. #define CONFIG_RTC_DS1374 /* use ds1374 rtc via i2c */
  284. #define CONFIG_SYS_I2C_RTC_ADDR 0x68 /* at address 0x68 */
  285. /*
  286. * General PCI
  287. * Addresses are mapped 1-1.
  288. */
  289. #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000
  290. #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE
  291. #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */
  292. #define CONFIG_SYS_PCI1_MMIO_BASE 0x90000000
  293. #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE
  294. #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */
  295. #define CONFIG_SYS_PCI1_IO_BASE 0x00000000
  296. #define CONFIG_SYS_PCI1_IO_PHYS 0xE0300000
  297. #define CONFIG_SYS_PCI1_IO_SIZE 0x100000 /* 1M */
  298. #define CONFIG_SYS_PCI_SLV_MEM_LOCAL CONFIG_SYS_SDRAM_BASE
  299. #define CONFIG_SYS_PCI_SLV_MEM_BUS 0x00000000
  300. #define CONFIG_SYS_PCI_SLV_MEM_SIZE 0x80000000
  301. #ifdef CONFIG_PCI
  302. #define CONFIG_PCI_INDIRECT_BRIDGE
  303. #define CONFIG_83XX_PCI_STREAMING
  304. #undef CONFIG_EEPRO100
  305. #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  306. #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1957 /* Freescale */
  307. #endif /* CONFIG_PCI */
  308. /*
  309. * QE UEC ethernet configuration
  310. */
  311. #define CONFIG_UEC_ETH
  312. #define CONFIG_ETHPRIME "UEC0"
  313. #define CONFIG_UEC_ETH1 /* ETH3 */
  314. #ifdef CONFIG_UEC_ETH1
  315. #define CONFIG_SYS_UEC1_UCC_NUM 2 /* UCC3 */
  316. #define CONFIG_SYS_UEC1_RX_CLK QE_CLK9
  317. #define CONFIG_SYS_UEC1_TX_CLK QE_CLK10
  318. #define CONFIG_SYS_UEC1_ETH_TYPE FAST_ETH
  319. #define CONFIG_SYS_UEC1_PHY_ADDR 3
  320. #define CONFIG_SYS_UEC1_INTERFACE_TYPE PHY_INTERFACE_MODE_MII
  321. #define CONFIG_SYS_UEC1_INTERFACE_SPEED 100
  322. #endif
  323. #define CONFIG_UEC_ETH2 /* ETH4 */
  324. #ifdef CONFIG_UEC_ETH2
  325. #define CONFIG_SYS_UEC2_UCC_NUM 3 /* UCC4 */
  326. #define CONFIG_SYS_UEC2_RX_CLK QE_CLK7
  327. #define CONFIG_SYS_UEC2_TX_CLK QE_CLK8
  328. #define CONFIG_SYS_UEC2_ETH_TYPE FAST_ETH
  329. #define CONFIG_SYS_UEC2_PHY_ADDR 4
  330. #define CONFIG_SYS_UEC2_INTERFACE_TYPE PHY_INTERFACE_MODE_MII
  331. #define CONFIG_SYS_UEC2_INTERFACE_SPEED 100
  332. #endif
  333. /*
  334. * Environment
  335. */
  336. #ifndef CONFIG_SYS_RAMBOOT
  337. #define CONFIG_ENV_IS_IN_FLASH 1
  338. #define CONFIG_ENV_ADDR \
  339. (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
  340. #define CONFIG_ENV_SECT_SIZE 0x20000
  341. #define CONFIG_ENV_SIZE 0x2000
  342. #else
  343. #define CONFIG_SYS_NO_FLASH 1 /* Flash is not usable now */
  344. #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */
  345. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
  346. #define CONFIG_ENV_SIZE 0x2000
  347. #endif
  348. #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
  349. #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
  350. /*
  351. * BOOTP options
  352. */
  353. #define CONFIG_BOOTP_BOOTFILESIZE
  354. #define CONFIG_BOOTP_BOOTPATH
  355. #define CONFIG_BOOTP_GATEWAY
  356. #define CONFIG_BOOTP_HOSTNAME
  357. /*
  358. * Command line configuration.
  359. */
  360. #if defined(CONFIG_PCI)
  361. #define CONFIG_CMD_PCI
  362. #endif
  363. #undef CONFIG_WATCHDOG /* watchdog disabled */
  364. /*
  365. * Miscellaneous configurable options
  366. */
  367. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  368. #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
  369. #if defined(CONFIG_CMD_KGDB)
  370. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  371. #else
  372. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  373. #endif
  374. /* Print Buffer Size */
  375. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
  376. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  377. /* Boot Argument Buffer Size */
  378. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  379. /*
  380. * For booting Linux, the board info and command line data
  381. * have to be in the first 256 MB of memory, since this is
  382. * the maximum mapped by the Linux kernel during initialization.
  383. */
  384. /* Initial Memory map for Linux */
  385. #define CONFIG_SYS_BOOTMAPSZ (256 << 20)
  386. #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */
  387. /*
  388. * Core HID Setup
  389. */
  390. #define CONFIG_SYS_HID0_INIT 0x000000000
  391. #define CONFIG_SYS_HID0_FINAL (HID0_ENABLE_MACHINE_CHECK | \
  392. HID0_ENABLE_INSTRUCTION_CACHE)
  393. #define CONFIG_SYS_HID2 HID2_HBE
  394. /*
  395. * MMU Setup
  396. */
  397. #define CONFIG_HIGH_BATS 1 /* High BATs supported */
  398. /* DDR: cache cacheable */
  399. #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE \
  400. | BATL_PP_RW \
  401. | BATL_MEMCOHERENCE)
  402. #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE \
  403. | BATU_BL_256M \
  404. | BATU_VS \
  405. | BATU_VP)
  406. #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L
  407. #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U
  408. /* IMMRBAR & PCI IO: cache-inhibit and guarded */
  409. #define CONFIG_SYS_IBAT1L (CONFIG_SYS_IMMR \
  410. | BATL_PP_RW \
  411. | BATL_CACHEINHIBIT \
  412. | BATL_GUARDEDSTORAGE)
  413. #define CONFIG_SYS_IBAT1U (CONFIG_SYS_IMMR \
  414. | BATU_BL_4M \
  415. | BATU_VS \
  416. | BATU_VP)
  417. #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L
  418. #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U
  419. /* BCSR: cache-inhibit and guarded */
  420. #define CONFIG_SYS_IBAT2L (CONFIG_SYS_BCSR \
  421. | BATL_PP_RW \
  422. | BATL_CACHEINHIBIT \
  423. | BATL_GUARDEDSTORAGE)
  424. #define CONFIG_SYS_IBAT2U (CONFIG_SYS_BCSR \
  425. | BATU_BL_128K \
  426. | BATU_VS \
  427. | BATU_VP)
  428. #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L
  429. #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U
  430. /* FLASH: icache cacheable, but dcache-inhibit and guarded */
  431. #define CONFIG_SYS_IBAT3L (CONFIG_SYS_FLASH_BASE \
  432. | BATL_PP_RW \
  433. | BATL_MEMCOHERENCE)
  434. #define CONFIG_SYS_IBAT3U (CONFIG_SYS_FLASH_BASE \
  435. | BATU_BL_32M \
  436. | BATU_VS \
  437. | BATU_VP)
  438. #define CONFIG_SYS_DBAT3L (CONFIG_SYS_FLASH_BASE \
  439. | BATL_PP_RW \
  440. | BATL_CACHEINHIBIT \
  441. | BATL_GUARDEDSTORAGE)
  442. #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U
  443. #define CONFIG_SYS_IBAT4L (0)
  444. #define CONFIG_SYS_IBAT4U (0)
  445. #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L
  446. #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U
  447. /* Stack in dcache: cacheable, no memory coherence */
  448. #define CONFIG_SYS_IBAT5L (CONFIG_SYS_INIT_RAM_ADDR | BATL_PP_RW)
  449. #define CONFIG_SYS_IBAT5U (CONFIG_SYS_INIT_RAM_ADDR \
  450. | BATU_BL_128K \
  451. | BATU_VS \
  452. | BATU_VP)
  453. #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L
  454. #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
  455. #ifdef CONFIG_PCI
  456. /* PCI MEM space: cacheable */
  457. #define CONFIG_SYS_IBAT6L (CONFIG_SYS_PCI1_MEM_PHYS \
  458. | BATL_PP_RW \
  459. | BATL_MEMCOHERENCE)
  460. #define CONFIG_SYS_IBAT6U (CONFIG_SYS_PCI1_MEM_PHYS \
  461. | BATU_BL_256M \
  462. | BATU_VS \
  463. | BATU_VP)
  464. #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L
  465. #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
  466. /* PCI MMIO space: cache-inhibit and guarded */
  467. #define CONFIG_SYS_IBAT7L (CONFIG_SYS_PCI1_MMIO_PHYS \
  468. | BATL_PP_RW \
  469. | BATL_CACHEINHIBIT \
  470. | BATL_GUARDEDSTORAGE)
  471. #define CONFIG_SYS_IBAT7U (CONFIG_SYS_PCI1_MMIO_PHYS \
  472. | BATU_BL_256M \
  473. | BATU_VS \
  474. | BATU_VP)
  475. #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
  476. #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
  477. #else
  478. #define CONFIG_SYS_IBAT6L (0)
  479. #define CONFIG_SYS_IBAT6U (0)
  480. #define CONFIG_SYS_IBAT7L (0)
  481. #define CONFIG_SYS_IBAT7U (0)
  482. #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L
  483. #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
  484. #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
  485. #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
  486. #endif
  487. #if defined(CONFIG_CMD_KGDB)
  488. #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */
  489. #endif
  490. /*
  491. * Environment Configuration
  492. */ #define CONFIG_ENV_OVERWRITE
  493. #if defined(CONFIG_UEC_ETH)
  494. #define CONFIG_HAS_ETH0
  495. #define CONFIG_HAS_ETH1
  496. #endif
  497. #define CONFIG_BAUDRATE 115200
  498. #define CONFIG_LOADADDR 800000 /* default location for tftp and bootm */
  499. #undef CONFIG_BOOTARGS /* the boot command will set bootargs */
  500. #define CONFIG_EXTRA_ENV_SETTINGS \
  501. "netdev=eth0\0" \
  502. "consoledev=ttyS0\0" \
  503. "ramdiskaddr=1000000\0" \
  504. "ramdiskfile=ramfs.83xx\0" \
  505. "fdtaddr=780000\0" \
  506. "fdtfile=mpc832x_mds.dtb\0" \
  507. ""
  508. #define CONFIG_NFSBOOTCOMMAND \
  509. "setenv bootargs root=/dev/nfs rw " \
  510. "nfsroot=$serverip:$rootpath " \
  511. "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:" \
  512. "$netdev:off " \
  513. "console=$consoledev,$baudrate $othbootargs;" \
  514. "tftp $loadaddr $bootfile;" \
  515. "tftp $fdtaddr $fdtfile;" \
  516. "bootm $loadaddr - $fdtaddr"
  517. #define CONFIG_RAMBOOTCOMMAND \
  518. "setenv bootargs root=/dev/ram rw " \
  519. "console=$consoledev,$baudrate $othbootargs;" \
  520. "tftp $ramdiskaddr $ramdiskfile;" \
  521. "tftp $loadaddr $bootfile;" \
  522. "tftp $fdtaddr $fdtfile;" \
  523. "bootm $loadaddr $ramdiskaddr $fdtaddr"
  524. #define CONFIG_BOOTCOMMAND CONFIG_NFSBOOTCOMMAND
  525. #endif /* __CONFIG_H */