GEN860T.h 19 KB

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