achware.h revision 84491
146283Sdfr/****************************************************************************** 2130803Smarcel * 346283Sdfr * Name: achware.h -- hardware specific interfaces 498944Sobrien * $Revision: 56 $ 546283Sdfr * 698944Sobrien *****************************************************************************/ 798944Sobrien 898944Sobrien/****************************************************************************** 998944Sobrien * 1046283Sdfr * 1. Copyright Notice 1198944Sobrien * 1298944Sobrien * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp. 1398944Sobrien * All rights reserved. 1498944Sobrien * 1546283Sdfr * 2. License 1698944Sobrien * 1798944Sobrien * 2.1. This is your license from Intel Corp. under its intellectual property 1898944Sobrien * rights. You may have additional license terms from the party that provided 1998944Sobrien * you this software, covering your right to use that party's intellectual 2046283Sdfr * property rights. 2146283Sdfr * 2246283Sdfr * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 2346283Sdfr * copy of the source code appearing in this file ("Covered Code") an 2446283Sdfr * irrevocable, perpetual, worldwide license under Intel's copyrights in the 2546283Sdfr * base code distributed originally by Intel ("Original Intel Code") to copy, 2646283Sdfr * make derivatives, distribute, use and display any portion of the Covered 2746283Sdfr * Code in any form, with the right to sublicense such rights; and 2846283Sdfr * 2946283Sdfr * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 3046283Sdfr * license (with the right to sublicense), under only those claims of Intel 3146283Sdfr * patents that are infringed by the Original Intel Code, to make, use, sell, 3246283Sdfr * offer to sell, and import the Covered Code and derivative works thereof 3346283Sdfr * solely to the minimum extent necessary to exercise the above copyright 3446283Sdfr * license, and in no event shall the patent license extend to any additions 3546283Sdfr * to or modifications of the Original Intel Code. No other license or right 36130803Smarcel * is granted directly or by implication, estoppel or otherwise; 37130803Smarcel * 38130803Smarcel * The above copyright and patent license is granted only if the following 3946283Sdfr * conditions are met: 4046283Sdfr * 4146283Sdfr * 3. Conditions 4246283Sdfr * 4346283Sdfr * 3.1. Redistribution of Source with Rights to Further Distribute Source. 4446283Sdfr * Redistribution of source code of any substantial portion of the Covered 4546283Sdfr * Code or modification with rights to further distribute source must include 4646283Sdfr * the above Copyright Notice, the above License, this list of Conditions, 4746283Sdfr * and the following Disclaimer and Export Compliance provision. In addition, 4846283Sdfr * Licensee must cause all Covered Code to which Licensee contributes to 4946283Sdfr * contain a file documenting the changes Licensee made to create that Covered 5046283Sdfr * Code and the date of any change. Licensee must include in that file the 5198944Sobrien * documentation of any changes made by any predecessor Licensee. Licensee 5246283Sdfr * must include a prominent statement that the modification is derived, 5398944Sobrien * directly or indirectly, from Original Intel Code. 5446283Sdfr * 5598944Sobrien * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 5698944Sobrien * Redistribution of source code of any substantial portion of the Covered 5798944Sobrien * Code or modification without rights to further distribute source must 5898944Sobrien * include the following Disclaimer and Export Compliance provision in the 5998944Sobrien * documentation and/or other materials provided with distribution. In 6098944Sobrien * addition, Licensee may not authorize further sublicense of source of any 6198944Sobrien * portion of the Covered Code, and must include terms to the effect that the 6298944Sobrien * license from Licensee to its licensee is limited to the intellectual 6398944Sobrien * property embodied in the software Licensee provides to its licensee, and 6498944Sobrien * not to intellectual property embodied in modifications its licensee may 6546283Sdfr * make. 6646283Sdfr * 6746283Sdfr * 3.3. Redistribution of Executable. Redistribution in executable form of any 6846283Sdfr * substantial portion of the Covered Code or modification must reproduce the 6946283Sdfr * above Copyright Notice, and the following Disclaimer and Export Compliance 7046283Sdfr * provision in the documentation and/or other materials provided with the 7198944Sobrien * distribution. 7246283Sdfr * 73130803Smarcel * 3.4. Intel retains all right, title, and interest in and to the Original 74130803Smarcel * Intel Code. 75130803Smarcel * 76130803Smarcel * 3.5. Neither the name Intel nor any other trademark owned or controlled by 77130803Smarcel * Intel shall be used in advertising or otherwise to promote the sale, use or 78130803Smarcel * other dealings in products derived from or relating to the Covered Code 7946283Sdfr * without prior written authorization from Intel. 8098944Sobrien * 8146283Sdfr * 4. Disclaimer and Export Compliance 8246283Sdfr * 8346283Sdfr * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 8498944Sobrien * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 8546283Sdfr * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 8646283Sdfr * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 8746283Sdfr * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 8846283Sdfr * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 8946283Sdfr * PARTICULAR PURPOSE. 9046283Sdfr * 9146283Sdfr * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 9246283Sdfr * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 9346283Sdfr * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 94130803Smarcel * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 9546283Sdfr * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 9698944Sobrien * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 9798944Sobrien * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 9846283Sdfr * LIMITED REMEDY. 9946283Sdfr * 10046283Sdfr * 4.3. Licensee shall not export, either directly or indirectly, any of this 10198944Sobrien * software or system incorporating such software without first obtaining any 10246283Sdfr * required license or other approval from the U. S. Department of Commerce or 10346283Sdfr * any other agency or department of the United States Government. In the 10446283Sdfr * event Licensee exports any such software from the United States or 10546283Sdfr * re-exports any such software from a foreign destination, Licensee shall 10646283Sdfr * ensure that the distribution and export/re-export of the software is in 107130803Smarcel * compliance with all laws, regulations, orders, or other restrictions of the 108130803Smarcel * U.S. Export Administration Regulations. Licensee agrees that neither it nor 10946283Sdfr * any of its subsidiaries will export/re-export any technical data, process, 11046283Sdfr * software, or service, directly or indirectly, to any country for which the 11146283Sdfr * United States government or any agency thereof requires an export license, 11246283Sdfr * other governmental approval, or letter of assurance, without first obtaining 113130803Smarcel * such license, approval or letter. 114130803Smarcel * 115130803Smarcel *****************************************************************************/ 11646283Sdfr 11746283Sdfr#ifndef __ACHWARE_H__ 118130803Smarcel#define __ACHWARE_H__ 119130803Smarcel 120130803Smarcel 12146283Sdfr/* PM Timer ticks per second (HZ) */ 122130803Smarcel#define PM_TIMER_FREQUENCY 3579545 12346283Sdfr 12446283Sdfr 12546283Sdfr/* Prototypes */ 12646283Sdfr 12746283Sdfr 12898944SobrienACPI_STATUS 12946283SdfrAcpiHwInitialize ( 13046283Sdfr void); 13146283Sdfr 132130803SmarcelACPI_STATUS 13346283SdfrAcpiHwShutdown ( 13446283Sdfr void); 13598944Sobrien 13646283SdfrACPI_STATUS 13746283SdfrAcpiHwInitializeSystemInfo ( 13898944Sobrien void); 13946283Sdfr 14046283SdfrACPI_STATUS 14146283SdfrAcpiHwSetMode ( 142130803Smarcel UINT32 Mode); 14346283Sdfr 14446283SdfrUINT32 145130803SmarcelAcpiHwGetMode ( 14646283Sdfr void); 14798944Sobrien 14846283SdfrUINT32 149130803SmarcelAcpiHwGetModeCapabilities ( 15046283Sdfr void); 15146283Sdfr 15246283Sdfr/* Register I/O Prototypes */ 153130803Smarcel 154130803Smarcel 155130803SmarcelUINT32 156130803SmarcelAcpiHwRegisterBitAccess ( 157130803Smarcel NATIVE_UINT ReadWrite, 158130803Smarcel BOOLEAN UseLock, 159130803Smarcel UINT32 RegisterId, 160130803Smarcel ... /* DWORD Write Value */); 161130803Smarcel 162130803SmarcelUINT32 16346283SdfrAcpiHwRegisterRead ( 16446283Sdfr BOOLEAN UseLock, 16546283Sdfr UINT32 RegisterId); 16698944Sobrien 16746283Sdfrvoid 16846283SdfrAcpiHwRegisterWrite ( 169130803Smarcel BOOLEAN UseLock, 17046283Sdfr UINT32 RegisterId, 17146283Sdfr UINT32 Value); 17246283Sdfr 17346283SdfrUINT32 17446283SdfrAcpiHwLowLevelRead ( 17546283Sdfr UINT32 Width, 17646283Sdfr ACPI_GENERIC_ADDRESS *Reg, 17746283Sdfr UINT32 Offset); 17898944Sobrien 17998944Sobrienvoid 18046283SdfrAcpiHwLowLevelWrite ( 18146283Sdfr UINT32 Width, 18246283Sdfr UINT32 Value, 18346283Sdfr ACPI_GENERIC_ADDRESS *Reg, 18446283Sdfr UINT32 Offset); 18546283Sdfr 18646283Sdfrvoid 18746283SdfrAcpiHwClearAcpiStatus ( 18846283Sdfr void); 189130803Smarcel 19046283SdfrUINT32 19146283SdfrAcpiHwGetBitShift ( 19246283Sdfr UINT32 Mask); 19346283Sdfr 19446283Sdfr 19546283Sdfr/* GPE support */ 19646283Sdfr 19746283Sdfrvoid 19846283SdfrAcpiHwEnableGpe ( 19946283Sdfr UINT32 GpeNumber); 20046283Sdfr 20146283Sdfrvoid 20246283SdfrAcpiHwEnableGpeForWakeup ( 20398944Sobrien UINT32 GpeNumber); 20446283Sdfr 20546283Sdfrvoid 20698944SobrienAcpiHwDisableGpe ( 20746283Sdfr UINT32 GpeNumber); 20846283Sdfr 20946283Sdfrvoid 21046283SdfrAcpiHwDisableGpeForWakeup ( 21146283Sdfr UINT32 GpeNumber); 21246283Sdfr 21398944Sobrienvoid 21498944SobrienAcpiHwClearGpe ( 21598944Sobrien UINT32 GpeNumber); 21646283Sdfr 21746283Sdfrvoid 21846283SdfrAcpiHwGetGpeStatus ( 21998944Sobrien UINT32 GpeNumber, 22098944Sobrien ACPI_EVENT_STATUS *EventStatus); 22146283Sdfr 22246283Sdfrvoid 22346283SdfrAcpiHwDisableNonWakeupGpes ( 22498944Sobrien void); 22546283Sdfr 22646283Sdfrvoid 22746283SdfrAcpiHwEnableNonWakeupGpes ( 22846283Sdfr void); 22998944Sobrien 23046283Sdfr 23146283Sdfr/* Sleep Prototypes */ 23246283Sdfr 23346283SdfrACPI_STATUS 23446283SdfrAcpiHwObtainSleepTypeRegisterData ( 23546283Sdfr UINT8 SleepState, 23698944Sobrien UINT8 *Slp_TypA, 23798944Sobrien UINT8 *Slp_TypB); 23846283Sdfr 23998944Sobrien 24098944Sobrien/* ACPI Timer prototypes */ 24146283Sdfr 24246283SdfrACPI_STATUS 24346283SdfrAcpiGetTimerResolution ( 24446283Sdfr UINT32 *Resolution); 24546283Sdfr 24646283SdfrACPI_STATUS 24798944SobrienAcpiGetTimer ( 24846283Sdfr UINT32 *Ticks); 24946283Sdfr 25046283SdfrACPI_STATUS 25198944SobrienAcpiGetTimerDuration ( 25246283Sdfr UINT32 StartTicks, 25398944Sobrien UINT32 EndTicks, 25446283Sdfr UINT32 *TimeElapsed); 25546283Sdfr 25646283Sdfr 257130803Smarcel#endif /* __ACHWARE_H__ */ 25846283Sdfr