MPC8323ERDB.h 16 KB

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