GEN860T.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768
  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. #define CFG_NAND_LEGACY
  249. /*
  250. * Verbose help from command monitor.
  251. */
  252. #define CFG_LONGHELP
  253. #if !defined(CONFIG_SC)
  254. #define CFG_PROMPT "B2> "
  255. #else
  256. #define CFG_PROMPT "SC> "
  257. #endif
  258. /*
  259. * Use the "hush" command parser
  260. */
  261. #define CFG_HUSH_PARSER
  262. #define CFG_PROMPT_HUSH_PS2 "> "
  263. /*
  264. * Set buffer size for console I/O
  265. */
  266. #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
  267. #define CFG_CBSIZE 1024
  268. #else
  269. #define CFG_CBSIZE 256
  270. #endif
  271. /*
  272. * Print buffer size
  273. */
  274. #define CFG_PBSIZE (CFG_CBSIZE + sizeof(CFG_PROMPT) + 16)
  275. /*
  276. * Maximum number of arguments that a command can accept
  277. */
  278. #define CFG_MAXARGS 16
  279. /*
  280. * Boot argument buffer size
  281. */
  282. #define CFG_BARGSIZE CFG_CBSIZE
  283. /*
  284. * Default memory test range
  285. */
  286. #define CFG_MEMTEST_START 0x0100000
  287. #define CFG_MEMTEST_END (CFG_MEMTEST_START + (128 * 1024))
  288. /*
  289. * Select the more full-featured memory test
  290. */
  291. #define CFG_ALT_MEMTEST
  292. /*
  293. * Default load address
  294. */
  295. #define CFG_LOAD_ADDR 0x01000000
  296. /*
  297. * Set decrementer frequency (1 ms ticks)
  298. */
  299. #define CFG_HZ 1000
  300. /*
  301. * Device memory map (after SDRAM remap to 0x0):
  302. *
  303. * CS Device Base Addr Size
  304. * ----------------------------------------------------
  305. * CS0* Flash 0x40000000 64 M
  306. * CS1* SDRAM 0x00000000 16 M
  307. * CS2* Disk-On-Chip 0x50000000 32 K
  308. * CS3* FPGA 0x60000000 64 M
  309. * CS4* SelectMap 0x70000000 32 K
  310. * CS5* Mil-Std 1553 I/F 0x80000000 32 K
  311. * CS6* Unused
  312. * CS7* Unused
  313. * IMMR 860T Registers 0xfff00000
  314. */
  315. /*
  316. * Base addresses and block sizes
  317. */
  318. #define CFG_IMMR 0xFF000000
  319. #define SDRAM_BASE 0x00000000
  320. #define SDRAM_SIZE (64 * 1024 * 1024)
  321. #define FLASH_BASE 0x40000000
  322. #define FLASH_SIZE (16 * 1024 * 1024)
  323. #define DOC_BASE 0x50000000
  324. #define DOC_SIZE (32 * 1024)
  325. #define FPGA_BASE 0x60000000
  326. #define FPGA_SIZE (64 * 1024 * 1024)
  327. #define SELECTMAP_BASE 0x70000000
  328. #define SELECTMAP_SIZE (32 * 1024)
  329. #define M1553_BASE 0x80000000
  330. #define M1553_SIZE (64 * 1024)
  331. /*
  332. * Definitions for initial stack pointer and data area (in DPRAM)
  333. */
  334. #define CFG_INIT_RAM_ADDR CFG_IMMR
  335. #define CFG_INIT_RAM_END 0x2F00 /* End of used area in DPRAM */
  336. #define CFG_INIT_DATA_SIZE 64 /* # bytes reserved for initial data*/
  337. #define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_INIT_DATA_SIZE)
  338. #define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
  339. /*
  340. * Start addresses for the final memory configuration
  341. * (Set up by the startup code)
  342. * Please note that CFG_SDRAM_BASE _must_ start at 0
  343. */
  344. #define CFG_SDRAM_BASE SDRAM_BASE
  345. /*
  346. * FLASH organization
  347. */
  348. #define CFG_FLASH_BASE FLASH_BASE
  349. #define CFG_FLASH_SIZE FLASH_SIZE
  350. #define CFG_FLASH_SECT_SIZE (128 * 1024)
  351. #define CFG_MAX_FLASH_BANKS 1
  352. #define CFG_MAX_FLASH_SECT 128
  353. /*
  354. * The timeout values are for an entire chip and are in milliseconds.
  355. * Yes I know that the write timeout is huge. Accroding to the
  356. * datasheet a single byte takes 630 uS (round to 1 ms) max at worst
  357. * case VCC and temp after 100K programming cycles. It works out
  358. * to 280 minutes (might as well be forever).
  359. */
  360. #define CFG_FLASH_ERASE_TOUT (CFG_MAX_FLASH_SECT * 5000)
  361. #define CFG_FLASH_WRITE_TOUT (CFG_MAX_FLASH_SECT * 128 * 1024 * 1)
  362. /*
  363. * Allow direct writes to FLASH from tftp transfers (** dangerous **)
  364. */
  365. #define CFG_DIRECT_FLASH_TFTP
  366. /*
  367. * Reserve memory for U-Boot.
  368. */
  369. #define CFG_MAX_UBOOT_SECTS 4
  370. #define CFG_MONITOR_LEN (CFG_MAX_UBOOT_SECTS * CFG_FLASH_SECT_SIZE)
  371. #define CFG_MONITOR_BASE CFG_FLASH_BASE
  372. /*
  373. * Select environment placement. NOTE that u-boot.lds must
  374. * be edited if this is changed!
  375. */
  376. #undef CFG_ENV_IS_IN_FLASH
  377. #define CFG_ENV_IS_IN_EEPROM
  378. #if defined(CFG_ENV_IS_IN_EEPROM)
  379. #define CFG_ENV_SIZE (2 * 1024)
  380. #define CFG_ENV_OFFSET (CFG_ENV_EEPROM_SIZE - (8 * 1024))
  381. #else
  382. #define CFG_ENV_SIZE 0x1000
  383. #define CFG_ENV_SECT_SIZE CFG_FLASH_SECT_SIZE
  384. /*
  385. * This ultimately gets passed right into the linker script, so we have to
  386. * use a number :(
  387. */
  388. #define CFG_ENV_OFFSET 0x060000
  389. #endif
  390. /*
  391. * Reserve memory for malloc()
  392. */
  393. #define CFG_MALLOC_LEN (128 * 1024)
  394. /*
  395. * For booting Linux, the board info and command line data
  396. * have to be in the first 8 MB of memory, since this is
  397. * the maximum mapped by the Linux kernel during initialization.
  398. */
  399. #define CFG_BOOTMAPSZ (8 * 1024 * 1024)
  400. /*
  401. * Cache Configuration
  402. */
  403. #define CFG_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */
  404. #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
  405. #define CFG_CACHELINE_SHIFT 4 /* log base 2 of above value */
  406. #endif
  407. /*------------------------------------------------------------------------
  408. * SYPCR - System Protection Control UM 11-9
  409. * -----------------------------------------------------------------------
  410. * SYPCR can only be written once after reset!
  411. *
  412. * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
  413. */
  414. #if defined(CONFIG_WATCHDOG)
  415. #define CFG_SYPCR ( SYPCR_SWTC | \
  416. SYPCR_BMT | \
  417. SYPCR_BME | \
  418. SYPCR_SWF | \
  419. SYPCR_SWE | \
  420. SYPCR_SWRI | \
  421. SYPCR_SWP \
  422. )
  423. #else
  424. #define CFG_SYPCR ( SYPCR_SWTC | \
  425. SYPCR_BMT | \
  426. SYPCR_BME | \
  427. SYPCR_SWF | \
  428. SYPCR_SWP \
  429. )
  430. #endif
  431. /*-----------------------------------------------------------------------
  432. * SIUMCR - SIU Module Configuration UM 11-6
  433. *-----------------------------------------------------------------------
  434. * Set debug pin mux, enable SPKROUT and GPLB5*.
  435. */
  436. #define CFG_SIUMCR ( SIUMCR_DBGC11 | \
  437. SIUMCR_DBPC11 | \
  438. SIUMCR_MLRC11 | \
  439. SIUMCR_GB5E \
  440. )
  441. /*-----------------------------------------------------------------------
  442. * TBSCR - Time Base Status and Control UM 11-26
  443. *-----------------------------------------------------------------------
  444. * Clear Reference Interrupt Status, Timebase freeze enabled
  445. */
  446. #define CFG_TBSCR ( TBSCR_REFA | \
  447. TBSCR_REFB | \
  448. TBSCR_TBF \
  449. )
  450. /*-----------------------------------------------------------------------
  451. * RTCSC - Real-Time Clock Status and Control Register UM 11-27
  452. *-----------------------------------------------------------------------
  453. */
  454. #define CFG_RTCSC ( RTCSC_SEC | \
  455. RTCSC_ALR | \
  456. RTCSC_RTF | \
  457. RTCSC_RTE \
  458. )
  459. /*-----------------------------------------------------------------------
  460. * PISCR - Periodic Interrupt Status and Control UM 11-31
  461. *-----------------------------------------------------------------------
  462. * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
  463. */
  464. #define CFG_PISCR ( PISCR_PS | \
  465. PISCR_PITF \
  466. )
  467. /*-----------------------------------------------------------------------
  468. * PLPRCR - PLL, Low-Power, and Reset Control Register UM 15-30
  469. *-----------------------------------------------------------------------
  470. * Reset PLL lock status sticky bit, timer expired status bit and timer
  471. * interrupt status bit. Set MF for 1:2:1 mode.
  472. */
  473. #define CFG_PLPRCR ( ((0x1 << PLPRCR_MF_SHIFT) & PLPRCR_MF_MSK) | \
  474. PLPRCR_SPLSS | \
  475. PLPRCR_TEXPS | \
  476. PLPRCR_TMIST \
  477. )
  478. /*-----------------------------------------------------------------------
  479. * SCCR - System Clock and reset Control Register UM 15-27
  480. *-----------------------------------------------------------------------
  481. * Set clock output, timebase and RTC source and divider,
  482. * power management and some other internal clocks
  483. */
  484. #define SCCR_MASK SCCR_EBDF11
  485. #if !defined(CONFIG_SC)
  486. #define CFG_SCCR ( SCCR_TBS | /* timebase = GCLK/2 */ \
  487. SCCR_COM00 | /* full strength CLKOUT */ \
  488. SCCR_DFSYNC00 | /* SYNCLK / 1 (normal) */ \
  489. SCCR_DFBRG00 | /* BRGCLK / 1 (normal) */ \
  490. SCCR_DFNL000 | \
  491. SCCR_DFNH000 \
  492. )
  493. #else
  494. #define CFG_SCCR ( SCCR_TBS | /* timebase = GCLK/2 */ \
  495. SCCR_COM00 | /* full strength CLKOUT */ \
  496. SCCR_DFSYNC00 | /* SYNCLK / 1 (normal) */ \
  497. SCCR_DFBRG00 | /* BRGCLK / 1 (normal) */ \
  498. SCCR_DFNL000 | \
  499. SCCR_DFNH000 | \
  500. SCCR_RTDIV | \
  501. SCCR_RTSEL \
  502. )
  503. #endif
  504. /*-----------------------------------------------------------------------
  505. * DER - Debug Enable Register UM 37-46
  506. *-----------------------------------------------------------------------
  507. * Mask all events that can cause entry into debug mode
  508. */
  509. #define CFG_DER 0
  510. /*
  511. * Initialize Memory Controller:
  512. *
  513. * BR0 and OR0 (FLASH memory)
  514. */
  515. #define FLASH_BASE0_PRELIM FLASH_BASE
  516. /*
  517. * Flash address mask
  518. */
  519. #define CFG_PRELIM_OR_AM 0xfe000000
  520. /*
  521. * FLASH timing:
  522. * 33 Mhz bus with ACS = 11, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 1
  523. */
  524. #define CFG_OR_TIMING_FLASH ( OR_CSNT_SAM | \
  525. OR_ACS_DIV2 | \
  526. OR_BI | \
  527. OR_SCY_2_CLK | \
  528. OR_TRLX | \
  529. OR_EHTR \
  530. )
  531. #define CFG_OR0_PRELIM ( CFG_PRELIM_OR_AM | \
  532. CFG_OR_TIMING_FLASH \
  533. )
  534. #define CFG_BR0_PRELIM ( (FLASH_BASE0_PRELIM & BR_BA_MSK) | \
  535. BR_MS_GPCM | \
  536. BR_PS_8 | \
  537. BR_V \
  538. )
  539. /*
  540. * SDRAM configuration
  541. */
  542. #define CFG_OR1_AM 0xfc000000
  543. #define CFG_OR1 ( (CFG_OR1_AM & OR_AM_MSK) | \
  544. OR_CSNT_SAM \
  545. )
  546. #define CFG_BR1 ( (SDRAM_BASE & BR_BA_MSK) | \
  547. BR_MS_UPMA | \
  548. BR_PS_32 | \
  549. BR_V \
  550. )
  551. /*
  552. * Refresh rate 7.8 us (= 64 ms / 8K = 31.2 uS quad bursts) for one bank
  553. * of 256 MBit SDRAM
  554. */
  555. #define CFG_MPTPR_1BK_8K MPTPR_PTP_DIV16
  556. /*
  557. * Periodic timer for refresh @ 33 MHz system clock
  558. */
  559. #define CFG_MAMR_PTA 64
  560. /*
  561. * MAMR settings for SDRAM
  562. */
  563. #define CFG_MAMR_8COL ( (CFG_MAMR_PTA << MAMR_PTA_SHIFT) | \
  564. MAMR_PTAE | \
  565. MAMR_AMA_TYPE_1 | \
  566. MAMR_DSA_1_CYCL | \
  567. MAMR_G0CLA_A10 | \
  568. MAMR_RLFA_1X | \
  569. MAMR_WLFA_1X | \
  570. MAMR_TLFA_4X \
  571. )
  572. /*
  573. * CS2* configuration for Disk On Chip:
  574. * 33 MHz bus with TRLX=1, ACS=11, CSNT=1, EBDF=1, SCY=2, EHTR=1,
  575. * no burst.
  576. */
  577. #define CFG_OR2_PRELIM ( (0xffff0000 & OR_AM_MSK) | \
  578. OR_CSNT_SAM | \
  579. OR_ACS_DIV2 | \
  580. OR_BI | \
  581. OR_SCY_2_CLK | \
  582. OR_TRLX | \
  583. OR_EHTR \
  584. )
  585. #define CFG_BR2_PRELIM ( (DOC_BASE & BR_BA_MSK) | \
  586. BR_PS_8 | \
  587. BR_MS_GPCM | \
  588. BR_V \
  589. )
  590. /*
  591. * CS3* configuration for FPGA:
  592. * 33 MHz bus with SCY=15, no burst.
  593. * The FPGA uses TA and TEA to terminate bus cycles, but we
  594. * clear SETA and set the cycle length to a large number so that
  595. * the cycle will still complete even if there is a configuration
  596. * error that prevents TA from asserting on FPGA accesss.
  597. */
  598. #define CFG_OR3_PRELIM ( (0xfc000000 & OR_AM_MSK) | \
  599. OR_SCY_15_CLK | \
  600. OR_BI \
  601. )
  602. #define CFG_BR3_PRELIM ( (FPGA_BASE & BR_BA_MSK) | \
  603. BR_PS_32 | \
  604. BR_MS_GPCM | \
  605. BR_V \
  606. )
  607. /*
  608. * CS4* configuration for FPGA SelectMap configuration interface.
  609. * 33 MHz bus, UPMB, no burst. Do not assert GPLB5 on falling edge
  610. * of GCLK1_50
  611. */
  612. #define CFG_OR4_PRELIM ( (0xffff0000 & OR_AM_MSK) | \
  613. OR_G5LS | \
  614. OR_BI \
  615. )
  616. #define CFG_BR4_PRELIM ( (SELECTMAP_BASE & BR_BA_MSK) | \
  617. BR_PS_8 | \
  618. BR_MS_UPMB | \
  619. BR_V \
  620. )
  621. /*
  622. * CS5* configuration for Mil-Std 1553 databus interface.
  623. * 33 MHz bus, GPCM, no burst.
  624. * The 1553 interface uses TA and TEA to terminate bus cycles,
  625. * but we clear SETA and set the cycle length to a large number so that
  626. * the cycle will still complete even if there is a configuration
  627. * error that prevents TA from asserting on FPGA accesss.
  628. */
  629. #define CFG_OR5_PRELIM ( (0xffff0000 & OR_AM_MSK) | \
  630. OR_SCY_15_CLK | \
  631. OR_EHTR | \
  632. OR_TRLX | \
  633. OR_CSNT_SAM | \
  634. OR_BI \
  635. )
  636. #define CFG_BR5_PRELIM ( (M1553_BASE & BR_BA_MSK) | \
  637. BR_PS_16 | \
  638. BR_MS_GPCM | \
  639. BR_V \
  640. )
  641. /*
  642. * Boot Flags
  643. */
  644. #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
  645. #define BOOTFLAG_WARM 0x02 /* Software reboot */
  646. /*
  647. * Disk On Chip (millenium) configuration
  648. */
  649. #if !defined(CONFIG_SC)
  650. #define CFG_MAX_DOC_DEVICE 1
  651. #undef CFG_DOC_SUPPORT_2000
  652. #define CFG_DOC_SUPPORT_MILLENNIUM
  653. #undef CFG_DOC_PASSIVE_PROBE
  654. #endif
  655. /*
  656. * FEC interrupt assignment
  657. */
  658. #define FEC_INTERRUPT SIU_LEVEL1
  659. /*
  660. * Sanity checks
  661. */
  662. #if defined(CONFIG_SCC1_ENET) && defined(CONFIG_FEC_ENET)
  663. #error Both CONFIG_SCC1_ENET and CONFIG_FEC_ENET configured
  664. #endif
  665. #endif /* __CONFIG_GEN860T_H */
  666. /* vim: set ts=4 tw=78 ai shiftwidth=4: */