P2020COME.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  1. /*
  2. * Copyright 2009-2010 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. #ifdef CONFIG_SYS_HUSH_PARSER
  178. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  179. #endif
  180. /*
  181. * Pass open firmware flat tree
  182. */
  183. #define CONFIG_OF_LIBFDT 1
  184. #define CONFIG_OF_BOARD_SETUP 1
  185. #define CONFIG_OF_STDOUT_VIA_ALIAS 1
  186. /* new uImage format support */
  187. #define CONFIG_FIT 1
  188. #define CONFIG_FIT_VERBOSE 1
  189. /* I2C */
  190. #define CONFIG_FSL_I2C /* Use FSL common I2C driver */
  191. #define CONFIG_HARD_I2C /* I2C with hardware support */
  192. #undef CONFIG_SOFT_I2C /* I2C bit-banged */
  193. #define CONFIG_I2C_MULTI_BUS
  194. #define CONFIG_I2C_CMD_TREE
  195. #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address*/
  196. #define CONFIG_SYS_I2C_SLAVE 0x7F
  197. #define CONFIG_SYS_I2C_NOPROBES { {0, 0x29} }
  198. #define CONFIG_SYS_I2C_OFFSET 0x3000
  199. #define CONFIG_SYS_I2C2_OFFSET 0x3100
  200. /*
  201. * I2C2 EEPROM
  202. */
  203. #define CONFIG_ID_EEPROM
  204. #ifdef CONFIG_ID_EEPROM
  205. #define CONFIG_SYS_I2C_EEPROM_NXID
  206. #endif
  207. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
  208. #define CONFIG_SYS_I2C_EEPROM_ADDR2 0x18
  209. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
  210. #define CONFIG_SYS_EEPROM_BUS_NUM 0
  211. #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 /* and takes up to 10 msec */
  212. /*
  213. * eSPI - Enhanced SPI
  214. */
  215. #define CONFIG_FSL_ESPI
  216. #define CONFIG_SPI_FLASH
  217. #define CONFIG_SPI_FLASH_STMICRO
  218. #define CONFIG_CMD_SF
  219. #define CONFIG_SF_DEFAULT_SPEED 10000000
  220. #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
  221. /*
  222. * General PCI
  223. * Memory space is mapped 1-1, but I/O space must start from 0.
  224. */
  225. #if defined(CONFIG_PCI)
  226. /* controller 3, Slot 3, tgtid 3, Base address 8000 */
  227. #define CONFIG_SYS_PCIE3_MEM_VIRT 0x80000000
  228. #define CONFIG_SYS_PCIE3_MEM_BUS 0x80000000
  229. #define CONFIG_SYS_PCIE3_MEM_PHYS 0x80000000
  230. #define CONFIG_SYS_PCIE3_MEM_SIZE 0x20000000 /* 512M */
  231. #define CONFIG_SYS_PCIE3_IO_VIRT 0xffc10000
  232. #define CONFIG_SYS_PCIE3_IO_BUS 0x00000000
  233. #define CONFIG_SYS_PCIE3_IO_PHYS 0xffc10000
  234. #define CONFIG_SYS_PCIE3_IO_SIZE 0x00010000 /* 64k */
  235. /* controller 2, Slot 2, tgtid 2, Base address 9000 */
  236. #define CONFIG_SYS_PCIE2_MEM_VIRT 0xa0000000
  237. #define CONFIG_SYS_PCIE2_MEM_BUS 0xa0000000
  238. #define CONFIG_SYS_PCIE2_MEM_PHYS 0xa0000000
  239. #define CONFIG_SYS_PCIE2_MEM_SIZE 0x20000000 /* 512M */
  240. #define CONFIG_SYS_PCIE2_IO_VIRT 0xffc20000
  241. #define CONFIG_SYS_PCIE2_IO_BUS 0x00000000
  242. #define CONFIG_SYS_PCIE2_IO_PHYS 0xffc20000
  243. #define CONFIG_SYS_PCIE2_IO_SIZE 0x00010000 /* 64k */
  244. /* controller 1, Slot 1, tgtid 1, Base address a000 */
  245. #define CONFIG_SYS_PCIE1_MEM_VIRT 0xc0000000
  246. #define CONFIG_SYS_PCIE1_MEM_BUS 0xc0000000
  247. #define CONFIG_SYS_PCIE1_MEM_PHYS 0xc0000000
  248. #define CONFIG_SYS_PCIE1_MEM_SIZE 0x20000000 /* 512M */
  249. #define CONFIG_SYS_PCIE1_IO_VIRT 0xffc30000
  250. #define CONFIG_SYS_PCIE1_IO_BUS 0x00000000
  251. #define CONFIG_SYS_PCIE1_IO_PHYS 0xffc30000
  252. #define CONFIG_SYS_PCIE1_IO_SIZE 0x00010000 /* 64k */
  253. #define CONFIG_PCI_PNP /* do pci plug-and-play */
  254. #undef CONFIG_EEPRO100
  255. #undef CONFIG_TULIP
  256. #undef CONFIG_RTL8139
  257. #ifdef CONFIG_RTL8139
  258. /* This macro is used by RTL8139 but not defined in PPC architecture */
  259. #define KSEG1ADDR(x) (x)
  260. #define _IO_BASE 0x00000000
  261. #endif
  262. #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  263. #define CONFIG_DOS_PARTITION
  264. #endif /* CONFIG_PCI */
  265. #if defined(CONFIG_TSEC_ENET)
  266. #define CONFIG_MII 1 /* MII PHY management */
  267. #define CONFIG_MII_DEFAULT_TSEC 1 /* Allow unregistered phys */
  268. #define CONFIG_TSEC1 1
  269. #define CONFIG_TSEC1_NAME "eTSEC1"
  270. #define CONFIG_TSEC2 1
  271. #define CONFIG_TSEC2_NAME "eTSEC2"
  272. #define CONFIG_TSEC3 1
  273. #define CONFIG_TSEC3_NAME "eTSEC3"
  274. #define TSEC1_PHY_ADDR 0
  275. #define TSEC2_PHY_ADDR 2
  276. #define TSEC3_PHY_ADDR 1
  277. #undef CONFIG_VSC7385_ENET
  278. #define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
  279. #define TSEC2_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
  280. #define TSEC3_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
  281. #define TSEC1_PHYIDX 0
  282. #define TSEC2_PHYIDX 0
  283. #define TSEC3_PHYIDX 0
  284. #define CONFIG_ETHPRIME "eTSEC1"
  285. #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */
  286. #endif /* CONFIG_TSEC_ENET */
  287. /*
  288. * Environment
  289. */
  290. #if defined(CONFIG_RAMBOOT_SDCARD)
  291. #define CONFIG_ENV_IS_IN_MMC 1
  292. #define CONFIG_FSL_FIXED_MMC_LOCATION
  293. #define CONFIG_ENV_SIZE 0x2000
  294. #define CONFIG_SYS_MMC_ENV_DEV 0
  295. #elif defined(CONFIG_RAMBOOT_SPIFLASH)
  296. #define CONFIG_ENV_IS_IN_SPI_FLASH
  297. #define CONFIG_ENV_SPI_BUS 0
  298. #define CONFIG_ENV_SPI_CS 0
  299. #define CONFIG_ENV_SPI_MAX_HZ 10000000
  300. #define CONFIG_ENV_SPI_MODE 0
  301. #define CONFIG_ENV_OFFSET 0x100000 /* 1MB */
  302. #define CONFIG_ENV_SECT_SIZE 0x10000
  303. #define CONFIG_ENV_SIZE 0x2000
  304. #endif
  305. #define CONFIG_LOADS_ECHO 1
  306. #define CONFIG_SYS_LOADS_BAUD_CHANGE 1
  307. /*
  308. * Command line configuration.
  309. */
  310. #include <config_cmd_default.h>
  311. #define CONFIG_CMD_ELF
  312. #define CONFIG_CMD_I2C
  313. #define CONFIG_CMD_IRQ
  314. #define CONFIG_CMD_MII
  315. #define CONFIG_CMD_PING
  316. #define CONFIG_CMD_SETEXPR
  317. #define CONFIG_CMD_REGINFO
  318. #if defined(CONFIG_PCI)
  319. #define CONFIG_CMD_NET
  320. #define CONFIG_CMD_PCI
  321. #endif
  322. #undef CONFIG_WATCHDOG /* watchdog disabled */
  323. #define CONFIG_MMC 1
  324. #ifdef CONFIG_MMC
  325. #define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_pre_init */
  326. #define CONFIG_CMD_MMC
  327. #define CONFIG_DOS_PARTITION
  328. #define CONFIG_FSL_ESDHC
  329. #define CONFIG_GENERIC_MMC
  330. #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR
  331. #define CONFIG_SYS_FSL_ESDHC_BROKEN_TIMEOUT
  332. #endif /* CONFIG_MMC */
  333. #define CONFIG_USB_EHCI
  334. #ifdef CONFIG_USB_EHCI
  335. #define CONFIG_CMD_USB
  336. #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
  337. #define CONFIG_USB_EHCI_FSL
  338. #define CONFIG_USB_STORAGE
  339. #define CONFIG_HAS_FSL_DR_USB
  340. #endif
  341. #if defined(CONFIG_MMC) || defined(CONFIG_USB_EHCI)
  342. #define CONFIG_CMD_EXT2
  343. #define CONFIG_CMD_FAT
  344. #define CONFIG_DOS_PARTITION
  345. #endif
  346. /* Misc Extra Settings */
  347. #define CONFIG_SYS_64BIT_STRTOUL 1
  348. #define CONFIG_CMD_DHCP 1
  349. #define CONFIG_CMD_DATE 1
  350. #define CONFIG_RTC_M41T62 1
  351. #define CONFIG_SYS_RTC_BUS_NUM 1
  352. #define CONFIG_SYS_I2C_RTC_ADDR 0x68
  353. /*
  354. * Miscellaneous configurable options
  355. */
  356. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  357. #define CONFIG_CMDLINE_EDITING /* Command-line editing */
  358. #define CONFIG_AUTO_COMPLETE 1 /* add autocompletion support */
  359. #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
  360. #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
  361. #if defined(CONFIG_CMD_KGDB)
  362. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  363. #else
  364. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  365. #endif
  366. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
  367. /* Print Buffer Size */
  368. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  369. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE/* Boot Argument Buffer Size */
  370. #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms tick */
  371. /*
  372. * For booting Linux, the board info and command line data
  373. * have to be in the first 64 MB of memory, since this is
  374. * the maximum mapped by the Linux kernel during initialization.
  375. */
  376. #define CONFIG_SYS_BOOTMAPSZ (64 << 20)
  377. #define CONFIG_SYS_BOOTM_LEN (64 << 20)
  378. #if defined(CONFIG_CMD_KGDB)
  379. #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
  380. #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
  381. #endif
  382. /*
  383. * Environment Configuration
  384. */
  385. /* The mac addresses for all ethernet interface */
  386. #if defined(CONFIG_TSEC_ENET)
  387. #define CONFIG_HAS_ETH0
  388. #define CONFIG_HAS_ETH1
  389. #define CONFIG_HAS_ETH2
  390. #define CONFIG_HAS_ETH3
  391. #endif
  392. #define CONFIG_HOSTNAME unknown
  393. #define CONFIG_ROOTPATH "/opt/nfsroot"
  394. #define CONFIG_BOOTFILE "uImage"
  395. #define CONFIG_UBOOTPATH u-boot.bin
  396. /* default location for tftp and bootm */
  397. #define CONFIG_LOADADDR 1000000
  398. #define CONFIG_BOOTDELAY 10 /* -1 disables auto-boot */
  399. #undef CONFIG_BOOTARGS /* the boot command will set bootargs */
  400. #define CONFIG_BAUDRATE 115200
  401. #define CONFIG_EXTRA_ENV_SETTINGS \
  402. "hwconfig=fsl_ddr:ecc=on\0" \
  403. "bootcmd=run sdboot\0" \
  404. "sdboot=setenv bootargs root=/dev/mmcblk0p2 rw " \
  405. "rootdelay=$rootdelaysecond console=$consoledev,$baudrate "\
  406. "$othbootargs; mmcinfo; " \
  407. "ext2load mmc 0:2 $loadaddr /boot/$bootfile; " \
  408. "ext2load mmc 0:2 $fdtaddr /boot/$fdtfile; " \
  409. "bootm $loadaddr - $fdtaddr\0" \
  410. "sdfatboot=setenv bootargs root=/dev/ram rw " \
  411. "rootdelay=$rootdelaysecond console=$consoledev,$baudrate "\
  412. "$othbootargs; mmcinfo; " \
  413. "fatload mmc 0:1 $loadaddr $bootfile; " \
  414. "fatload mmc 0:1 $fdtaddr $fdtfile; " \
  415. "fatload mmc 0:1 $ramdiskaddr $ramdiskfile; " \
  416. "bootm $loadaddr $ramdiskaddr $fdtaddr\0" \
  417. "usbboot=setenv bootargs root=/dev/sda1 rw " \
  418. "rootdelay=$rootdelaysecond console=$consoledev,$baudrate "\
  419. "$othbootargs; " \
  420. "usb start; " \
  421. "ext2load usb 0:1 $loadaddr /boot/$bootfile; " \
  422. "ext2load usb 0:1 $fdtaddr /boot/$fdtfile; " \
  423. "bootm $loadaddr - $fdtaddr\0" \
  424. "usbfatboot=setenv bootargs root=/dev/ram rw " \
  425. "console=$consoledev,$baudrate $othbootargs; " \
  426. "usb start; " \
  427. "fatload usb 0:2 $loadaddr $bootfile; " \
  428. "fatload usb 0:2 $fdtaddr $fdtfile; " \
  429. "fatload usb 0:2 $ramdiskaddr $ramdiskfile; " \
  430. "bootm $loadaddr $ramdiskaddr $fdtaddr\0" \
  431. "usbext2boot=setenv bootargs root=/dev/ram rw " \
  432. "console=$consoledev,$baudrate $othbootargs; " \
  433. "usb start; " \
  434. "ext2load usb 0:4 $loadaddr $bootfile; " \
  435. "ext2load usb 0:4 $fdtaddr $fdtfile; " \
  436. "ext2load usb 0:4 $ramdiskaddr $ramdiskfile; " \
  437. "bootm $loadaddr $ramdiskaddr $fdtaddr\0" \
  438. "upgradespi=sf probe 0; " \
  439. "setenv startaddr 0; " \
  440. "setenv erasesize a0000; " \
  441. "tftp 1000000 $tftppath/$uboot_spi; " \
  442. "sf erase $startaddr $erasesize; " \
  443. "sf write 1000000 $startaddr $filesize; " \
  444. "sf erase 100000 120000\0" \
  445. "clearspienv=sf probe 0;sf erase 100000 20000\0" \
  446. "othbootargs=ramdisk_size=700000 cache-sram-size=0x10000\0" \
  447. "netdev=eth0\0" \
  448. "rootdelaysecond=15\0" \
  449. "uboot_nor=u-boot-nor.bin\0" \
  450. "uboot_spi=u-boot-p2020.spi\0" \
  451. "uboot_sd=u-boot-p2020.bin\0" \
  452. "consoledev=ttyS0\0" \
  453. "ramdiskaddr=2000000\0" \
  454. "ramdiskfile=rootfs-dev.ext2.img\0" \
  455. "fdtaddr=c00000\0" \
  456. "fdtfile=uImage-2.6.32-p2020.dtb\0" \
  457. "tftppath=p2020\0"
  458. #define CONFIG_HDBOOT \
  459. "setenv bootargs root=/dev/$bdev rw rootdelay=30 " \
  460. "console=$consoledev,$baudrate $othbootargs;" \
  461. "usb start;" \
  462. "ext2load usb 0:1 $loadaddr /boot/$bootfile;" \
  463. "ext2load usb 0:1 $fdtaddr /boot/$fdtfile;" \
  464. "bootm $loadaddr - $fdtaddr"
  465. #define CONFIG_NFSBOOTCOMMAND \
  466. "setenv bootargs root=/dev/nfs rw " \
  467. "nfsroot=$serverip:$rootpath " \
  468. "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off "\
  469. "console=$consoledev,$baudrate $othbootargs;" \
  470. "tftp $loadaddr $tftppath/$bootfile;" \
  471. "tftp $fdtaddr $tftppath/$fdtfile;" \
  472. "bootm $loadaddr - $fdtaddr"
  473. #define CONFIG_RAMBOOTCOMMAND \
  474. "setenv bootargs root=/dev/ram rw " \
  475. "console=$consoledev,$baudrate $othbootargs;" \
  476. "tftp $ramdiskaddr $tftppath/$ramdiskfile;" \
  477. "tftp $loadaddr $tftppath/$bootfile;" \
  478. "tftp $fdtaddr $tftppath/$fdtfile;" \
  479. "bootm $loadaddr $ramdiskaddr $fdtaddr"
  480. #define CONFIG_BOOTCOMMAND CONFIG_HDBOOT
  481. #endif /* __CONFIG_H */