;++
;Copyright (c) 1999-2000 Microsoft Corporation.  All rights reserved.
;
; Module Name:
;
;    sh3.inc
;
; Abstract:
;
;    This module defines names for the SH-3's on-chip control and status
;    registers, and their fields.  It is directly based on the SH-3 Hardware
;    Reference Manual.
;
; Author:
;
;    David Neff (dneff) 5-Jul-1996
;
; Environment:
;
;    SH-3 privileged mode.
;
; Revision History:
;
;--

; SH-3 register definitions.  The prefix of each register name is derived from
; the module name in table A.1 of the SH-3 Hardware Reference Manual.

;
; Bus state controller registers.
;

BCN_BCR1:	.equ	0xffffff60	; Bus control register 1
BCN_BCR2:	.equ	0xffffff62	; Bus control register 2
BCN_WCR1:	.equ	0xffffff64	; Wait state control register 1
BCN_WCR2:	.equ	0xffffff66	; Wait state control register 2
BCN_MCR:	.equ	0xffffff68	; Individual memory control register
BCN_DCR:	.equ	0xffffff6a	; DRAM control register
BCN_PCR:	.equ	0xffffff6c	; PCMCIA control register
BCN_RTCSR:	.equ	0xffffff6e	; Refresh timer control/status register
BCN_RTCNT:	.equ	0xffffff70	; Refresh timer counter
BCN_RTCOR:	.equ	0xffffff72	; Refresh time constant register
BCN_RFCR:	.equ	0xffffff74	; Refresh count register

; BCR1: bus control register 1 fields (function and bus cycle status for each
; area).

BCN_BCR1_ENDIAN:	.equ	0x0800	; 1 <=> little endian

BCN_BCR1_A0BST:		.equ	0x0600	; Area 0 burst mask
BCN_BCR1_A0BST_N:	.equ	0x0000	; Area 0 ordinary memory
BCN_BCR1_A0BST_4:	.equ	0x0200	; Area 0 burst (4 consecutive accesses)
BCN_BCR1_A0BST_8:	.equ	0x0400	; Area 0 burst (8 consecutive accesses)
BCN_BCR1_A0BST_16:	.equ	0x0600	; Area 0 burst (16 consecutive accesses)

BCN_BCR1_A5BST:		.equ	0x0180	; Area 5 burst mask
BCN_BCR1_A5BST_N:	.equ	0x0000	; Area 5 ordinary memory
BCN_BCR1_A5BST_4:	.equ	0x0080	; Area 5 burst (4 consecutive accesses)
BCN_BCR1_A5BST_8:	.equ	0x0100	; Area 5 burst (8 consecutive accesses)
BCN_BCR1_A5BST_16:	.equ	0x0180	; Area 5 burst (16 consecutive accesses)

BCN_BCR1_A6BST:		.equ	0x0060	; Area 6 burst mask
BCN_BCR1_A6BST_N:	.equ	0x0000	; Area 6 ordinary memory
BCN_BCR1_A6BST_4:	.equ	0x0020	; Area 6 burst (4 consecutive accesses)
BCN_BCR1_A6BST_8:	.equ	0x0040	; Area 6 burst (8 consecutive accesses)
BCN_BCR1_A6BST_16:	.equ	0x0060	; Area 6 burst (16 consecutive accesses)

BCN_BCR1_DRAM:		.equ	0x001c	; Areas 2 & 3 mask
BCN_BCR1_DRAM_A2N3N:	.equ	0x0000	; Area 2 normal, Area 3 normal
BCN_BCR1_DRAM_A2N3P:	.equ	0x0004	; Area 2 normal, Area 3 PSRAM
BCN_BCR1_DRAM_A2N3S:	.equ	0x0008	; Area 2 normal, Area 3 SDRAM
BCN_BCR1_DRAM_A2S3S:	.equ	0x000c	; Area 2 SDRAM, Area 3 SDRAM
BCN_BCR1_DRAM_A2N3D:	.equ	0x0010	; Area 2 normal, Area 3 DRAM
BCN_BCR1_DRAM_A2D3D:	.equ	0x0014	; Area 2 DRAM, Area 3 DRAM

BCN_BCR1_A5PCM:		.equ	0x0002	; Area 5 is PCMCIA access
BCN_BCR1_A6PCM:		.equ	0x0001	; Area 6 is PCMCIA access

; BCR2: bus control register 2 fields (bus size width of each area).

