sd: remove 'ssd' driver support
[unleashed/tickless.git] / arch / x86 / kernel / platform / i86pc / include / sys / hpet.h
blob1ee991044153d3aa5d8d40639807b72469fd4e28
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _HPET_H
27 #define _HPET_H
29 #include <sys/hpet_acpi.h>
32 * Interface for HPET access.
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
40 * HPET_INFINITY is used for timers that will never expire.
42 #define HPET_INFINITY (INT64_MAX)
45 * State of initialization.
47 #define HPET_NO_SUPPORT (0)
48 #define HPET_TIMER_SUPPORT (1) /* supports main counter reads */
49 #define HPET_INTERRUPT_SUPPORT (2) /* supports interrupt/timer */
50 #define HPET_FULL_SUPPORT (3) /* supports counter and timer intr */
52 typedef struct hpet {
53 uint_t supported;
54 boolean_t (*install_proxy)(void);
55 boolean_t (*callback)(int);
57 * Next two function pointers allow CPUs to use the HPET's timer
58 * as a proxy for their LAPIC timers which stop during Deep C-State.
60 boolean_t (*use_hpet_timer)(hrtime_t *);
61 void (*use_lapic_timer)(hrtime_t);
62 } hpet_t;
64 #define CST_EVENT_MULTIPLE_CSTATES (128) /* callbacks for _CST changes */
65 #define CST_EVENT_ONE_CSTATE (129)
68 * unix access to the HPET is done through the hpet structure.
70 extern hpet_t hpet;
72 int hpet_acpi_init(int *hpet_vect, iflag_t *hpet_flags);
73 void hpet_acpi_fini(void);
74 uint32_t hpet_proxy_ipl(void);
76 #ifdef __cplusplus
78 #endif
80 #endif /* _HPET_H */