; --------------------------------------------------------------------------------
; @Title: Setup for the Motorola MPC860FADS board
; @Description: -
; @Author: DIE
; @Chip: MPC860
; @Board: MPC860FADS
; @Copyright: (C) 1989-2014 Lauterbach GmbH, licensed for use with TRACE32(R) only
; --------------------------------------------------------------------------------
; $Id: fads860t.cmm 7476 2014-07-28 12:03:02Z rweiss $


 LOCAL &base
 
; set IMMR Register
 &base=0xff000000
 Data.Set SPR:638. %Long &base    ; set IMMR

; Initialize Flash Access (BR0/OR0)

 Data.Set &base+0x100 %Long 0x02800001  ; base 0x40000000
 Data.Set &base+0x104 %Long 0xffe00d34  ; size 2MB

; Initialize DRAM Access (BR2/OR2)

 Data.Set &base+0x110 %Long 0x00000081  ; base 0
 Data.Set &base+0x114 %Long 0xff000b00  ; size 16MB

; Programming UPMA for SDRAM

 DO writeupm

; initialize memory controller
 
 Data.Set &base+0x170 %Long 0x13b01114  ; MAMR
 Data.Set &base+0x17a %Word 0x0400      ; MPTPR
 Data.Set &base+0x164 %Long 0x00000088  ; MAR

; init SIUMCR
 Data.Set &base+0x000 %Long 0x01600400

; init clocks
 Data.Set &base+0x200 %Word 0x02    ; TBSCR
 Data.Set &base+0x220 %Word 0x02    ; RTCSC
 Data.Set &base+0x240 %Long 0x20000 ; PISCR

 ENDDO