BCN_BCR2_A6SZ:		.equ	0x3000	; Area 6 mask
BCN_BCR2_A6SZ_8:	.equ	0x1000	; Area 6 is  8-bit memory
BCN_BCR2_A6SZ_16:	.equ	0x2000	; Area 6 is 16-bit memory
BCN_BCR2_A6SZ_32:	.equ	0x3000	; Area 6 is 32-bit memory

BCN_BCR2_A5SZ:		.equ	0x0c00	; Area 5 mask
BCN_BCR2_A5SZ_8:	.equ	0x0400	; Area 5 is  8-bit memory
BCN_BCR2_A5SZ_16:	.equ	0x0800	; Area 5 is 16-bit memory
BCN_BCR2_A5SZ_32:	.equ	0x0c00	; Area 5 is 32-bit memory

BCN_BCR2_A4SZ:		.equ	0x0300	; Area 4 mask
BCN_BCR2_A4SZ_8:	.equ	0x0100	; Area 4 is  8-bit memory
BCN_BCR2_A4SZ_16:	.equ	0x0200	; Area 4 is 16-bit memory
BCN_BCR2_A4SZ_32:	.equ	0x0300	; Area 4 is 32-bit memory

BCN_BCR2_A3SZ:		.equ	0x00c0	; Area 3 mask
BCN_BCR2_A3SZ_8:	.equ	0x0040	; Area 3 is  8-bit memory
BCN_BCR2_A3SZ_16:	.equ	0x0080	; Area 3 is 16-bit memory
BCN_BCR2_A3SZ_32:	.equ	0x00c0	; Area 3 is 32-bit memory

BCN_BCR2_A2SZ:		.equ	0x0030	; Area 2 mask
BCN_BCR2_A2SZ_8:	.equ	0x0010	; Area 2 is  8-bit memory
BCN_BCR2_A2SZ_16:	.equ	0x0020	; Area 2 is 16-bit memory
BCN_BCR2_A2SZ_32:	.equ	0x0030	; Area 2 is 32-bit memory

BCN_BCR2_A1SZ:		.equ	0x000c	; Area 1 mask
BCN_BCR2_A1SZ_8:	.equ	0x0004	; Area 1 is  8-bit memory
BCN_BCR2_A1SZ_16:	.equ	0x0008	; Area 1 is 16-bit memory
BCN_BCR2_A1SZ_32:	.equ	0x000c	; Area 1 is 32-bit memory

BCN_BCR2_PORTEN:	.equ	0x0001	; Port enable

; WCR1: Wait (idle) state control register 1 fields.

BCN_WCR1_A6IW:		.equ	0x3000	; Area 6 mask
BCN_WCR1_A6IW_0:	.equ	0x0000	; Area 6 has 0 idle states
BCN_WCR1_A6IW_1:	.equ	0x1000	; Area 6 has 1 idle states
BCN_WCR1_A6IW_2:	.equ	0x2000	; Area 6 has 2 idle states
BCN_WCR1_A6IW_3:	.equ	0x3000	; Area 6 has 3 idle states

BCN_WCR1_A5IW:		.equ	0x0c00	; Area 5 mask
BCN_WCR1_A5IW_0:	.equ	0x0000	; Area 5 has 0 idle states
BCN_WCR1_A5IW_1:	.equ	0x0400	; Area 5 has 1 idle states
BCN_WCR1_A5IW_2:	.equ	0x0800	; Area 5 has 2 idle states
BCN_WCR1_A5IW_3:	.equ	0x0c00	; Area 5 has 3 idle states

BCN_WCR1_A4IW:		.equ	0x0300	; Area 4 mask
BCN_WCR1_A4IW_0:	.equ	0x0000	; Area 4 has 0 idle states
BCN_WCR1_A4IW_1:	.equ	0x0100	; Area 4 has 1 idle states
BCN_WCR1_A4IW_2:	.equ	0x0200	; Area 4 has 2 idle states
BCN_WCR1_A4IW_3:	.equ	0x0300	; Area 4 has 3 idle states

BCN_WCR1_A3IW:		.equ	0x00c0	; Area 3 mask
BCN_WCR1_A3IW_0:	.equ	0x0000	; Area 3 has 0 idle states
BCN_WCR1_A3IW_1:	.equ	0x0040	; Area 3 has 1 idle states
BCN_WCR1_A3IW_2:	.equ	0x0080	; Area 3 has 2 idle states
BCN_WCR1_A3IW_3:	.equ	0x00c0	; Area 3 has 3 idle states

