sbc8349.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  1. /*
  2. * WindRiver SBC8349 U-Boot configuration file.
  3. * Copyright (c) 2006, 2007 Wind River Systems, Inc.
  4. *
  5. * Paul Gortmaker <paul.gortmaker@windriver.com>
  6. * Based on the MPC8349EMDS config.
  7. *
  8. * See file CREDITS for list of people who contributed to this
  9. * project.
  10. *
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License as
  13. * published by the Free Software Foundation; either version 2 of
  14. * the License, or (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  24. * MA 02111-1307 USA
  25. */
  26. /*
  27. * sbc8349 board configuration file.
  28. */
  29. #ifndef __CONFIG_H
  30. #define __CONFIG_H
  31. /*
  32. * High Level Configuration Options
  33. */
  34. #define CONFIG_E300 1 /* E300 Family */
  35. #define CONFIG_MPC83XX 1 /* MPC83XX family */
  36. #define CONFIG_MPC834X 1 /* MPC834X family */
  37. #define CONFIG_MPC8349 1 /* MPC8349 specific */
  38. #define CONFIG_SBC8349 1 /* WRS SBC8349 board specific */
  39. #undef CONFIG_PCI
  40. /* Don't enable PCI2 on sbc834x - it doesn't exist physically. */
  41. #undef CONFIG_MPC83XX_PCI2 /* support for 2nd PCI controller */
  42. #define PCI_66M
  43. #ifdef PCI_66M
  44. #define CONFIG_83XX_CLKIN 66000000 /* in Hz */
  45. #else
  46. #define CONFIG_83XX_CLKIN 33000000 /* in Hz */
  47. #endif
  48. #ifndef CONFIG_SYS_CLK_FREQ
  49. #ifdef PCI_66M
  50. #define CONFIG_SYS_CLK_FREQ 66000000
  51. #define HRCWL_CSB_TO_CLKIN HRCWL_CSB_TO_CLKIN_4X1
  52. #else
  53. #define CONFIG_SYS_CLK_FREQ 33000000
  54. #define HRCWL_CSB_TO_CLKIN HRCWL_CSB_TO_CLKIN_8X1
  55. #endif
  56. #endif
  57. #undef CONFIG_BOARD_EARLY_INIT_F /* call board_pre_init */
  58. #define CONFIG_SYS_IMMR 0xE0000000
  59. #undef CONFIG_SYS_DRAM_TEST /* memory test, takes time */
  60. #define CONFIG_SYS_MEMTEST_START 0x00000000 /* memtest region */
  61. #define CONFIG_SYS_MEMTEST_END 0x00100000
  62. /*
  63. * DDR Setup
  64. */
  65. #undef CONFIG_DDR_ECC /* only for ECC DDR module */
  66. #undef CONFIG_DDR_ECC_CMD /* use DDR ECC user commands */
  67. #define CONFIG_SPD_EEPROM /* use SPD EEPROM for DDR setup*/
  68. #define CONFIG_SYS_83XX_DDR_USES_CS0 /* WRS; Fsl board uses CS2/CS3 */
  69. /*
  70. * 32-bit data path mode.
  71. *
  72. * Please note that using this mode for devices with the real density of 64-bit
  73. * effectively reduces the amount of available memory due to the effect of
  74. * wrapping around while translating address to row/columns, for example in the
  75. * 256MB module the upper 128MB get aliased with contents of the lower
  76. * 128MB); normally this define should be used for devices with real 32-bit
  77. * data path.
  78. */
  79. #undef CONFIG_DDR_32BIT
  80. #define CONFIG_SYS_DDR_BASE 0x00000000 /* DDR is system memory*/
  81. #define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_BASE
  82. #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_DDR_BASE
  83. #define CONFIG_SYS_DDR_SDRAM_CLK_CNTL (DDR_SDRAM_CLK_CNTL_SS_EN | \
  84. DDR_SDRAM_CLK_CNTL_CLK_ADJUST_075)
  85. #define CONFIG_DDR_2T_TIMING
  86. #if defined(CONFIG_SPD_EEPROM)
  87. /*
  88. * Determine DDR configuration from I2C interface.
  89. */
  90. #define SPD_EEPROM_ADDRESS 0x52 /* DDR DIMM */
  91. #else
  92. /*
  93. * Manually set up DDR parameters
  94. * NB: manual DDR setup untested on sbc834x
  95. */
  96. #define CONFIG_SYS_DDR_SIZE 256 /* MB */
  97. #define CONFIG_SYS_DDR_CONFIG (CSCONFIG_EN | CSCONFIG_ROW_BIT_13 | CSCONFIG_COL_BIT_10)
  98. #define CONFIG_SYS_DDR_TIMING_1 0x36332321
  99. #define CONFIG_SYS_DDR_TIMING_2 0x00000800 /* P9-45,may need tuning */
  100. #define CONFIG_SYS_DDR_CONTROL 0xc2000000 /* unbuffered,no DYN_PWR */
  101. #define CONFIG_SYS_DDR_INTERVAL 0x04060100 /* autocharge,no open page */
  102. #if defined(CONFIG_DDR_32BIT)
  103. /* set burst length to 8 for 32-bit data path */
  104. #define CONFIG_SYS_DDR_MODE 0x00000023 /* DLL,normal,seq,4/2.5, 8 burst len */
  105. #else
  106. /* the default burst length is 4 - for 64-bit data path */
  107. #define CONFIG_SYS_DDR_MODE 0x00000022 /* DLL,normal,seq,4/2.5, 4 burst len */
  108. #endif
  109. #endif
  110. /*
  111. * SDRAM on the Local Bus
  112. */
  113. #define CONFIG_SYS_LBC_SDRAM_BASE 0x10000000 /* Localbus SDRAM */
  114. #define CONFIG_SYS_LBC_SDRAM_SIZE 128 /* LBC SDRAM is 128MB */
  115. /*
  116. * FLASH on the Local Bus
  117. */
  118. #define CONFIG_SYS_FLASH_CFI /* use the Common Flash Interface */
  119. #define CONFIG_FLASH_CFI_DRIVER /* use the CFI driver */
  120. #define CONFIG_SYS_FLASH_BASE 0xFF800000 /* start of FLASH */
  121. #define CONFIG_SYS_FLASH_SIZE 8 /* flash size in MB */
  122. /* #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE */
  123. #define CONFIG_SYS_BR0_PRELIM (CONFIG_SYS_FLASH_BASE | /* flash Base address */ \
  124. (2 << BR_PS_SHIFT) | /* 32 bit port size */ \
  125. BR_V) /* valid */
  126. #define CONFIG_SYS_OR0_PRELIM 0xFF806FF7 /* 8 MB flash size */
  127. #define CONFIG_SYS_LBLAWBAR0_PRELIM CONFIG_SYS_FLASH_BASE /* window base at flash base */
  128. #define CONFIG_SYS_LBLAWAR0_PRELIM 0x80000016 /* 8 MB window size */
  129. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */
  130. #define CONFIG_SYS_MAX_FLASH_SECT 64 /* sectors per device */
  131. #undef CONFIG_SYS_FLASH_CHECKSUM
  132. #define CONFIG_SYS_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */
  133. #define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
  134. #define CONFIG_SYS_MID_FLASH_JUMP 0x7F000000
  135. #define CONFIG_SYS_MONITOR_BASE TEXT_BASE /* start of monitor */
  136. #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
  137. #define CONFIG_SYS_RAMBOOT
  138. #else
  139. #undef CONFIG_SYS_RAMBOOT
  140. #endif
  141. #define CONFIG_SYS_INIT_RAM_LOCK 1
  142. #define CONFIG_SYS_INIT_RAM_ADDR 0xFD000000 /* Initial RAM address */
  143. #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in RAM*/
  144. #define CONFIG_SYS_GBL_DATA_SIZE 0x100 /* num bytes initial data */
  145. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
  146. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  147. #define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon */
  148. #define CONFIG_SYS_MALLOC_LEN (128 * 1024) /* Reserved for malloc */
  149. /*
  150. * Local Bus LCRR and LBCR regs
  151. * LCRR: DLL bypass, Clock divider is 4
  152. * External Local Bus rate is
  153. * CLKIN * HRCWL_CSB_TO_CLKIN / HRCWL_LCL_BUS_TO_SCB_CLK / LCRR_CLKDIV
  154. */
  155. #define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_CLKDIV_4)
  156. #define CONFIG_SYS_LBC_LBCR 0x00000000
  157. #undef CONFIG_SYS_LB_SDRAM /* if board has SDRAM on local bus */
  158. #ifdef CONFIG_SYS_LB_SDRAM
  159. /* Local bus BR2, OR2 definition for SDRAM if soldered on the board*/
  160. /*
  161. * Base Register 2 and Option Register 2 configure SDRAM.
  162. * The SDRAM base address, CONFIG_SYS_LBC_SDRAM_BASE, is 0xf0000000.
  163. *
  164. * For BR2, need:
  165. * Base address of 0xf0000000 = BR[0:16] = 1111 0000 0000 0000 0
  166. * port-size = 32-bits = BR2[19:20] = 11
  167. * no parity checking = BR2[21:22] = 00
  168. * SDRAM for MSEL = BR2[24:26] = 011
  169. * Valid = BR[31] = 1
  170. *
  171. * 0 4 8 12 16 20 24 28
  172. * 1111 0000 0000 0000 0001 1000 0110 0001 = F0001861
  173. *
  174. * FIXME: CONFIG_SYS_LBC_SDRAM_BASE should be masked and OR'ed into
  175. * FIXME: the top 17 bits of BR2.
  176. */
  177. #define CONFIG_SYS_BR2_PRELIM 0xF0001861 /* Port-size=32bit, MSEL=SDRAM */
  178. #define CONFIG_SYS_LBLAWBAR2_PRELIM 0xF0000000
  179. #define CONFIG_SYS_LBLAWAR2_PRELIM 0x80000019 /* 64M */
  180. /*
  181. * The SDRAM size in MB, CONFIG_SYS_LBC_SDRAM_SIZE, is 64.
  182. *
  183. * For OR2, need:
  184. * 64MB mask for AM, OR2[0:7] = 1111 1100
  185. * XAM, OR2[17:18] = 11
  186. * 9 columns OR2[19-21] = 010
  187. * 13 rows OR2[23-25] = 100
  188. * EAD set for extra time OR[31] = 1
  189. *
  190. * 0 4 8 12 16 20 24 28
  191. * 1111 1100 0000 0000 0110 1001 0000 0001 = FC006901
  192. */
  193. #define CONFIG_SYS_OR2_PRELIM 0xFC006901
  194. #define CONFIG_SYS_LBC_LSRT 0x32000000 /* LB sdram refresh timer, about 6us */
  195. #define CONFIG_SYS_LBC_MRTPR 0x20000000 /* LB refresh timer prescal, 266MHz/32 */
  196. #define CONFIG_SYS_LBC_LSDMR_COMMON ( LSDMR_RFEN \
  197. | LSDMR_BSMA1516 \
  198. | LSDMR_RFCR8 \
  199. | LSDMR_PRETOACT6 \
  200. | LSDMR_ACTTORW3 \
  201. | LSDMR_BL8 \
  202. | LSDMR_WRC3 \
  203. | LSDMR_CL3 \
  204. )
  205. /*
  206. * SDRAM Controller configuration sequence.
  207. */
  208. #define CONFIG_SYS_LBC_LSDMR_1 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_PCHALL)
  209. #define CONFIG_SYS_LBC_LSDMR_2 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH)
  210. #define CONFIG_SYS_LBC_LSDMR_3 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_ARFRSH)
  211. #define CONFIG_SYS_LBC_LSDMR_4 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_MRW)
  212. #define CONFIG_SYS_LBC_LSDMR_5 (CONFIG_SYS_LBC_LSDMR_COMMON | LSDMR_OP_NORMAL)
  213. #endif
  214. /*
  215. * Serial Port
  216. */
  217. #define CONFIG_CONS_INDEX 1
  218. #undef CONFIG_SERIAL_SOFTWARE_FIFO
  219. #define CONFIG_SYS_NS16550
  220. #define CONFIG_SYS_NS16550_SERIAL
  221. #define CONFIG_SYS_NS16550_REG_SIZE 1
  222. #define CONFIG_SYS_NS16550_CLK get_bus_freq(0)
  223. #define CONFIG_SYS_BAUDRATE_TABLE \
  224. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200}
  225. #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_IMMR+0x4500)
  226. #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_IMMR+0x4600)
  227. #define CONFIG_CMDLINE_EDITING 1 /* add command line history */
  228. /* Use the HUSH parser */
  229. #define CONFIG_SYS_HUSH_PARSER
  230. #ifdef CONFIG_SYS_HUSH_PARSER
  231. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  232. #endif
  233. /* pass open firmware flat tree */
  234. #define CONFIG_OF_LIBFDT 1
  235. #define CONFIG_OF_BOARD_SETUP 1
  236. #define CONFIG_OF_STDOUT_VIA_ALIAS 1
  237. /* I2C */
  238. #define CONFIG_HARD_I2C /* I2C with hardware support*/
  239. #undef CONFIG_SOFT_I2C /* I2C bit-banged */
  240. #define CONFIG_FSL_I2C
  241. #define CONFIG_I2C_CMD_TREE
  242. #define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */
  243. #define CONFIG_SYS_I2C_SLAVE 0x7F
  244. #define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */
  245. #define CONFIG_SYS_I2C1_OFFSET 0x3000
  246. #define CONFIG_SYS_I2C2_OFFSET 0x3100
  247. #define CONFIG_SYS_I2C_OFFSET CONFIG_SYS_I2C2_OFFSET
  248. /* could also use CONFIG_I2C_MULTI_BUS and CONFIG_SPD_BUS_NUM... */
  249. /* TSEC */
  250. #define CONFIG_SYS_TSEC1_OFFSET 0x24000
  251. #define CONFIG_SYS_TSEC1 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC1_OFFSET)
  252. #define CONFIG_SYS_TSEC2_OFFSET 0x25000
  253. #define CONFIG_SYS_TSEC2 (CONFIG_SYS_IMMR+CONFIG_SYS_TSEC2_OFFSET)
  254. /*
  255. * General PCI
  256. * Addresses are mapped 1-1.
  257. */
  258. #define CONFIG_SYS_PCI1_MEM_BASE 0x80000000
  259. #define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE
  260. #define CONFIG_SYS_PCI1_MEM_SIZE 0x10000000 /* 256M */
  261. #define CONFIG_SYS_PCI1_MMIO_BASE 0x90000000
  262. #define CONFIG_SYS_PCI1_MMIO_PHYS CONFIG_SYS_PCI1_MMIO_BASE
  263. #define CONFIG_SYS_PCI1_MMIO_SIZE 0x10000000 /* 256M */
  264. #define CONFIG_SYS_PCI1_IO_BASE 0x00000000
  265. #define CONFIG_SYS_PCI1_IO_PHYS 0xE2000000
  266. #define CONFIG_SYS_PCI1_IO_SIZE 0x00100000 /* 1M */
  267. #define CONFIG_SYS_PCI2_MEM_BASE 0xA0000000
  268. #define CONFIG_SYS_PCI2_MEM_PHYS CONFIG_SYS_PCI2_MEM_BASE
  269. #define CONFIG_SYS_PCI2_MEM_SIZE 0x10000000 /* 256M */
  270. #define CONFIG_SYS_PCI2_MMIO_BASE 0xB0000000
  271. #define CONFIG_SYS_PCI2_MMIO_PHYS CONFIG_SYS_PCI2_MMIO_BASE
  272. #define CONFIG_SYS_PCI2_MMIO_SIZE 0x10000000 /* 256M */
  273. #define CONFIG_SYS_PCI2_IO_BASE 0x00000000
  274. #define CONFIG_SYS_PCI2_IO_PHYS 0xE2100000
  275. #define CONFIG_SYS_PCI2_IO_SIZE 0x00100000 /* 1M */
  276. #if defined(CONFIG_PCI)
  277. #define PCI_64BIT
  278. #define PCI_ONE_PCI1
  279. #if defined(PCI_64BIT)
  280. #undef PCI_ALL_PCI1
  281. #undef PCI_TWO_PCI1
  282. #undef PCI_ONE_PCI1
  283. #endif
  284. #define CONFIG_NET_MULTI
  285. #define CONFIG_PCI_PNP /* do pci plug-and-play */
  286. #undef CONFIG_EEPRO100
  287. #undef CONFIG_TULIP
  288. #if !defined(CONFIG_PCI_PNP)
  289. #define PCI_ENET0_IOADDR 0xFIXME
  290. #define PCI_ENET0_MEMADDR 0xFIXME
  291. #define PCI_IDSEL_NUMBER 0xFIXME
  292. #endif
  293. #undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */
  294. #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x1057 /* Motorola */
  295. #endif /* CONFIG_PCI */
  296. /*
  297. * TSEC configuration
  298. */
  299. #define CONFIG_TSEC_ENET /* TSEC ethernet support */
  300. #if defined(CONFIG_TSEC_ENET)
  301. #ifndef CONFIG_NET_MULTI
  302. #define CONFIG_NET_MULTI 1
  303. #endif
  304. #define CONFIG_TSEC1 1
  305. #define CONFIG_TSEC1_NAME "TSEC0"
  306. #define CONFIG_TSEC2 1
  307. #define CONFIG_TSEC2_NAME "TSEC1"
  308. #define CONFIG_PHY_BCM5421S 1
  309. #define TSEC1_PHY_ADDR 0x19
  310. #define TSEC2_PHY_ADDR 0x1a
  311. #define TSEC1_PHYIDX 0
  312. #define TSEC2_PHYIDX 0
  313. #define TSEC1_FLAGS TSEC_GIGABIT
  314. #define TSEC2_FLAGS TSEC_GIGABIT
  315. /* Options are: TSEC[0-1] */
  316. #define CONFIG_ETHPRIME "TSEC0"
  317. #endif /* CONFIG_TSEC_ENET */
  318. /*
  319. * Environment
  320. */
  321. #ifndef CONFIG_SYS_RAMBOOT
  322. #define CONFIG_ENV_IS_IN_FLASH 1
  323. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + 0x40000)
  324. #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */
  325. #define CONFIG_ENV_SIZE 0x2000
  326. /* Address and size of Redundant Environment Sector */
  327. #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
  328. #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
  329. #else
  330. #define CONFIG_SYS_NO_FLASH 1 /* Flash is not usable now */
  331. #define CONFIG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */
  332. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
  333. #define CONFIG_ENV_SIZE 0x2000
  334. #endif
  335. #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
  336. #define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
  337. /*
  338. * BOOTP options
  339. */
  340. #define CONFIG_BOOTP_BOOTFILESIZE
  341. #define CONFIG_BOOTP_BOOTPATH
  342. #define CONFIG_BOOTP_GATEWAY
  343. #define CONFIG_BOOTP_HOSTNAME
  344. /*
  345. * Command line configuration.
  346. */
  347. #include <config_cmd_default.h>
  348. #define CONFIG_CMD_I2C
  349. #define CONFIG_CMD_MII
  350. #define CONFIG_CMD_PING
  351. #if defined(CONFIG_PCI)
  352. #define CONFIG_CMD_PCI
  353. #endif
  354. #if defined(CONFIG_SYS_RAMBOOT)
  355. #undef CONFIG_CMD_SAVEENV
  356. #undef CONFIG_CMD_LOADS
  357. #endif
  358. #undef CONFIG_WATCHDOG /* watchdog disabled */
  359. /*
  360. * Miscellaneous configurable options
  361. */
  362. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  363. #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
  364. #define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
  365. #if defined(CONFIG_CMD_KGDB)
  366. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  367. #else
  368. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  369. #endif
  370. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
  371. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  372. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
  373. #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */
  374. /*
  375. * For booting Linux, the board info and command line data
  376. * have to be in the first 8 MB of memory, since this is
  377. * the maximum mapped by the Linux kernel during initialization.
  378. */
  379. #define CONFIG_SYS_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux*/
  380. #define CONFIG_SYS_RCWH_PCIHOST 0x80000000 /* PCIHOST */
  381. #if 1 /*528/264*/
  382. #define CONFIG_SYS_HRCW_LOW (\
  383. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  384. HRCWL_DDR_TO_SCB_CLK_1X1 |\
  385. HRCWL_CSB_TO_CLKIN |\
  386. HRCWL_VCO_1X2 |\
  387. HRCWL_CORE_TO_CSB_2X1)
  388. #elif 0 /*396/132*/
  389. #define CONFIG_SYS_HRCW_LOW (\
  390. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  391. HRCWL_DDR_TO_SCB_CLK_1X1 |\
  392. HRCWL_CSB_TO_CLKIN |\
  393. HRCWL_VCO_1X4 |\
  394. HRCWL_CORE_TO_CSB_3X1)
  395. #elif 0 /*264/132*/
  396. #define CONFIG_SYS_HRCW_LOW (\
  397. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  398. HRCWL_DDR_TO_SCB_CLK_1X1 |\
  399. HRCWL_CSB_TO_CLKIN |\
  400. HRCWL_VCO_1X4 |\
  401. HRCWL_CORE_TO_CSB_2X1)
  402. #elif 0 /*132/132*/
  403. #define CONFIG_SYS_HRCW_LOW (\
  404. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  405. HRCWL_DDR_TO_SCB_CLK_1X1 |\
  406. HRCWL_CSB_TO_CLKIN |\
  407. HRCWL_VCO_1X4 |\
  408. HRCWL_CORE_TO_CSB_1X1)
  409. #elif 0 /*264/264 */
  410. #define CONFIG_SYS_HRCW_LOW (\
  411. HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
  412. HRCWL_DDR_TO_SCB_CLK_1X1 |\
  413. HRCWL_CSB_TO_CLKIN |\
  414. HRCWL_VCO_1X4 |\
  415. HRCWL_CORE_TO_CSB_1X1)
  416. #endif
  417. #if defined(PCI_64BIT)
  418. #define CONFIG_SYS_HRCW_HIGH (\
  419. HRCWH_PCI_HOST |\
  420. HRCWH_64_BIT_PCI |\
  421. HRCWH_PCI1_ARBITER_ENABLE |\
  422. HRCWH_PCI2_ARBITER_DISABLE |\
  423. HRCWH_CORE_ENABLE |\
  424. HRCWH_FROM_0X00000100 |\
  425. HRCWH_BOOTSEQ_DISABLE |\
  426. HRCWH_SW_WATCHDOG_DISABLE |\
  427. HRCWH_ROM_LOC_LOCAL_16BIT |\
  428. HRCWH_TSEC1M_IN_GMII |\
  429. HRCWH_TSEC2M_IN_GMII )
  430. #else
  431. #define CONFIG_SYS_HRCW_HIGH (\
  432. HRCWH_PCI_HOST |\
  433. HRCWH_32_BIT_PCI |\
  434. HRCWH_PCI1_ARBITER_ENABLE |\
  435. HRCWH_PCI2_ARBITER_ENABLE |\
  436. HRCWH_CORE_ENABLE |\
  437. HRCWH_FROM_0X00000100 |\
  438. HRCWH_BOOTSEQ_DISABLE |\
  439. HRCWH_SW_WATCHDOG_DISABLE |\
  440. HRCWH_ROM_LOC_LOCAL_16BIT |\
  441. HRCWH_TSEC1M_IN_GMII |\
  442. HRCWH_TSEC2M_IN_GMII )
  443. #endif
  444. /* System IO Config */
  445. #define CONFIG_SYS_SICRH SICRH_TSOBI1
  446. #define CONFIG_SYS_SICRL SICRL_LDP_A
  447. #define CONFIG_SYS_HID0_INIT 0x000000000
  448. #define CONFIG_SYS_HID0_FINAL HID0_ENABLE_MACHINE_CHECK
  449. /* #define CONFIG_SYS_HID0_FINAL (\
  450. HID0_ENABLE_INSTRUCTION_CACHE |\
  451. HID0_ENABLE_M_BIT |\
  452. HID0_ENABLE_ADDRESS_BROADCAST ) */
  453. #define CONFIG_SYS_HID2 HID2_HBE
  454. #define CONFIG_HIGH_BATS 1 /* High BATs supported */
  455. /* DDR @ 0x00000000 */
  456. #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
  457. #define CONFIG_SYS_IBAT0U (CONFIG_SYS_SDRAM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
  458. /* PCI @ 0x80000000 */
  459. #ifdef CONFIG_PCI
  460. #define CONFIG_SYS_IBAT1L (CONFIG_SYS_PCI1_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
  461. #define CONFIG_SYS_IBAT1U (CONFIG_SYS_PCI1_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
  462. #define CONFIG_SYS_IBAT2L (CONFIG_SYS_PCI1_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  463. #define CONFIG_SYS_IBAT2U (CONFIG_SYS_PCI1_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
  464. #else
  465. #define CONFIG_SYS_IBAT1L (0)
  466. #define CONFIG_SYS_IBAT1U (0)
  467. #define CONFIG_SYS_IBAT2L (0)
  468. #define CONFIG_SYS_IBAT2U (0)
  469. #endif
  470. #ifdef CONFIG_MPC83XX_PCI2
  471. #define CONFIG_SYS_IBAT3L (CONFIG_SYS_PCI2_MEM_BASE | BATL_PP_10 | BATL_MEMCOHERENCE)
  472. #define CONFIG_SYS_IBAT3U (CONFIG_SYS_PCI2_MEM_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
  473. #define CONFIG_SYS_IBAT4L (CONFIG_SYS_PCI2_MMIO_BASE | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  474. #define CONFIG_SYS_IBAT4U (CONFIG_SYS_PCI2_MMIO_BASE | BATU_BL_256M | BATU_VS | BATU_VP)
  475. #else
  476. #define CONFIG_SYS_IBAT3L (0)
  477. #define CONFIG_SYS_IBAT3U (0)
  478. #define CONFIG_SYS_IBAT4L (0)
  479. #define CONFIG_SYS_IBAT4U (0)
  480. #endif
  481. /* IMMRBAR @ 0xE0000000, PCI IO @ 0xE2000000 */
  482. #define CONFIG_SYS_IBAT5L (CONFIG_SYS_IMMR | BATL_PP_10 | BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
  483. #define CONFIG_SYS_IBAT5U (CONFIG_SYS_IMMR | BATU_BL_256M | BATU_VS | BATU_VP)
  484. /* SDRAM @ 0xF0000000, stack in DCACHE 0xFDF00000 & FLASH @ 0xFE000000 */
  485. #define CONFIG_SYS_IBAT6L (0xF0000000 | BATL_PP_10 | BATL_MEMCOHERENCE)
  486. #define CONFIG_SYS_IBAT6U (0xF0000000 | BATU_BL_256M | BATU_VS | BATU_VP)
  487. #define CONFIG_SYS_IBAT7L (0)
  488. #define CONFIG_SYS_IBAT7U (0)
  489. #define CONFIG_SYS_DBAT0L CONFIG_SYS_IBAT0L
  490. #define CONFIG_SYS_DBAT0U CONFIG_SYS_IBAT0U
  491. #define CONFIG_SYS_DBAT1L CONFIG_SYS_IBAT1L
  492. #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U
  493. #define CONFIG_SYS_DBAT2L CONFIG_SYS_IBAT2L
  494. #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U
  495. #define CONFIG_SYS_DBAT3L CONFIG_SYS_IBAT3L
  496. #define CONFIG_SYS_DBAT3U CONFIG_SYS_IBAT3U
  497. #define CONFIG_SYS_DBAT4L CONFIG_SYS_IBAT4L
  498. #define CONFIG_SYS_DBAT4U CONFIG_SYS_IBAT4U
  499. #define CONFIG_SYS_DBAT5L CONFIG_SYS_IBAT5L
  500. #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
  501. #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L
  502. #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
  503. #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
  504. #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
  505. /*
  506. * Internal Definitions
  507. *
  508. * Boot Flags
  509. */
  510. #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
  511. #define BOOTFLAG_WARM 0x02 /* Software reboot */
  512. #if defined(CONFIG_CMD_KGDB)
  513. #define CONFIG_KGDB_BAUDRATE 230400 /* speed of kgdb serial port */
  514. #define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
  515. #endif
  516. /*
  517. * Environment Configuration
  518. */
  519. #define CONFIG_ENV_OVERWRITE
  520. #if defined(CONFIG_TSEC_ENET)
  521. #define CONFIG_HAS_ETH0
  522. #define CONFIG_ETHADDR 00:a0:1e:a0:13:8d
  523. #define CONFIG_HAS_ETH1
  524. #define CONFIG_ETH1ADDR 00:a0:1e:a0:13:8e
  525. #endif
  526. #define CONFIG_IPADDR 192.168.1.234
  527. #define CONFIG_HOSTNAME SBC8349
  528. #define CONFIG_ROOTPATH /tftpboot/rootfs
  529. #define CONFIG_BOOTFILE uImage
  530. #define CONFIG_SERVERIP 192.168.1.1
  531. #define CONFIG_GATEWAYIP 192.168.1.1
  532. #define CONFIG_NETMASK 255.255.255.0
  533. #define CONFIG_LOADADDR 500000 /* default location for tftp and bootm */
  534. #define CONFIG_BOOTDELAY 6 /* -1 disables auto-boot */
  535. #undef CONFIG_BOOTARGS /* the boot command will set bootargs */
  536. #define CONFIG_BAUDRATE 115200
  537. #define CONFIG_EXTRA_ENV_SETTINGS \
  538. "netdev=eth0\0" \
  539. "hostname=sbc8349\0" \
  540. "nfsargs=setenv bootargs root=/dev/nfs rw " \
  541. "nfsroot=${serverip}:${rootpath}\0" \
  542. "ramargs=setenv bootargs root=/dev/ram rw\0" \
  543. "addip=setenv bootargs ${bootargs} " \
  544. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \
  545. ":${hostname}:${netdev}:off panic=1\0" \
  546. "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\
  547. "flash_nfs=run nfsargs addip addtty;" \
  548. "bootm ${kernel_addr}\0" \
  549. "flash_self=run ramargs addip addtty;" \
  550. "bootm ${kernel_addr} ${ramdisk_addr}\0" \
  551. "net_nfs=tftp 200000 ${bootfile};run nfsargs addip addtty;" \
  552. "bootm\0" \
  553. "load=tftp 100000 /tftpboot/sbc8349/u-boot.bin\0" \
  554. "update=protect off fff00000 fff3ffff; " \
  555. "era fff00000 fff3ffff; cp.b 100000 fff00000 ${filesize}\0" \
  556. "upd=run load update\0" \
  557. "fdtaddr=400000\0" \
  558. "fdtfile=sbc8349.dtb\0" \
  559. ""
  560. #define CONFIG_NFSBOOTCOMMAND \
  561. "setenv bootargs root=/dev/nfs rw " \
  562. "nfsroot=$serverip:$rootpath " \
  563. "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
  564. "console=$consoledev,$baudrate $othbootargs;" \
  565. "tftp $loadaddr $bootfile;" \
  566. "tftp $fdtaddr $fdtfile;" \
  567. "bootm $loadaddr - $fdtaddr"
  568. #define CONFIG_RAMBOOTCOMMAND \
  569. "setenv bootargs root=/dev/ram rw " \
  570. "console=$consoledev,$baudrate $othbootargs;" \
  571. "tftp $ramdiskaddr $ramdiskfile;" \
  572. "tftp $loadaddr $bootfile;" \
  573. "tftp $fdtaddr $fdtfile;" \
  574. "bootm $loadaddr $ramdiskaddr $fdtaddr"
  575. #define CONFIG_BOOTCOMMAND "run flash_self"
  576. #endif /* __CONFIG_H */