P1022DS.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. /*
  2. * Copyright 2010-2012 Freescale Semiconductor, Inc.
  3. * Authors: Srikanth Srinivasan <srikanth.srinivasan@freescale.com>
  4. * Timur Tabi <timur@freescale.com>
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License as published by the Free
  8. * Software Foundation; either version 2 of the License, or (at your option)
  9. * any later version.
  10. */
  11. #ifndef __CONFIG_H
  12. #define __CONFIG_H
  13. #include "../board/freescale/common/ics307_clk.h"
  14. #ifdef CONFIG_36BIT
  15. #define CONFIG_PHYS_64BIT
  16. #endif
  17. #ifdef CONFIG_SDCARD
  18. #define CONFIG_RAMBOOT_SDCARD
  19. #define CONFIG_SYS_RAMBOOT
  20. #define CONFIG_SYS_EXTRA_ENV_RELOC
  21. #define CONFIG_SYS_TEXT_BASE 0x11000000
  22. #define CONFIG_RESET_VECTOR_ADDRESS 0x1107fffc
  23. #endif
  24. #ifdef CONFIG_SPIFLASH
  25. #define CONFIG_RAMBOOT_SPIFLASH
  26. #define CONFIG_SYS_RAMBOOT
  27. #define CONFIG_SYS_EXTRA_ENV_RELOC
  28. #define CONFIG_SYS_TEXT_BASE 0x11000000
  29. #define CONFIG_RESET_VECTOR_ADDRESS 0x1107fffc
  30. #endif
  31. /* High Level Configuration Options */
  32. #define CONFIG_BOOKE /* BOOKE */
  33. #define CONFIG_E500 /* BOOKE e500 family */
  34. #define CONFIG_MPC85xx /* MPC8540/60/55/41/48 */
  35. #define CONFIG_P1022
  36. #define CONFIG_P1022DS
  37. #define CONFIG_MP /* support multiple processors */
  38. #ifndef CONFIG_SYS_TEXT_BASE
  39. #define CONFIG_SYS_TEXT_BASE 0xeff80000
  40. #endif
  41. #ifndef CONFIG_RESET_VECTOR_ADDRESS
  42. #define CONFIG_RESET_VECTOR_ADDRESS 0xeffffffc
  43. #endif
  44. #define CONFIG_FSL_ELBC /* Has Enhanced localbus controller */
  45. #define CONFIG_PCI /* Enable PCI/PCIE */
  46. #define CONFIG_PCIE1 /* PCIE controler 1 (slot 1) */
  47. #define CONFIG_PCIE2 /* PCIE controler 2 (slot 2) */
  48. #define CONFIG_PCIE3 /* PCIE controler 3 (ULI bridge) */
  49. #define CONFIG_FSL_PCI_INIT /* Use common FSL init code */
  50. #define CONFIG_FSL_PCIE_RESET /* need PCIe reset errata */
  51. #define CONFIG_SYS_PCI_64BIT /* enable 64-bit PCI resources */
  52. #define CONFIG_ENABLE_36BIT_PHYS
  53. #ifdef CONFIG_PHYS_64BIT
  54. #define CONFIG_ADDR_MAP
  55. #define CONFIG_SYS_NUM_ADDR_MAP 16 /* number of TLB1 entries */
  56. #endif
  57. #define CONFIG_FSL_LAW /* Use common FSL init code */
  58. #define CONFIG_SYS_CLK_FREQ get_board_sys_clk()
  59. #define CONFIG_DDR_CLK_FREQ get_board_ddr_clk()
  60. #define CONFIG_ICS307_REFCLK_HZ 33333000 /* ICS307 clock chip ref freq */
  61. /*
  62. * These can be toggled for performance analysis, otherwise use default.
  63. */
  64. #define CONFIG_L2_CACHE
  65. #define CONFIG_BTB
  66. #define CONFIG_SYS_MEMTEST_START 0x00000000
  67. #define CONFIG_SYS_MEMTEST_END 0x7fffffff
  68. #define CONFIG_SYS_CCSRBAR 0xffe00000
  69. #define CONFIG_SYS_CCSRBAR_PHYS_LOW CONFIG_SYS_CCSRBAR
  70. /* DDR Setup */
  71. #define CONFIG_DDR_SPD
  72. #define CONFIG_VERY_BIG_RAM
  73. #define CONFIG_FSL_DDR3
  74. #ifdef CONFIG_DDR_ECC
  75. #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER
  76. #define CONFIG_MEM_INIT_VALUE 0xdeadbeef
  77. #endif
  78. #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000
  79. #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE
  80. #define CONFIG_NUM_DDR_CONTROLLERS 1
  81. #define CONFIG_DIMM_SLOTS_PER_CTLR 1
  82. #define CONFIG_CHIP_SELECTS_PER_CTRL (2 * CONFIG_DIMM_SLOTS_PER_CTLR)
  83. /* I2C addresses of SPD EEPROMs */
  84. #define CONFIG_SYS_SPD_BUS_NUM 1
  85. #define SPD_EEPROM_ADDRESS 0x51 /* CTLR 0 DIMM 0 */
  86. /*
  87. * Memory map
  88. *
  89. * 0x0000_0000 0x7fff_ffff DDR 2G Cacheable
  90. * 0x8000_0000 0xdfff_ffff PCI Express Mem 1.5G non-cacheable
  91. * 0xffc0_0000 0xffc2_ffff PCI IO range 192K non-cacheable
  92. *
  93. * Localbus cacheable (TBD)
  94. * 0xXXXX_XXXX 0xXXXX_XXXX SRAM YZ M Cacheable
  95. *
  96. * Localbus non-cacheable
  97. * 0xe000_0000 0xe80f_ffff Promjet/free 128M non-cacheable
  98. * 0xe800_0000 0xefff_ffff FLASH 128M non-cacheable
  99. * 0xffdf_0000 0xffdf_7fff PIXIS 32K non-cacheable TLB0
  100. * 0xffd0_0000 0xffd0_3fff L1 for stack 16K Cacheable TLB0
  101. * 0xffe0_0000 0xffef_ffff CCSR 1M non-cacheable
  102. */
  103. /*
  104. * Local Bus Definitions
  105. */
  106. #define CONFIG_SYS_FLASH_BASE 0xe0000000 /* start of FLASH 128M */
  107. #ifdef CONFIG_PHYS_64BIT
  108. #define CONFIG_SYS_FLASH_BASE_PHYS 0xfe0000000ull
  109. #else
  110. #define CONFIG_SYS_FLASH_BASE_PHYS CONFIG_SYS_FLASH_BASE
  111. #endif
  112. #define CONFIG_FLASH_BR_PRELIM \
  113. (BR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS + 0x8000000) | BR_PS_16 | BR_V)
  114. #define CONFIG_FLASH_OR_PRELIM (OR_AM_128MB | 0xff7)
  115. #define CONFIG_SYS_BR0_PRELIM CONFIG_FLASH_BR_PRELIM /* NOR Base Address */
  116. #define CONFIG_SYS_OR0_PRELIM CONFIG_FLASH_OR_PRELIM /* NOR Options */
  117. #define CONFIG_SYS_BR1_PRELIM \
  118. (BR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | BR_PS_16 | BR_V)
  119. #define CONFIG_SYS_OR1_PRELIM CONFIG_FLASH_OR_PRELIM
  120. #define CONFIG_SYS_FLASH_BANKS_LIST \
  121. {CONFIG_SYS_FLASH_BASE_PHYS + 0x8000000, CONFIG_SYS_FLASH_BASE_PHYS}
  122. #define CONFIG_SYS_FLASH_QUIET_TEST
  123. #define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */
  124. #define CONFIG_SYS_MAX_FLASH_BANKS 2
  125. #define CONFIG_SYS_MAX_FLASH_SECT 1024
  126. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
  127. #define CONFIG_FLASH_CFI_DRIVER
  128. #define CONFIG_SYS_FLASH_CFI
  129. #define CONFIG_SYS_FLASH_EMPTY_INFO
  130. #define CONFIG_BOARD_EARLY_INIT_F
  131. #define CONFIG_BOARD_EARLY_INIT_R
  132. #define CONFIG_MISC_INIT_R
  133. #define CONFIG_HWCONFIG
  134. #define CONFIG_FSL_NGPIXIS
  135. #define PIXIS_BASE 0xffdf0000 /* PIXIS registers */
  136. #ifdef CONFIG_PHYS_64BIT
  137. #define PIXIS_BASE_PHYS 0xfffdf0000ull
  138. #else
  139. #define PIXIS_BASE_PHYS PIXIS_BASE
  140. #endif
  141. #define CONFIG_SYS_BR2_PRELIM (BR_PHYS_ADDR(PIXIS_BASE_PHYS) | BR_PS_8 | BR_V)
  142. #define CONFIG_SYS_OR2_PRELIM (OR_AM_32KB | 0x6ff7)
  143. #define PIXIS_LBMAP_SWITCH 7
  144. #define PIXIS_LBMAP_MASK 0xF0
  145. #define PIXIS_LBMAP_ALTBANK 0x20
  146. #define PIXIS_ELBC_SPI_MASK 0xc0
  147. #define PIXIS_SPI 0x80
  148. #define CONFIG_SYS_INIT_RAM_LOCK
  149. #define CONFIG_SYS_INIT_RAM_ADDR 0xffd00000 /* Initial L1 address */
  150. #define CONFIG_SYS_INIT_RAM_SIZE 0x00004000 /* Size of used area in RAM */
  151. #define CONFIG_SYS_GBL_DATA_OFFSET \
  152. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  153. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  154. #define CONFIG_SYS_MONITOR_LEN (512 * 1024)
  155. #define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
  156. /*
  157. * Serial Port
  158. */
  159. #define CONFIG_CONS_INDEX 1
  160. #define CONFIG_SYS_NS16550
  161. #define CONFIG_SYS_NS16550_SERIAL
  162. #define CONFIG_SYS_NS16550_REG_SIZE 1
  163. #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
  164. #define CONFIG_SYS_BAUDRATE_TABLE \
  165. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
  166. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500)
  167. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600)
  168. /* Use the HUSH parser */
  169. #define CONFIG_SYS_HUSH_PARSER
  170. /* Video */
  171. #define CONFIG_FSL_DIU_FB
  172. #ifdef CONFIG_FSL_DIU_FB
  173. #define CONFIG_SYS_DIU_ADDR (CONFIG_SYS_CCSRBAR + 0x10000)
  174. #define CONFIG_VIDEO
  175. #define CONFIG_CMD_BMP
  176. #define CONFIG_CFB_CONSOLE
  177. #define CONFIG_VIDEO_SW_CURSOR
  178. #define CONFIG_VGA_AS_SINGLE_DEVICE
  179. #define CONFIG_VIDEO_LOGO
  180. #define CONFIG_VIDEO_BMP_LOGO
  181. #define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
  182. /*
  183. * With CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS, flash I/O is really slow, so
  184. * disable empty flash sector detection, which is I/O-intensive.
  185. */
  186. #undef CONFIG_SYS_FLASH_EMPTY_INFO
  187. #endif
  188. #ifndef CONFIG_FSL_DIU_FB
  189. #define CONFIG_ATI
  190. #endif
  191. #ifdef CONFIG_ATI
  192. #define VIDEO_IO_OFFSET CONFIG_SYS_PCIE1_IO_VIRT
  193. #define CONFIG_VIDEO
  194. #define CONFIG_BIOSEMU
  195. #define CONFIG_VIDEO_SW_CURSOR
  196. #define CONFIG_ATI_RADEON_FB
  197. #define CONFIG_VIDEO_LOGO
  198. #define CONFIG_SYS_ISA_IO_BASE_ADDRESS VIDEO_IO_OFFSET
  199. #define CONFIG_CFB_CONSOLE
  200. #define CONFIG_VGA_AS_SINGLE_DEVICE
  201. #endif
  202. /*
  203. * Pass open firmware flat tree
  204. */
  205. #define CONFIG_OF_LIBFDT
  206. #define CONFIG_OF_BOARD_SETUP
  207. #define CONFIG_OF_STDOUT_VIA_ALIAS
  208. /* new uImage format support */
  209. #define CONFIG_FIT
  210. #define CONFIG_FIT_VERBOSE
  211. /* I2C */
  212. #define CONFIG_FSL_I2C
  213. #define CONFIG_HARD_I2C
  214. #define CONFIG_I2C_MULTI_BUS
  215. #define CONFIG_SYS_I2C_SPEED 400000
  216. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57
  217. #define CONFIG_SYS_I2C_SLAVE 0x7F
  218. #define CONFIG_SYS_I2C_NOPROBES {{0, 0x29}}
  219. #define CONFIG_SYS_I2C_OFFSET 0x3000
  220. #define CONFIG_SYS_I2C2_OFFSET 0x3100
  221. /*
  222. * I2C2 EEPROM
  223. */
  224. #define CONFIG_ID_EEPROM
  225. #define CONFIG_SYS_I2C_EEPROM_NXID
  226. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x57
  227. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
  228. #define CONFIG_SYS_EEPROM_BUS_NUM 1
  229. /*
  230. * eSPI - Enhanced SPI
  231. */
  232. #define CONFIG_SPI_FLASH
  233. #define CONFIG_SPI_FLASH_SPANSION
  234. #define CONFIG_HARD_SPI
  235. #define CONFIG_FSL_ESPI
  236. #define CONFIG_CMD_SF
  237. #define CONFIG_SF_DEFAULT_SPEED 10000000
  238. #define CONFIG_SF_DEFAULT_MODE 0
  239. /*
  240. * General PCI
  241. * Memory space is mapped 1-1, but I/O space must start from 0.
  242. */
  243. /* controller 1, Slot 2, tgtid 1, Base address a000 */
  244. #define CONFIG_SYS_PCIE1_MEM_VIRT 0xc0000000
  245. #ifdef CONFIG_PHYS_64BIT
  246. #define CONFIG_SYS_PCIE1_MEM_BUS 0xe0000000
  247. #define CONFIG_SYS_PCIE1_MEM_PHYS 0xc40000000ull
  248. #else
  249. #define CONFIG_SYS_PCIE1_MEM_BUS 0xc0000000
  250. #define CONFIG_SYS_PCIE1_MEM_PHYS 0xc0000000
  251. #endif
  252. #define CONFIG_SYS_PCIE1_MEM_SIZE 0x20000000 /* 512M */
  253. #define CONFIG_SYS_PCIE1_IO_VIRT 0xffc20000
  254. #define CONFIG_SYS_PCIE1_IO_BUS 0x00000000
  255. #ifdef CONFIG_PHYS_64BIT
  256. #define CONFIG_SYS_PCIE1_IO_PHYS 0xfffc20000ull
  257. #else
  258. #define CONFIG_SYS_PCIE1_IO_PHYS 0xffc20000
  259. #endif
  260. #define CONFIG_SYS_PCIE1_IO_SIZE 0x00010000 /* 64k */
  261. /* controller 2, direct to uli, tgtid 2, Base address 9000 */
  262. #define CONFIG_SYS_PCIE2_MEM_VIRT 0xa0000000
  263. #ifdef CONFIG_PHYS_64BIT
  264. #define CONFIG_SYS_PCIE2_MEM_BUS 0xe0000000
  265. #define CONFIG_SYS_PCIE2_MEM_PHYS 0xc20000000ull
  266. #else
  267. #define CONFIG_SYS_PCIE2_MEM_BUS 0xa0000000
  268. #define CONFIG_SYS_PCIE2_MEM_PHYS 0xa0000000
  269. #endif
  270. #define CONFIG_SYS_PCIE2_MEM_SIZE 0x20000000 /* 512M */
  271. #define CONFIG_SYS_PCIE2_IO_VIRT 0xffc10000
  272. #define CONFIG_SYS_PCIE2_IO_BUS 0x00000000
  273. #ifdef CONFIG_PHYS_64BIT
  274. #define CONFIG_SYS_PCIE2_IO_PHYS 0xfffc10000ull
  275. #else
  276. #define CONFIG_SYS_PCIE2_IO_PHYS 0xffc10000
  277. #endif
  278. #define CONFIG_SYS_PCIE2_IO_SIZE 0x00010000 /* 64k */
  279. /* controller 3, Slot 1, tgtid 3, Base address b000 */
  280. #define CONFIG_SYS_PCIE3_MEM_VIRT 0x80000000
  281. #ifdef CONFIG_PHYS_64BIT
  282. #define CONFIG_SYS_PCIE3_MEM_BUS 0xe0000000
  283. #define CONFIG_SYS_PCIE3_MEM_PHYS 0xc00000000ull
  284. #else
  285. #define CONFIG_SYS_PCIE3_MEM_BUS 0x80000000
  286. #define CONFIG_SYS_PCIE3_MEM_PHYS 0x80000000
  287. #endif
  288. #define CONFIG_SYS_PCIE3_MEM_SIZE 0x20000000 /* 512M */
  289. #define CONFIG_SYS_PCIE3_IO_VIRT 0xffc00000
  290. #define CONFIG_SYS_PCIE3_IO_BUS 0x00000000
  291. #ifdef CONFIG_PHYS_64BIT
  292. #define CONFIG_SYS_PCIE3_IO_PHYS 0xfffc00000ull
  293. #else
  294. #define CONFIG_SYS_PCIE3_IO_PHYS 0xffc00000
  295. #endif
  296. #define CONFIG_SYS_PCIE3_IO_SIZE 0x00010000 /* 64k */
  297. #ifdef CONFIG_PCI
  298. #define CONFIG_PCI_PNP /* do pci plug-and-play */
  299. #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  300. #define CONFIG_E1000 /* Define e1000 pci Ethernet card */
  301. #endif
  302. /* SATA */
  303. #define CONFIG_LIBATA
  304. #define CONFIG_FSL_SATA
  305. #define CONFIG_SYS_SATA_MAX_DEVICE 2
  306. #define CONFIG_SATA1
  307. #define CONFIG_SYS_SATA1 CONFIG_SYS_MPC85xx_SATA1_ADDR
  308. #define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA
  309. #define CONFIG_SATA2
  310. #define CONFIG_SYS_SATA2 CONFIG_SYS_MPC85xx_SATA2_ADDR
  311. #define CONFIG_SYS_SATA2_FLAGS FLAGS_DMA
  312. #ifdef CONFIG_FSL_SATA
  313. #define CONFIG_LBA48
  314. #define CONFIG_CMD_SATA
  315. #define CONFIG_DOS_PARTITION
  316. #define CONFIG_CMD_EXT2
  317. #endif
  318. #define CONFIG_MMC
  319. #ifdef CONFIG_MMC
  320. #define CONFIG_CMD_MMC
  321. #define CONFIG_FSL_ESDHC
  322. #define CONFIG_GENERIC_MMC
  323. #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR
  324. #endif
  325. #if defined(CONFIG_MMC) || defined(CONFIG_USB_EHCI)
  326. #define CONFIG_CMD_EXT2
  327. #define CONFIG_CMD_FAT
  328. #define CONFIG_DOS_PARTITION
  329. #endif
  330. #define CONFIG_TSEC_ENET
  331. #ifdef CONFIG_TSEC_ENET
  332. #define CONFIG_TSECV2
  333. #define CONFIG_MII /* MII PHY management */
  334. #define CONFIG_TSEC1 1
  335. #define CONFIG_TSEC1_NAME "eTSEC1"
  336. #define CONFIG_TSEC2 1
  337. #define CONFIG_TSEC2_NAME "eTSEC2"
  338. #define TSEC1_PHY_ADDR 1
  339. #define TSEC2_PHY_ADDR 2
  340. #define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
  341. #define TSEC2_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
  342. #define TSEC1_PHYIDX 0
  343. #define TSEC2_PHYIDX 0
  344. #define CONFIG_ETHPRIME "eTSEC1"
  345. #define CONFIG_PHY_GIGE /* Include GbE speed/duplex detection */
  346. #endif
  347. /*
  348. * Environment
  349. */
  350. #ifdef CONFIG_SYS_RAMBOOT
  351. #ifdef CONFIG_RAMBOOT_SPIFLASH
  352. #define CONFIG_ENV_IS_IN_SPI_FLASH
  353. #define CONFIG_ENV_SPI_BUS 0
  354. #define CONFIG_ENV_SPI_CS 0
  355. #define CONFIG_ENV_SPI_MAX_HZ 10000000
  356. #define CONFIG_ENV_SPI_MODE 0
  357. #define CONFIG_ENV_SIZE 0x2000 /* 8KB */
  358. #define CONFIG_ENV_OFFSET 0x100000 /* 1MB */
  359. #define CONFIG_ENV_SECT_SIZE 0x10000
  360. #elif defined(CONFIG_RAMBOOT_SDCARD)
  361. #define CONFIG_ENV_IS_IN_MMC
  362. #define CONFIG_ENV_SIZE 0x2000
  363. #define CONFIG_SYS_MMC_ENV_DEV 0
  364. #elif defined(CONFIG_NAND_U_BOOT)
  365. #define CONFIG_ENV_IS_IN_NAND
  366. #define CONFIG_ENV_SIZE CONFIG_SYS_NAND_BLOCK_SIZE
  367. #define CONFIG_ENV_OFFSET ((512 * 1024) + CONFIG_SYS_NAND_BLOCK_SIZE)
  368. #define CONFIG_ENV_RANGE (3 * CONFIG_ENV_SIZE)
  369. #else
  370. #define CONFIG_ENV_IS_NOWHERE /* Store ENV in memory only */
  371. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
  372. #define CONFIG_ENV_SIZE 0x2000
  373. #endif
  374. #else
  375. #define CONFIG_ENV_IS_IN_FLASH
  376. #if CONFIG_SYS_MONITOR_BASE > 0xfff80000
  377. #define CONFIG_ENV_ADDR 0xfff80000
  378. #else
  379. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE)
  380. #endif
  381. #define CONFIG_ENV_SIZE 0x2000
  382. #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K (one sector) */
  383. #endif
  384. #define CONFIG_LOADS_ECHO
  385. #define CONFIG_SYS_LOADS_BAUD_CHANGE
  386. /*
  387. * Command line configuration.
  388. */
  389. #include <config_cmd_default.h>
  390. #define CONFIG_CMD_ELF
  391. #define CONFIG_CMD_ERRATA
  392. #define CONFIG_CMD_IRQ
  393. #define CONFIG_CMD_I2C
  394. #define CONFIG_CMD_MII
  395. #define CONFIG_CMD_PING
  396. #define CONFIG_CMD_SETEXPR
  397. #define CONFIG_CMD_REGINFO
  398. #ifdef CONFIG_PCI
  399. #define CONFIG_CMD_PCI
  400. #define CONFIG_CMD_NET
  401. #endif
  402. /*
  403. * USB
  404. */
  405. #define CONFIG_HAS_FSL_DR_USB
  406. #ifdef CONFIG_HAS_FSL_DR_USB
  407. #define CONFIG_USB_EHCI
  408. #ifdef CONFIG_USB_EHCI
  409. #define CONFIG_CMD_USB
  410. #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
  411. #define CONFIG_USB_EHCI_FSL
  412. #define CONFIG_USB_STORAGE
  413. #define CONFIG_CMD_FAT
  414. #endif
  415. #endif
  416. /*
  417. * Miscellaneous configurable options
  418. */
  419. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  420. #define CONFIG_CMDLINE_EDITING /* Command-line editing */
  421. #define CONFIG_AUTO_COMPLETE /* add autocompletion support */
  422. #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
  423. #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
  424. #ifdef CONFIG_CMD_KGDB
  425. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  426. #else
  427. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  428. #endif
  429. /* Print Buffer Size */
  430. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  431. #define CONFIG_SYS_MAXARGS 16
  432. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  433. #define CONFIG_SYS_HZ 1000
  434. /*
  435. * For booting Linux, the board info and command line data
  436. * have to be in the first 64 MB of memory, since this is
  437. * the maximum mapped by the Linux kernel during initialization.
  438. */
  439. #define CONFIG_SYS_BOOTMAPSZ (64 << 20) /* Initial Memory map for Linux*/
  440. #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */
  441. #ifdef CONFIG_CMD_KGDB
  442. #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
  443. #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
  444. #endif
  445. /*
  446. * Environment Configuration
  447. */
  448. #define CONFIG_HOSTNAME p1022ds
  449. #define CONFIG_ROOTPATH "/opt/nfsroot"
  450. #define CONFIG_BOOTFILE "uImage"
  451. #define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */
  452. #define CONFIG_LOADADDR 1000000
  453. #define CONFIG_BOOTDELAY 10 /* -1 disables auto-boot */
  454. #define CONFIG_BAUDRATE 115200
  455. #define CONFIG_EXTRA_ENV_SETTINGS \
  456. "netdev=eth0\0" \
  457. "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \
  458. "ubootaddr=" MK_STR(CONFIG_SYS_TEXT_BASE) "\0" \
  459. "tftpflash=tftpboot $loadaddr $uboot && " \
  460. "protect off $ubootaddr +$filesize && " \
  461. "erase $ubootaddr +$filesize && " \
  462. "cp.b $loadaddr $ubootaddr $filesize && " \
  463. "protect on $ubootaddr +$filesize && " \
  464. "cmp.b $loadaddr $ubootaddr $filesize\0" \
  465. "consoledev=ttyS0\0" \
  466. "ramdiskaddr=2000000\0" \
  467. "ramdiskfile=rootfs.ext2.gz.uboot\0" \
  468. "fdtaddr=c00000\0" \
  469. "fdtfile=p1022ds.dtb\0" \
  470. "bdev=sda3\0" \
  471. "hwconfig=esdhc;audclk:12\0"
  472. #define CONFIG_HDBOOT \
  473. "setenv bootargs root=/dev/$bdev rw " \
  474. "console=$consoledev,$baudrate $othbootargs $videobootargs;" \
  475. "tftp $loadaddr $bootfile;" \
  476. "tftp $fdtaddr $fdtfile;" \
  477. "bootm $loadaddr - $fdtaddr"
  478. #define CONFIG_NFSBOOTCOMMAND \
  479. "setenv bootargs root=/dev/nfs rw " \
  480. "nfsroot=$serverip:$rootpath " \
  481. "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
  482. "console=$consoledev,$baudrate $othbootargs $videobootargs;" \
  483. "tftp $loadaddr $bootfile;" \
  484. "tftp $fdtaddr $fdtfile;" \
  485. "bootm $loadaddr - $fdtaddr"
  486. #define CONFIG_RAMBOOTCOMMAND \
  487. "setenv bootargs root=/dev/ram rw " \
  488. "console=$consoledev,$baudrate $othbootargs $videobootargs;" \
  489. "tftp $ramdiskaddr $ramdiskfile;" \
  490. "tftp $loadaddr $bootfile;" \
  491. "tftp $fdtaddr $fdtfile;" \
  492. "bootm $loadaddr $ramdiskaddr $fdtaddr"
  493. #define CONFIG_BOOTCOMMAND CONFIG_RAMBOOTCOMMAND
  494. #endif