BCN_WCR1_A2IW:		.equ	0x0030	; Area 2 mask
BCN_WCR1_A2IW_0:	.equ	0x0000	; Area 2 has 0 idle states
BCN_WCR1_A2IW_1:	.equ	0x0010	; Area 2 has 1 idle states
BCN_WCR1_A2IW_2:	.equ	0x0020	; Area 2 has 2 idle states
BCN_WCR1_A2IW_3:	.equ	0x0030	; Area 2 has 3 idle states

BCN_WCR1_A1IW:		.equ	0x000c	; Area 1 mask
BCN_WCR1_A1IW_0:	.equ	0x0000	; Area 1 has 0 idle states
BCN_WCR1_A1IW_1:	.equ	0x0004	; Area 1 has 1 idle states
BCN_WCR1_A1IW_2:	.equ	0x0008	; Area 1 has 2 idle states
BCN_WCR1_A1IW_3:	.equ	0x000c	; Area 1 has 3 idle states

BCN_WCR1_A0IW:		.equ	0x0003	; Area 0 mask
BCN_WCR1_A0IW_0:	.equ	0x0000	; Area 0 has 0 idle states
BCN_WCR1_A0IW_1:	.equ	0x0001	; Area 0 has 1 idle states
BCN_WCR1_A0IW_2:	.equ	0x0002	; Area 0 has 2 idle states
BCN_WCR1_A0IW_3:	.equ	0x0003	; Area 0 has 3 idle states

; WCR2: Wait state control register 2 fields.

BCN_WCR2_A6W:		.equ	0xe000	; Area 6 wait state mask
BCN_WCR2_A6W_0:		.equ	0x0000	; Area 6 has 0 wait states
BCN_WCR2_A6W_1:		.equ	0x2000	; Area 6 has 1 wait states
BCN_WCR2_A6W_2:		.equ	0x4000	; Area 6 has 2 wait states
BCN_WCR2_A6W_3:		.equ	0x6000	; Area 6 has 3 wait states
BCN_WCR2_A6W_4:		.equ	0x8000	; Area 6 has 4 wait states
BCN_WCR2_A6W_6:		.equ	0xa000	; Area 6 has 6 wait states
BCN_WCR2_A6W_8:		.equ	0xc000	; Area 6 has 8 wait states
BCN_WCR2_A6W_10:	.equ	0xe000	; Area 6 has 10 wait states

BCN_WCR2_A5W:		.equ	0x1c00	; Area 5 wait state mask
BCN_WCR2_A5W_0:		.equ	0x0000	; Area 5 has 0 wait states
BCN_WCR2_A5W_1:		.equ	0x0400	; Area 5 has 1 wait states
BCN_WCR2_A5W_2:		.equ	0x0800	; Area 5 has 2 wait states
BCN_WCR2_A5W_3:		.equ	0x0c00	; Area 5 has 3 wait states
BCN_WCR2_A5W_4:		.equ	0x1000	; Area 5 has 4 wait states
BCN_WCR2_A5W_6:		.equ	0x1400	; Area 5 has 6 wait states
BCN_WCR2_A5W_8:		.equ	0x1800	; Area 5 has 8 wait states
BCN_WCR2_A5W_10:	.equ	0x1c00	; Area 5 has 10 wait states

BCN_WCR2_A4W:		.equ	0x0380	; Area 4 wait state mask
BCN_WCR2_A4W_0:		.equ	0x0000	; Area 4 has 0 wait states
BCN_WCR2_A4W_1:		.equ	0x0080	; Area 4 has 1 wait states
BCN_WCR2_A4W_2:		.equ	0x0100	; Area 4 has 2 wait states
BCN_WCR2_A4W_3:		.equ	0x0180	; Area 4 has 3 wait states
BCN_WCR2_A4W_4:		.equ	0x0200	; Area 4 has 4 wait states
BCN_WCR2_A4W_6:		.equ	0x0280	; Area 4 has 6 wait states
BCN_WCR2_A4W_8:		.equ	0x0300	; Area 4 has 8 wait states
BCN_WCR2_A4W_10:	.equ	0x0380	; Area 4 has 10 wait states

BCN_WCR2_A3W:		.equ	0x0060	; Area 3 wait state mask
BCN_WCR2_A3W_0:		.equ	0x0000	; Area 3 has 0 wait states
BCN_WCR2_A3W_1:		.equ	0x0020	; Area 3 has 1 wait states
BCN_WCR2_A3W_2:		.equ	0x0040	; Area 3 has 2 wait states
BCN_WCR2_A3W_3:		.equ	0x0060	; Area 3 has 3 wait states

