File: /usr/src/linux/drivers/acpi/include/achware.h

1     /******************************************************************************
2      *
3      * Name: achware.h -- hardware specific interfaces
4      *       $Revision: 55 $
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_index);
109     
110     void
111     acpi_hw_disable_gpe (
112     	u32                     gpe_index);
113     
114     void
115     acpi_hw_clear_gpe (
116     	u32                     gpe_index);
117     
118     void
119     acpi_hw_get_gpe_status (
120     	u32                     gpe_number,
121     	acpi_event_status       *event_status);
122     
123     /* Sleep Prototypes */
124     
125     acpi_status
126     acpi_hw_obtain_sleep_type_register_data (
127     	u8                      sleep_state,
128     	u8                      *slp_typ_a,
129     	u8                      *slp_typ_b);
130     
131     
132     /* ACPI Timer prototypes */
133     
134     acpi_status
135     acpi_get_timer_resolution (
136     	u32                     *resolution);
137     
138     acpi_status
139     acpi_get_timer (
140     	u32                     *ticks);
141     
142     acpi_status
143     acpi_get_timer_duration (
144     	u32                     start_ticks,
145     	u32                     end_ticks,
146     	u32                     *time_elapsed);
147     
148     
149     #endif /* __ACHWARE_H__ */
150