GEN860T.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. /*
  2. * (C) Copyright 2000
  3. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. * Keith Outwater, keith_outwater@mvis.com
  5. *
  6. * See file CREDITS for list of people who contributed to this
  7. * project.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  22. * MA 02111-1307 USA
  23. */
  24. /*
  25. * board/config_GEN860T.h - board specific configuration options
  26. */
  27. #ifndef __CONFIG_GEN860T_H
  28. #define __CONFIG_H
  29. /*
  30. * High Level Configuration Options
  31. */
  32. #define CONFIG_MPC860
  33. #define CONFIG_GEN860T
  34. #define CONFIG_SYS_TEXT_BASE 0x40000000
  35. /*
  36. * Identify the board
  37. */
  38. #if !defined(CONFIG_SC)
  39. #define CONFIG_IDENT_STRING " B2"
  40. #else
  41. #define CONFIG_IDENT_STRING " SC"
  42. #endif
  43. /*
  44. * Don't depend on the RTC clock to determine clock frequency -
  45. * the 860's internal rtc uses a 32.768 KHz clock which is
  46. * generated by the DS1337 - and the DS1337 clock can be turned off.
  47. */
  48. #if !defined(CONFIG_SC)
  49. #define CONFIG_8xx_GCLK_FREQ 66600000
  50. #else
  51. #define CONFIG_8xx_GCLK_FREQ 48000000
  52. #endif
  53. /*
  54. * The RS-232 console port is on SMC1
  55. */
  56. #define CONFIG_8xx_CONS_SMC1
  57. #define CONFIG_BAUDRATE 38400
  58. /*
  59. * Print console information
  60. */
  61. #undef CONFIG_SYS_CONSOLE_INFO_QUIET
  62. /*
  63. * Set the autoboot delay in seconds. A delay of -1 disables autoboot
  64. */
  65. #define CONFIG_BOOTDELAY 5
  66. /*
  67. * Pass the clock frequency to the Linux kernel in units of MHz
  68. */
  69. #define CONFIG_CLOCKS_IN_MHZ
  70. #define CONFIG_PREBOOT \
  71. "echo;echo"
  72. #undef CONFIG_BOOTARGS
  73. #define CONFIG_BOOTCOMMAND \
  74. "bootp;" \
  75. "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} " \
  76. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \
  77. "bootm"
  78. /*
  79. * Turn off echo for serial download by default. Allow baud rate to be changed
  80. * for downloads
  81. */
  82. #undef CONFIG_LOADS_ECHO
  83. #define CONFIG_SYS_LOADS_BAUD_CHANGE
  84. /*
  85. * Turn off the watchdog timer
  86. */
  87. #undef CONFIG_WATCHDOG
  88. /*
  89. * Do not reboot if a panic occurs
  90. */
  91. #define CONFIG_PANIC_HANG
  92. /*
  93. * Enable the status LED
  94. */
  95. #define CONFIG_STATUS_LED
  96. /*
  97. * Reset address. We pick an address such that when an instruction
  98. * is executed at that address, a machine check exception occurs
  99. */
  100. #define CONFIG_SYS_RESET_ADDRESS ((ulong) -1)
  101. /*
  102. * BOOTP options
  103. */
  104. #define CONFIG_BOOTP_SUBNETMASK
  105. #define CONFIG_BOOTP_GATEWAY
  106. #define CONFIG_BOOTP_HOSTNAME
  107. #define CONFIG_BOOTP_BOOTPATH
  108. #define CONFIG_BOOTP_BOOTFILESIZE
  109. /*
  110. * The GEN860T network interface uses the on-chip 10/100 FEC with
  111. * an Intel LXT971A PHY connected to the 860T's MII. The PHY's
  112. * MII address is hardwired on the board to zero.
  113. */
  114. #define CONFIG_FEC_ENET
  115. #define CONFIG_SYS_DISCOVER_PHY
  116. #define CONFIG_MII
  117. #define CONFIG_MII_INIT 1
  118. #define CONFIG_PHY_ADDR 0
  119. /*
  120. * Set default IP stuff just to get bootstrap entries into the
  121. * environment so that we can source the full default environment.
  122. */
  123. #define CONFIG_ETHADDR 9a:52:63:15:85:25
  124. #define CONFIG_SERVERIP 10.0.4.201
  125. #define CONFIG_IPADDR 10.0.4.111
  126. /*
  127. * This board has a 32 kibibyte EEPROM (Atmel AT24C256) connected to
  128. * the MPC860T I2C interface.
  129. */
  130. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
  131. #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6 /* 64 byte pages */
  132. #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 12 /* 10 mS w/ 20% margin */
  133. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* need 16 bit address */
  134. #define CONFIG_ENV_EEPROM_SIZE (32 * 1024)
  135. /*
  136. * Enable I2C and select the hardware/software driver
  137. */
  138. #define CONFIG_HARD_I2C 1 /* CPM based I2C */
  139. #undef CONFIG_SOFT_I2C /* Bit-banged I2C */
  140. #ifdef CONFIG_HARD_I2C
  141. #define CONFIG_SYS_I2C_SPEED 100000 /* clock speed in Hz */
  142. #define CONFIG_SYS_I2C_SLAVE 0xFE /* I2C slave address */
  143. #endif
  144. #ifdef CONFIG_SOFT_I2C
  145. #define PB_SCL 0x00000020 /* PB 26 */
  146. #define PB_SDA 0x00000010 /* PB 27 */
  147. #define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL)
  148. #define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA)
  149. #define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA)
  150. #define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0)
  151. #define I2C_SDA(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SDA; \
  152. else immr->im_cpm.cp_pbdat &= ~PB_SDA
  153. #define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \
  154. else immr->im_cpm.cp_pbdat &= ~PB_SCL
  155. #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */
  156. #endif
  157. /*
  158. * Allow environment overwrites by anyone
  159. */
  160. #define CONFIG_ENV_OVERWRITE
  161. #if !defined(CONFIG_SC)
  162. /*
  163. * The MPC860's internal RTC is horribly broken in rev D masks. Three
  164. * internal MPC860T circuit nodes were inadvertently left floating; this
  165. * causes KAPWR current in power down mode to be three orders of magnitude
  166. * higher than specified in the datasheet (from 10 uA to 10 mA). No
  167. * reasonable battery can keep that kind RTC running during powerdown for any
  168. * length of time, so we use an external RTC on the I2C bus instead.
  169. */
  170. #define CONFIG_RTC_DS1337
  171. #define CONFIG_SYS_I2C_RTC_ADDR 0x68
  172. #else
  173. /*
  174. * No external RTC on SC variant, so we're stuck with the internal one.
  175. */
  176. #define CONFIG_RTC_MPC8xx
  177. #endif
  178. /*
  179. * Power On Self Test support
  180. */
  181. #define CONFIG_POST ( CONFIG_SYS_POST_CACHE | \
  182. CONFIG_SYS_POST_MEMORY | \
  183. CONFIG_SYS_POST_CPU | \
  184. CONFIG_SYS_POST_UART | \
  185. CONFIG_SYS_POST_SPR )
  186. /*
  187. * Command line configuration.
  188. */
  189. #include <config_cmd_default.h>
  190. #define CONFIG_CMD_ASKENV
  191. #define CONFIG_CMD_DHCP
  192. #define CONFIG_CMD_I2C
  193. #define CONFIG_CMD_EEPROM
  194. #define CONFIG_CMD_REGINFO
  195. #define CONFIG_CMD_IMMAP
  196. #define CONFIG_CMD_ELF
  197. #define CONFIG_CMD_DATE
  198. #define CONFIG_CMD_FPGA
  199. #define CONFIG_CMD_MII
  200. #define CONFIG_CMD_BEDBUG
  201. #ifdef CONFIG_POST
  202. #define CONFIG_CMD_DIAG
  203. #endif
  204. /*
  205. * There is no IDE/PCMCIA hardware support on the board.
  206. */
  207. #undef CONFIG_IDE_PCMCIA
  208. #undef CONFIG_IDE_LED
  209. #undef CONFIG_IDE_RESET
  210. /*
  211. * Enable the call to misc_init_r() for miscellaneous platform
  212. * dependent initialization.
  213. */
  214. #define CONFIG_MISC_INIT_R
  215. /*
  216. * Enable call to last_stage_init() so we can twiddle some LEDS :)
  217. */
  218. #define CONFIG_LAST_STAGE_INIT
  219. /*
  220. * Virtex2 FPGA configuration support
  221. */
  222. #define CONFIG_FPGA_COUNT 1
  223. #define CONFIG_FPGA
  224. #define CONFIG_FPGA_XILINX
  225. #define CONFIG_FPGA_VIRTEX2
  226. #define CONFIG_SYS_FPGA_PROG_FEEDBACK
  227. /*
  228. * Verbose help from command monitor.
  229. */
  230. #define CONFIG_SYS_LONGHELP
  231. #if !defined(CONFIG_SC)
  232. #define CONFIG_SYS_PROMPT "B2> "
  233. #else
  234. #define CONFIG_SYS_PROMPT "SC> "
  235. #endif
  236. /*
  237. * Use the "hush" command parser
  238. */
  239. #define CONFIG_SYS_HUSH_PARSER
  240. /*
  241. * Set buffer size for console I/O
  242. */
  243. #if defined(CONFIG_CMD_KGDB)
  244. #define CONFIG_SYS_CBSIZE 1024
  245. #else
  246. #define CONFIG_SYS_CBSIZE 256
  247. #endif
  248. /*
  249. * Print buffer size
  250. */
  251. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  252. /*
  253. * Maximum number of arguments that a command can accept
  254. */
  255. #define CONFIG_SYS_MAXARGS 16
  256. /*
  257. * Boot argument buffer size
  258. */
  259. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  260. /*
  261. * Default memory test range
  262. */
  263. #define CONFIG_SYS_MEMTEST_START 0x0100000
  264. #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + (128 * 1024))
  265. /*
  266. * Select the more full-featured memory test
  267. */
  268. #define CONFIG_SYS_ALT_MEMTEST
  269. /*
  270. * Default load address
  271. */
  272. #define CONFIG_SYS_LOAD_ADDR 0x01000000
  273. /*
  274. * Set decrementer frequency (1 ms ticks)
  275. */
  276. #define CONFIG_SYS_HZ 1000
  277. /*
  278. * Device memory map (after SDRAM remap to 0x0):
  279. *
  280. * CS Device Base Addr Size
  281. * ----------------------------------------------------
  282. * CS0* Flash 0x40000000 64 M
  283. * CS1* SDRAM 0x00000000 16 M
  284. * CS2* Disk-On-Chip 0x50000000 32 K
  285. * CS3* FPGA 0x60000000 64 M
  286. * CS4* SelectMap 0x70000000 32 K
  287. * CS5* Mil-Std 1553 I/F 0x80000000 32 K
  288. * CS6* Unused
  289. * CS7* Unused
  290. * IMMR 860T Registers 0xfff00000
  291. */
  292. /*
  293. * Base addresses and block sizes
  294. */
  295. #define CONFIG_SYS_IMMR 0xFF000000
  296. #define SDRAM_BASE 0x00000000
  297. #define SDRAM_SIZE (64 * 1024 * 1024)
  298. #define FLASH_BASE 0x40000000
  299. #define FLASH_SIZE (16 * 1024 * 1024)
  300. #define DOC_BASE 0x50000000
  301. #define DOC_SIZE (32 * 1024)
  302. #define FPGA_BASE 0x60000000
  303. #define FPGA_SIZE (64 * 1024 * 1024)
  304. #define SELECTMAP_BASE 0x70000000
  305. #define SELECTMAP_SIZE (32 * 1024)
  306. #define M1553_BASE 0x80000000
  307. #define M1553_SIZE (64 * 1024)
  308. /*
  309. * Definitions for initial stack pointer and data area (in DPRAM)
  310. */
  311. #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR
  312. #define CONFIG_SYS_INIT_RAM_SIZE 0x2F00 /* Size of used area in DPRAM */
  313. #define CONFIG_SYS_INIT_DATA_SIZE 64 /* # bytes reserved for initial data*/
  314. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - CONFIG_SYS_INIT_DATA_SIZE)
  315. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  316. /*
  317. * Start addresses for the final memory configuration
  318. * (Set up by the startup code)
  319. * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
  320. */
  321. #define CONFIG_SYS_SDRAM_BASE SDRAM_BASE
  322. /*
  323. * FLASH organization
  324. */
  325. #define CONFIG_SYS_FLASH_BASE FLASH_BASE
  326. #define CONFIG_SYS_FLASH_SIZE FLASH_SIZE
  327. #define CONFIG_SYS_FLASH_SECT_SIZE (128 * 1024)
  328. #define CONFIG_SYS_MAX_FLASH_BANKS 1
  329. #define CONFIG_SYS_MAX_FLASH_SECT 128
  330. /*
  331. * The timeout values are for an entire chip and are in milliseconds.
  332. * Yes I know that the write timeout is huge. Accroding to the
  333. * datasheet a single byte takes 630 uS (round to 1 ms) max at worst
  334. * case VCC and temp after 100K programming cycles. It works out
  335. * to 280 minutes (might as well be forever).
  336. */
  337. #define CONFIG_SYS_FLASH_ERASE_TOUT (CONFIG_SYS_MAX_FLASH_SECT * 5000)
  338. #define CONFIG_SYS_FLASH_WRITE_TOUT (CONFIG_SYS_MAX_FLASH_SECT * 128 * 1024 * 1)
  339. /*
  340. * Allow direct writes to FLASH from tftp transfers (** dangerous **)
  341. */
  342. #define CONFIG_SYS_DIRECT_FLASH_TFTP
  343. /*
  344. * Reserve memory for U-Boot.
  345. */
  346. #define CONFIG_SYS_MAX_UBOOT_SECTS 4
  347. #define CONFIG_SYS_MONITOR_LEN (CONFIG_SYS_MAX_UBOOT_SECTS * CONFIG_SYS_FLASH_SECT_SIZE)
  348. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
  349. /*
  350. * Select environment placement. NOTE that u-boot.lds must
  351. * be edited if this is changed!
  352. */
  353. #undef CONFIG_ENV_IS_IN_FLASH
  354. #define CONFIG_ENV_IS_IN_EEPROM
  355. #if defined(CONFIG_ENV_IS_IN_EEPROM)
  356. #define CONFIG_ENV_SIZE (2 * 1024)
  357. #define CONFIG_ENV_OFFSET (CONFIG_ENV_EEPROM_SIZE - (8 * 1024))
  358. #else
  359. #define CONFIG_ENV_SIZE 0x1000
  360. #define CONFIG_ENV_SECT_SIZE CONFIG_SYS_FLASH_SECT_SIZE
  361. /*
  362. * This ultimately gets passed right into the linker script, so we have to
  363. * use a number :(
  364. */
  365. #define CONFIG_ENV_OFFSET 0x060000
  366. #endif
  367. /*
  368. * Reserve memory for malloc()
  369. */
  370. #define CONFIG_SYS_MALLOC_LEN (128 * 1024)
  371. /*
  372. * For booting Linux, the board info and command line data
  373. * have to be in the first 8 MB of memory, since this is
  374. * the maximum mapped by the Linux kernel during initialization.
  375. */
  376. #define CONFIG_SYS_BOOTMAPSZ (8 * 1024 * 1024)
  377. /*
  378. * Cache Configuration
  379. */
  380. #define CONFIG_SYS_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */
  381. #if defined(CONFIG_CMD_KGDB)
  382. #define CONFIG_SYS_CACHELINE_SHIFT 4 /* log base 2 of above value */
  383. #endif
  384. /*------------------------------------------------------------------------
  385. * SYPCR - System Protection Control UM 11-9
  386. * -----------------------------------------------------------------------
  387. * SYPCR can only be written once after reset!
  388. *
  389. * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
  390. */
  391. #if defined(CONFIG_WATCHDOG)
  392. #define CONFIG_SYS_SYPCR ( SYPCR_SWTC | \
  393. SYPCR_BMT | \
  394. SYPCR_BME | \
  395. SYPCR_SWF | \
  396. SYPCR_SWE | \
  397. SYPCR_SWRI | \
  398. SYPCR_SWP \
  399. )
  400. #else
  401. #define CONFIG_SYS_SYPCR ( SYPCR_SWTC | \
  402. SYPCR_BMT | \
  403. SYPCR_BME | \
  404. SYPCR_SWF | \
  405. SYPCR_SWP \
  406. )
  407. #endif
  408. /*-----------------------------------------------------------------------
  409. * SIUMCR - SIU Module Configuration UM 11-6
  410. *-----------------------------------------------------------------------
  411. * Set debug pin mux, enable SPKROUT and GPLB5*.
  412. */
  413. #define CONFIG_SYS_SIUMCR ( SIUMCR_DBGC11 | \
  414. SIUMCR_DBPC11 | \
  415. SIUMCR_MLRC11 | \
  416. SIUMCR_GB5E \
  417. )
  418. /*-----------------------------------------------------------------------
  419. * TBSCR - Time Base Status and Control UM 11-26
  420. *-----------------------------------------------------------------------
  421. * Clear Reference Interrupt Status, Timebase freeze enabled
  422. */
  423. #define CONFIG_SYS_TBSCR ( TBSCR_REFA | \
  424. TBSCR_REFB | \
  425. TBSCR_TBF \
  426. )
  427. /*-----------------------------------------------------------------------
  428. * RTCSC - Real-Time Clock Status and Control Register UM 11-27
  429. *-----------------------------------------------------------------------
  430. */
  431. #define CONFIG_SYS_RTCSC ( RTCSC_SEC | \
  432. RTCSC_ALR | \
  433. RTCSC_RTF | \
  434. RTCSC_RTE \
  435. )
  436. /*-----------------------------------------------------------------------
  437. * PISCR - Periodic Interrupt Status and Control UM 11-31
  438. *-----------------------------------------------------------------------
  439. * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
  440. */
  441. #define CONFIG_SYS_PISCR ( PISCR_PS | \
  442. PISCR_PITF \
  443. )
  444. /*-----------------------------------------------------------------------
  445. * PLPRCR - PLL, Low-Power, and Reset Control Register UM 15-30
  446. *-----------------------------------------------------------------------
  447. * Reset PLL lock status sticky bit, timer expired status bit and timer
  448. * interrupt status bit. Set MF for 1:2:1 mode.
  449. */
  450. #define CONFIG_SYS_PLPRCR ( ((0x1 << PLPRCR_MF_SHIFT) & PLPRCR_MF_MSK) | \
  451. PLPRCR_SPLSS | \
  452. PLPRCR_TEXPS | \
  453. PLPRCR_TMIST \
  454. )
  455. /*-----------------------------------------------------------------------
  456. * SCCR - System Clock and reset Control Register UM 15-27
  457. *-----------------------------------------------------------------------
  458. * Set clock output, timebase and RTC source and divider,
  459. * power management and some other internal clocks
  460. */
  461. #define SCCR_MASK SCCR_EBDF11
  462. #if !defined(CONFIG_SC)
  463. #define CONFIG_SYS_SCCR ( SCCR_TBS | /* timebase = GCLK/2 */ \
  464. SCCR_COM00 | /* full strength CLKOUT */ \
  465. SCCR_DFSYNC00 | /* SYNCLK / 1 (normal) */ \
  466. SCCR_DFBRG00 | /* BRGCLK / 1 (normal) */ \
  467. SCCR_DFNL000 | \
  468. SCCR_DFNH000 \
  469. )
  470. #else
  471. #define CONFIG_SYS_SCCR ( SCCR_TBS | /* timebase = GCLK/2 */ \
  472. SCCR_COM00 | /* full strength CLKOUT */ \
  473. SCCR_DFSYNC00 | /* SYNCLK / 1 (normal) */ \
  474. SCCR_DFBRG00 | /* BRGCLK / 1 (normal) */ \
  475. SCCR_DFNL000 | \
  476. SCCR_DFNH000 | \
  477. SCCR_RTDIV | \
  478. SCCR_RTSEL \
  479. )
  480. #endif
  481. /*-----------------------------------------------------------------------
  482. * DER - Debug Enable Register UM 37-46
  483. *-----------------------------------------------------------------------
  484. * Mask all events that can cause entry into debug mode
  485. */
  486. #define CONFIG_SYS_DER 0
  487. /*
  488. * Initialize Memory Controller:
  489. *
  490. * BR0 and OR0 (FLASH memory)
  491. */
  492. #define FLASH_BASE0_PRELIM FLASH_BASE
  493. /*
  494. * Flash address mask
  495. */
  496. #define CONFIG_SYS_PRELIM_OR_AM 0xfe000000
  497. /*
  498. * FLASH timing:
  499. * 33 Mhz bus with ACS = 11, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 1
  500. */
  501. #define CONFIG_SYS_OR_TIMING_FLASH ( OR_CSNT_SAM | \
  502. OR_ACS_DIV2 | \
  503. OR_BI | \
  504. OR_SCY_2_CLK | \
  505. OR_TRLX | \
  506. OR_EHTR \
  507. )
  508. #define CONFIG_SYS_OR0_PRELIM ( CONFIG_SYS_PRELIM_OR_AM | \
  509. CONFIG_SYS_OR_TIMING_FLASH \
  510. )
  511. #define CONFIG_SYS_BR0_PRELIM ( (FLASH_BASE0_PRELIM & BR_BA_MSK) | \
  512. BR_MS_GPCM | \
  513. BR_PS_8 | \
  514. BR_V \
  515. )
  516. /*
  517. * SDRAM configuration
  518. */
  519. #define CONFIG_SYS_OR1_AM 0xfc000000
  520. #define CONFIG_SYS_OR1 ( (CONFIG_SYS_OR1_AM & OR_AM_MSK) | \
  521. OR_CSNT_SAM \
  522. )
  523. #define CONFIG_SYS_BR1 ( (SDRAM_BASE & BR_BA_MSK) | \
  524. BR_MS_UPMA | \
  525. BR_PS_32 | \
  526. BR_V \
  527. )
  528. /*
  529. * Refresh rate 7.8 us (= 64 ms / 8K = 31.2 uS quad bursts) for one bank
  530. * of 256 MBit SDRAM
  531. */
  532. #define CONFIG_SYS_MPTPR_1BK_8K MPTPR_PTP_DIV16
  533. /*
  534. * Periodic timer for refresh @ 33 MHz system clock
  535. */
  536. #define CONFIG_SYS_MAMR_PTA 64
  537. /*
  538. * MAMR settings for SDRAM
  539. */
  540. #define CONFIG_SYS_MAMR_8COL ( (CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT) | \
  541. MAMR_PTAE | \
  542. MAMR_AMA_TYPE_1 | \
  543. MAMR_DSA_1_CYCL | \
  544. MAMR_G0CLA_A10 | \
  545. MAMR_RLFA_1X | \
  546. MAMR_WLFA_1X | \
  547. MAMR_TLFA_4X \
  548. )
  549. /*
  550. * CS2* configuration for Disk On Chip:
  551. * 33 MHz bus with TRLX=1, ACS=11, CSNT=1, EBDF=1, SCY=2, EHTR=1,
  552. * no burst.
  553. */
  554. #define CONFIG_SYS_OR2_PRELIM ( (0xffff0000 & OR_AM_MSK) | \
  555. OR_CSNT_SAM | \
  556. OR_ACS_DIV2 | \
  557. OR_BI | \
  558. OR_SCY_2_CLK | \
  559. OR_TRLX | \
  560. OR_EHTR \
  561. )
  562. #define CONFIG_SYS_BR2_PRELIM ( (DOC_BASE & BR_BA_MSK) | \
  563. BR_PS_8 | \
  564. BR_MS_GPCM | \
  565. BR_V \
  566. )
  567. /*
  568. * CS3* configuration for FPGA:
  569. * 33 MHz bus with SCY=15, no burst.
  570. * The FPGA uses TA and TEA to terminate bus cycles, but we
  571. * clear SETA and set the cycle length to a large number so that
  572. * the cycle will still complete even if there is a configuration
  573. * error that prevents TA from asserting on FPGA accesss.
  574. */
  575. #define CONFIG_SYS_OR3_PRELIM ( (0xfc000000 & OR_AM_MSK) | \
  576. OR_SCY_15_CLK | \
  577. OR_BI \
  578. )
  579. #define CONFIG_SYS_BR3_PRELIM ( (FPGA_BASE & BR_BA_MSK) | \
  580. BR_PS_32 | \
  581. BR_MS_GPCM | \
  582. BR_V \
  583. )
  584. /*
  585. * CS4* configuration for FPGA SelectMap configuration interface.
  586. * 33 MHz bus, UPMB, no burst. Do not assert GPLB5 on falling edge
  587. * of GCLK1_50
  588. */
  589. #define CONFIG_SYS_OR4_PRELIM ( (0xffff0000 & OR_AM_MSK) | \
  590. OR_G5LS | \
  591. OR_BI \
  592. )
  593. #define CONFIG_SYS_BR4_PRELIM ( (SELECTMAP_BASE & BR_BA_MSK) | \
  594. BR_PS_8 | \
  595. BR_MS_UPMB | \
  596. BR_V \
  597. )
  598. /*
  599. * CS5* configuration for Mil-Std 1553 databus interface.
  600. * 33 MHz bus, GPCM, no burst.
  601. * The 1553 interface uses TA and TEA to terminate bus cycles,
  602. * but we clear SETA and set the cycle length to a large number so that
  603. * the cycle will still complete even if there is a configuration
  604. * error that prevents TA from asserting on FPGA accesss.
  605. */
  606. #define CONFIG_SYS_OR5_PRELIM ( (0xffff0000 & OR_AM_MSK) | \
  607. OR_SCY_15_CLK | \
  608. OR_EHTR | \
  609. OR_TRLX | \
  610. OR_CSNT_SAM | \
  611. OR_BI \
  612. )
  613. #define CONFIG_SYS_BR5_PRELIM ( (M1553_BASE & BR_BA_MSK) | \
  614. BR_PS_16 | \
  615. BR_MS_GPCM | \
  616. BR_V \
  617. )
  618. /*
  619. * FEC interrupt assignment
  620. */
  621. #define FEC_INTERRUPT SIU_LEVEL1
  622. /*
  623. * Sanity checks
  624. */
  625. #if defined(CONFIG_SCC1_ENET) && defined(CONFIG_FEC_ENET)
  626. #error Both CONFIG_SCC1_ENET and CONFIG_FEC_ENET configured
  627. #endif
  628. #endif /* __CONFIG_GEN860T_H */