BCN_WCR2_A12W:		.equ	0x0018	; Areas 1, 2 wait state mask
BCN_WCR2_A12W_0:	.equ	0x0000	; Areas 1, 2 have 0 wait states
BCN_WCR2_A12W_1:	.equ	0x0008	; Areas 1, 2 have 1 wait states
BCN_WCR2_A12W_2:	.equ	0x0010	; Areas 1, 2 have 2 wait states
BCN_WCR2_A12W_3:	.equ	0x0018	; Areas 1, 2 have 3 wait states

BCN_WCR2_A0W:		.equ	0x0007	; Area 0 wait state mask
BCN_WCR2_A0W_0:		.equ	0x0000	; Area 0 has 0 wait states
BCN_WCR2_A0W_1:		.equ	0x0001	; Area 0 has 1 wait states
BCN_WCR2_A0W_2:		.equ	0x0002	; Area 0 has 2 wait states
BCN_WCR2_A0W_3:		.equ	0x0003	; Area 0 has 3 wait states
BCN_WCR2_A0W_4:		.equ	0x0004	; Area 0 has 4 wait states
BCN_WCR2_A0W_6:		.equ	0x0005	; Area 0 has 6 wait states
BCN_WCR2_A0W_8:		.equ	0x0006	; Area 0 has 8 wait states
BCN_WCR2_A0W_10:	.equ	0x0007	; Area 0 has 10 wait states

