MPC8323ERDB.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  1. /*
  2. * Copyright (C) 2007 Freescale Semiconductor, Inc.
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU General Public License version 2 as published
  6. * by the Free Software Foundation.
  7. */
  8. #ifndef __CONFIG_H
  9. #define __CONFIG_H
  10. #undef DEBUG
  11. /*
  12. * High Level Configuration Options
  13. */
  14. #define CONFIG_E300 1 /* E300 family */
  15. #define CONFIG_QE 1 /* Has QE */
  16. #define CONFIG_MPC83XX 1 /* MPC83xx family */
  17. #define CONFIG_MPC832X 1 /* MPC832x CPU specific */
  18. #define CONFIG_PCI 1
  19. #define CONFIG_83XX_GENERIC_PCI 1
  20. /*
  21. * System Clock Setup
  22. */
  23. #define CONFIG_83XX_CLKIN 66666667 /* in Hz */
  24. #ifndef CONFIG_SYS_CLK_FREQ
  25. #define CONFIG_SYS_CLK_FREQ CONFIG_83XX_CLKIN
  26. #endif
  27. /*
  28. * Hardware Reset Configuration Word
  29. */
  30. #define CFG_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_2_5X1 |\
  36. HRCWL_CE_PLL_VCO_DIV_2 |\
  37. HRCWL_CE_PLL_DIV_1X1 |\
  38. HRCWL_CE_TO_PLL_1X3)
  39. #define CFG_HRCW_HIGH (\
  40. HRCWH_PCI_HOST |\
  41. HRCWH_PCI1_ARBITER_ENABLE |\
  42. HRCWH_CORE_ENABLE |\
  43. HRCWH_FROM_0X00000100 |\
  44. HRCWH_BOOTSEQ_DISABLE |\
  45. HRCWH_SW_WATCHDOG_DISABLE |\
  46. HRCWH_ROM_LOC_LOCAL_16BIT |\
  47. HRCWH_BIG_ENDIAN |\
  48. HRCWH_LALE_NORMAL)
  49. /*
  50. * System IO Config
  51. */
  52. #define CFG_SICRL 0x00000000
  53. #define CONFIG_BOARD_EARLY_INIT_F /* call board_pre_init */
  54. /*
  55. * IMMR new address
  56. */
  57. #define CFG_IMMR 0xE0000000
  58. /*
  59. * DDR Setup
  60. */
  61. #define CFG_DDR_BASE 0x00000000 /* DDR is system memory */
  62. #define CFG_SDRAM_BASE CFG_DDR_BASE
  63. #define CFG_DDR_SDRAM_BASE CFG_DDR_BASE
  64. #define CFG_DDRCDR 0x73000002 /* DDR II voltage is 1.8V */
  65. #undef CONFIG_SPD_EEPROM
  66. #if defined(CONFIG_SPD_EEPROM)
  67. /* Determine DDR configuration from I2C interface
  68. */
  69. #define SPD_EEPROM_ADDRESS 0x51 /* DDR SODIMM */
  70. #else
  71. /* Manually set up DDR parameters
  72. */
  73. #define CFG_DDR_SIZE 64 /* MB */
  74. #define CFG_DDR_CS0_CONFIG 0x80840101
  75. #define CFG_DDR_TIMING_0 0x00220802
  76. #define CFG_DDR_TIMING_1 0x3935d322
  77. #define CFG_DDR_TIMING_2 0x0f9048ca
  78. #define CFG_DDR_TIMING_3 0x00000000
  79. #define CFG_DDR_CLK_CNTL 0x02000000
  80. #define CFG_DDR_MODE 0x44400232
  81. #define CFG_DDR_MODE2 0x8000c000
  82. #define CFG_DDR_INTERVAL 0x03200064
  83. #define CFG_DDR_CS0_BNDS 0x00000003
  84. #define CFG_DDR_SDRAM_CFG 0x43080000
  85. #define CFG_DDR_SDRAM_CFG2 0x00401000
  86. #endif
  87. /*
  88. * Memory test
  89. */
  90. #undef CFG_DRAM_TEST /* memory test, takes time */
  91. #define CFG_MEMTEST_START 0x00030000 /* memtest region */
  92. #define CFG_MEMTEST_END 0x03f00000
  93. /*
  94. * The reserved memory
  95. */
  96. #define CFG_MONITOR_BASE TEXT_BASE /* start of monitor */
  97. #if (CFG_MONITOR_BASE < CFG_FLASH_BASE)
  98. #define CFG_RAMBOOT
  99. #else
  100. #undef CFG_RAMBOOT
  101. #endif
  102. /* CFG_MONITOR_LEN must be a multiple of CFG_ENV_SECT_SIZE */
  103. #define CFG_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */
  104. #define CFG_MALLOC_LEN (128 * 1024) /* Reserved for malloc */
  105. /*
  106. * Initial RAM Base Address Setup
  107. */
  108. #define CFG_INIT_RAM_LOCK 1
  109. #define CFG_INIT_RAM_ADDR 0xE6000000 /* Initial RAM address */
  110. #define CFG_INIT_RAM_END 0x1000 /* End of used area in RAM */
  111. #define CFG_GBL_DATA_SIZE 0x100 /* num bytes initial data */
  112. #define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
  113. /*
  114. * Local Bus Configuration & Clock Setup
  115. */
  116. #define CFG_LCRR (LCRR_DBYP | LCRR_CLKDIV_2)
  117. #define CFG_LBC_LBCR 0x00000000
  118. /*
  119. * FLASH on the Local Bus
  120. */
  121. #define CFG_FLASH_CFI /* use the Common Flash Interface */
  122. #define CFG_FLASH_CFI_DRIVER /* use the CFI driver */
  123. #define CFG_FLASH_BASE 0xFE000000 /* FLASH base address */
  124. #define CFG_FLASH_SIZE 16 /* FLASH size is 16M */
  125. #define CFG_LBLAWBAR0_PRELIM CFG_FLASH_BASE /* Window base at flash base */
  126. #define CFG_LBLAWAR0_PRELIM 0x80000018 /* 32MB window size */
  127. #define CFG_BR0_PRELIM (CFG_FLASH_BASE | /* Flash Base address */ \
  128. (2 << BR_PS_SHIFT) | /* 16 bit port size */ \
  129. BR_V) /* valid */
  130. #define CFG_OR0_PRELIM 0xfe006ff7 /* 16MB Flash size */
  131. #define CFG_MAX_FLASH_BANKS 1 /* number of banks */
  132. #define CFG_MAX_FLASH_SECT 128 /* sectors per device */
  133. #undef CFG_FLASH_CHECKSUM
  134. /*
  135. * SDRAM on the Local Bus
  136. */
  137. #undef CFG_LB_SDRAM /* The board has not SRDAM on local bus */
  138. #ifdef CFG_LB_SDRAM
  139. #define CFG_LBC_SDRAM_BASE 0xF0000000 /* SDRAM base address */
  140. #define CFG_LBC_SDRAM_SIZE 64 /* LBC SDRAM is 64MB */
  141. #define CFG_LBLAWBAR2_PRELIM CFG_LBC_SDRAM_BASE
  142. #define CFG_LBLAWAR2_PRELIM 0x80000019 /* 64MB */
  143. /*local bus BR2, OR2 definition for SDRAM if soldered on the EPB board */
  144. /*
  145. * Base Register 2 and Option Register 2 configure SDRAM.
  146. * The SDRAM base address, CFG_LBC_SDRAM_BASE, is 0xf0000000.
  147. *
  148. * For BR2, need:
  149. * Base address of 0xf0000000 = BR[0:16] = 1111 0000 0000 0000 0
  150. * port size = 32-bits = BR2[19:20] = 11
  151. * no parity checking = BR2[21:22] = 00
  152. * SDRAM for MSEL = BR2[24:26] = 011
  153. * Valid = BR[31] = 1
  154. *
  155. * 0 4 8 12 16 20 24 28
  156. * 1111 0000 0000 0000 0001 1000 0110 0001 = f0001861
  157. *
  158. * CFG_LBC_SDRAM_BASE should be masked and OR'ed into
  159. * the top 17 bits of BR2.
  160. */
  161. #define CFG_BR2_PRELIM 0xf0001861 /*Port size=32bit, MSEL=SDRAM */
  162. /*
  163. * The SDRAM size in MB, CFG_LBC_SDRAM_SIZE, is 64.
  164. *
  165. * For OR2, need:
  166. * 64MB mask for AM, OR2[0:7] = 1111 1100
  167. * XAM, OR2[17:18] = 11
  168. * 9 columns OR2[19-21] = 010
  169. * 13 rows OR2[23-25] = 100
  170. * EAD set for extra time OR[31] = 1
  171. *
  172. * 0 4 8 12 16 20 24 28
  173. * 1111 1100 0000 0000 0110 1001 0000 0001 = fc006901
  174. */
  175. #define CFG_OR2_PRELIM 0xfc006901
  176. #define CFG_LBC_LSRT 0x32000000 /* LB sdram refresh timer, about 6us */
  177. #define CFG_LBC_MRTPR 0x20000000 /* LB refresh timer prescal, 266MHz/32 */
  178. /*
  179. * LSDMR masks
  180. */
  181. #define CFG_LBC_LSDMR_OP_NORMAL (0 << (31 - 4))
  182. #define CFG_LBC_LSDMR_OP_ARFRSH (1 << (31 - 4))
  183. #define CFG_LBC_LSDMR_OP_SRFRSH (2 << (31 - 4))
  184. #define CFG_LBC_LSDMR_OP_MRW (3 << (31 - 4))
  185. #define CFG_LBC_LSDMR_OP_PRECH (4 << (31 - 4))
  186. #define CFG_LBC_LSDMR_OP_PCHALL (5 << (31 - 4))
  187. #define CFG_LBC_LSDMR_OP_ACTBNK (6 << (31 - 4))
  188. #define CFG_LBC_LSDMR_OP_RWINV (7 << (31 - 4))
  189. #define CFG_LBC_LSDMR_COMMON 0x0063b723
  190. /*
  191. * SDRAM Controller configuration sequence.
  192. */
  193. #define CFG_LBC_LSDMR_1 ( CFG_LBC_LSDMR_COMMON \
  194. | CFG_LBC_LSDMR_OP_PCHALL)
  195. #define CFG_LBC_LSDMR_2 ( CFG_LBC_LSDMR_COMMON \
  196. | CFG_LBC_LSDMR_OP_ARFRSH)
  197. #define CFG_LBC_LSDMR_3 ( CFG_LBC_LSDMR_COMMON \
  198. | CFG_LBC_LSDMR_OP_ARFRSH)
  199. #define CFG_LBC_LSDMR_4 ( CFG_LBC_LSDMR_COMMON \
  200. | CFG_LBC_LSDMR_OP_MRW)
  201. #define CFG_LBC_LSDMR_5 ( CFG_LBC_LSDMR_COMMON \
  202. | CFG_LBC_LSDMR_OP_NORMAL)
  203. #endif
  204. /*
  205. * Windows to access PIB via local bus
  206. */
  207. #define CFG_LBLAWBAR3_PRELIM 0xf8008000 /* windows base 0xf8008000 */
  208. #define CFG_LBLAWAR3_PRELIM 0x8000000f /* windows size 64KB */
  209. /*
  210. * Serial Port
  211. */
  212. #define CONFIG_CONS_INDEX 1
  213. #undef CONFIG_SERIAL_SOFTWARE_FIFO
  214. #define CFG_NS16550
  215. #define CFG_NS16550_SERIAL
  216. #define CFG_NS16550_REG_SIZE 1
  217. #define CFG_NS16550_CLK get_bus_freq(0)
  218. #define CFG_BAUDRATE_TABLE \
  219. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200}
  220. #define CFG_NS16550_COM1 (CFG_IMMR+0x4500)
  221. #define CFG_NS16550_COM2 (CFG_IMMR+0x4600)
  222. #define CONFIG_CMDLINE_EDITING 1 /* add command line history */
  223. /* Use the HUSH parser */
  224. #define CFG_HUSH_PARSER
  225. #ifdef CFG_HUSH_PARSER
  226. #define CFG_PROMPT_HUSH_PS2 "> "
  227. #endif
  228. /* pass open firmware flat tree */
  229. #define CONFIG_OF_LIBFDT 1
  230. #define CONFIG_OF_BOARD_SETUP 1
  231. #define CONFIG_OF_STDOUT_VIA_ALIAS 1
  232. /* I2C */
  233. #define CONFIG_HARD_I2C /* I2C with hardware support */
  234. #undef CONFIG_SOFT_I2C /* I2C bit-banged */
  235. #define CONFIG_FSL_I2C
  236. #define CFG_I2C_SPEED 400000 /* I2C speed and slave address */
  237. #define CFG_I2C_SLAVE 0x7F
  238. #define CFG_I2C_NOPROBES {0x51} /* Don't probe these addrs */
  239. #define CFG_I2C_OFFSET 0x3000
  240. /*
  241. * Config on-board RTC
  242. */
  243. #define CONFIG_RTC_DS1374 /* use ds1374 rtc via i2c */
  244. #define CFG_I2C_RTC_ADDR 0x68 /* at address 0x68 */
  245. /*
  246. * General PCI
  247. * Addresses are mapped 1-1.
  248. */
  249. #define CFG_PCI1_MEM_BASE 0x80000000
  250. #define CFG_PCI1_MEM_PHYS CFG_PCI1_MEM_BASE
  251. #define CFG_PCI1_MEM_SIZE 0x10000000 /* 256M */
  252. #define CFG_PCI1_MMIO_BASE 0x90000000
  253. #define CFG_PCI1_MMIO_PHYS CFG_PCI1_MMIO_BASE
  254. #define CFG_PCI1_MMIO_SIZE 0x10000000 /* 256M */
  255. #define CFG_PCI1_IO_BASE 0xd0000000
  256. #define CFG_PCI1_IO_PHYS CFG_PCI1_IO_BASE
  257. #define CFG_PCI1_IO_SIZE 0x04000000 /* 64M */
  258. #ifdef CONFIG_PCI
  259. #define CONFIG_NET_MULTI
  260. #define CONFIG_PCI_PNP /* do pci plug-and-play */
  261. #undef CONFIG_EEPRO100
  262. #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  263. #define CFG_PCI_SUBSYS_VENDORID 0x1957 /* Freescale */
  264. #endif /* CONFIG_PCI */
  265. #ifndef CONFIG_NET_MULTI
  266. #define CONFIG_NET_MULTI 1
  267. #endif
  268. /*
  269. * QE UEC ethernet configuration
  270. */
  271. #define CONFIG_UEC_ETH
  272. #define CONFIG_ETHPRIME "FSL UEC0"
  273. #define CONFIG_UEC_ETH1 /* ETH3 */
  274. #ifdef CONFIG_UEC_ETH1
  275. #define CFG_UEC1_UCC_NUM 2 /* UCC3 */
  276. #define CFG_UEC1_RX_CLK QE_CLK9
  277. #define CFG_UEC1_TX_CLK QE_CLK10
  278. #define CFG_UEC1_ETH_TYPE FAST_ETH
  279. #define CFG_UEC1_PHY_ADDR 4
  280. #define CFG_UEC1_INTERFACE_MODE ENET_100_MII
  281. #endif
  282. #define CONFIG_UEC_ETH2 /* ETH4 */
  283. #ifdef CONFIG_UEC_ETH2
  284. #define CFG_UEC2_UCC_NUM 1 /* UCC2 */
  285. #define CFG_UEC2_RX_CLK QE_CLK16
  286. #define CFG_UEC2_TX_CLK QE_CLK3
  287. #define CFG_UEC2_ETH_TYPE FAST_ETH
  288. #define CFG_UEC2_PHY_ADDR 0
  289. #define CFG_UEC2_INTERFACE_MODE ENET_100_MII
  290. #endif
  291. /*
  292. * Environment
  293. */
  294. #ifndef CFG_RAMBOOT
  295. #define CFG_ENV_IS_IN_FLASH 1
  296. #define CFG_ENV_ADDR (CFG_MONITOR_BASE + CFG_MONITOR_LEN)
  297. #define CFG_ENV_SECT_SIZE 0x20000
  298. #define CFG_ENV_SIZE 0x2000
  299. #else
  300. #define CFG_NO_FLASH 1 /* Flash is not usable now */
  301. #define CFG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */
  302. #define CFG_ENV_ADDR (CFG_MONITOR_BASE - 0x1000)
  303. #define CFG_ENV_SIZE 0x2000
  304. #endif
  305. #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
  306. #define CFG_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
  307. /*
  308. * BOOTP options
  309. */
  310. #define CONFIG_BOOTP_BOOTFILESIZE
  311. #define CONFIG_BOOTP_BOOTPATH
  312. #define CONFIG_BOOTP_GATEWAY
  313. #define CONFIG_BOOTP_HOSTNAME
  314. /*
  315. * Command line configuration.
  316. */
  317. #include <config_cmd_default.h>
  318. #define CONFIG_CMD_PING
  319. #define CONFIG_CMD_I2C
  320. #define CONFIG_CMD_ASKENV
  321. #if defined(CONFIG_PCI)
  322. #define CONFIG_CMD_PCI
  323. #endif
  324. #if defined(CFG_RAMBOOT)
  325. #undef CONFIG_CMD_ENV
  326. #undef CONFIG_CMD_LOADS
  327. #endif
  328. #undef CONFIG_WATCHDOG /* watchdog disabled */
  329. /*
  330. * Miscellaneous configurable options
  331. */
  332. #define CFG_LONGHELP /* undef to save memory */
  333. #define CFG_LOAD_ADDR 0x2000000 /* default load address */
  334. #define CFG_PROMPT "=> " /* Monitor Command Prompt */
  335. #if (CONFIG_CMD_KGDB)
  336. #define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
  337. #else
  338. #define CFG_CBSIZE 256 /* Console I/O Buffer Size */
  339. #endif
  340. #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
  341. #define CFG_MAXARGS 16 /* max number of command args */
  342. #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
  343. #define CFG_HZ 1000 /* decrementer freq: 1ms ticks */
  344. /*
  345. * For booting Linux, the board info and command line data
  346. * have to be in the first 8 MB of memory, since this is
  347. * the maximum mapped by the Linux kernel during initialization.
  348. */
  349. #define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
  350. /*
  351. * Core HID Setup
  352. */
  353. #define CFG_HID0_INIT 0x000000000
  354. #define CFG_HID0_FINAL HID0_ENABLE_MACHINE_CHECK
  355. #define CFG_HID2 HID2_HBE
  356. /*
  357. * MMU Setup
  358. */
  359. /* DDR: cache cacheable */
  360. #define CFG_IBAT0L (CFG_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
  361. #define CFG_IBAT0U (CFG_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
  362. #define CFG_DBAT0L CFG_IBAT0L
  363. #define CFG_DBAT0U CFG_IBAT0U
  364. /* IMMRBAR & PCI IO: cache-inhibit and guarded */
  365. #define CFG_IBAT1L (CFG_IMMR | BATL_PP_10 | \
  366. BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  367. #define CFG_IBAT1U (CFG_IMMR | BATU_BL_4M | BATU_VS | BATU_VP)
  368. #define CFG_DBAT1L CFG_IBAT1L
  369. #define CFG_DBAT1U CFG_IBAT1U
  370. /* FLASH: icache cacheable, but dcache-inhibit and guarded */
  371. #define CFG_IBAT2L (CFG_FLASH_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
  372. #define CFG_IBAT2U (CFG_FLASH_BASE | BATU_BL_32M | BATU_VS | BATU_VP)
  373. #define CFG_DBAT2L (CFG_FLASH_BASE | BATL_PP_10 | \
  374. BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  375. #define CFG_DBAT2U CFG_IBAT2U
  376. #define CFG_IBAT3L (0)
  377. #define CFG_IBAT3U (0)
  378. #define CFG_DBAT3L CFG_IBAT3L
  379. #define CFG_DBAT3U CFG_IBAT3U
  380. /* Stack in dcache: cacheable, no memory coherence */
  381. #define CFG_IBAT4L (CFG_INIT_RAM_ADDR | BATL_PP_10)
  382. #define CFG_IBAT4U (CFG_INIT_RAM_ADDR | BATU_BL_128K | BATU_VS | BATU_VP)
  383. #define CFG_DBAT4L CFG_IBAT4L
  384. #define CFG_DBAT4U CFG_IBAT4U
  385. #ifdef CONFIG_PCI
  386. /* PCI MEM space: cacheable */
  387. #define CFG_IBAT5L (CFG_PCI1_MEM_PHYS | BATL_PP_10 | BATL_MEMCOHERENCE)
  388. #define CFG_IBAT5U (CFG_PCI1_MEM_PHYS | BATU_BL_256M | BATU_VS | BATU_VP)
  389. #define CFG_DBAT5L CFG_IBAT5L
  390. #define CFG_DBAT5U CFG_IBAT5U
  391. /* PCI MMIO space: cache-inhibit and guarded */
  392. #define CFG_IBAT6L (CFG_PCI1_MMIO_PHYS | BATL_PP_10 | \
  393. BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  394. #define CFG_IBAT6U (CFG_PCI1_MMIO_PHYS | BATU_BL_256M | BATU_VS | BATU_VP)
  395. #define CFG_DBAT6L CFG_IBAT6L
  396. #define CFG_DBAT6U CFG_IBAT6U
  397. #else
  398. #define CFG_IBAT5L (0)
  399. #define CFG_IBAT5U (0)
  400. #define CFG_IBAT6L (0)
  401. #define CFG_IBAT6U (0)
  402. #define CFG_DBAT5L CFG_IBAT5L
  403. #define CFG_DBAT5U CFG_IBAT5U
  404. #define CFG_DBAT6L CFG_IBAT6L
  405. #define CFG_DBAT6U CFG_IBAT6U
  406. #endif
  407. /* Nothing in BAT7 */
  408. #define CFG_IBAT7L (0)
  409. #define CFG_IBAT7U (0)
  410. #define CFG_DBAT7L CFG_IBAT7L
  411. #define CFG_DBAT7U CFG_IBAT7U
  412. /*
  413. * Internal Definitions
  414. *
  415. * Boot Flags
  416. */
  417. #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
  418. #define BOOTFLAG_WARM 0x02 /* Software reboot */
  419. #if (CONFIG_CMD_KGDB)
  420. #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */
  421. #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
  422. #endif
  423. /*
  424. * Environment Configuration
  425. */
  426. #define CONFIG_ENV_OVERWRITE
  427. #define CONFIG_HAS_ETH0 /* add support for "ethaddr" */
  428. #define CONFIG_ETHADDR 00:04:9f:ef:03:01
  429. #define CONFIG_HAS_ETH1 /* add support for "eth1addr" */
  430. #define CONFIG_ETH1ADDR 00:04:9f:ef:03:02
  431. #define CONFIG_IPADDR 10.0.0.2
  432. #define CONFIG_SERVERIP 10.0.0.1
  433. #define CONFIG_GATEWAYIP 10.0.0.1
  434. #define CONFIG_NETMASK 255.0.0.0
  435. #define CONFIG_NETDEV eth1
  436. #define CONFIG_HOSTNAME mpc8323erdb
  437. #define CONFIG_ROOTPATH /nfsroot
  438. #define CONFIG_RAMDISKFILE rootfs.ext2.gz.uboot
  439. #define CONFIG_BOOTFILE uImage
  440. #define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */
  441. #define CONFIG_FDTFILE mpc832x_rdb.dtb
  442. #define CONFIG_LOADADDR 200000 /* default location for tftp and bootm */
  443. #define CONFIG_BOOTDELAY -1 /* -1 disables auto-boot */
  444. #define CONFIG_BAUDRATE 115200
  445. #define XMK_STR(x) #x
  446. #define MK_STR(x) XMK_STR(x)
  447. #define CONFIG_EXTRA_ENV_SETTINGS \
  448. "netdev=" MK_STR(CONFIG_NETDEV) "\0" \
  449. "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \
  450. "tftpflash=tftp $loadaddr $uboot;" \
  451. "protect off " MK_STR(TEXT_BASE) " +$filesize; " \
  452. "erase " MK_STR(TEXT_BASE) " +$filesize; " \
  453. "cp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize; " \
  454. "protect on " MK_STR(TEXT_BASE) " +$filesize; " \
  455. "cmp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize\0" \
  456. "fdtaddr=400000\0" \
  457. "fdtfile=" MK_STR(CONFIG_FDTFILE) "\0" \
  458. "ramdiskaddr=1000000\0" \
  459. "ramdiskfile=" MK_STR(CONFIG_RAMDISKFILE) "\0" \
  460. "console=ttyS0\0" \
  461. "setbootargs=setenv bootargs " \
  462. "root=$rootdev rw console=$console,$baudrate $othbootargs\0" \
  463. "setipargs=setenv bootargs nfsroot=$serverip:$rootpath " \
  464. "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
  465. "root=$rootdev rw console=$console,$baudrate $othbootargs\0"
  466. #define CONFIG_NFSBOOTCOMMAND \
  467. "setenv rootdev /dev/nfs;" \
  468. "run setbootargs;" \
  469. "run setipargs;" \
  470. "tftp $loadaddr $bootfile;" \
  471. "tftp $fdtaddr $fdtfile;" \
  472. "bootm $loadaddr - $fdtaddr"
  473. #define CONFIG_RAMBOOTCOMMAND \
  474. "setenv rootdev /dev/ram;" \
  475. "run setbootargs;" \
  476. "tftp $ramdiskaddr $ramdiskfile;" \
  477. "tftp $loadaddr $bootfile;" \
  478. "tftp $fdtaddr $fdtfile;" \
  479. "bootm $loadaddr $ramdiskaddr $fdtaddr"
  480. #undef MK_STR
  481. #undef XMK_STR
  482. #endif /* __CONFIG_H */