MPC832XEMDS.h 18 KB

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