1 /* $NetBSD: gemini_timervar.h,v 1.1 2008/10/24 04:23:18 matt Exp $ */
6 * NetBSD: omap2_mputmrvar.h,v 1.2 2008/04/27 18:58:45 matt Exp
10 * Copyright (c) 2007 Microsoft
11 * All rights reserved.
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
16 * 1. Redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer.
18 * 2. Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution.
21 * 3. All advertising materials mentioning features or use of this software
22 * must display the following acknowledgement:
23 * This product includes software developed by Microsoft
25 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
26 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
27 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTERS BE LIABLE FOR ANY DIRECT,
29 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 #ifndef _GEMINI_TIMER_H
38 #define _GEMINI_TIMER_H
44 typedef struct timer_factors
{
45 uint32_t tf_counts_per_usec
;
53 typedef struct geminitmr_softc
{
56 bus_space_tag_t sc_iot
;
57 bus_space_handle_t sc_ioh
;
61 timer_factors_t sc_tf
;
66 extern uint32_t hardref
;
67 extern struct timeval hardtime
;
68 extern struct geminitmr_softc
*clock_sc
;
69 extern struct geminitmr_softc
*stat_sc
;
70 extern struct geminitmr_softc
*ref_sc
;
72 extern void gemini_microtime_init(void);
74 extern int clockintr(void *);
75 extern int statintr(void *);
76 extern void rtcinit(void);
78 #endif /* _GEMINI_TIMER_H */