; MCR: Individual memory control register (RAS/CAS timing and burst control for
; DRAM, SRAM and PSRAM, address multiplexing, and refresh control.

BCN_MCR_TPC:		.equ	0xc000	; RAS precharge time mask
BCN_MCR_TPC_1:		.equ	0x0000	; 1 cycle
BCN_MCR_TPC_2:		.equ	0x4000	; 2 cycles
BCN_MCR_TPC_3:		.equ	0x8000	; 3 cycles
BCN_MCR_TPC_4:		.equ	0xc000	; 4 cycles

BCN_MCR_RCD:		.equ	0x3000	; RAS-CAS delay mask
BCN_MCR_RCD_1:		.equ	0x0000	; 1 cycle
BCN_MCR_RCD_2:		.equ	0x1000	; 2 cycles
BCN_MCR_RCD_3:		.equ	0x2000	; 3 cycles
BCN_MCR_RCD_4:		.equ	0x3000	; 4 cycles

BCN_MCR_TRWL:		.equ	0x0c00	; Write-precharge delay
BCN_MCR_TRWL_1:		.equ	0x0000	; 1 cycle
BCN_MCR_TRWL_2:		.equ	0x0400	; 2 cycles
BCN_MCR_TRWL_3:		.equ	0x0800	; 3 cycles

BCN_MCR_TRAS:		.equ	0x0300	; RAS precharge time mask
BCN_MCR_TRAS_2:		.equ	0x0000	; 2 cycles
BCN_MCR_TRAS_3:		.equ	0x0100	; 3 cycles
BCN_MCR_TRAS_4:		.equ	0x0200	; 4 cycles
BCN_MCR_TRAS_5:		.equ	0x0300	; 5 cycles

BCN_MCR_BE:		.equ	0x0040	; Burst enable
BCN_MCR_SZ:		.equ	0x0020	; Memory data size, 0 => 16, 1 => 32

BCN_MCR_AMX:		.equ	0x0018	; Address multiplex mask
BCN_MCR_AMX_9:		.equ	0x0000	; Row addr begins with A9
BCN_MCR_AMX_10:		.equ	0x0008	; Row addr begins with A10
BCN_MCR_AMX_11:		.equ	0x0010	; Row addr begins with A11
BCN_MCR_AMX_12:		.equ	0x0018	; Row addr begins with A12 (9 for SDRAM)

BCN_MCR_RFSH:		.equ	0x0004	; Refresh enable
BCN_MCR_RMODE:		.equ	0x0002	; Refresh mode, 0 => ordinary, 1 => self
BCN_MCR_HSMODE:		.equ	0x0001	; High speed mode

; Values that will be written to many of the following registers must be ORed
; with their corresponding *_*_COOKIE value before writing the register.
; Otherwise, the hardware will reject (ignore) the write.

; RTCSR: Refresh timer control/status register (refresh cycle, interrupt enable,
; and the interrupt's cycle).

BCN_RTCSR_COOKIE:	.equ	0xa500	; OR with new value before writing
BCN_RTCSR_CMF:		.equ	0x0080	; Predicate, RTCNT == RTCOR
BCN_RTCSR_CMIE:		.equ	0x0040	; Enable an interrupt via CMF

BCN_RTCSR_CKS:		.equ	0x0038	; Clock select mask
BCN_RTCSR_CKS_DISABLE:	.equ	0x0000	; Disable clock input
BCN_RTCSR_CKS_4:	.equ	0x0008	; CKIO/4
BCN_RTCSR_CKS_16:	.equ	0x0010	; CKIO/16
BCN_RTCSR_CKS_64:	.equ	0x0018	; CKIO/64
BCN_RTCSR_CKS_256:	.equ	0x0020	; CKIO/256
BCN_RTCSR_CKS_1024:	.equ	0x0028	; CKIO/1024
BCN_RTCSR_CKS_2048:	.equ	0x0030	; CKIO/2048
BCN_RTCSR_CKS_4096:	.equ	0x0038	; CKIO/4096

BCN_RTCSR_OVF:		.equ	0x0004	; RFCR has exceeded count limit in LMTS
BCN_RTCSR_OVIE:		.equ	0x0002	; Enable an interrupt via OVF
BCN_RTCSR_LMTS:		.equ	0x0001	; Count limit: 0 => 1024, 1 => 512

; RTCNT: Refresh timer counter.

BCN_RTCNT_COOKIE:	.equ	0xa500	; OR with new value before writing
BCN_RTCNT_COUNT:	.equ	0x00ff	; Refresh timer counter mask

; RTCOR: Refresh time constant register.

BCN_RTCOR_COOKIE:	.equ	0xa500	; OR with new value before writing
BCN_RTCOR_COUNT:	.equ	0x00ff	; Refresh time constant mask

; RFCR: Refresh count register.

BCN_RFCR_COOKIE:	.equ	0xa400	; OR with new value before writing
BCN_RFCR_COUNT:		.equ	0x03ff	; Refresh count mask

;
; Clock pulse generator registers.
;

CPG_FRQCR:	.equ	0xffffff80	; Frequency control register
CPG_WTCNT:	.equ	0xffffff84	; Watchdog timer counter
CPG_WTCSR:	.equ	0xffffff86	; Watchdog timer control/status register

; Frequency control register.

CPG_FRQCR_CKOEN:	.equ	0x0100	; Clock enable
CPG_FRQCR_PLLEN:	.equ	0x0080	; PLL circuit 1 enable
CPG_FRQCR_PSTBY:	.equ	0x0040	; PLL 1 standby

CPG_FRQCR_STC:		.equ	0x0030	; PLL 1 frequency multiplication rate
CPG_FRQCR_STC_1:	.equ	0x0000	; x1
CPG_FRQCR_STC_2:	.equ	0x0010	; x2
CPG_FRQCR_STC_4:	.equ	0x0020	; x4

CPG_FRQCR_IFC:		.equ	0x000c	; Internal clock freq divider 1 rate
CPG_FRQCR_IFC_1:	.equ	0x0000	; /1
CPG_FRQCR_IFC_2:	.equ	0x0004	; /2
CPG_FRQCR_IFC_4:	.equ	0x0008	; /4

CPG_FRQCR_PFC:		.equ	0x0003	; Peripheral clock freq divider 2 rate
CPG_FRQCR_PFC_1:	.equ	0x0000	; /1
CPG_FRQCR_PFC_2:	.equ	0x0001	; /2
CPG_FRQCR_PFC_4:	.equ	0x0002	; /4

; Watchdog timer counter.

CPG_WTCNT_COOKIE:	.equ	0x5a00	; OR with new value before writing
CPG_WTCNT_COUNT:	.equ	0x00ff	; Watchdog timer counter mask

; Watchdog timer control/status register.

CPG_WTCSR_COOKIE:	.equ	0xa500	; OR with new value before writing
CPG_WTCSR_TME:		.equ	0x0080	; Timer enable
CPG_WTCSR_WT:		.equ	0x0040	; Timer mode select, 1 <=> watchdog
CPG_WTCSR_RSTS:		.equ	0x0020	; Reset select
CPG_WTCSR_WOVF:		.equ	0x0010	; Watchdog timer overflow
CPG_WTCSR_IOVF:		.equ	0x0008	; Interval timer overflow

CPG_WTCSR_CKS:		.equ	0x0007	; Clock select, periph clock div ratio
CPG_WTCSR_CKS_1:	.equ	0x0000	; /1
CPG_WTCSR_CKS_4:	.equ	0x0001	; /4
CPG_WTCSR_CKS_16:	.equ	0x0002	; /16
CPG_WTCSR_CKS_32:	.equ	0x0003	; /32
CPG_WTCSR_CKS_64:	.equ	0x0004	; /64
CPG_WTCSR_CKS_256:	.equ	0x0005	; /256
CPG_WTCSR_CKS_1024:	.equ	0x0006	; /1024
CPG_WTCSR_CKS_4096:	.equ	0x0007	; /4096

;
; Cache controller registers (though most aren't).
;

CCN_TRA:	.equ	0xffffffd0	; TRAPA exception register
CCN_EXPEVT:	.equ	0xffffffd4	; Exception event register
CCN_INTEVT:	.equ	0xffffffd8	; Interrupt event register
CCN_CCR:	.equ	0xffffffec	; Cache control register

; Cache control register.

CCN_CCR_RA:	.equ	0x00000020	; RAM mode (1/2 of cache acts as RAM)
CCN_CCR_CF:	.equ	0x00000008	; Cache flush
CCN_CCR_CB:	.equ	0x00000004	; P1 Mode: 0 => write-thru, 1 => write-back
CCN_CCR_WT:	.equ	0x00000002	; Mode: 0 => write-back, 1 => write-thru
CCN_CCR_CE:	.equ	0x00000001	; Cache enable



;* SH3 Timer unit registers

TMU_BASE: .equ  h'fffffe90
TMU_OCR: .equ   h'00    ; timer output control (8 bit)
TMU_STR: .equ   h'02    ; timer start register (8 bit)

TMU_START0: .equ h'01
TMU_START1: .equ h'02
TMU_START2: .equ h'04

TMU_COR0: .equ  h'04    ; timer constant 0 (32 bit)
TMU_CNT0: .equ  h'08    ; timer count 0 (32 bit)
TMU_CR0: .equ   h'0c    ; timer control 0 (16 bit)

TMU_COR1: .equ  h'10    ; timer constant 1 (32 bit)
TMU_CNT1: .equ  h'14    ; timer count 1 (32 bit)
TMU_CR1: .equ   h'18    ; timer control 1 (16 bit)

TMU_COR2: .equ  h'1c    ; timer constant 2 (32 bit)
TMU_CNT2: .equ  h'20    ; timer count 2 (32 bit)
TMU_CR2: .equ   h'24    ; timer control 2 (16 bit)
TMU_CPR2: .equ  h'28    ; input capture 2 (32 bit)

TMUCR_UNF: .equ h'100   ; counter underflowed
TMUCR_UNIE: .equ h'20   ; underflow interrupt enable

TMUCR_RISE: .equ h'00   ; count on rising edge of clock
TMUCR_FALL: .equ h'08   ; count on falling edge of clock
TMUCR_BOTH: .equ h'10   ; count on both edges of clock

TMUCR_D4:   .equ h'00   ; PERIPHERAL clock / 4
TMUCR_D16:  .equ h'01   ; PERIPHERAL clock / 16
TMUCR_D64:  .equ h'02   ; PERIPHERAL clock / 64
TMUCR_D256: .equ h'03   ; PERIPHERAL clock / 256
TMUCR_RTC:  .equ h'04   ; real time clock output (16 kHz)
TMUCR_EXT:  .equ h'05   ; external clock input

;RTC
RTC_BASE        .equ    h'FFFFFEC0
RTC_64CNT       .equ    h'0000          ;8
RTC_SECCNT      .equ    h'0002          ;8
RTC_MINCNT      .equ    h'0004          ;8
RTC_HRCNT       .equ    h'0006          ;8
RTC_WKCNT       .equ    h'0008          ;8
RTC_DAYCNT      .equ    h'000a          ;8
RTC_MONCNT      .equ    h'000c          ;8
RTC_YRCNT       .equ    h'000e          ;8
RTC_SECAR       .equ    h'0010          ;8
RTC_MINAR       .equ    h'0012          ;8
RTC_HRAR        .equ    h'0014          ;8
RTC_WKAR        .equ    h'0016          ;8
RTC_DAYAR       .equ    h'0018          ;8
RTC_MONAR       .equ    h'001a          ;8
RTC_CR1         .equ    h'001c          ;8
RTC_CR2         .equ    h'001e          ;8

; Power control registers
STBCR       .equ   0xFFFFFF82    ;   Standby control register
