1 /* Registers, offsets, and default address for the clock device.
2    Copyright 2002 Paul Twohey.
3 
4 This file is part of VMIPS.
5 
6 VMIPS is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 2 of the License, or (at your
9 option) any later version.
10 
11 VMIPS is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 for more details.
15 
16 You should have received a copy of the GNU General Public License along
17 with VMIPS; if not, write to the Free Software Foundation, Inc.,
18 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
19 
20 #ifndef _CLOCKREG_H_
21 #define _CLOCKREG_H_
22 
23 #include "devreg.h"
24 
25 /* Use this as a mask to check when the clock device has interrupts enabled.
26    This is deprecated in favor of using CTL_IE. */
27 #define CDC_INTERRUPTS_ENABLED CTL_IE
28 
29 /* Default base address in physical memory clock device address */
30 #define CLOCK_BASE 0x01010000
31 
32 /* Default virtual (KSEG0) clock device address */
33 #define CLOCK_ADDR 0xa1010000
34 
35 /* Register offsets */
36 #define REAL_SECONDS     0x00
37 #define REAL_MICRO       0x04
38 #define SIM_SECONDS      0x08
39 #define SIM_MICRO        0x0C
40 #define CLOCKDEV_CONTROL 0x10
41 
42 #endif /* _CLOCKREG_H_ */
43