make oldconfig will rebuild these...
[linux-2.4.21-pre4.git] / drivers / acpi / include / achware.h
1 /******************************************************************************
2  *
3  * Name: achware.h -- hardware specific interfaces
4  *       $Revision: 1.1.1.1 $
5  *
6  *****************************************************************************/
7
8 /*
9  *  Copyright (C) 2000, 2001 R. Byron Moore
10  *
11  *  This program is free software; you can redistribute it and/or modify
12  *  it under the terms of the GNU General Public License as published by
13  *  the Free Software Foundation; either version 2 of the License, or
14  *  (at your option) any later version.
15  *
16  *  This program is distributed in the hope that it will be useful,
17  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  *  GNU General Public License for more details.
20  *
21  *  You should have received a copy of the GNU General Public License
22  *  along with this program; if not, write to the Free Software
23  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
24  */
25
26 #ifndef __ACHWARE_H__
27 #define __ACHWARE_H__
28
29
30 /* PM Timer ticks per second (HZ) */
31 #define PM_TIMER_FREQUENCY  3579545
32
33
34 /* Prototypes */
35
36
37 acpi_status
38 acpi_hw_initialize (
39         void);
40
41 acpi_status
42 acpi_hw_shutdown (
43         void);
44
45 acpi_status
46 acpi_hw_initialize_system_info (
47         void);
48
49 acpi_status
50 acpi_hw_set_mode (
51         u32                     mode);
52
53 u32
54 acpi_hw_get_mode (
55         void);
56
57 u32
58 acpi_hw_get_mode_capabilities (
59         void);
60
61 /* Register I/O Prototypes */
62
63
64 u32
65 acpi_hw_register_bit_access (
66         NATIVE_UINT             read_write,
67         u8                      use_lock,
68         u32                     register_id,
69         ... /* DWORD Write Value */);
70
71 u32
72 acpi_hw_register_read (
73         u8                      use_lock,
74         u32                     register_id);
75
76 void
77 acpi_hw_register_write (
78         u8                      use_lock,
79         u32                     register_id,
80         u32                     value);
81
82 u32
83 acpi_hw_low_level_read (
84         u32                     width,
85         acpi_generic_address    *reg,
86         u32                     offset);
87
88 void
89 acpi_hw_low_level_write (
90         u32                     width,
91         u32                     value,
92         acpi_generic_address    *reg,
93         u32                     offset);
94
95 void
96 acpi_hw_clear_acpi_status (
97    void);
98
99 u32
100 acpi_hw_get_bit_shift (
101         u32                     mask);
102
103
104 /* GPE support */
105
106 void
107 acpi_hw_enable_gpe (
108         u32                     gpe_number);
109
110 void
111 acpi_hw_enable_gpe_for_wakeup (
112         u32                     gpe_number);
113
114 void
115 acpi_hw_disable_gpe (
116         u32                     gpe_number);
117
118 void
119 acpi_hw_disable_gpe_for_wakeup (
120         u32                     gpe_number);
121
122 void
123 acpi_hw_clear_gpe (
124         u32                     gpe_number);
125
126 void
127 acpi_hw_get_gpe_status (
128         u32                     gpe_number,
129         acpi_event_status       *event_status);
130
131 void
132 acpi_hw_disable_non_wakeup_gpes (
133         void);
134
135 void
136 acpi_hw_enable_non_wakeup_gpes (
137         void);
138
139
140 /* Sleep Prototypes */
141
142 acpi_status
143 acpi_hw_obtain_sleep_type_register_data (
144         u8                      sleep_state,
145         u8                      *slp_typ_a,
146         u8                      *slp_typ_b);
147
148
149 /* ACPI Timer prototypes */
150
151 acpi_status
152 acpi_get_timer_resolution (
153         u32                     *resolution);
154
155 acpi_status
156 acpi_get_timer (
157         u32                     *ticks);
158
159 acpi_status
160 acpi_get_timer_duration (
161         u32                     start_ticks,
162         u32                     end_ticks,
163         u32                     *time_elapsed);
164
165
166 #endif /* __ACHWARE_H__ */