/******************************************************************************1*2* Name: achware.h -- hardware specific interfaces3*4*****************************************************************************/56/*7* Copyright (C) 2000 - 2011, Intel Corp.8* All rights reserved.9*10* Redistribution and use in source and binary forms, with or without11* modification, are permitted provided that the following conditions12* are met:13* 1. Redistributions of source code must retain the above copyright14* notice, this list of conditions, and the following disclaimer,15* without modification.16* 2. Redistributions in binary form must reproduce at minimum a disclaimer17* substantially similar to the "NO WARRANTY" disclaimer below18* ("Disclaimer") and any redistribution must be conditioned upon19* including a substantially similar Disclaimer requirement for further20* binary redistribution.21* 3. Neither the names of the above-listed copyright holders nor the names22* of any contributors may be used to endorse or promote products derived23* from this software without specific prior written permission.24*25* Alternatively, this software may be distributed under the terms of the26* GNU General Public License ("GPL") version 2 as published by the Free27* Software Foundation.28*29* NO WARRANTY30* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS31* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT32* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR33* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT34* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL35* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS36* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)37* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,38* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING39* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE40* POSSIBILITY OF SUCH DAMAGES.41*/4243#ifndef __ACHWARE_H__44#define __ACHWARE_H__4546/* Values for the _SST predefined method */4748#define ACPI_SST_INDICATOR_OFF 049#define ACPI_SST_WORKING 150#define ACPI_SST_WAKING 251#define ACPI_SST_SLEEPING 352#define ACPI_SST_SLEEP_CONTEXT 45354/*55* hwacpi - high level functions56*/57acpi_status acpi_hw_set_mode(u32 mode);5859u32 acpi_hw_get_mode(void);6061/*62* hwregs - ACPI Register I/O63*/64acpi_status65acpi_hw_validate_register(struct acpi_generic_address *reg,66u8 max_bit_width, u64 *address);6768acpi_status acpi_hw_read(u32 *value, struct acpi_generic_address *reg);6970acpi_status acpi_hw_write(u32 value, struct acpi_generic_address *reg);7172struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id);7374acpi_status acpi_hw_write_pm1_control(u32 pm1a_control, u32 pm1b_control);7576acpi_status acpi_hw_register_read(u32 register_id, u32 *return_value);7778acpi_status acpi_hw_register_write(u32 register_id, u32 value);7980acpi_status acpi_hw_clear_acpi_status(void);8182/*83* hwvalid - Port I/O with validation84*/85acpi_status acpi_hw_read_port(acpi_io_address address, u32 *value, u32 width);8687acpi_status acpi_hw_write_port(acpi_io_address address, u32 value, u32 width);8889/*90* hwgpe - GPE support91*/92u32 acpi_hw_get_gpe_register_bit(struct acpi_gpe_event_info *gpe_event_info,93struct acpi_gpe_register_info *gpe_register_info);9495acpi_status96acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u32 action);9798acpi_status99acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,100struct acpi_gpe_block_info *gpe_block, void *context);101102acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info *gpe_event_info);103104acpi_status105acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,106struct acpi_gpe_block_info *gpe_block, void *context);107108acpi_status109acpi_hw_get_gpe_status(struct acpi_gpe_event_info *gpe_event_info,110acpi_event_status * event_status);111112acpi_status acpi_hw_disable_all_gpes(void);113114acpi_status acpi_hw_enable_all_runtime_gpes(void);115116acpi_status acpi_hw_enable_all_wakeup_gpes(void);117118acpi_status119acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,120struct acpi_gpe_block_info *gpe_block,121void *context);122123/*124* hwpci - PCI configuration support125*/126acpi_status127acpi_hw_derive_pci_id(struct acpi_pci_id *pci_id,128acpi_handle root_pci_device, acpi_handle pci_region);129130#ifdef ACPI_FUTURE_USAGE131/*132* hwtimer - ACPI Timer prototypes133*/134acpi_status acpi_get_timer_resolution(u32 * resolution);135136acpi_status acpi_get_timer(u32 * ticks);137138acpi_status139acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed);140#endif /* ACPI_FUTURE_USAGE */141142#endif /* __ACHWARE_H__ */143144145