GEN860T.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766
  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. /*
  35. * Identify the board
  36. */
  37. #if !defined(CONFIG_SC)
  38. #define CONFIG_IDENT_STRING " B2"
  39. #else
  40. #define CONFIG_IDENT_STRING " SC"
  41. #endif
  42. /*
  43. * Don't depend on the RTC clock to determine clock frequency -
  44. * the 860's internal rtc uses a 32.768 KHz clock which is
  45. * generated by the DS1337 - and the DS1337 clock can be turned off.
  46. */
  47. #if !defined(CONFIG_SC)
  48. #define CONFIG_8xx_GCLK_FREQ 66600000
  49. #else
  50. #define CONFIG_8xx_GCLK_FREQ 48000000
  51. #endif
  52. /*
  53. * The RS-232 console port is on SMC1
  54. */
  55. #define CONFIG_8xx_CONS_SMC1
  56. #define CONFIG_BAUDRATE 38400
  57. /*
  58. * Set allowable console baud rates
  59. */
  60. #define CFG_BAUDRATE_TABLE { 9600, \
  61. 19200, \
  62. 38400, \
  63. 57600, \
  64. 115200, \
  65. }
  66. /*
  67. * Print console information
  68. */
  69. #undef CFG_CONSOLE_INFO_QUIET
  70. /*
  71. * Set the autoboot delay in seconds. A delay of -1 disables autoboot
  72. */
  73. #define CONFIG_BOOTDELAY 5
  74. /*
  75. * Pass the clock frequency to the Linux kernel in units of MHz
  76. */
  77. #define CONFIG_CLOCKS_IN_MHZ
  78. #define CONFIG_PREBOOT \
  79. "echo;echo"
  80. #undef CONFIG_BOOTARGS
  81. #define CONFIG_BOOTCOMMAND \
  82. "bootp;" \
  83. "setenv bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath) " \
  84. "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off; " \
  85. "bootm"
  86. /*
  87. * Turn off echo for serial download by default. Allow baud rate to be changed
  88. * for downloads
  89. */
  90. #undef CONFIG_LOADS_ECHO
  91. #define CFG_LOADS_BAUD_CHANGE
  92. /*
  93. * Set default load address for tftp network downloads
  94. */
  95. #define CFG_TFTP_LOADADDR 0x01000000
  96. /*
  97. * Turn off the watchdog timer
  98. */
  99. #undef CONFIG_WATCHDOG
  100. /*
  101. * Do not reboot if a panic occurs
  102. */
  103. #define CONFIG_PANIC_HANG
  104. /*
  105. * Enable the status LED
  106. */
  107. #define CONFIG_STATUS_LED
  108. /*
  109. * Reset address. We pick an address such that when an instruction
  110. * is executed at that address, a machine check exception occurs
  111. */
  112. #define CFG_RESET_ADDRESS ((ulong) -1)
  113. /*
  114. * BOOTP options
  115. */
  116. #define CONFIG_BOOTP_MASK ( CONFIG_BOOTP_DEFAULT | \
  117. CONFIG_BOOTP_BOOTFILESIZE \
  118. )
  119. /*
  120. * The GEN860T network interface uses the on-chip 10/100 FEC with
  121. * an Intel LXT971A PHY connected to the 860T's MII. The PHY's
  122. * MII address is hardwired on the board to zero.
  123. */
  124. #define CONFIG_FEC_ENET
  125. #define CFG_DISCOVER_PHY
  126. #define CONFIG_MII
  127. #define CONFIG_PHY_ADDR 0
  128. /*
  129. * Set default IP stuff just to get bootstrap entries into the
  130. * environment so that we can autoscript the full default environment.
  131. */
  132. #define CONFIG_ETHADDR 9a:52:63:15:85:25
  133. #define CONFIG_SERVERIP 10.0.4.201
  134. #define CONFIG_IPADDR 10.0.4.111
  135. /*
  136. * This board has a 32 kibibyte EEPROM (Atmel AT24C256) connected to
  137. * the MPC860T I2C interface.
  138. */
  139. #define CFG_I2C_EEPROM_ADDR 0x50
  140. #define CFG_EEPROM_PAGE_WRITE_BITS 6 /* 64 byte pages */
  141. #define CFG_EEPROM_PAGE_WRITE_DELAY_MS 12 /* 10 mS w/ 20% margin */
  142. #define CFG_I2C_EEPROM_ADDR_LEN 2 /* need 16 bit address */
  143. #define CFG_ENV_EEPROM_SIZE (32 * 1024)
  144. /*
  145. * Enable I2C and select the hardware/software driver
  146. */
  147. #define CONFIG_HARD_I2C 1 /* CPM based I2C */
  148. #undef CONFIG_SOFT_I2C /* Bit-banged I2C */
  149. #ifdef CONFIG_HARD_I2C
  150. #define CFG_I2C_SPEED 100000 /* clock speed in Hz */
  151. #define CFG_I2C_SLAVE 0xFE /* I2C slave address */
  152. #endif
  153. #ifdef CONFIG_SOFT_I2C
  154. #define PB_SCL 0x00000020 /* PB 26 */
  155. #define PB_SDA 0x00000010 /* PB 27 */
  156. #define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL)
  157. #define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA)
  158. #define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA)
  159. #define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0)
  160. #define I2C_SDA(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SDA; \
  161. else immr->im_cpm.cp_pbdat &= ~PB_SDA
  162. #define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \
  163. else immr->im_cpm.cp_pbdat &= ~PB_SCL
  164. #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */
  165. #endif
  166. /*
  167. * Allow environment overwrites by anyone
  168. */
  169. #define CONFIG_ENV_OVERWRITE
  170. #if !defined(CONFIG_SC)
  171. /*
  172. * The MPC860's internal RTC is horribly broken in rev D masks. Three
  173. * internal MPC860T circuit nodes were inadvertently left floating; this
  174. * causes KAPWR current in power down mode to be three orders of magnitude
  175. * higher than specified in the datasheet (from 10 uA to 10 mA). No
  176. * reasonable battery can keep that kind RTC running during powerdown for any
  177. * length of time, so we use an external RTC on the I2C bus instead.
  178. */
  179. #define CONFIG_RTC_DS1337
  180. #define CFG_I2C_RTC_ADDR 0x68
  181. #else
  182. /*
  183. * No external RTC on SC variant, so we're stuck with the internal one.
  184. */
  185. #define CONFIG_RTC_MPC8xx
  186. #endif
  187. /*
  188. * Power On Self Test support
  189. */
  190. #define CONFIG_POST ( CFG_POST_CACHE | \
  191. CFG_POST_MEMORY | \
  192. CFG_POST_CPU | \
  193. CFG_POST_UART | \
  194. CFG_POST_SPR )
  195. #ifdef CONFIG_POST
  196. #define CFG_CMD_POST_DIAG CFG_CMD_DIAG
  197. #else
  198. #define CFG_CMD_POST_DIAG 0
  199. #endif
  200. /*
  201. * List of available monitor commands. Use the system default list
  202. * plus add some of the "non-standard" commands back in.
  203. * See ./cmd_confdefs.h
  204. */
  205. #define BASE_CONFIG_COMMANDS ( CONFIG_CMD_DFL | \
  206. CFG_CMD_ASKENV | \
  207. CFG_CMD_DHCP | \
  208. CFG_CMD_I2C | \
  209. CFG_CMD_EEPROM | \
  210. CFG_CMD_REGINFO | \
  211. CFG_CMD_IMMAP | \
  212. CFG_CMD_ELF | \
  213. CFG_CMD_DATE | \
  214. CFG_CMD_FPGA | \
  215. CFG_CMD_MII | \
  216. CFG_CMD_BEDBUG | \
  217. CFG_CMD_POST_DIAG )
  218. #if !defined(CONFIG_SC)
  219. #define CONFIG_COMMANDS ( BASE_CONFIG_COMMANDS | CFG_CMD_DOC )
  220. #else
  221. #define CONFIG_COMMANDS BASE_CONFIG_COMMANDS
  222. #endif
  223. /*
  224. * There is no IDE/PCMCIA hardware support on the board.
  225. */
  226. #undef CONFIG_IDE_PCMCIA
  227. #undef CONFIG_IDE_LED
  228. #undef CONFIG_IDE_RESET
  229. /*
  230. * Enable the call to misc_init_r() for miscellaneous platform
  231. * dependent initialization.
  232. */
  233. #define CONFIG_MISC_INIT_R
  234. /*
  235. * Enable call to last_stage_init() so we can twiddle some LEDS :)
  236. */
  237. #define CONFIG_LAST_STAGE_INIT
  238. /*
  239. * Virtex2 FPGA configuration support
  240. */
  241. #define CONFIG_FPGA_COUNT 1
  242. #define CONFIG_FPGA CFG_XILINX_VIRTEX2
  243. #define CFG_FPGA_PROG_FEEDBACK
  244. /************************************************************************
  245. * This must be included AFTER the definition of any CONFIG_COMMANDS
  246. */
  247. #include <cmd_confdefs.h>
  248. /*
  249. * Verbose help from command monitor.
  250. */
  251. #define CFG_LONGHELP
  252. #if !defined(CONFIG_SC)
  253. #define CFG_PROMPT "B2> "
  254. #else
  255. #define CFG_PROMPT "SC> "
  256. #endif
  257. /*
  258. * Use the "hush" command parser
  259. */
  260. #define CFG_HUSH_PARSER
  261. #define CFG_PROMPT_HUSH_PS2 "> "
  262. /*
  263. * Set buffer size for console I/O
  264. */
  265. #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
  266. #define CFG_CBSIZE 1024
  267. #else
  268. #define CFG_CBSIZE 256
  269. #endif
  270. /*
  271. * Print buffer size
  272. */
  273. #define CFG_PBSIZE (CFG_CBSIZE + sizeof(CFG_PROMPT) + 16)
  274. /*
  275. * Maximum number of arguments that a command can accept
  276. */
  277. #define CFG_MAXARGS 16
  278. /*
  279. * Boot argument buffer size
  280. */
  281. #define CFG_BARGSIZE CFG_CBSIZE
  282. /*
  283. * Default memory test range
  284. */
  285. #define CFG_MEMTEST_START 0x0100000
  286. #define CFG_MEMTEST_END (CFG_MEMTEST_START + (128 * 1024))
  287. /*
  288. * Select the more full-featured memory test
  289. */
  290. #define CFG_ALT_MEMTEST
  291. /*
  292. * Default load address
  293. */
  294. #define CFG_LOAD_ADDR 0x01000000
  295. /*
  296. * Set decrementer frequency (1 ms ticks)
  297. */
  298. #define CFG_HZ 1000
  299. /*
  300. * Device memory map (after SDRAM remap to 0x0):
  301. *
  302. * CS Device Base Addr Size
  303. * ----------------------------------------------------
  304. * CS0* Flash 0x40000000 64 M
  305. * CS1* SDRAM 0x00000000 16 M
  306. * CS2* Disk-On-Chip 0x50000000 32 K
  307. * CS3* FPGA 0x60000000 64 M
  308. * CS4* SelectMap 0x70000000 32 K
  309. * CS5* Mil-Std 1553 I/F 0x80000000 32 K
  310. * CS6* Unused
  311. * CS7* Unused
  312. * IMMR 860T Registers 0xfff00000
  313. */
  314. /*
  315. * Base addresses and block sizes
  316. */
  317. #define CFG_IMMR 0xFF000000
  318. #define SDRAM_BASE 0x00000000
  319. #define SDRAM_SIZE (64 * 1024 * 1024)
  320. #define FLASH_BASE 0x40000000
  321. #define FLASH_SIZE (16 * 1024 * 1024)
  322. #define DOC_BASE 0x50000000
  323. #define DOC_SIZE (32 * 1024)
  324. #define FPGA_BASE 0x60000000
  325. #define FPGA_SIZE (64 * 1024 * 1024)
  326. #define SELECTMAP_BASE 0x70000000
  327. #define SELECTMAP_SIZE (32 * 1024)
  328. #define M1553_BASE 0x80000000
  329. #define M1553_SIZE (64 * 1024)
  330. /*
  331. * Definitions for initial stack pointer and data area (in DPRAM)
  332. */
  333. #define CFG_INIT_RAM_ADDR CFG_IMMR
  334. #define CFG_INIT_RAM_END 0x2F00 /* End of used area in DPRAM */
  335. #define CFG_INIT_DATA_SIZE 64 /* # bytes reserved for initial data*/
  336. #define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_INIT_DATA_SIZE)
  337. #define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
  338. /*
  339. * Start addresses for the final memory configuration
  340. * (Set up by the startup code)
  341. * Please note that CFG_SDRAM_BASE _must_ start at 0
  342. */
  343. #define CFG_SDRAM_BASE SDRAM_BASE
  344. /*
  345. * FLASH organization
  346. */
  347. #define CFG_FLASH_BASE FLASH_BASE
  348. #define CFG_FLASH_SIZE FLASH_SIZE
  349. #define CFG_FLASH_SECT_SIZE (128 * 1024)
  350. #define CFG_MAX_FLASH_BANKS 1
  351. #define CFG_MAX_FLASH_SECT 128
  352. /*
  353. * The timeout values are for an entire chip and are in milliseconds.
  354. * Yes I know that the write timeout is huge. Accroding to the
  355. * datasheet a single byte takes 630 uS (round to 1 ms) max at worst
  356. * case VCC and temp after 100K programming cycles. It works out
  357. * to 280 minutes (might as well be forever).
  358. */
  359. #define CFG_FLASH_ERASE_TOUT (CFG_MAX_FLASH_SECT * 5000)
  360. #define CFG_FLASH_WRITE_TOUT (CFG_MAX_FLASH_SECT * 128 * 1024 * 1)
  361. /*
  362. * Allow direct writes to FLASH from tftp transfers (** dangerous **)
  363. */
  364. #define CFG_DIRECT_FLASH_TFTP
  365. /*
  366. * Reserve memory for U-Boot.
  367. */
  368. #define CFG_MAX_UBOOT_SECTS 4
  369. #define CFG_MONITOR_LEN (CFG_MAX_UBOOT_SECTS * CFG_FLASH_SECT_SIZE)
  370. #define CFG_MONITOR_BASE CFG_FLASH_BASE
  371. /*
  372. * Select environment placement. NOTE that u-boot.lds must
  373. * be edited if this is changed!
  374. */
  375. #undef CFG_ENV_IS_IN_FLASH
  376. #define CFG_ENV_IS_IN_EEPROM
  377. #if defined(CFG_ENV_IS_IN_EEPROM)
  378. #define CFG_ENV_SIZE (2 * 1024)
  379. #define CFG_ENV_OFFSET (CFG_ENV_EEPROM_SIZE - (8 * 1024))
  380. #else
  381. #define CFG_ENV_SIZE 0x1000
  382. #define CFG_ENV_SECT_SIZE CFG_FLASH_SECT_SIZE
  383. /*
  384. * This ultimately gets passed right into the linker script, so we have to
  385. * use a number :(
  386. */
  387. #define CFG_ENV_OFFSET 0x060000
  388. #endif
  389. /*
  390. * Reserve memory for malloc()
  391. */
  392. #define CFG_MALLOC_LEN (128 * 1024)
  393. /*
  394. * For booting Linux, the board info and command line data
  395. * have to be in the first 8 MB of memory, since this is
  396. * the maximum mapped by the Linux kernel during initialization.
  397. */
  398. #define CFG_BOOTMAPSZ (8 * 1024 * 1024)
  399. /*
  400. * Cache Configuration
  401. */
  402. #define CFG_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */
  403. #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
  404. #define CFG_CACHELINE_SHIFT 4 /* log base 2 of above value */
  405. #endif
  406. /*------------------------------------------------------------------------
  407. * SYPCR - System Protection Control UM 11-9
  408. * -----------------------------------------------------------------------
  409. * SYPCR can only be written once after reset!
  410. *
  411. * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
  412. */
  413. #if defined(CONFIG_WATCHDOG)
  414. #define CFG_SYPCR ( SYPCR_SWTC | \
  415. SYPCR_BMT | \
  416. SYPCR_BME | \
  417. SYPCR_SWF | \
  418. SYPCR_SWE | \
  419. SYPCR_SWRI | \
  420. SYPCR_SWP \
  421. )
  422. #else
  423. #define CFG_SYPCR ( SYPCR_SWTC | \
  424. SYPCR_BMT | \
  425. SYPCR_BME | \
  426. SYPCR_SWF | \
  427. SYPCR_SWP \
  428. )
  429. #endif
  430. /*-----------------------------------------------------------------------
  431. * SIUMCR - SIU Module Configuration UM 11-6
  432. *-----------------------------------------------------------------------
  433. * Set debug pin mux, enable SPKROUT and GPLB5*.
  434. */
  435. #define CFG_SIUMCR ( SIUMCR_DBGC11 | \
  436. SIUMCR_DBPC11 | \
  437. SIUMCR_MLRC11 | \
  438. SIUMCR_GB5E \
  439. )
  440. /*-----------------------------------------------------------------------
  441. * TBSCR - Time Base Status and Control UM 11-26
  442. *-----------------------------------------------------------------------
  443. * Clear Reference Interrupt Status, Timebase freeze enabled
  444. */
  445. #define CFG_TBSCR ( TBSCR_REFA | \
  446. TBSCR_REFB | \
  447. TBSCR_TBF \
  448. )
  449. /*-----------------------------------------------------------------------
  450. * RTCSC - Real-Time Clock Status and Control Register UM 11-27
  451. *-----------------------------------------------------------------------
  452. */
  453. #define CFG_RTCSC ( RTCSC_SEC | \
  454. RTCSC_ALR | \
  455. RTCSC_RTF | \
  456. RTCSC_RTE \
  457. )
  458. /*-----------------------------------------------------------------------
  459. * PISCR - Periodic Interrupt Status and Control UM 11-31
  460. *-----------------------------------------------------------------------
  461. * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
  462. */
  463. #define CFG_PISCR ( PISCR_PS | \
  464. PISCR_PITF \
  465. )
  466. /*-----------------------------------------------------------------------
  467. * PLPRCR - PLL, Low-Power, and Reset Control Register UM 15-30
  468. *-----------------------------------------------------------------------
  469. * Reset PLL lock status sticky bit, timer expired status bit and timer
  470. * interrupt status bit. Set MF for 1:2:1 mode.
  471. */
  472. #define CFG_PLPRCR ( ((0x1 << PLPRCR_MF_SHIFT) & PLPRCR_MF_MSK) | \
  473. PLPRCR_SPLSS | \
  474. PLPRCR_TEXPS | \
  475. PLPRCR_TMIST \
  476. )
  477. /*-----------------------------------------------------------------------
  478. * SCCR - System Clock and reset Control Register UM 15-27
  479. *-----------------------------------------------------------------------
  480. * Set clock output, timebase and RTC source and divider,
  481. * power management and some other internal clocks
  482. */
  483. #define SCCR_MASK SCCR_EBDF11
  484. #if !defined(CONFIG_SC)
  485. #define CFG_SCCR ( SCCR_TBS | /* timebase = GCLK/2 */ \
  486. SCCR_COM00 | /* full strength CLKOUT */ \
  487. SCCR_DFSYNC00 | /* SYNCLK / 1 (normal) */ \
  488. SCCR_DFBRG00 | /* BRGCLK / 1 (normal) */ \
  489. SCCR_DFNL000 | \
  490. SCCR_DFNH000 \
  491. )
  492. #else
  493. #define CFG_SCCR ( SCCR_TBS | /* timebase = GCLK/2 */ \
  494. SCCR_COM00 | /* full strength CLKOUT */ \
  495. SCCR_DFSYNC00 | /* SYNCLK / 1 (normal) */ \
  496. SCCR_DFBRG00 | /* BRGCLK / 1 (normal) */ \
  497. SCCR_DFNL000 | \
  498. SCCR_DFNH000 | \
  499. SCCR_RTDIV | \
  500. SCCR_RTSEL \
  501. )
  502. #endif
  503. /*-----------------------------------------------------------------------
  504. * DER - Debug Enable Register UM 37-46
  505. *-----------------------------------------------------------------------
  506. * Mask all events that can cause entry into debug mode
  507. */
  508. #define CFG_DER 0
  509. /*
  510. * Initialize Memory Controller:
  511. *
  512. * BR0 and OR0 (FLASH memory)
  513. */
  514. #define FLASH_BASE0_PRELIM FLASH_BASE
  515. /*
  516. * Flash address mask
  517. */
  518. #define CFG_PRELIM_OR_AM 0xfe000000
  519. /*
  520. * FLASH timing:
  521. * 33 Mhz bus with ACS = 11, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 1
  522. */
  523. #define CFG_OR_TIMING_FLASH ( OR_CSNT_SAM | \
  524. OR_ACS_DIV2 | \
  525. OR_BI | \
  526. OR_SCY_2_CLK | \
  527. OR_TRLX | \
  528. OR_EHTR \
  529. )
  530. #define CFG_OR0_PRELIM ( CFG_PRELIM_OR_AM | \
  531. CFG_OR_TIMING_FLASH \
  532. )
  533. #define CFG_BR0_PRELIM ( (FLASH_BASE0_PRELIM & BR_BA_MSK) | \
  534. BR_MS_GPCM | \
  535. BR_PS_8 | \
  536. BR_V \
  537. )
  538. /*
  539. * SDRAM configuration
  540. */
  541. #define CFG_OR1_AM 0xfc000000
  542. #define CFG_OR1 ( (CFG_OR1_AM & OR_AM_MSK) | \
  543. OR_CSNT_SAM \
  544. )
  545. #define CFG_BR1 ( (SDRAM_BASE & BR_BA_MSK) | \
  546. BR_MS_UPMA | \
  547. BR_PS_32 | \
  548. BR_V \
  549. )
  550. /*
  551. * Refresh rate 7.8 us (= 64 ms / 8K = 31.2 uS quad bursts) for one bank
  552. * of 256 MBit SDRAM
  553. */
  554. #define CFG_MPTPR_1BK_8K MPTPR_PTP_DIV16
  555. /*
  556. * Periodic timer for refresh @ 33 MHz system clock
  557. */
  558. #define CFG_MAMR_PTA 64
  559. /*
  560. * MAMR settings for SDRAM
  561. */
  562. #define CFG_MAMR_8COL ( (CFG_MAMR_PTA << MAMR_PTA_SHIFT) | \
  563. MAMR_PTAE | \
  564. MAMR_AMA_TYPE_1 | \
  565. MAMR_DSA_1_CYCL | \
  566. MAMR_G0CLA_A10 | \
  567. MAMR_RLFA_1X | \
  568. MAMR_WLFA_1X | \
  569. MAMR_TLFA_4X \
  570. )
  571. /*
  572. * CS2* configuration for Disk On Chip:
  573. * 33 MHz bus with TRLX=1, ACS=11, CSNT=1, EBDF=1, SCY=2, EHTR=1,
  574. * no burst.
  575. */
  576. #define CFG_OR2_PRELIM ( (0xffff0000 & OR_AM_MSK) | \
  577. OR_CSNT_SAM | \
  578. OR_ACS_DIV2 | \
  579. OR_BI | \
  580. OR_SCY_2_CLK | \
  581. OR_TRLX | \
  582. OR_EHTR \
  583. )
  584. #define CFG_BR2_PRELIM ( (DOC_BASE & BR_BA_MSK) | \
  585. BR_PS_8 | \
  586. BR_MS_GPCM | \
  587. BR_V \
  588. )
  589. /*
  590. * CS3* configuration for FPGA:
  591. * 33 MHz bus with SCY=15, no burst.
  592. * The FPGA uses TA and TEA to terminate bus cycles, but we
  593. * clear SETA and set the cycle length to a large number so that
  594. * the cycle will still complete even if there is a configuration
  595. * error that prevents TA from asserting on FPGA accesss.
  596. */
  597. #define CFG_OR3_PRELIM ( (0xfc000000 & OR_AM_MSK) | \
  598. OR_SCY_15_CLK | \
  599. OR_BI \
  600. )
  601. #define CFG_BR3_PRELIM ( (FPGA_BASE & BR_BA_MSK) | \
  602. BR_PS_32 | \
  603. BR_MS_GPCM | \
  604. BR_V \
  605. )
  606. /*
  607. * CS4* configuration for FPGA SelectMap configuration interface.
  608. * 33 MHz bus, UPMB, no burst. Do not assert GPLB5 on falling edge
  609. * of GCLK1_50
  610. */
  611. #define CFG_OR4_PRELIM ( (0xffff0000 & OR_AM_MSK) | \
  612. OR_G5LS | \
  613. OR_BI \
  614. )
  615. #define CFG_BR4_PRELIM ( (SELECTMAP_BASE & BR_BA_MSK) | \
  616. BR_PS_8 | \
  617. BR_MS_UPMB | \
  618. BR_V \
  619. )
  620. /*
  621. * CS5* configuration for Mil-Std 1553 databus interface.
  622. * 33 MHz bus, GPCM, no burst.
  623. * The 1553 interface uses TA and TEA to terminate bus cycles,
  624. * but we clear SETA and set the cycle length to a large number so that
  625. * the cycle will still complete even if there is a configuration
  626. * error that prevents TA from asserting on FPGA accesss.
  627. */
  628. #define CFG_OR5_PRELIM ( (0xffff0000 & OR_AM_MSK) | \
  629. OR_SCY_15_CLK | \
  630. OR_EHTR | \
  631. OR_TRLX | \
  632. OR_CSNT_SAM | \
  633. OR_BI \
  634. )
  635. #define CFG_BR5_PRELIM ( (M1553_BASE & BR_BA_MSK) | \
  636. BR_PS_16 | \
  637. BR_MS_GPCM | \
  638. BR_V \
  639. )
  640. /*
  641. * Boot Flags
  642. */
  643. #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
  644. #define BOOTFLAG_WARM 0x02 /* Software reboot */
  645. /*
  646. * Disk On Chip (millenium) configuration
  647. */
  648. #if !defined(CONFIG_SC)
  649. #define CFG_MAX_DOC_DEVICE 1
  650. #undef CFG_DOC_SUPPORT_2000
  651. #define CFG_DOC_SUPPORT_MILLENNIUM
  652. #undef CFG_DOC_PASSIVE_PROBE
  653. #endif
  654. /*
  655. * FEC interrupt assignment
  656. */
  657. #define FEC_INTERRUPT SIU_LEVEL1
  658. /*
  659. * Sanity checks
  660. */
  661. #if defined(CONFIG_SCC1_ENET) && defined(CONFIG_FEC_ENET)
  662. #error Both CONFIG_SCC1_ENET and CONFIG_FEC_ENET configured
  663. #endif
  664. #endif /* __CONFIG_GEN860T_H */
  665. /* vim: set ts=4 tw=78 ai shiftwidth=4: */