Print this page
update to acpica-unix2-20140114
update to acpica-unix2-20130927
acpica-unix2-20130823
PANKOVs restructure

*** 1,14 **** - /****************************************************************************** * * Name: hwtimer.c - ACPI Power Management Timer Interface * *****************************************************************************/ /* ! * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: --- 1,13 ---- /****************************************************************************** * * Name: hwtimer.c - ACPI Power Management Timer Interface * *****************************************************************************/ /* ! * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
*** 40,56 **** --- 39,58 ---- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. */ + #define EXPORT_ACPI_INTERFACES + #include "acpi.h" #include "accommon.h" #define _COMPONENT ACPI_HARDWARE ACPI_MODULE_NAME ("hwtimer") + #if (!ACPI_REDUCED_HARDWARE) /* Entire module */ /****************************************************************************** * * FUNCTION: AcpiGetTimerResolution * * PARAMETERS: Resolution - Where the resolution is returned
*** 113,124 **** if (!Ticks) { return_ACPI_STATUS (AE_BAD_PARAMETER); } ! Status = AcpiHwRead (Ticks, &AcpiGbl_FADT.XPmTimerBlock); return_ACPI_STATUS (Status); } ACPI_EXPORT_SYMBOL (AcpiGetTimer) --- 115,132 ---- if (!Ticks) { return_ACPI_STATUS (AE_BAD_PARAMETER); } ! /* ACPI 5.0A: PM Timer is optional */ + if (!AcpiGbl_FADT.XPmTimerBlock.Address) + { + return_ACPI_STATUS (AE_SUPPORT); + } + + Status = AcpiHwRead (Ticks, &AcpiGbl_FADT.XPmTimerBlock); return_ACPI_STATUS (Status); } ACPI_EXPORT_SYMBOL (AcpiGetTimer)
*** 169,178 **** --- 177,193 ---- if (!TimeElapsed) { return_ACPI_STATUS (AE_BAD_PARAMETER); } + /* ACPI 5.0A: PM Timer is optional */ + + if (!AcpiGbl_FADT.XPmTimerBlock.Address) + { + return_ACPI_STATUS (AE_SUPPORT); + } + /* * Compute Tick Delta: * Handle (max one) timer rollovers on 24-bit versus 32-bit timers. */ if (StartTicks < EndTicks)
*** 201,216 **** } /* * Compute Duration (Requires a 64-bit multiply and divide): * ! * TimeElapsed = (DeltaTicks * 1000000) / PM_TIMER_FREQUENCY; */ ! Status = AcpiUtShortDivide (((UINT64) DeltaTicks) * 1000000, ! PM_TIMER_FREQUENCY, &Quotient, NULL); *TimeElapsed = (UINT32) Quotient; return_ACPI_STATUS (Status); } ACPI_EXPORT_SYMBOL (AcpiGetTimerDuration) --- 216,233 ---- } /* * Compute Duration (Requires a 64-bit multiply and divide): * ! * TimeElapsed (microseconds) = ! * (DeltaTicks * ACPI_USEC_PER_SEC) / ACPI_PM_TIMER_FREQUENCY; */ ! Status = AcpiUtShortDivide (((UINT64) DeltaTicks) * ACPI_USEC_PER_SEC, ! ACPI_PM_TIMER_FREQUENCY, &Quotient, NULL); *TimeElapsed = (UINT32) Quotient; return_ACPI_STATUS (Status); } ACPI_EXPORT_SYMBOL (AcpiGetTimerDuration) + #endif /* !ACPI_REDUCED_HARDWARE */