p1_p2_rdb_pc.h 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967
  1. /*
  2. * Copyright 2010-2011 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. /*
  23. * QorIQ RDB boards configuration file
  24. */
  25. #ifndef __CONFIG_H
  26. #define __CONFIG_H
  27. #ifdef CONFIG_36BIT
  28. #define CONFIG_PHYS_64BIT
  29. #endif
  30. #if defined(CONFIG_P1020MBG)
  31. #define CONFIG_BOARDNAME "P1020MBG"
  32. #define CONFIG_P1020
  33. #define CONFIG_VSC7385_ENET
  34. #define CONFIG_SLIC
  35. #define __SW_BOOT_MASK 0x03
  36. #define __SW_BOOT_NOR 0xe4
  37. #define __SW_BOOT_SD 0x54
  38. #endif
  39. #if defined(CONFIG_P1020UTM)
  40. #define CONFIG_BOARDNAME "P1020UTM"
  41. #define CONFIG_P1020
  42. #define __SW_BOOT_MASK 0x03
  43. #define __SW_BOOT_NOR 0xe0
  44. #define __SW_BOOT_SD 0x50
  45. #endif
  46. #if defined(CONFIG_P1020RDB)
  47. #define CONFIG_BOARDNAME "P1020RDB"
  48. #define CONFIG_NAND_FSL_ELBC
  49. #define CONFIG_P1020
  50. #define CONFIG_SPI_FLASH
  51. #define CONFIG_VSC7385_ENET
  52. #define CONFIG_SLIC
  53. #define __SW_BOOT_MASK 0x03
  54. #define __SW_BOOT_NOR 0x5c
  55. #define __SW_BOOT_SPI 0x1c
  56. #define __SW_BOOT_SD 0x9c
  57. #define __SW_BOOT_NAND 0xec
  58. #define __SW_BOOT_PCIE 0x6c
  59. #endif
  60. #if defined(CONFIG_P1021RDB)
  61. #define CONFIG_BOARDNAME "P1021RDB"
  62. #define CONFIG_NAND_FSL_ELBC
  63. #define CONFIG_P1021
  64. #define CONFIG_QE
  65. #define CONFIG_SPI_FLASH
  66. #define CONFIG_VSC7385_ENET
  67. #define CONFIG_SYS_LBC_LBCR 0x00080000 /* Implement conversion of
  68. addresses in the LBC */
  69. #define __SW_BOOT_MASK 0x03
  70. #define __SW_BOOT_NOR 0x5c
  71. #define __SW_BOOT_SPI 0x1c
  72. #define __SW_BOOT_SD 0x9c
  73. #define __SW_BOOT_NAND 0xec
  74. #define __SW_BOOT_PCIE 0x6c
  75. #endif
  76. #if defined(CONFIG_P1024RDB)
  77. #define CONFIG_BOARDNAME "P1024RDB"
  78. #define CONFIG_NAND_FSL_ELBC
  79. #define CONFIG_P1024
  80. #define CONFIG_SLIC
  81. #define CONFIG_SPI_FLASH
  82. #define __SW_BOOT_MASK 0xf3
  83. #define __SW_BOOT_NOR 0x00
  84. #define __SW_BOOT_SPI 0x08
  85. #define __SW_BOOT_SD 0x04
  86. #define __SW_BOOT_NAND 0x0c
  87. #endif
  88. #if defined(CONFIG_P1025RDB)
  89. #define CONFIG_BOARDNAME "P1025RDB"
  90. #define CONFIG_NAND_FSL_ELBC
  91. #define CONFIG_P1025
  92. #define CONFIG_QE
  93. #define CONFIG_SLIC
  94. #define CONFIG_SPI_FLASH
  95. #define CONFIG_SYS_LBC_LBCR 0x00080000 /* Implement conversion of
  96. addresses in the LBC */
  97. #define __SW_BOOT_MASK 0xf3
  98. #define __SW_BOOT_NOR 0x00
  99. #define __SW_BOOT_SPI 0x08
  100. #define __SW_BOOT_SD 0x04
  101. #define __SW_BOOT_NAND 0x0c
  102. #endif
  103. #if defined(CONFIG_P2020RDB)
  104. #define CONFIG_BOARDNAME "P2020RDB"
  105. #define CONFIG_NAND_FSL_ELBC
  106. #define CONFIG_P2020
  107. #define CONFIG_SPI_FLASH
  108. #define CONFIG_VSC7385_ENET
  109. #define __SW_BOOT_MASK 0x03
  110. #define __SW_BOOT_NOR 0xc8
  111. #define __SW_BOOT_SPI 0x28
  112. #define __SW_BOOT_SD 0x68 /* or 0x18 */
  113. #define __SW_BOOT_NAND 0xe8
  114. #define __SW_BOOT_PCIE 0xa8
  115. #endif
  116. #ifdef CONFIG_SDCARD
  117. #define CONFIG_RAMBOOT_SDCARD
  118. #define CONFIG_SYS_RAMBOOT
  119. #define CONFIG_SYS_EXTRA_ENV_RELOC
  120. #define CONFIG_SYS_TEXT_BASE 0x11000000
  121. #define CONFIG_RESET_VECTOR_ADDRESS 0x1107fffc
  122. #endif
  123. #ifdef CONFIG_SPIFLASH
  124. #define CONFIG_RAMBOOT_SPIFLASH
  125. #define CONFIG_SYS_RAMBOOT
  126. #define CONFIG_SYS_EXTRA_ENV_RELOC
  127. #define CONFIG_SYS_TEXT_BASE 0x11000000
  128. #define CONFIG_RESET_VECTOR_ADDRESS 0x1107fffc
  129. #endif
  130. #if defined(CONFIG_NAND) && defined(CONFIG_NAND_FSL_ELBC)
  131. #define CONFIG_NAND_U_BOOT
  132. #define CONFIG_SYS_EXTRA_ENV_RELOC
  133. #define CONFIG_SYS_RAMBOOT
  134. #define CONFIG_SYS_TEXT_BASE_SPL 0xff800000
  135. #ifdef CONFIG_NAND_SPL
  136. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE_SPL
  137. #else
  138. #define CONFIG_SYS_TEXT_BASE 0x11001000
  139. #endif /* CONFIG_NAND_SPL */
  140. #endif
  141. #ifndef CONFIG_SYS_TEXT_BASE
  142. #define CONFIG_SYS_TEXT_BASE 0xeff80000
  143. #endif
  144. #ifndef CONFIG_RESET_VECTOR_ADDRESS
  145. #define CONFIG_RESET_VECTOR_ADDRESS 0xeffffffc
  146. #endif
  147. #ifndef CONFIG_SYS_MONITOR_BASE
  148. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
  149. #endif
  150. /* High Level Configuration Options */
  151. #define CONFIG_BOOKE
  152. #define CONFIG_E500
  153. #define CONFIG_MPC85xx
  154. #define CONFIG_MP
  155. #define CONFIG_FSL_ELBC
  156. #define CONFIG_PCI
  157. #define CONFIG_PCIE1 /* PCIE controler 1 (slot 1) */
  158. #define CONFIG_PCIE2 /* PCIE controler 2 (slot 2) */
  159. #define CONFIG_FSL_PCI_INIT /* Use common FSL init code */
  160. #define CONFIG_FSL_PCIE_RESET /* need PCIe reset errata */
  161. #define CONFIG_SYS_PCI_64BIT /* enable 64-bit PCI resources */
  162. #define CONFIG_FSL_LAW
  163. #define CONFIG_TSEC_ENET /* tsec ethernet support */
  164. #define CONFIG_ENV_OVERWRITE
  165. #define CONFIG_CMD_SATA
  166. #define CONFIG_SATA_SIL3114
  167. #define CONFIG_SYS_SATA_MAX_DEVICE 2
  168. #define CONFIG_LIBATA
  169. #define CONFIG_LBA48
  170. #if defined(CONFIG_P2020RDB)
  171. #define CONFIG_SYS_CLK_FREQ 100000000
  172. #else
  173. #define CONFIG_SYS_CLK_FREQ 66666666
  174. #endif
  175. #define CONFIG_DDR_CLK_FREQ 66666666
  176. #define CONFIG_HWCONFIG
  177. /*
  178. * These can be toggled for performance analysis, otherwise use default.
  179. */
  180. #define CONFIG_L2_CACHE
  181. #define CONFIG_BTB
  182. #define CONFIG_BOARD_EARLY_INIT_F /* Call board_pre_init */
  183. #define CONFIG_ENABLE_36BIT_PHYS
  184. #ifdef CONFIG_PHYS_64BIT
  185. #define CONFIG_ADDR_MAP 1
  186. #define CONFIG_SYS_NUM_ADDR_MAP 16 /* number of TLB1 entries */
  187. #endif
  188. #define CONFIG_SYS_MEMTEST_START 0x00200000 /* memtest works on */
  189. #define CONFIG_SYS_MEMTEST_END 0x1fffffff
  190. #define CONFIG_PANIC_HANG /* do not reset board on panic */
  191. #define CONFIG_SYS_CCSRBAR 0xffe00000
  192. #define CONFIG_SYS_CCSRBAR_PHYS_LOW CONFIG_SYS_CCSRBAR
  193. /* IN case of NAND bootloader relocate CCSRBAR in RAMboot code not in the 4k
  194. SPL code*/
  195. #if defined(CONFIG_NAND_U_BOOT) && defined(CONFIG_NAND_SPL)
  196. #define CONFIG_SYS_CCSR_DO_NOT_RELOCATE
  197. #endif
  198. /* DDR Setup */
  199. #define CONFIG_FSL_DDR3
  200. #define CONFIG_DDR_RAW_TIMING
  201. #define CONFIG_DDR_SPD
  202. #define CONFIG_SYS_SPD_BUS_NUM 1
  203. #define SPD_EEPROM_ADDRESS 0x52
  204. #undef CONFIG_FSL_DDR_INTERACTIVE
  205. #ifdef CONFIG_P1020MBG
  206. #define CONFIG_SYS_SDRAM_SIZE_LAW LAW_SIZE_2G
  207. #define CONFIG_CHIP_SELECTS_PER_CTRL 2
  208. #else
  209. #define CONFIG_SYS_SDRAM_SIZE_LAW LAW_SIZE_1G
  210. #define CONFIG_CHIP_SELECTS_PER_CTRL 1
  211. #endif
  212. #define CONFIG_SYS_SDRAM_SIZE (1u << (CONFIG_SYS_SDRAM_SIZE_LAW - 19))
  213. #define CONFIG_SYS_DDR_SDRAM_BASE 0x00000000
  214. #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE
  215. #define CONFIG_NUM_DDR_CONTROLLERS 1
  216. #define CONFIG_DIMM_SLOTS_PER_CTLR 1
  217. /* Default settings for DDR3 */
  218. #ifdef CONFIG_P2020RDB
  219. #define CONFIG_SYS_DDR_CS0_BNDS 0x0000003f
  220. #define CONFIG_SYS_DDR_CS0_CONFIG 0x80014202
  221. #define CONFIG_SYS_DDR_CS0_CONFIG_2 0x00000000
  222. #define CONFIG_SYS_DDR_CS1_BNDS 0x00000000
  223. #define CONFIG_SYS_DDR_CS1_CONFIG 0x00000000
  224. #define CONFIG_SYS_DDR_CS1_CONFIG_2 0x00000000
  225. #define CONFIG_SYS_DDR_DATA_INIT 0xdeadbeef
  226. #define CONFIG_SYS_DDR_INIT_ADDR 0x00000000
  227. #define CONFIG_SYS_DDR_INIT_EXT_ADDR 0x00000000
  228. #define CONFIG_SYS_DDR_MODE_CONTROL 0x00000000
  229. #define CONFIG_SYS_DDR_ZQ_CONTROL 0x89080600
  230. #define CONFIG_SYS_DDR_WRLVL_CONTROL 0x8645F607
  231. #define CONFIG_SYS_DDR_SR_CNTR 0x00000000
  232. #define CONFIG_SYS_DDR_RCW_1 0x00000000
  233. #define CONFIG_SYS_DDR_RCW_2 0x00000000
  234. #define CONFIG_SYS_DDR_CONTROL 0xC7000000 /* Type = DDR3 */
  235. #define CONFIG_SYS_DDR_CONTROL_2 0x24401000
  236. #define CONFIG_SYS_DDR_TIMING_4 0x00220001
  237. #define CONFIG_SYS_DDR_TIMING_5 0x02401400
  238. #define CONFIG_SYS_DDR_TIMING_3 0x00020000
  239. #define CONFIG_SYS_DDR_TIMING_0 0x00330104
  240. #define CONFIG_SYS_DDR_TIMING_1 0x6f6B4644
  241. #define CONFIG_SYS_DDR_TIMING_2 0x0FA88CCF
  242. #define CONFIG_SYS_DDR_CLK_CTRL 0x02000000
  243. #define CONFIG_SYS_DDR_MODE_1 0x00421422
  244. #define CONFIG_SYS_DDR_MODE_2 0x04000000
  245. #define CONFIG_SYS_DDR_INTERVAL 0x0C300100
  246. #else
  247. #define CONFIG_SYS_DDR_CS0_BNDS 0x0000003f
  248. #define CONFIG_SYS_DDR_CS0_CONFIG 0x80014302
  249. #define CONFIG_SYS_DDR_CS0_CONFIG_2 0x00000000
  250. #define CONFIG_SYS_DDR_CS1_BNDS 0x0040007f
  251. #define CONFIG_SYS_DDR_CS1_CONFIG 0x80014302
  252. #define CONFIG_SYS_DDR_CS1_CONFIG_2 0x00000000
  253. #define CONFIG_SYS_DDR_DATA_INIT 0xdeadbeef
  254. #define CONFIG_SYS_DDR_INIT_ADDR 0x00000000
  255. #define CONFIG_SYS_DDR_INIT_EXT_ADDR 0x00000000
  256. #define CONFIG_SYS_DDR_MODE_CONTROL 0x00000000
  257. #define CONFIG_SYS_DDR_ZQ_CONTROL 0x89080600
  258. #define CONFIG_SYS_DDR_WRLVL_CONTROL 0x8655A608
  259. #define CONFIG_SYS_DDR_SR_CNTR 0x00000000
  260. #define CONFIG_SYS_DDR_RCW_1 0x00000000
  261. #define CONFIG_SYS_DDR_RCW_2 0x00000000
  262. #define CONFIG_SYS_DDR_CONTROL 0xC70C0000 /* Type = DDR3 */
  263. #define CONFIG_SYS_DDR_CONTROL_2 0x04401050
  264. #define CONFIG_SYS_DDR_TIMING_4 0x00220001
  265. #define CONFIG_SYS_DDR_TIMING_5 0x03402400
  266. #define CONFIG_SYS_DDR_TIMING_3 0x00020000
  267. #define CONFIG_SYS_DDR_TIMING_0 0x00330004
  268. #define CONFIG_SYS_DDR_TIMING_1 0x6f6B4846
  269. #define CONFIG_SYS_DDR_TIMING_2 0x0FA8C8CF
  270. #define CONFIG_SYS_DDR_CLK_CTRL 0x03000000
  271. #define CONFIG_SYS_DDR_MODE_1 0x40461520
  272. #define CONFIG_SYS_DDR_MODE_2 0x8000c000
  273. #define CONFIG_SYS_DDR_INTERVAL 0x0C300000
  274. #endif
  275. #undef CONFIG_CLOCKS_IN_MHZ
  276. /*
  277. * Memory map
  278. *
  279. * 0x0000_0000 0x7fff_ffff DDR Up to 2GB cacheable
  280. * 0x8000_0000 0xdfff_ffff PCI Express Mem 1.5G non-cacheable(PCIe * 3)
  281. * 0xffc0_0000 0xffc3_ffff PCI IO range 256k non-cacheable
  282. *
  283. * Localbus cacheable (TBD)
  284. * 0xXXXX_XXXX 0xXXXX_XXXX SRAM YZ M Cacheable
  285. *
  286. * Localbus non-cacheable
  287. * 0xec00_0000 0xefff_ffff FLASH Up to 64M non-cacheable
  288. * 0xff80_0000 0xff8f_ffff NAND flash 1M non-cacheable
  289. * 0xff90_0000 0xff97_ffff L2 SDRAM(REV.) 512K cacheable(optional)
  290. * 0xffa0_0000 0xffaf_ffff CPLD 1M non-cacheable
  291. * 0xffb0_0000 0xffbf_ffff VSC7385 switch 1M non-cacheable
  292. * 0xffd0_0000 0xffd0_3fff L1 for stack 16K Cacheable TLB0
  293. * 0xffe0_0000 0xffef_ffff CCSR 1M non-cacheable
  294. */
  295. /*
  296. * Local Bus Definitions
  297. */
  298. #if defined(CONFIG_P1020MBG)
  299. #define CONFIG_SYS_MAX_FLASH_SECT 512 /* 64M */
  300. #define CONFIG_SYS_FLASH_BASE 0xec000000
  301. #elif defined(CONFIG_P1020UTM)
  302. #define CONFIG_SYS_MAX_FLASH_SECT 256 /* 32M */
  303. #define CONFIG_SYS_FLASH_BASE 0xee000000
  304. #else
  305. #define CONFIG_SYS_MAX_FLASH_SECT 128 /* 16M */
  306. #define CONFIG_SYS_FLASH_BASE 0xef000000
  307. #endif
  308. #ifdef CONFIG_PHYS_64BIT
  309. #define CONFIG_SYS_FLASH_BASE_PHYS (0xf00000000ull | CONFIG_SYS_FLASH_BASE)
  310. #else
  311. #define CONFIG_SYS_FLASH_BASE_PHYS CONFIG_SYS_FLASH_BASE
  312. #endif
  313. #define CONFIG_FLASH_BR_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_FLASH_BASE_PHYS)) \
  314. | BR_PS_16 | BR_V)
  315. #define CONFIG_FLASH_OR_PRELIM 0xfc000ff7
  316. #define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE_PHYS}
  317. #define CONFIG_SYS_FLASH_QUIET_TEST
  318. #define CONFIG_FLASH_SHOW_PROGRESS 45 /* count down from 45/5: 9..1 */
  319. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */
  320. #undef CONFIG_SYS_FLASH_CHECKSUM
  321. #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
  322. #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
  323. #define CONFIG_FLASH_CFI_DRIVER
  324. #define CONFIG_SYS_FLASH_CFI
  325. #define CONFIG_SYS_FLASH_EMPTY_INFO
  326. #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
  327. /* Nand Flash */
  328. #ifdef CONFIG_NAND_FSL_ELBC
  329. #define CONFIG_SYS_NAND_BASE 0xff800000
  330. #ifdef CONFIG_PHYS_64BIT
  331. #define CONFIG_SYS_NAND_BASE_PHYS 0xfff800000ull
  332. #else
  333. #define CONFIG_SYS_NAND_BASE_PHYS CONFIG_SYS_NAND_BASE
  334. #endif
  335. #define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
  336. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  337. #define CONFIG_MTD_NAND_VERIFY_WRITE
  338. #define CONFIG_CMD_NAND
  339. #define CONFIG_SYS_NAND_BLOCK_SIZE (16 * 1024)
  340. /* NAND boot: 4K NAND loader config */
  341. #define CONFIG_SYS_NAND_SPL_SIZE 0x1000
  342. #define CONFIG_SYS_NAND_U_BOOT_SIZE ((512 << 10) + CONFIG_SYS_NAND_SPL_SIZE)
  343. #define CONFIG_SYS_NAND_U_BOOT_DST (0x11000000 - CONFIG_SYS_NAND_SPL_SIZE)
  344. #define CONFIG_SYS_NAND_U_BOOT_START 0x11000000
  345. #define CONFIG_SYS_NAND_U_BOOT_OFFS (0)
  346. #define CONFIG_SYS_NAND_U_BOOT_RELOC 0x00010000
  347. #define CONFIG_SYS_NAND_U_BOOT_RELOC_SP (CONFIG_SYS_NAND_U_BOOT_RELOC + 0x10000)
  348. #define CONFIG_SYS_NAND_BR_PRELIM (BR_PHYS_ADDR((CONFIG_SYS_NAND_BASE_PHYS)) \
  349. | (2<<BR_DECC_SHIFT) /* Use HW ECC */ \
  350. | BR_PS_8 /* Port Size = 8 bit */ \
  351. | BR_MS_FCM /* MSEL = FCM */ \
  352. | BR_V) /* valid */
  353. #define CONFIG_SYS_NAND_OR_PRELIM (OR_AM_32KB /* small page */ \
  354. | OR_FCM_CSCT \
  355. | OR_FCM_CST \
  356. | OR_FCM_CHT \
  357. | OR_FCM_SCY_1 \
  358. | OR_FCM_TRLX \
  359. | OR_FCM_EHTR)
  360. #endif /* CONFIG_NAND_FSL_ELBC */
  361. #define CONFIG_BOARD_EARLY_INIT_R /* call board_early_init_r function */
  362. #define CONFIG_SYS_INIT_RAM_LOCK
  363. #define CONFIG_SYS_INIT_RAM_ADDR 0xffd00000 /* stack in RAM */
  364. #ifdef CONFIG_PHYS_64BIT
  365. #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0xf
  366. #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW CONFIG_SYS_INIT_RAM_ADDR
  367. /* The assembler doesn't like typecast */
  368. #define CONFIG_SYS_INIT_RAM_ADDR_PHYS \
  369. ((CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH * 1ull << 32) | \
  370. CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW)
  371. #else
  372. /* Initial L1 address */
  373. #define CONFIG_SYS_INIT_RAM_ADDR_PHYS CONFIG_SYS_INIT_RAM_ADDR
  374. #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH 0
  375. #define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW CONFIG_SYS_INIT_RAM_ADDR_PHYS
  376. #endif
  377. /* Size of used area in RAM */
  378. #define CONFIG_SYS_INIT_RAM_SIZE 0x00004000
  379. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \
  380. GENERATED_GBL_DATA_SIZE)
  381. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  382. #define CONFIG_SYS_MONITOR_LEN (256 * 1024)/* Reserve 256 kB for Mon */
  383. #define CONFIG_SYS_MALLOC_LEN (1024 * 1024)/* Reserved for malloc */
  384. #define CONFIG_SYS_CPLD_BASE 0xffa00000
  385. #ifdef CONFIG_PHYS_64BIT
  386. #define CONFIG_SYS_CPLD_BASE_PHYS 0xfffa00000ull
  387. #else
  388. #define CONFIG_SYS_CPLD_BASE_PHYS CONFIG_SYS_CPLD_BASE
  389. #endif
  390. /* CPLD config size: 1Mb */
  391. #define CONFIG_CPLD_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_CPLD_BASE_PHYS) | \
  392. BR_PS_8 | BR_V)
  393. #define CONFIG_CPLD_OR_PRELIM (0xfff009f7)
  394. #define CONFIG_SYS_PMC_BASE 0xff980000
  395. #define CONFIG_SYS_PMC_BASE_PHYS CONFIG_SYS_PMC_BASE
  396. #define CONFIG_PMC_BR_PRELIM (BR_PHYS_ADDR(CONFIG_SYS_PMC_BASE_PHYS) | \
  397. BR_PS_8 | BR_V)
  398. #define CONFIG_PMC_OR_PRELIM (OR_AM_64KB | OR_GPCM_CSNT | OR_GPCM_XACS | \
  399. OR_GPCM_SCY | OR_GPCM_TRLX | OR_GPCM_EHTR | \
  400. OR_GPCM_EAD)
  401. #ifdef CONFIG_NAND_U_BOOT
  402. #define CONFIG_SYS_BR0_PRELIM CONFIG_SYS_NAND_BR_PRELIM /* NAND Base Addr */
  403. #define CONFIG_SYS_OR0_PRELIM CONFIG_SYS_NAND_OR_PRELIM /* NAND Options */
  404. #define CONFIG_SYS_BR1_PRELIM CONFIG_FLASH_BR_PRELIM /* NOR Base Address */
  405. #define CONFIG_SYS_OR1_PRELIM CONFIG_FLASH_OR_PRELIM /* NOR Options */
  406. #else
  407. #define CONFIG_SYS_BR0_PRELIM CONFIG_FLASH_BR_PRELIM /* NOR Base Address */
  408. #define CONFIG_SYS_OR0_PRELIM CONFIG_FLASH_OR_PRELIM /* NOR Options */
  409. #ifdef CONFIG_NAND_FSL_ELBC
  410. #define CONFIG_SYS_BR1_PRELIM CONFIG_SYS_NAND_BR_PRELIM /* NAND Base Addr */
  411. #define CONFIG_SYS_OR1_PRELIM CONFIG_SYS_NAND_OR_PRELIM /* NAND Options */
  412. #endif
  413. #endif
  414. #define CONFIG_SYS_BR3_PRELIM CONFIG_CPLD_BR_PRELIM /* CPLD Base Address */
  415. #define CONFIG_SYS_OR3_PRELIM CONFIG_CPLD_OR_PRELIM /* CPLD Options */
  416. /* Vsc7385 switch */
  417. #ifdef CONFIG_VSC7385_ENET
  418. #define CONFIG_SYS_VSC7385_BASE 0xffb00000
  419. #ifdef CONFIG_PHYS_64BIT
  420. #define CONFIG_SYS_VSC7385_BASE_PHYS 0xfffb00000ull
  421. #else
  422. #define CONFIG_SYS_VSC7385_BASE_PHYS CONFIG_SYS_VSC7385_BASE
  423. #endif
  424. #define CONFIG_SYS_VSC7385_BR_PRELIM \
  425. (BR_PHYS_ADDR(CONFIG_SYS_VSC7385_BASE_PHYS) | BR_PS_8 | BR_V)
  426. #define CONFIG_SYS_VSC7385_OR_PRELIM (OR_AM_128KB | OR_GPCM_CSNT | \
  427. OR_GPCM_XACS | OR_GPCM_SCY_15 | OR_GPCM_SETA | \
  428. OR_GPCM_TRLX | OR_GPCM_EHTR | OR_GPCM_EAD)
  429. #define CONFIG_SYS_BR2_PRELIM CONFIG_SYS_VSC7385_BR_PRELIM
  430. #define CONFIG_SYS_OR2_PRELIM CONFIG_SYS_VSC7385_OR_PRELIM
  431. /* The size of the VSC7385 firmware image */
  432. #define CONFIG_VSC7385_IMAGE_SIZE 8192
  433. #endif
  434. /* Serial Port - controlled on board with jumper J8
  435. * open - index 2
  436. * shorted - index 1
  437. */
  438. #define CONFIG_CONS_INDEX 1
  439. #undef CONFIG_SERIAL_SOFTWARE_FIFO
  440. #define CONFIG_SYS_NS16550
  441. #define CONFIG_SYS_NS16550_SERIAL
  442. #define CONFIG_SYS_NS16550_REG_SIZE 1
  443. #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
  444. #ifdef CONFIG_NAND_SPL
  445. #define CONFIG_NS16550_MIN_FUNCTIONS
  446. #endif
  447. #define CONFIG_SYS_BAUDRATE_TABLE \
  448. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
  449. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500)
  450. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600)
  451. /* Use the HUSH parser */
  452. #define CONFIG_SYS_HUSH_PARSER
  453. #ifdef CONFIG_SYS_HUSH_PARSER
  454. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  455. #endif
  456. /*
  457. * Pass open firmware flat tree
  458. */
  459. #define CONFIG_OF_LIBFDT
  460. #define CONFIG_OF_BOARD_SETUP
  461. #define CONFIG_OF_STDOUT_VIA_ALIAS
  462. #define CONFIG_SYS_64BIT_VSPRINTF
  463. #define CONFIG_SYS_64BIT_STRTOUL
  464. /* new uImage format support */
  465. #define CONFIG_FIT
  466. #define CONFIG_FIT_VERBOSE /* enable fit_format_{error,warning}() */
  467. /* I2C */
  468. #define CONFIG_FSL_I2C /* Use FSL common I2C driver */
  469. #define CONFIG_HARD_I2C /* I2C with hardware support */
  470. #undef CONFIG_SOFT_I2C /* I2C bit-banged */
  471. #define CONFIG_I2C_MULTI_BUS
  472. #define CONFIG_I2C_CMD_TREE
  473. #define CONFIG_SYS_I2C_SPEED 400000 /* I2C spd and slave address */
  474. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x52
  475. #define CONFIG_SYS_I2C_SLAVE 0x7F
  476. #define CONFIG_SYS_I2C_NOPROBES {{0, 0x29}} /* Don't probe this addr */
  477. #define CONFIG_SYS_I2C_OFFSET 0x3000
  478. #define CONFIG_SYS_I2C2_OFFSET 0x3100
  479. #define CONFIG_SYS_SPD_BUS_NUM 1 /* For rom_loc and flash bank */
  480. /*
  481. * I2C2 EEPROM
  482. */
  483. #undef CONFIG_ID_EEPROM
  484. #define CONFIG_RTC_PT7C4338
  485. #define CONFIG_SYS_I2C_RTC_ADDR 0x68
  486. #define CONFIG_SYS_I2C_PCA9557_ADDR 0x18
  487. /* enable read and write access to EEPROM */
  488. #define CONFIG_CMD_EEPROM
  489. #define CONFIG_SYS_I2C_MULTI_EEPROMS
  490. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
  491. #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
  492. #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
  493. /*
  494. * eSPI - Enhanced SPI
  495. */
  496. #define CONFIG_HARD_SPI
  497. #define CONFIG_FSL_ESPI
  498. #if defined(CONFIG_SPI_FLASH)
  499. #define CONFIG_SPI_FLASH_SPANSION
  500. #define CONFIG_CMD_SF
  501. #define CONFIG_SF_DEFAULT_SPEED 10000000
  502. #define CONFIG_SF_DEFAULT_MODE 0
  503. #endif
  504. #if defined(CONFIG_PCI)
  505. /*
  506. * General PCI
  507. * Memory space is mapped 1-1, but I/O space must start from 0.
  508. */
  509. /* controller 2, direct to uli, tgtid 2, Base address 9000 */
  510. #define CONFIG_SYS_PCIE2_NAME "PCIe SLOT"
  511. #define CONFIG_SYS_PCIE2_MEM_VIRT 0xa0000000
  512. #ifdef CONFIG_PHYS_64BIT
  513. #define CONFIG_SYS_PCIE2_MEM_BUS 0xc0000000
  514. #define CONFIG_SYS_PCIE2_MEM_PHYS 0xc20000000ull
  515. #else
  516. #define CONFIG_SYS_PCIE2_MEM_BUS 0xa0000000
  517. #define CONFIG_SYS_PCIE2_MEM_PHYS 0xa0000000
  518. #endif
  519. #define CONFIG_SYS_PCIE2_MEM_SIZE 0x20000000 /* 512M */
  520. #define CONFIG_SYS_PCIE2_IO_VIRT 0xffc10000
  521. #define CONFIG_SYS_PCIE2_IO_BUS 0x00000000
  522. #ifdef CONFIG_PHYS_64BIT
  523. #define CONFIG_SYS_PCIE2_IO_PHYS 0xfffc10000ull
  524. #else
  525. #define CONFIG_SYS_PCIE2_IO_PHYS 0xffc10000
  526. #endif
  527. #define CONFIG_SYS_PCIE2_IO_SIZE 0x00010000 /* 64k */
  528. /* controller 1, Slot 2, tgtid 1, Base address a000 */
  529. #define CONFIG_SYS_PCIE1_NAME "mini PCIe SLOT"
  530. #define CONFIG_SYS_PCIE1_MEM_VIRT 0x80000000
  531. #ifdef CONFIG_PHYS_64BIT
  532. #define CONFIG_SYS_PCIE1_MEM_BUS 0x80000000
  533. #define CONFIG_SYS_PCIE1_MEM_PHYS 0xc00000000ull
  534. #else
  535. #define CONFIG_SYS_PCIE1_MEM_BUS 0x80000000
  536. #define CONFIG_SYS_PCIE1_MEM_PHYS 0x80000000
  537. #endif
  538. #define CONFIG_SYS_PCIE1_MEM_SIZE 0x20000000 /* 512M */
  539. #define CONFIG_SYS_PCIE1_IO_VIRT 0xffc00000
  540. #define CONFIG_SYS_PCIE1_IO_BUS 0x00000000
  541. #ifdef CONFIG_PHYS_64BIT
  542. #define CONFIG_SYS_PCIE1_IO_PHYS 0xfffc00000ull
  543. #else
  544. #define CONFIG_SYS_PCIE1_IO_PHYS 0xffc00000
  545. #endif
  546. #define CONFIG_SYS_PCIE1_IO_SIZE 0x00010000 /* 64k */
  547. #define CONFIG_NET_MULTI
  548. #define CONFIG_PCI_PNP /* do pci plug-and-play */
  549. #define CONFIG_E1000 /* Defind e1000 pci Ethernet card*/
  550. #define CONFIG_CMD_PCI
  551. #define CONFIG_CMD_NET
  552. #define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  553. #define CONFIG_DOS_PARTITION
  554. #endif /* CONFIG_PCI */
  555. #if defined(CONFIG_TSEC_ENET)
  556. #ifndef CONFIG_NET_MULTI
  557. #define CONFIG_NET_MULTI
  558. #endif
  559. #define CONFIG_MII /* MII PHY management */
  560. #define CONFIG_TSEC1
  561. #define CONFIG_TSEC1_NAME "eTSEC1"
  562. #define CONFIG_TSEC2
  563. #define CONFIG_TSEC2_NAME "eTSEC2"
  564. #define CONFIG_TSEC3
  565. #define CONFIG_TSEC3_NAME "eTSEC3"
  566. #define TSEC1_PHY_ADDR 2
  567. #define TSEC2_PHY_ADDR 0
  568. #define TSEC3_PHY_ADDR 1
  569. #define TSEC1_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
  570. #define TSEC2_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
  571. #define TSEC3_FLAGS (TSEC_GIGABIT | TSEC_REDUCED)
  572. #define TSEC1_PHYIDX 0
  573. #define TSEC2_PHYIDX 0
  574. #define TSEC3_PHYIDX 0
  575. #define CONFIG_ETHPRIME "eTSEC1"
  576. #define CONFIG_PHY_GIGE 1 /* Include GbE speed/duplex detection */
  577. #define CONFIG_HAS_ETH0
  578. #define CONFIG_HAS_ETH1
  579. #define CONFIG_HAS_ETH2
  580. #endif /* CONFIG_TSEC_ENET */
  581. #ifdef CONFIG_QE
  582. /* QE microcode/firmware address */
  583. #define CONFIG_SYS_QE_FW_ADDR 0xefec0000
  584. #define CONFIG_SYS_QE_FW_LENGTH 0x10000
  585. #endif /* CONFIG_QE */
  586. #ifdef CONFIG_P1025RDB
  587. /*
  588. * QE UEC ethernet configuration
  589. */
  590. #define CONFIG_MIIM_ADDRESS (CONFIG_SYS_CCSRBAR + 0x82120)
  591. #undef CONFIG_UEC_ETH
  592. #define CONFIG_PHY_MODE_NEED_CHANGE
  593. #define CONFIG_UEC_ETH1 /* ETH1 */
  594. #define CONFIG_HAS_ETH0
  595. #ifdef CONFIG_UEC_ETH1
  596. #define CONFIG_SYS_UEC1_UCC_NUM 0 /* UCC1 */
  597. #define CONFIG_SYS_UEC1_RX_CLK QE_CLK12 /* CLK12 for MII */
  598. #define CONFIG_SYS_UEC1_TX_CLK QE_CLK9 /* CLK9 for MII */
  599. #define CONFIG_SYS_UEC1_ETH_TYPE FAST_ETH
  600. #define CONFIG_SYS_UEC1_PHY_ADDR 0x0 /* 0x0 for MII */
  601. #define CONFIG_SYS_UEC1_INTERFACE_TYPE PHY_INTERFACE_MODE_RMII
  602. #define CONFIG_SYS_UEC1_INTERFACE_SPEED 100
  603. #endif /* CONFIG_UEC_ETH1 */
  604. #define CONFIG_UEC_ETH5 /* ETH5 */
  605. #define CONFIG_HAS_ETH1
  606. #ifdef CONFIG_UEC_ETH5
  607. #define CONFIG_SYS_UEC5_UCC_NUM 4 /* UCC5 */
  608. #define CONFIG_SYS_UEC5_RX_CLK QE_CLK_NONE
  609. #define CONFIG_SYS_UEC5_TX_CLK QE_CLK13 /* CLK 13 for RMII */
  610. #define CONFIG_SYS_UEC5_ETH_TYPE FAST_ETH
  611. #define CONFIG_SYS_UEC5_PHY_ADDR 0x3 /* 0x3 for RMII */
  612. #define CONFIG_SYS_UEC5_INTERFACE_TYPE PHY_INTERFACE_MODE_RMII
  613. #define CONFIG_SYS_UEC5_INTERFACE_SPEED 100
  614. #endif /* CONFIG_UEC_ETH5 */
  615. #endif /* CONFIG_P1025RDB */
  616. /*
  617. * Environment
  618. */
  619. #ifdef CONFIG_SYS_RAMBOOT
  620. #ifdef CONFIG_RAMBOOT_SPIFLASH
  621. #define CONFIG_ENV_IS_IN_SPI_FLASH
  622. #define CONFIG_ENV_SPI_BUS 0
  623. #define CONFIG_ENV_SPI_CS 0
  624. #define CONFIG_ENV_SPI_MAX_HZ 10000000
  625. #define CONFIG_ENV_SPI_MODE 0
  626. #define CONFIG_ENV_SIZE 0x2000 /* 8KB */
  627. #define CONFIG_ENV_OFFSET 0x100000 /* 1MB */
  628. #define CONFIG_ENV_SECT_SIZE 0x10000
  629. #elif defined(CONFIG_RAMBOOT_SDCARD)
  630. #define CONFIG_ENV_IS_IN_MMC
  631. #define CONFIG_ENV_SIZE 0x2000
  632. #define CONFIG_SYS_MMC_ENV_DEV 0
  633. #elif defined(CONFIG_NAND_U_BOOT)
  634. #define CONFIG_ENV_IS_IN_NAND
  635. #define CONFIG_ENV_SIZE CONFIG_SYS_NAND_BLOCK_SIZE
  636. #define CONFIG_ENV_OFFSET ((512 * 1024) + CONFIG_SYS_NAND_BLOCK_SIZE)
  637. #define CONFIG_ENV_RANGE (3 * CONFIG_ENV_SIZE)
  638. #else
  639. #define CONFIG_ENV_IS_NOWHERE /* Store ENV in memory only */
  640. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
  641. #define CONFIG_ENV_SIZE 0x2000
  642. #endif
  643. #else
  644. #define CONFIG_ENV_IS_IN_FLASH
  645. #if CONFIG_SYS_MONITOR_BASE > 0xfff80000
  646. #define CONFIG_ENV_ADDR 0xfff80000
  647. #else
  648. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE)
  649. #endif
  650. #define CONFIG_ENV_SIZE 0x2000
  651. #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K (one sector) */
  652. #endif
  653. #define CONFIG_LOADS_ECHO /* echo on for serial download */
  654. #define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */
  655. /*
  656. * Command line configuration.
  657. */
  658. #include <config_cmd_default.h>
  659. #define CONFIG_CMD_IRQ
  660. #define CONFIG_CMD_PING
  661. #define CONFIG_CMD_I2C
  662. #define CONFIG_CMD_MII
  663. #define CONFIG_CMD_DATE
  664. #define CONFIG_CMD_ELF
  665. #define CONFIG_CMD_SETEXPR
  666. #define CONFIG_CMD_REGINFO
  667. /*
  668. * USB
  669. */
  670. #define CONFIG_HAS_FSL_DR_USB
  671. #if defined(CONFIG_HAS_FSL_DR_USB)
  672. #define CONFIG_USB_EHCI
  673. #ifdef CONFIG_USB_EHCI
  674. #define CONFIG_CMD_USB
  675. #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
  676. #define CONFIG_USB_EHCI_FSL
  677. #define CONFIG_USB_STORAGE
  678. #endif
  679. #endif
  680. #define CONFIG_MMC
  681. #ifdef CONFIG_MMC
  682. #define CONFIG_FSL_ESDHC
  683. #define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR
  684. #define CONFIG_CMD_MMC
  685. #define CONFIG_GENERIC_MMC
  686. #endif
  687. #if defined(CONFIG_MMC) || defined(CONFIG_USB_EHCI) \
  688. || defined(CONFIG_FSL_SATA)
  689. #define CONFIG_CMD_EXT2
  690. #define CONFIG_CMD_FAT
  691. #define CONFIG_DOS_PARTITION
  692. #endif
  693. #undef CONFIG_WATCHDOG /* watchdog disabled */
  694. /*
  695. * Miscellaneous configurable options
  696. */
  697. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  698. #define CONFIG_CMDLINE_EDITING /* Command-line editing */
  699. #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
  700. #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
  701. #if defined(CONFIG_CMD_KGDB)
  702. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  703. #else
  704. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  705. #endif
  706. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  707. /* Print Buffer Size */
  708. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  709. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE/* Boot Argument Buffer Size */
  710. #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms tick */
  711. /*
  712. * For booting Linux, the board info and command line data
  713. * have to be in the first 64 MB of memory, since this is
  714. * the maximum mapped by the Linux kernel during initialization.
  715. */
  716. #define CONFIG_SYS_BOOTMAPSZ (64 << 20) /* Initial Memory for Linux*/
  717. #define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */
  718. #if defined(CONFIG_CMD_KGDB)
  719. #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
  720. #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
  721. #endif
  722. /*
  723. * Environment Configuration
  724. */
  725. #define CONFIG_HOSTNAME unknown
  726. #define CONFIG_ROOTPATH "/opt/nfsroot"
  727. #define CONFIG_BOOTFILE "uImage"
  728. #define CONFIG_UBOOTPATH u-boot.bin /* U-Boot image on TFTP server */
  729. /* default location for tftp and bootm */
  730. #define CONFIG_LOADADDR 1000000
  731. #define CONFIG_BOOTDELAY 10 /* -1 disables auto-boot */
  732. #define CONFIG_BOOTARGS /* the boot command will set bootargs */
  733. #define CONFIG_BAUDRATE 115200
  734. #ifdef __SW_BOOT_NOR
  735. #define __NOR_RST_CMD \
  736. norboot=i2c dev 1; i2c mw 18 1 __SW_BOOT_NOR 1; \
  737. i2c mw 18 3 __SW_BOOT_MASK 1; reset
  738. #endif
  739. #ifdef __SW_BOOT_SPI
  740. #define __SPI_RST_CMD \
  741. spiboot=i2c dev 1; i2c mw 18 1 __SW_BOOT_SPI 1; \
  742. i2c mw 18 3 __SW_BOOT_MASK 1; reset
  743. #endif
  744. #ifdef __SW_BOOT_SD
  745. #define __SD_RST_CMD \
  746. sdboot=i2c dev 1; i2c mw 18 1 __SW_BOOT_SD 1; \
  747. i2c mw 18 3 __SW_BOOT_MASK 1; reset
  748. #endif
  749. #ifdef __SW_BOOT_NAND
  750. #define __NAND_RST_CMD \
  751. nandboot=i2c dev 1; i2c mw 18 1 __SW_BOOT_NAND 1; \
  752. i2c mw 18 3 __SW_BOOT_MASK 1; reset
  753. #endif
  754. #ifdef __SW_BOOT_PCIE
  755. #define __PCIE_RST_CMD \
  756. pciboot=i2c dev 1; i2c mw 18 1 __SW_BOOT_PCIE 1; \
  757. i2c mw 18 3 __SW_BOOT_MASK 1; reset
  758. #endif
  759. #define CONFIG_EXTRA_ENV_SETTINGS \
  760. "netdev=eth0\0" \
  761. "uboot=" MK_STR(CONFIG_UBOOTPATH) "\0" \
  762. "loadaddr=1000000\0" \
  763. "bootfile=uImage\0" \
  764. "tftpflash=tftpboot $loadaddr $uboot; " \
  765. "protect off " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; " \
  766. "erase " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; " \
  767. "cp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize; " \
  768. "protect on " MK_STR(CONFIG_SYS_TEXT_BASE) " +$filesize; " \
  769. "cmp.b $loadaddr " MK_STR(CONFIG_SYS_TEXT_BASE) " $filesize\0" \
  770. "hwconfig=usb1:dr_mode=host,phy_type=ulpi\0" \
  771. "consoledev=ttyS0\0" \
  772. "ramdiskaddr=2000000\0" \
  773. "ramdiskfile=rootfs.ext2.gz.uboot\0" \
  774. "fdtaddr=c00000\0" \
  775. "bdev=sda1\0" \
  776. "jffs2nor=mtdblock3\0" \
  777. "norbootaddr=ef080000\0" \
  778. "norfdtaddr=ef040000\0" \
  779. "jffs2nand=mtdblock9\0" \
  780. "nandbootaddr=100000\0" \
  781. "nandfdtaddr=80000\0" \
  782. "ramdisk_size=120000\0" \
  783. "map_lowernorbank=i2c dev 1; i2c mw 18 1 02 1; i2c mw 18 3 fd 1\0" \
  784. "map_uppernorbank=i2c dev 1; i2c mw 18 1 00 1; i2c mw 18 3 fd 1\0" \
  785. MK_STR(__NOR_RST_CMD)"\0" \
  786. MK_STR(__SPI_RST_CMD)"\0" \
  787. MK_STR(__SD_RST_CMD)"\0" \
  788. MK_STR(__NAND_RST_CMD)"\0" \
  789. MK_STR(__PCIE_RST_CMD)"\0"
  790. #define CONFIG_NFSBOOTCOMMAND \
  791. "setenv bootargs root=/dev/nfs rw " \
  792. "nfsroot=$serverip:$rootpath " \
  793. "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
  794. "console=$consoledev,$baudrate $othbootargs;" \
  795. "tftp $loadaddr $bootfile;" \
  796. "tftp $fdtaddr $fdtfile;" \
  797. "bootm $loadaddr - $fdtaddr"
  798. #define CONFIG_HDBOOT \
  799. "setenv bootargs root=/dev/$bdev rw rootdelay=30 " \
  800. "console=$consoledev,$baudrate $othbootargs;" \
  801. "usb start;" \
  802. "ext2load usb 0:1 $loadaddr /boot/$bootfile;" \
  803. "ext2load usb 0:1 $fdtaddr /boot/$fdtfile;" \
  804. "bootm $loadaddr - $fdtaddr"
  805. #define CONFIG_USB_FAT_BOOT \
  806. "setenv bootargs root=/dev/ram rw " \
  807. "console=$consoledev,$baudrate $othbootargs " \
  808. "ramdisk_size=$ramdisk_size;" \
  809. "usb start;" \
  810. "fatload usb 0:2 $loadaddr $bootfile;" \
  811. "fatload usb 0:2 $fdtaddr $fdtfile;" \
  812. "fatload usb 0:2 $ramdiskaddr $ramdiskfile;" \
  813. "bootm $loadaddr $ramdiskaddr $fdtaddr"
  814. #define CONFIG_USB_EXT2_BOOT \
  815. "setenv bootargs root=/dev/ram rw " \
  816. "console=$consoledev,$baudrate $othbootargs " \
  817. "ramdisk_size=$ramdisk_size;" \
  818. "usb start;" \
  819. "ext2load usb 0:4 $loadaddr $bootfile;" \
  820. "ext2load usb 0:4 $fdtaddr $fdtfile;" \
  821. "ext2load usb 0:4 $ramdiskaddr $ramdiskfile;" \
  822. "bootm $loadaddr $ramdiskaddr $fdtaddr"
  823. #define CONFIG_NORBOOT \
  824. "setenv bootargs root=/dev/$jffs2nor rw " \
  825. "console=$consoledev,$baudrate rootfstype=jffs2 $othbootargs;" \
  826. "bootm $norbootaddr - $norfdtaddr"
  827. #define CONFIG_RAMBOOTCOMMAND \
  828. "setenv bootargs root=/dev/ram rw " \
  829. "console=$consoledev,$baudrate $othbootargs " \
  830. "ramdisk_size=$ramdisk_size;" \
  831. "tftp $ramdiskaddr $ramdiskfile;" \
  832. "tftp $loadaddr $bootfile;" \
  833. "tftp $fdtaddr $fdtfile;" \
  834. "bootm $loadaddr $ramdiskaddr $fdtaddr"
  835. #define CONFIG_BOOTCOMMAND CONFIG_HDBOOT
  836. #endif /* __CONFIG_H */