~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/linux/acpi.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  *  acpi.h - ACPI driver interface
  3  *
  4  *  Copyright (C) 1999 Andrew Henroid
  5  *
  6  *  This program is free software; you can redistribute it and/or modify
  7  *  it under the terms of the GNU General Public License as published by
  8  *  the Free Software Foundation; either version 2 of the License, or
  9  *  (at your option) any later version.
 10  *
 11  *  This program is distributed in the hope that it will be useful,
 12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 14  *  GNU General Public License for more details.
 15  *
 16  *  You should have received a copy of the GNU General Public License
 17  *  along with this program; if not, write to the Free Software
 18  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 19  */
 20 
 21 #ifndef _LINUX_ACPI_H
 22 #define _LINUX_ACPI_H
 23 
 24 #include <linux/types.h>
 25 #include <linux/ioctl.h>
 26 #ifdef __KERNEL__
 27 #include <linux/sched.h>
 28 #include <linux/wait.h>
 29 #endif /* __KERNEL__ */
 30 
 31 u64 acpi_get_rsdp_ptr(void);
 32 
 33 /*
 34  * System sleep states
 35  */
 36 enum
 37 {
 38         ACPI_S0, /* working */
 39         ACPI_S1, /* sleep */
 40         ACPI_S2, /* sleep */
 41         ACPI_S3, /* sleep */
 42         ACPI_S4, /* non-volatile sleep */
 43         ACPI_S5, /* soft-off */
 44 };
 45 
 46 typedef int acpi_sstate_t;
 47 
 48 /*
 49  * Device states
 50  */
 51 enum
 52 {
 53         ACPI_D0, /* fully-on */
 54         ACPI_D1, /* partial-on */
 55         ACPI_D2, /* partial-on */
 56         ACPI_D3, /* fully-off */
 57 };
 58 
 59 typedef int acpi_dstate_t;
 60 
 61 /* RSDP location */
 62 #define ACPI_BIOS_ROM_BASE (0x0e0000)
 63 #define ACPI_BIOS_ROM_END  (0x100000)
 64 
 65 /* Table signatures */
 66 #define ACPI_RSDP1_SIG 0x20445352 /* 'RSD ' */
 67 #define ACPI_RSDP2_SIG 0x20525450 /* 'PTR ' */
 68 #define ACPI_RSDT_SIG  0x54445352 /* 'RSDT' */
 69 #define ACPI_FADT_SIG  0x50434146 /* 'FACP' */
 70 #define ACPI_DSDT_SIG  0x54445344 /* 'DSDT' */
 71 #define ACPI_FACS_SIG  0x53434146 /* 'FACS' */
 72 
 73 #define ACPI_SIG_LEN            4
 74 #define ACPI_FADT_SIGNATURE     "FACP"
 75 
 76 /* PM1_STS/EN flags */
 77 #define ACPI_TMR    0x0001
 78 #define ACPI_BM     0x0010
 79 #define ACPI_GBL    0x0020
 80 #define ACPI_PWRBTN 0x0100
 81 #define ACPI_SLPBTN 0x0200
 82 #define ACPI_RTC    0x0400
 83 #define ACPI_WAK    0x8000
 84 
 85 /* PM1_CNT flags */
 86 #define ACPI_SCI_EN   0x0001
 87 #define ACPI_BM_RLD   0x0002
 88 #define ACPI_GBL_RLS  0x0004
 89 #define ACPI_SLP_TYP0 0x0400
 90 #define ACPI_SLP_TYP1 0x0800
 91 #define ACPI_SLP_TYP2 0x1000
 92 #define ACPI_SLP_EN   0x2000
 93 
 94 #define ACPI_SLP_TYP_MASK  0x1c00
 95 #define ACPI_SLP_TYP_SHIFT 10
 96 
 97 /* PM_TMR masks */
 98 #define ACPI_TMR_VAL_EXT 0x00000100
 99 #define ACPI_TMR_MASK    0x00ffffff
100 #define ACPI_TMR_HZ      3580000 /* 3.58 MHz */
101 
102 /* strangess to avoid integer overflow */
103 #define ACPI_MICROSEC_TO_TMR_TICKS(val) \
104   (((val) * (ACPI_TMR_HZ / 10000)) / 100)
105 #define ACPI_TMR_TICKS_TO_MICROSEC(ticks) \
106   (((ticks) * 100) / (ACPI_TMR_HZ / 10000))
107 
108 /* PM2_CNT flags */
109 #define ACPI_ARB_DIS 0x01
110 
111 /* FADT flags */
112 #define ACPI_WBINVD       0x00000001
113 #define ACPI_WBINVD_FLUSH 0x00000002
114 #define ACPI_PROC_C1      0x00000004
115 #define ACPI_P_LVL2_UP    0x00000008
116 #define ACPI_PWR_BUTTON   0x00000010
117 #define ACPI_SLP_BUTTON   0x00000020
118 #define ACPI_FIX_RTC      0x00000040
119 #define ACPI_RTC_64       0x00000080
120 #define ACPI_TMR_VAL_EXT  0x00000100
121 #define ACPI_DCK_CAP      0x00000200
122 
123 /* FADT BOOT_ARCH flags */
124 #define FADT_BOOT_ARCH_LEGACY_DEVICES   0x0001
125 #define FADT_BOOT_ARCH_KBD_CONTROLLER   0x0002
126 
127 /* FACS flags */
128 #define ACPI_S4BIOS       0x00000001
129 
130 /* processor block offsets */
131 #define ACPI_P_CNT        0x00000000
132 #define ACPI_P_LVL2       0x00000004
133 #define ACPI_P_LVL3       0x00000005
134 
135 /* C-state latencies (microseconds) */
136 #define ACPI_MAX_P_LVL2_LAT 100
137 #define ACPI_MAX_P_LVL3_LAT 1000
138 #define ACPI_INFINITE_LAT   (~0UL)
139 
140 /*
141  * Sysctl declarations
142  */
143 
144 enum
145 {
146         CTL_ACPI = 10
147 };
148 
149 enum
150 {
151         ACPI_FADT = 1,
152         ACPI_DSDT,
153         ACPI_PM1_ENABLE,
154         ACPI_GPE_ENABLE,
155         ACPI_GPE_LEVEL,
156         ACPI_EVENT,
157         ACPI_P_BLK,
158         ACPI_ENTER_LVL2_LAT,
159         ACPI_ENTER_LVL3_LAT,
160         ACPI_P_LVL2_LAT,
161         ACPI_P_LVL3_LAT,
162         ACPI_C1_TIME,
163         ACPI_C2_TIME,
164         ACPI_C3_TIME,
165         ACPI_S0_SLP_TYP,
166         ACPI_S1_SLP_TYP,
167         ACPI_S5_SLP_TYP,
168         ACPI_SLEEP,
169         ACPI_FACS,
170         ACPI_XSDT,
171         ACPI_PMTIMER,
172         ACPI_BATTERY,
173 };
174 
175 #define ACPI_SLP_TYP_DISABLED   (~0UL)
176 
177 #endif /* _LINUX_ACPI_H */
178 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.