GEN860T.h 20 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 CONFIG_SYS_BAUDRATE_TABLE { 9600, \
  61. 19200, \
  62. 38400, \
  63. 57600, \
  64. 115200, \
  65. }
  66. /*
  67. * Print console information
  68. */
  69. #undef CONFIG_SYS_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 CONFIG_SYS_LOADS_BAUD_CHANGE
  92. /*
  93. * Set default load address for tftp network downloads
  94. */
  95. #define CONFIG_SYS_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 CONFIG_SYS_RESET_ADDRESS ((ulong) -1)
  113. /*
  114. * BOOTP options
  115. */
  116. #define CONFIG_BOOTP_SUBNETMASK
  117. #define CONFIG_BOOTP_GATEWAY
  118. #define CONFIG_BOOTP_HOSTNAME
  119. #define CONFIG_BOOTP_BOOTPATH
  120. #define CONFIG_BOOTP_BOOTFILESIZE
  121. /*
  122. * The GEN860T network interface uses the on-chip 10/100 FEC with
  123. * an Intel LXT971A PHY connected to the 860T's MII. The PHY's
  124. * MII address is hardwired on the board to zero.
  125. */
  126. #define CONFIG_FEC_ENET
  127. #define CONFIG_SYS_DISCOVER_PHY
  128. #define CONFIG_MII
  129. #define CONFIG_MII_INIT 1
  130. #define CONFIG_PHY_ADDR 0
  131. /*
  132. * Set default IP stuff just to get bootstrap entries into the
  133. * environment so that we can source the full default environment.
  134. */
  135. #define CONFIG_ETHADDR 9a:52:63:15:85:25
  136. #define CONFIG_SERVERIP 10.0.4.201
  137. #define CONFIG_IPADDR 10.0.4.111
  138. /*
  139. * This board has a 32 kibibyte EEPROM (Atmel AT24C256) connected to
  140. * the MPC860T I2C interface.
  141. */
  142. #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
  143. #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6 /* 64 byte pages */
  144. #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 12 /* 10 mS w/ 20% margin */
  145. #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* need 16 bit address */
  146. #define CONFIG_ENV_EEPROM_SIZE (32 * 1024)
  147. /*
  148. * Enable I2C and select the hardware/software driver
  149. */
  150. #define CONFIG_HARD_I2C 1 /* CPM based I2C */
  151. #undef CONFIG_SOFT_I2C /* Bit-banged I2C */
  152. #ifdef CONFIG_HARD_I2C
  153. #define CONFIG_SYS_I2C_SPEED 100000 /* clock speed in Hz */
  154. #define CONFIG_SYS_I2C_SLAVE 0xFE /* I2C slave address */
  155. #endif
  156. #ifdef CONFIG_SOFT_I2C
  157. #define PB_SCL 0x00000020 /* PB 26 */
  158. #define PB_SDA 0x00000010 /* PB 27 */
  159. #define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL)
  160. #define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA)
  161. #define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA)
  162. #define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0)
  163. #define I2C_SDA(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SDA; \
  164. else immr->im_cpm.cp_pbdat &= ~PB_SDA
  165. #define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \
  166. else immr->im_cpm.cp_pbdat &= ~PB_SCL
  167. #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */
  168. #endif
  169. /*
  170. * Allow environment overwrites by anyone
  171. */
  172. #define CONFIG_ENV_OVERWRITE
  173. #if !defined(CONFIG_SC)
  174. /*
  175. * The MPC860's internal RTC is horribly broken in rev D masks. Three
  176. * internal MPC860T circuit nodes were inadvertently left floating; this
  177. * causes KAPWR current in power down mode to be three orders of magnitude
  178. * higher than specified in the datasheet (from 10 uA to 10 mA). No
  179. * reasonable battery can keep that kind RTC running during powerdown for any
  180. * length of time, so we use an external RTC on the I2C bus instead.
  181. */
  182. #define CONFIG_RTC_DS1337
  183. #define CONFIG_SYS_I2C_RTC_ADDR 0x68
  184. #else
  185. /*
  186. * No external RTC on SC variant, so we're stuck with the internal one.
  187. */
  188. #define CONFIG_RTC_MPC8xx
  189. #endif
  190. /*
  191. * Power On Self Test support
  192. */
  193. #define CONFIG_POST ( CONFIG_SYS_POST_CACHE | \
  194. CONFIG_SYS_POST_MEMORY | \
  195. CONFIG_SYS_POST_CPU | \
  196. CONFIG_SYS_POST_UART | \
  197. CONFIG_SYS_POST_SPR )
  198. /*
  199. * Command line configuration.
  200. */
  201. #include <config_cmd_default.h>
  202. #define CONFIG_CMD_ASKENV
  203. #define CONFIG_CMD_DHCP
  204. #define CONFIG_CMD_I2C
  205. #define CONFIG_CMD_EEPROM
  206. #define CONFIG_CMD_REGINFO
  207. #define CONFIG_CMD_IMMAP
  208. #define CONFIG_CMD_ELF
  209. #define CONFIG_CMD_DATE
  210. #define CONFIG_CMD_FPGA
  211. #define CONFIG_CMD_MII
  212. #define CONFIG_CMD_BEDBUG
  213. #if !defined(CONFIG_SC)
  214. #define CONFIG_CMD_DOC
  215. #endif
  216. #ifdef CONFIG_POST
  217. #define CONFIG_CMD_DIAG
  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
  239. #define CONFIG_FPGA_XILINX
  240. #define CONFIG_FPGA_VIRTEX2
  241. #define CONFIG_SYS_FPGA_PROG_FEEDBACK
  242. #define CONFIG_NAND_LEGACY
  243. /*
  244. * Verbose help from command monitor.
  245. */
  246. #define CONFIG_SYS_LONGHELP
  247. #if !defined(CONFIG_SC)
  248. #define CONFIG_SYS_PROMPT "B2> "
  249. #else
  250. #define CONFIG_SYS_PROMPT "SC> "
  251. #endif
  252. /*
  253. * Use the "hush" command parser
  254. */
  255. #define CONFIG_SYS_HUSH_PARSER
  256. #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
  257. /*
  258. * Set buffer size for console I/O
  259. */
  260. #if defined(CONFIG_CMD_KGDB)
  261. #define CONFIG_SYS_CBSIZE 1024
  262. #else
  263. #define CONFIG_SYS_CBSIZE 256
  264. #endif
  265. /*
  266. * Print buffer size
  267. */
  268. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  269. /*
  270. * Maximum number of arguments that a command can accept
  271. */
  272. #define CONFIG_SYS_MAXARGS 16
  273. /*
  274. * Boot argument buffer size
  275. */
  276. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  277. /*
  278. * Default memory test range
  279. */
  280. #define CONFIG_SYS_MEMTEST_START 0x0100000
  281. #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + (128 * 1024))
  282. /*
  283. * Select the more full-featured memory test
  284. */
  285. #define CONFIG_SYS_ALT_MEMTEST
  286. /*
  287. * Default load address
  288. */
  289. #define CONFIG_SYS_LOAD_ADDR 0x01000000
  290. /*
  291. * Set decrementer frequency (1 ms ticks)
  292. */
  293. #define CONFIG_SYS_HZ 1000
  294. /*
  295. * Device memory map (after SDRAM remap to 0x0):
  296. *
  297. * CS Device Base Addr Size
  298. * ----------------------------------------------------
  299. * CS0* Flash 0x40000000 64 M
  300. * CS1* SDRAM 0x00000000 16 M
  301. * CS2* Disk-On-Chip 0x50000000 32 K
  302. * CS3* FPGA 0x60000000 64 M
  303. * CS4* SelectMap 0x70000000 32 K
  304. * CS5* Mil-Std 1553 I/F 0x80000000 32 K
  305. * CS6* Unused
  306. * CS7* Unused
  307. * IMMR 860T Registers 0xfff00000
  308. */
  309. /*
  310. * Base addresses and block sizes
  311. */
  312. #define CONFIG_SYS_IMMR 0xFF000000
  313. #define SDRAM_BASE 0x00000000
  314. #define SDRAM_SIZE (64 * 1024 * 1024)
  315. #define FLASH_BASE 0x40000000
  316. #define FLASH_SIZE (16 * 1024 * 1024)
  317. #define DOC_BASE 0x50000000
  318. #define DOC_SIZE (32 * 1024)
  319. #define FPGA_BASE 0x60000000
  320. #define FPGA_SIZE (64 * 1024 * 1024)
  321. #define SELECTMAP_BASE 0x70000000
  322. #define SELECTMAP_SIZE (32 * 1024)
  323. #define M1553_BASE 0x80000000
  324. #define M1553_SIZE (64 * 1024)
  325. /*
  326. * Definitions for initial stack pointer and data area (in DPRAM)
  327. */
  328. #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR
  329. #define CONFIG_SYS_INIT_RAM_END 0x2F00 /* End of used area in DPRAM */
  330. #define CONFIG_SYS_INIT_DATA_SIZE 64 /* # bytes reserved for initial data*/
  331. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_INIT_DATA_SIZE)
  332. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  333. /*
  334. * Start addresses for the final memory configuration
  335. * (Set up by the startup code)
  336. * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
  337. */
  338. #define CONFIG_SYS_SDRAM_BASE SDRAM_BASE
  339. /*
  340. * FLASH organization
  341. */
  342. #define CONFIG_SYS_FLASH_BASE FLASH_BASE
  343. #define CONFIG_SYS_FLASH_SIZE FLASH_SIZE
  344. #define CONFIG_SYS_FLASH_SECT_SIZE (128 * 1024)
  345. #define CONFIG_SYS_MAX_FLASH_BANKS 1
  346. #define CONFIG_SYS_MAX_FLASH_SECT 128
  347. /*
  348. * The timeout values are for an entire chip and are in milliseconds.
  349. * Yes I know that the write timeout is huge. Accroding to the
  350. * datasheet a single byte takes 630 uS (round to 1 ms) max at worst
  351. * case VCC and temp after 100K programming cycles. It works out
  352. * to 280 minutes (might as well be forever).
  353. */
  354. #define CONFIG_SYS_FLASH_ERASE_TOUT (CONFIG_SYS_MAX_FLASH_SECT * 5000)
  355. #define CONFIG_SYS_FLASH_WRITE_TOUT (CONFIG_SYS_MAX_FLASH_SECT * 128 * 1024 * 1)
  356. /*
  357. * Allow direct writes to FLASH from tftp transfers (** dangerous **)
  358. */
  359. #define CONFIG_SYS_DIRECT_FLASH_TFTP
  360. /*
  361. * Reserve memory for U-Boot.
  362. */
  363. #define CONFIG_SYS_MAX_UBOOT_SECTS 4
  364. #define CONFIG_SYS_MONITOR_LEN (CONFIG_SYS_MAX_UBOOT_SECTS * CONFIG_SYS_FLASH_SECT_SIZE)
  365. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
  366. /*
  367. * Select environment placement. NOTE that u-boot.lds must
  368. * be edited if this is changed!
  369. */
  370. #undef CONFIG_ENV_IS_IN_FLASH
  371. #define CONFIG_ENV_IS_IN_EEPROM
  372. #if defined(CONFIG_ENV_IS_IN_EEPROM)
  373. #define CONFIG_ENV_SIZE (2 * 1024)
  374. #define CONFIG_ENV_OFFSET (CONFIG_ENV_EEPROM_SIZE - (8 * 1024))
  375. #else
  376. #define CONFIG_ENV_SIZE 0x1000
  377. #define CONFIG_ENV_SECT_SIZE CONFIG_SYS_FLASH_SECT_SIZE
  378. /*
  379. * This ultimately gets passed right into the linker script, so we have to
  380. * use a number :(
  381. */
  382. #define CONFIG_ENV_OFFSET 0x060000
  383. #endif
  384. /*
  385. * Reserve memory for malloc()
  386. */
  387. #define CONFIG_SYS_MALLOC_LEN (128 * 1024)
  388. /*
  389. * For booting Linux, the board info and command line data
  390. * have to be in the first 8 MB of memory, since this is
  391. * the maximum mapped by the Linux kernel during initialization.
  392. */
  393. #define CONFIG_SYS_BOOTMAPSZ (8 * 1024 * 1024)
  394. /*
  395. * Cache Configuration
  396. */
  397. #define CONFIG_SYS_CACHELINE_SIZE 16 /* For all MPC8xx CPUs */
  398. #if defined(CONFIG_CMD_KGDB)
  399. #define CONFIG_SYS_CACHELINE_SHIFT 4 /* log base 2 of above value */
  400. #endif
  401. /*------------------------------------------------------------------------
  402. * SYPCR - System Protection Control UM 11-9
  403. * -----------------------------------------------------------------------
  404. * SYPCR can only be written once after reset!
  405. *
  406. * Software & Bus Monitor Timer max, Bus Monitor enable, SW Watchdog freeze
  407. */
  408. #if defined(CONFIG_WATCHDOG)
  409. #define CONFIG_SYS_SYPCR ( SYPCR_SWTC | \
  410. SYPCR_BMT | \
  411. SYPCR_BME | \
  412. SYPCR_SWF | \
  413. SYPCR_SWE | \
  414. SYPCR_SWRI | \
  415. SYPCR_SWP \
  416. )
  417. #else
  418. #define CONFIG_SYS_SYPCR ( SYPCR_SWTC | \
  419. SYPCR_BMT | \
  420. SYPCR_BME | \
  421. SYPCR_SWF | \
  422. SYPCR_SWP \
  423. )
  424. #endif
  425. /*-----------------------------------------------------------------------
  426. * SIUMCR - SIU Module Configuration UM 11-6
  427. *-----------------------------------------------------------------------
  428. * Set debug pin mux, enable SPKROUT and GPLB5*.
  429. */
  430. #define CONFIG_SYS_SIUMCR ( SIUMCR_DBGC11 | \
  431. SIUMCR_DBPC11 | \
  432. SIUMCR_MLRC11 | \
  433. SIUMCR_GB5E \
  434. )
  435. /*-----------------------------------------------------------------------
  436. * TBSCR - Time Base Status and Control UM 11-26
  437. *-----------------------------------------------------------------------
  438. * Clear Reference Interrupt Status, Timebase freeze enabled
  439. */
  440. #define CONFIG_SYS_TBSCR ( TBSCR_REFA | \
  441. TBSCR_REFB | \
  442. TBSCR_TBF \
  443. )
  444. /*-----------------------------------------------------------------------
  445. * RTCSC - Real-Time Clock Status and Control Register UM 11-27
  446. *-----------------------------------------------------------------------
  447. */
  448. #define CONFIG_SYS_RTCSC ( RTCSC_SEC | \
  449. RTCSC_ALR | \
  450. RTCSC_RTF | \
  451. RTCSC_RTE \
  452. )
  453. /*-----------------------------------------------------------------------
  454. * PISCR - Periodic Interrupt Status and Control UM 11-31
  455. *-----------------------------------------------------------------------
  456. * Clear Periodic Interrupt Status, Interrupt Timer freezing enabled
  457. */
  458. #define CONFIG_SYS_PISCR ( PISCR_PS | \
  459. PISCR_PITF \
  460. )
  461. /*-----------------------------------------------------------------------
  462. * PLPRCR - PLL, Low-Power, and Reset Control Register UM 15-30
  463. *-----------------------------------------------------------------------
  464. * Reset PLL lock status sticky bit, timer expired status bit and timer
  465. * interrupt status bit. Set MF for 1:2:1 mode.
  466. */
  467. #define CONFIG_SYS_PLPRCR ( ((0x1 << PLPRCR_MF_SHIFT) & PLPRCR_MF_MSK) | \
  468. PLPRCR_SPLSS | \
  469. PLPRCR_TEXPS | \
  470. PLPRCR_TMIST \
  471. )
  472. /*-----------------------------------------------------------------------
  473. * SCCR - System Clock and reset Control Register UM 15-27
  474. *-----------------------------------------------------------------------
  475. * Set clock output, timebase and RTC source and divider,
  476. * power management and some other internal clocks
  477. */
  478. #define SCCR_MASK SCCR_EBDF11
  479. #if !defined(CONFIG_SC)
  480. #define CONFIG_SYS_SCCR ( SCCR_TBS | /* timebase = GCLK/2 */ \
  481. SCCR_COM00 | /* full strength CLKOUT */ \
  482. SCCR_DFSYNC00 | /* SYNCLK / 1 (normal) */ \
  483. SCCR_DFBRG00 | /* BRGCLK / 1 (normal) */ \
  484. SCCR_DFNL000 | \
  485. SCCR_DFNH000 \
  486. )
  487. #else
  488. #define CONFIG_SYS_SCCR ( SCCR_TBS | /* timebase = GCLK/2 */ \
  489. SCCR_COM00 | /* full strength CLKOUT */ \
  490. SCCR_DFSYNC00 | /* SYNCLK / 1 (normal) */ \
  491. SCCR_DFBRG00 | /* BRGCLK / 1 (normal) */ \
  492. SCCR_DFNL000 | \
  493. SCCR_DFNH000 | \
  494. SCCR_RTDIV | \
  495. SCCR_RTSEL \
  496. )
  497. #endif
  498. /*-----------------------------------------------------------------------
  499. * DER - Debug Enable Register UM 37-46
  500. *-----------------------------------------------------------------------
  501. * Mask all events that can cause entry into debug mode
  502. */
  503. #define CONFIG_SYS_DER 0
  504. /*
  505. * Initialize Memory Controller:
  506. *
  507. * BR0 and OR0 (FLASH memory)
  508. */
  509. #define FLASH_BASE0_PRELIM FLASH_BASE
  510. /*
  511. * Flash address mask
  512. */
  513. #define CONFIG_SYS_PRELIM_OR_AM 0xfe000000
  514. /*
  515. * FLASH timing:
  516. * 33 Mhz bus with ACS = 11, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 1
  517. */
  518. #define CONFIG_SYS_OR_TIMING_FLASH ( OR_CSNT_SAM | \
  519. OR_ACS_DIV2 | \
  520. OR_BI | \
  521. OR_SCY_2_CLK | \
  522. OR_TRLX | \
  523. OR_EHTR \
  524. )
  525. #define CONFIG_SYS_OR0_PRELIM ( CONFIG_SYS_PRELIM_OR_AM | \
  526. CONFIG_SYS_OR_TIMING_FLASH \
  527. )
  528. #define CONFIG_SYS_BR0_PRELIM ( (FLASH_BASE0_PRELIM & BR_BA_MSK) | \
  529. BR_MS_GPCM | \
  530. BR_PS_8 | \
  531. BR_V \
  532. )
  533. /*
  534. * SDRAM configuration
  535. */
  536. #define CONFIG_SYS_OR1_AM 0xfc000000
  537. #define CONFIG_SYS_OR1 ( (CONFIG_SYS_OR1_AM & OR_AM_MSK) | \
  538. OR_CSNT_SAM \
  539. )
  540. #define CONFIG_SYS_BR1 ( (SDRAM_BASE & BR_BA_MSK) | \
  541. BR_MS_UPMA | \
  542. BR_PS_32 | \
  543. BR_V \
  544. )
  545. /*
  546. * Refresh rate 7.8 us (= 64 ms / 8K = 31.2 uS quad bursts) for one bank
  547. * of 256 MBit SDRAM
  548. */
  549. #define CONFIG_SYS_MPTPR_1BK_8K MPTPR_PTP_DIV16
  550. /*
  551. * Periodic timer for refresh @ 33 MHz system clock
  552. */
  553. #define CONFIG_SYS_MAMR_PTA 64
  554. /*
  555. * MAMR settings for SDRAM
  556. */
  557. #define CONFIG_SYS_MAMR_8COL ( (CONFIG_SYS_MAMR_PTA << MAMR_PTA_SHIFT) | \
  558. MAMR_PTAE | \
  559. MAMR_AMA_TYPE_1 | \
  560. MAMR_DSA_1_CYCL | \
  561. MAMR_G0CLA_A10 | \
  562. MAMR_RLFA_1X | \
  563. MAMR_WLFA_1X | \
  564. MAMR_TLFA_4X \
  565. )
  566. /*
  567. * CS2* configuration for Disk On Chip:
  568. * 33 MHz bus with TRLX=1, ACS=11, CSNT=1, EBDF=1, SCY=2, EHTR=1,
  569. * no burst.
  570. */
  571. #define CONFIG_SYS_OR2_PRELIM ( (0xffff0000 & OR_AM_MSK) | \
  572. OR_CSNT_SAM | \
  573. OR_ACS_DIV2 | \
  574. OR_BI | \
  575. OR_SCY_2_CLK | \
  576. OR_TRLX | \
  577. OR_EHTR \
  578. )
  579. #define CONFIG_SYS_BR2_PRELIM ( (DOC_BASE & BR_BA_MSK) | \
  580. BR_PS_8 | \
  581. BR_MS_GPCM | \
  582. BR_V \
  583. )
  584. /*
  585. * CS3* configuration for FPGA:
  586. * 33 MHz bus with SCY=15, no burst.
  587. * The FPGA uses TA and TEA to terminate bus cycles, but we
  588. * clear SETA and set the cycle length to a large number so that
  589. * the cycle will still complete even if there is a configuration
  590. * error that prevents TA from asserting on FPGA accesss.
  591. */
  592. #define CONFIG_SYS_OR3_PRELIM ( (0xfc000000 & OR_AM_MSK) | \
  593. OR_SCY_15_CLK | \
  594. OR_BI \
  595. )
  596. #define CONFIG_SYS_BR3_PRELIM ( (FPGA_BASE & BR_BA_MSK) | \
  597. BR_PS_32 | \
  598. BR_MS_GPCM | \
  599. BR_V \
  600. )
  601. /*
  602. * CS4* configuration for FPGA SelectMap configuration interface.
  603. * 33 MHz bus, UPMB, no burst. Do not assert GPLB5 on falling edge
  604. * of GCLK1_50
  605. */
  606. #define CONFIG_SYS_OR4_PRELIM ( (0xffff0000 & OR_AM_MSK) | \
  607. OR_G5LS | \
  608. OR_BI \
  609. )
  610. #define CONFIG_SYS_BR4_PRELIM ( (SELECTMAP_BASE & BR_BA_MSK) | \
  611. BR_PS_8 | \
  612. BR_MS_UPMB | \
  613. BR_V \
  614. )
  615. /*
  616. * CS5* configuration for Mil-Std 1553 databus interface.
  617. * 33 MHz bus, GPCM, no burst.
  618. * The 1553 interface uses TA and TEA to terminate bus cycles,
  619. * but we clear SETA and set the cycle length to a large number so that
  620. * the cycle will still complete even if there is a configuration
  621. * error that prevents TA from asserting on FPGA accesss.
  622. */
  623. #define CONFIG_SYS_OR5_PRELIM ( (0xffff0000 & OR_AM_MSK) | \
  624. OR_SCY_15_CLK | \
  625. OR_EHTR | \
  626. OR_TRLX | \
  627. OR_CSNT_SAM | \
  628. OR_BI \
  629. )
  630. #define CONFIG_SYS_BR5_PRELIM ( (M1553_BASE & BR_BA_MSK) | \
  631. BR_PS_16 | \
  632. BR_MS_GPCM | \
  633. BR_V \
  634. )
  635. /*
  636. * Boot Flags
  637. */
  638. #define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */
  639. #define BOOTFLAG_WARM 0x02 /* Software reboot */
  640. /*
  641. * Disk On Chip (millenium) configuration
  642. */
  643. #if !defined(CONFIG_SC)
  644. #define CONFIG_SYS_MAX_DOC_DEVICE 1
  645. #undef CONFIG_SYS_DOC_SUPPORT_2000
  646. #define CONFIG_SYS_DOC_SUPPORT_MILLENNIUM
  647. #undef CONFIG_SYS_DOC_PASSIVE_PROBE
  648. #endif
  649. /*
  650. * FEC interrupt assignment
  651. */
  652. #define FEC_INTERRUPT SIU_LEVEL1
  653. /*
  654. * Sanity checks
  655. */
  656. #if defined(CONFIG_SCC1_ENET) && defined(CONFIG_FEC_ENET)
  657. #error Both CONFIG_SCC1_ENET and CONFIG_FEC_ENET configured
  658. #endif
  659. #endif /* __CONFIG_GEN860T_H */