P2020COME.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  1. /*
  2. * Copyright 2009-2010,2012 Freescale Semiconductor, Inc.
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  20. * MA 02111-1307 USA
  21. */
  22. #ifndef __CONFIG_H
  23. #define __CONFIG_H
  24. /* The P2020COME board is only booted via the Freescale On-Chip ROM */
  25. #define CONFIG_SYS_RAMBOOT
  26. #define CONFIG_SYS_EXTRA_ENV_RELOC
  27. #define CONFIG_SYS_TEXT_BASE 0xf8f80000
  28. #define CONFIG_RESET_VECTOR_ADDRESS 0xf8fffffc
  29. #ifdef CONFIG_SDCARD
  30. #define CONFIG_RAMBOOT_SDCARD 1
  31. #endif
  32. #ifdef CONFIG_SPIFLASH
  33. #define CONFIG_RAMBOOT_SPIFLASH 1
  34. #endif
  35. #ifndef CONFIG_SYS_MONITOR_BASE
  36. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
  37. #endif
  38. /* High Level Configuration Options */
  39. #define CONFIG_BOOKE 1 /* BOOKE */
  40. #define CONFIG_E500 1 /* BOOKE e500 family */
  41. #define CONFIG_MPC85xx 1 /* MPC8540/60/55/41/48/P1020/P2020,etc*/
  42. #define CONFIG_P2020 1
  43. #define CONFIG_P2020COME 1
  44. #define CONFIG_FSL_ELBC 1 /* Enable eLBC Support */
  45. #define CONFIG_MP
  46. #define CONFIG_PCI 1 /* Enable PCI/PCIE */
  47. #if defined(CONFIG_PCI)
  48. #define CONFIG_PCIE1 1 /* PCIE controller 1 (slot 1) */
  49. #define CONFIG_PCIE2 1 /* PCIE controller 2 (slot 2) */
  50. #define CONFIG_PCIE3 1 /* PCIE controller 3 (slot 3) */
  51. #define CONFIG_FSL_PCI_INIT 1 /* Use common FSL init code */
  52. #define CONFIG_FSL_PCIE_RESET 1 /* need PCIe reset errata */
  53. #define CONFIG_SYS_PCI_64BIT 1 /* enable 64-bit PCI resources */
  54. #endif /* #if defined(CONFIG_PCI) */
  55. #define CONFIG_FSL_LAW 1 /* Use common FSL init code */
  56. #define CONFIG_TSEC_ENET /* tsec ethernet support */
  57. #define CONFIG_ENV_OVERWRITE
  58. #if defined(CONFIG_PCI)
  59. #define CONFIG_E1000 1 /* E1000 pci Ethernet card */
  60. #endif
  61. #ifndef __ASSEMBLY__
  62. extern unsigned long get_board_ddr_clk(unsigned long dummy);
  63. extern unsigned long get_board_sys_clk(unsigned long dummy);
  64. #endif
  65. /*
  66. * For P2020COME DDRCLK and SYSCLK are from the same oscillator
  67. * For DA phase the SYSCLK is 66MHz
  68. * For EA phase the SYSCLK is 100MHz
  69. */
  70. #define CONFIG_DDR_CLK_FREQ get_board_ddr_clk(0)
  71. #define CONFIG_SYS_CLK_FREQ get_board_sys_clk(0)
  72. #define CONFIG_HWCONFIG
  73. /*
  74. * These can be toggled for performance analysis, otherwise use default.
  75. */
  76. #define CONFIG_L2_CACHE /* toggle L2 cache */
  77. #define CONFIG_BTB /* toggle branch prediction */
  78. #define CONFIG_ADDR_STREAMING /* toggle addr streaming */
  79. #define CONFIG_ENABLE_36BIT_PHYS 1
  80. #ifdef CONFIG_PHYS_64BIT
  81. #define CONFIG_ADDR_MAP 1
  82. #define CONFIG_SYS_NUM_ADDR_MAP 16 /* number of TLB1 entries */
  83. #endif
  84. #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest works on */
  85. #define CONFIG_SYS_MEMTEST_END 0x1fffffff
  86. #define CONFIG_PANIC_HANG /* do not reset board on panic */
  87. /*
  88. * Config the L2 Cache as L2 SRAM
  89. */
  90. #define CONFIG_SYS_INIT_L2_ADDR 0xf8f80000
  91. #ifdef CONFIG_PHYS_64BIT
  92. #define CONFIG_SYS_INIT_L2_ADDR_PHYS 0xff8f80000ull
  93. #else
  94. #define CONFIG_SYS_INIT_L2_ADDR_PHYS CONFIG_SYS_INIT_L2_ADDR
  95. #endif
  96. #define CONFIG_SYS_L2_SIZE (512 << 10)
  97. #define CONFIG_SYS_INIT_L2_END (CONFIG_SYS_INIT_L2_ADDR \
  98. + CONFIG_SYS_L2_SIZE)
  99. #define CONFIG_SYS_CCSRBAR 0xffe00000
  100. #define CONFIG_SYS_CCSRBAR_PHYS_LOW CONFIG_SYS_CCSRBAR
  101. /* DDR Setup */
  102. #define CONFIG_FSL_DDR3
  103. #define CONFIG_SPD_EEPROM /* Use SPD EEPROM for DDR setup */
  104. #define CONFIG_DDR_SPD
  105. #define CONFIG_DDR_ECC
  106. #define CONFIG_ECC_INIT_VIA_DDRCONTROLLER
  107. #define CONFIG_MEM_INIT_VALUE 0xdeadbeef
  108. #define CONFIG_SYS_SDRAM_SIZE 2048ULL /* DDR size on P2020COME */
  109. #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000
  110. #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE
  111. #define CONFIG_NUM_DDR_CONTROLLERS 1
  112. #define CONFIG_DIMM_SLOTS_PER_CTLR 1
  113. #define CONFIG_CHIP_SELECTS_PER_CTRL 2
  114. #define CONFIG_SYS_DDR_ERR_INT_EN 0x0000000d
  115. #define CONFIG_SYS_DDR_ERR_DIS 0x00000000
  116. #define CONFIG_SYS_DDR_SBE 0x00ff0000
  117. #define CONFIG_SYS_SPD_BUS_NUM 1
  118. #define SPD_EEPROM_ADDRESS 0x53
  119. /*
  120. * Memory map
  121. *
  122. * 0x0000_0000 0x7fff_ffff DDR3 2G Cacheable
  123. * 0x8000_0000 0x9fff_ffff PCI Express 3 Mem 1G non-cacheable
  124. * 0xa000_0000 0xbfff_ffff PCI Express 2 Mem 1G non-cacheable
  125. * 0xc000_0000 0xdfff_ffff PCI Express 1 Mem 1G non-cacheable
  126. * 0xffc1_0000 0xffc1_ffff PCI Express 3 IO 64K non-cacheable
  127. * 0xffc2_0000 0xffc2_ffff PCI Express 2 IO 64K non-cacheable
  128. * 0xffc3_0000 0xffc3_ffff PCI Express 1 IO 64K non-cacheable
  129. *
  130. * 0xffd0_0000 0xffd0_3fff L1 for stack 16K Cacheable TLB0
  131. * 0xffe0_0000 0xffef_ffff CCSR 1M non-cacheable
  132. */
  133. /*
  134. * Local Bus Definitions
  135. */
  136. /* There is no NOR Flash on P2020COME */
  137. #define CONFIG_SYS_NO_FLASH
  138. #define CONFIG_BOARD_EARLY_INIT_R /* call board_early_init_r function */
  139. #define CONFIG_HWCONFIG
  140. #define CONFIG_SYS_INIT_RAM_LOCK 1
  141. #define CONFIG_SYS_INIT_RAM_ADDR 0xffd00000 /* stack in RAM */
  142. #ifdef CONFIG_PHYS_64BIT
  143. #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0xf
  144. #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW CONFIG_SYS_INIT_RAM_ADDR
  145. /* the assembler doesn't like typecast */
  146. #define CONFIG_SYS_INIT_RAM_ADDR_PHYS \
  147. ((CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH * 1ull << 32) | \
  148. CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW)
  149. #else
  150. #define CONFIG_SYS_INIT_RAM_ADDR_PHYS CONFIG_SYS_INIT_RAM_ADDR
  151. #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0
  152. #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW CONFIG_SYS_INIT_RAM_ADDR_PHYS
  153. #endif
  154. #define CONFIG_SYS_INIT_RAM_SIZE 0x00004000
  155. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE \
  156. - GENERATED_GBL_DATA_SIZE)
  157. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  158. #define CONFIG_SYS_MONITOR_LEN (256 * 1024)
  159. #define CONFIG_SYS_MALLOC_LEN (1024 * 1024)
  160. /* Serial Port - controlled on board with jumper J8
  161. * open - index 2
  162. * shorted - index 1
  163. */
  164. #define CONFIG_CONS_INDEX 1
  165. #define CONFIG_SYS_NS16550
  166. #define CONFIG_SYS_NS16550_SERIAL
  167. #define CONFIG_SYS_NS16550_REG_SIZE 1
  168. #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
  169. #define CONFIG_SERIAL_MULTI 1 /* Enable both serial ports */
  170. #define CONFIG_SYS_CONSOLE_IS_IN_ENV /* determine from environment */
  171. #define CONFIG_SYS_BAUDRATE_TABLE \
  172. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
  173. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500)
  174. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600)
  175. /* Use the HUSH parser */
  176. #define CONFIG_SYS_HUSH_PARSER
  177. /*
  178. * Pass open firmware flat tree
  179. */
  180. #define CONFIG_OF_LIBFDT 1
  181. #define CONFIG_OF_BOARD_SETUP 1
  182. #define CONFIG_OF_STDOUT_VIA_ALIAS 1
  183. /* new uImage format support */
  184. #define CONFIG_FIT 1
  185. #define CONFIG_FIT_VERBOSE 1
  186. /* I2C */
  187. #define CONFIG_FSL_I2C /* Use FSL common I2C driver */
  188. #define CONFIG_HARD_I2C /* I2C with hardware support */
  189. #undef CONFIG_SOFT_I2C /* I2C bit-banged */
  190. #define CONFIG_I2C_MULTI_BUS
  191. #define CONFIG_I2C_CMD_TREE
  192. #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address*/
  193. #define CONFIG_SYS_I2C_SLAVE 0x7F
  194. #define CONFIG_SYS_I2C_NOPROBES { {0, 0x29} }
  195. #define CONFIG_SYS_I2C_OFFSET 0x3000
  196. #define CONFIG_SYS_I2C2_OFFSET 0x3100
  197. /*
  198. * I2C2 EEPROM
  199. */
  200. #define CONFIG_ID_EEPROM
  201. #ifdef CONFIG_ID_EEPROM
  202. #define CONFIG_SYS_I2C_EEPROM_NXID
  203. #endif
  204. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
  205. #define CONFIG_SYS_I2C_EEPROM_ADDR2 0x18
  206. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
  207. #define CONFIG_SYS_EEPROM_BUS_NUM 0
  208. #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 /* and takes up to 10 msec */
  209. /*
  210. * eSPI - Enhanced SPI
  211. */
  212. #define CONFIG_FSL_ESPI
  213. #define CONFIG_SPI_FLASH
  214. #define CONFIG_SPI_FLASH_STMICRO
  215. #define CONFIG_CMD_SF
  216. #define CONFIG_SF_DEFAULT_SPEED 10000000
  217. #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
  218. /*
  219. * General PCI
  220. * Memory space is mapped 1-1, but I/O space must start from 0.
  221. */
  222. #if defined(CONFIG_PCI)
  223. /* controller 3, Slot 3, tgtid 3, Base address 8000 */
  224. #define CONFIG_SYS_PCIE3_MEM_VIRT 0x80000000
  225. #define CONFIG_SYS_PCIE3_MEM_BUS 0x80000000
  226. #define CONFIG_SYS_PCIE3_MEM_PHYS 0x80000000
  227. #define CONFIG_SYS_PCIE3_MEM_SIZE 0x20000000 /* 512M */
  228. #define CONFIG_SYS_PCIE3_IO_VIRT 0xffc10000
  229. #define CONFIG_SYS_PCIE3_IO_BUS 0x00000000
  230. #define CONFIG_SYS_PCIE3_IO_PHYS 0xffc10000
  231. #define CONFIG_SYS_PCIE3_IO_SIZE 0x00010000 /* 64k */
  232. /* controller 2, Slot 2, tgtid 2, Base address 9000 */
  233. #define CONFIG_SYS_PCIE2_MEM_VIRT 0xa0000000
  234. #define CONFIG_SYS_PCIE2_MEM_BUS 0xa0000000
  235. #define CONFIG_SYS_PCIE2_MEM_PHYS 0xa0000000
  236. #define CONFIG_SYS_PCIE2_MEM_SIZE 0x20000000 /* 512M */
  237. #define CONFIG_SYS_PCIE2_IO_VIRT 0xffc20000
  238. #define CONFIG_SYS_PCIE2_IO_BUS 0x00000000
  239. #define CONFIG_SYS_PCIE2_IO_PHYS 0xffc20000
  240. #define CONFIG_SYS_PCIE2_IO_SIZE 0x00010000 /* 64k */
  241. /* controller 1, Slot 1, tgtid 1, Base address a000 */
  242. #define CONFIG_SYS_PCIE1_MEM_VIRT 0xc0000000
  243. #define CONFIG_SYS_PCIE1_MEM_BUS 0xc0000000
  244. #define CONFIG_SYS_PCIE1_MEM_PHYS 0xc0000000
  245. #define CONFIG_SYS_PCIE1_MEM_SIZE 0x20000000 /* 512M */
  246. #define CONFIG_SYS_PCIE1_IO_VIRT 0xffc30000
  247. #define CONFIG_SYS_PCIE1_IO_BUS 0x00000000
  248. #define CONFIG_SYS_PCIE1_IO_PHYS 0xffc30000
  249. #define CONFIG_SYS_PCIE1_IO_SIZE 0x00010000 /* 64k */
  250. #define CONFIG_PCI_PNP /* do pci plug-and-play */
  251. #undef CONFIG_EEPRO100
  252. #undef CONFIG_TULIP
  253. #undef CONFIG_RTL8139
  254. #ifdef CONFIG_RTL8139
  255. /* This macro is used by RTL8139 but not defined in PPC architecture */
  256. #define KSEG1ADDR(x) (x)
  257. #define _IO_BASE 0x00000000
  258. #endif
  259. #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  260. #define CONFIG_DOS_PARTITION
  261. #endif /* CONFIG_PCI */
  262. #if defined(CONFIG_TSEC_ENET)
  263. #define CONFIG_MII 1 /* MII PHY management */
  264. #define CONFIG_MII_DEFAULT_TSEC 1 /* Allow unregistered phys */
  265. #define CONFIG_TSEC1 1
  266. #define CONFIG_TSEC1_NAME "eTSEC1"
  267. #define CONFIG_TSEC2 1
  268. #define CONFIG_TSEC2_NAME "eTSEC2"
  269. #define CONFIG_TSEC3 1
  270. #define CONFIG_TSEC3_NAME "eTSEC3"
  271. #define TSEC1_PHY_ADDR 0
  272. #define TSEC2_PHY_ADDR 2
  273. #define TSEC3_PHY_ADDR 1
  274. #undef CONFIG_VSC7385_ENET
  275. #define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
  276. #define TSEC2_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
  277. #define TSEC3_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
  278. #define TSEC1_PHYIDX 0
  279. #define TSEC2_PHYIDX 0
  280. #define TSEC3_PHYIDX 0
  281. #define CONFIG_ETHPRIME "eTSEC1"
  282. #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */
  283. #endif /* CONFIG_TSEC_ENET */
  284. /*
  285. * Environment
  286. */
  287. #if defined(CONFIG_RAMBOOT_SDCARD)
  288. #define CONFIG_ENV_IS_IN_MMC 1
  289. #define CONFIG_FSL_FIXED_MMC_LOCATION
  290. #define CONFIG_ENV_SIZE 0x2000
  291. #define CONFIG_SYS_MMC_ENV_DEV 0
  292. #elif defined(CONFIG_RAMBOOT_SPIFLASH)
  293. #define CONFIG_ENV_IS_IN_SPI_FLASH
  294. #define CONFIG_ENV_SPI_BUS 0
  295. #define CONFIG_ENV_SPI_CS 0
  296. #define CONFIG_ENV_SPI_MAX_HZ 10000000
  297. #define CONFIG_ENV_SPI_MODE 0
  298. #define CONFIG_ENV_OFFSET 0x100000 /* 1MB */
  299. #define CONFIG_ENV_SECT_SIZE 0x10000
  300. #define CONFIG_ENV_SIZE 0x2000
  301. #endif
  302. #define CONFIG_LOADS_ECHO 1
  303. #define CONFIG_SYS_LOADS_BAUD_CHANGE 1
  304. /*
  305. * Command line configuration.
  306. */
  307. #include <config_cmd_default.h>
  308. #define CONFIG_CMD_ELF
  309. #define CONFIG_CMD_I2C
  310. #define CONFIG_CMD_IRQ
  311. #define CONFIG_CMD_MII
  312. #define CONFIG_CMD_PING
  313. #define CONFIG_CMD_SETEXPR
  314. #define CONFIG_CMD_REGINFO
  315. #if defined(CONFIG_PCI)
  316. #define CONFIG_CMD_NET
  317. #define CONFIG_CMD_PCI
  318. #endif
  319. #undef CONFIG_WATCHDOG /* watchdog disabled */
  320. #define CONFIG_MMC 1
  321. #ifdef CONFIG_MMC
  322. #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_pre_init */
  323. #define CONFIG_CMD_MMC
  324. #define CONFIG_DOS_PARTITION
  325. #define CONFIG_FSL_ESDHC
  326. #define CONFIG_GENERIC_MMC
  327. #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR
  328. #define CONFIG_SYS_FSL_ESDHC_BROKEN_TIMEOUT
  329. #endif /* CONFIG_MMC */
  330. #define CONFIG_HAS_FSL_DR_USB
  331. #ifdef CONFIG_HAS_FSL_DR_USB
  332. #define CONFIG_USB_EHCI
  333. #ifdef CONFIG_USB_EHCI
  334. #define CONFIG_CMD_USB
  335. #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
  336. #define CONFIG_USB_EHCI_FSL
  337. #define CONFIG_USB_STORAGE
  338. #endif
  339. #endif
  340. #if defined(CONFIG_MMC) || defined(CONFIG_USB_EHCI)
  341. #define CONFIG_CMD_EXT2
  342. #define CONFIG_CMD_FAT
  343. #define CONFIG_DOS_PARTITION
  344. #endif
  345. /* Misc Extra Settings */
  346. #define CONFIG_CMD_DHCP 1
  347. #define CONFIG_CMD_DATE 1
  348. #define CONFIG_RTC_M41T62 1
  349. #define CONFIG_SYS_RTC_BUS_NUM 1
  350. #define CONFIG_SYS_I2C_RTC_ADDR 0x68
  351. /*
  352. * Miscellaneous configurable options
  353. */
  354. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  355. #define CONFIG_CMDLINE_EDITING /* Command-line editing */
  356. #define CONFIG_AUTO_COMPLETE 1 /* add autocompletion support */
  357. #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
  358. #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
  359. #if defined(CONFIG_CMD_KGDB)
  360. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  361. #else
  362. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  363. #endif
  364. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
  365. /* Print Buffer Size */
  366. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  367. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE/* Boot Argument Buffer Size */
  368. #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms tick */
  369. /*
  370. * For booting Linux, the board info and command line data
  371. * have to be in the first 64 MB of memory, since this is
  372. * the maximum mapped by the Linux kernel during initialization.
  373. */
  374. #define CONFIG_SYS_BOOTMAPSZ (64 << 20)
  375. #define CONFIG_SYS_BOOTM_LEN (64 << 20)
  376. #if defined(CONFIG_CMD_KGDB)
  377. #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
  378. #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
  379. #endif
  380. /*
  381. * Environment Configuration
  382. */
  383. /* The mac addresses for all ethernet interface */
  384. #if defined(CONFIG_TSEC_ENET)
  385. #define CONFIG_HAS_ETH0
  386. #define CONFIG_HAS_ETH1
  387. #define CONFIG_HAS_ETH2
  388. #define CONFIG_HAS_ETH3
  389. #endif
  390. #define CONFIG_HOSTNAME unknown
  391. #define CONFIG_ROOTPATH "/opt/nfsroot"
  392. #define CONFIG_BOOTFILE "uImage"
  393. #define CONFIG_UBOOTPATH u-boot.bin
  394. /* default location for tftp and bootm */
  395. #define CONFIG_LOADADDR 1000000
  396. #define CONFIG_BOOTDELAY 10 /* -1 disables auto-boot */
  397. #undef CONFIG_BOOTARGS /* the boot command will set bootargs */
  398. #define CONFIG_BAUDRATE 115200
  399. #define CONFIG_EXTRA_ENV_SETTINGS \
  400. "hwconfig=fsl_ddr:ecc=on\0" \
  401. "bootcmd=run sdboot\0" \
  402. "sdboot=setenv bootargs root=/dev/mmcblk0p2 rw " \
  403. "rootdelay=$rootdelaysecond console=$consoledev,$baudrate "\
  404. "$othbootargs; mmcinfo; " \
  405. "ext2load mmc 0:2 $loadaddr /boot/$bootfile; " \
  406. "ext2load mmc 0:2 $fdtaddr /boot/$fdtfile; " \
  407. "bootm $loadaddr - $fdtaddr\0" \
  408. "sdfatboot=setenv bootargs root=/dev/ram rw " \
  409. "rootdelay=$rootdelaysecond console=$consoledev,$baudrate "\
  410. "$othbootargs; mmcinfo; " \
  411. "fatload mmc 0:1 $loadaddr $bootfile; " \
  412. "fatload mmc 0:1 $fdtaddr $fdtfile; " \
  413. "fatload mmc 0:1 $ramdiskaddr $ramdiskfile; " \
  414. "bootm $loadaddr $ramdiskaddr $fdtaddr\0" \
  415. "usbboot=setenv bootargs root=/dev/sda1 rw " \
  416. "rootdelay=$rootdelaysecond console=$consoledev,$baudrate "\
  417. "$othbootargs; " \
  418. "usb start; " \
  419. "ext2load usb 0:1 $loadaddr /boot/$bootfile; " \
  420. "ext2load usb 0:1 $fdtaddr /boot/$fdtfile; " \
  421. "bootm $loadaddr - $fdtaddr\0" \
  422. "usbfatboot=setenv bootargs root=/dev/ram rw " \
  423. "console=$consoledev,$baudrate $othbootargs; " \
  424. "usb start; " \
  425. "fatload usb 0:2 $loadaddr $bootfile; " \
  426. "fatload usb 0:2 $fdtaddr $fdtfile; " \
  427. "fatload usb 0:2 $ramdiskaddr $ramdiskfile; " \
  428. "bootm $loadaddr $ramdiskaddr $fdtaddr\0" \
  429. "usbext2boot=setenv bootargs root=/dev/ram rw " \
  430. "console=$consoledev,$baudrate $othbootargs; " \
  431. "usb start; " \
  432. "ext2load usb 0:4 $loadaddr $bootfile; " \
  433. "ext2load usb 0:4 $fdtaddr $fdtfile; " \
  434. "ext2load usb 0:4 $ramdiskaddr $ramdiskfile; " \
  435. "bootm $loadaddr $ramdiskaddr $fdtaddr\0" \
  436. "upgradespi=sf probe 0; " \
  437. "setenv startaddr 0; " \
  438. "setenv erasesize a0000; " \
  439. "tftp 1000000 $tftppath/$uboot_spi; " \
  440. "sf erase $startaddr $erasesize; " \
  441. "sf write 1000000 $startaddr $filesize; " \
  442. "sf erase 100000 120000\0" \
  443. "clearspienv=sf probe 0;sf erase 100000 20000\0" \
  444. "othbootargs=ramdisk_size=700000 cache-sram-size=0x10000\0" \
  445. "netdev=eth0\0" \
  446. "rootdelaysecond=15\0" \
  447. "uboot_nor=u-boot-nor.bin\0" \
  448. "uboot_spi=u-boot-p2020.spi\0" \
  449. "uboot_sd=u-boot-p2020.bin\0" \
  450. "consoledev=ttyS0\0" \
  451. "ramdiskaddr=2000000\0" \
  452. "ramdiskfile=rootfs-dev.ext2.img\0" \
  453. "fdtaddr=c00000\0" \
  454. "fdtfile=uImage-2.6.32-p2020.dtb\0" \
  455. "tftppath=p2020\0"
  456. #define CONFIG_HDBOOT \
  457. "setenv bootargs root=/dev/$bdev rw rootdelay=30 " \
  458. "console=$consoledev,$baudrate $othbootargs;" \
  459. "usb start;" \
  460. "ext2load usb 0:1 $loadaddr /boot/$bootfile;" \
  461. "ext2load usb 0:1 $fdtaddr /boot/$fdtfile;" \
  462. "bootm $loadaddr - $fdtaddr"
  463. #define CONFIG_NFSBOOTCOMMAND \
  464. "setenv bootargs root=/dev/nfs rw " \
  465. "nfsroot=$serverip:$rootpath " \
  466. "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off "\
  467. "console=$consoledev,$baudrate $othbootargs;" \
  468. "tftp $loadaddr $tftppath/$bootfile;" \
  469. "tftp $fdtaddr $tftppath/$fdtfile;" \
  470. "bootm $loadaddr - $fdtaddr"
  471. #define CONFIG_RAMBOOTCOMMAND \
  472. "setenv bootargs root=/dev/ram rw " \
  473. "console=$consoledev,$baudrate $othbootargs;" \
  474. "tftp $ramdiskaddr $tftppath/$ramdiskfile;" \
  475. "tftp $loadaddr $tftppath/$bootfile;" \
  476. "tftp $fdtaddr $tftppath/$fdtfile;" \
  477. "bootm $loadaddr $ramdiskaddr $fdtaddr"
  478. #define CONFIG_BOOTCOMMAND CONFIG_HDBOOT
  479. #endif /* __CONFIG_H */