diff options
Diffstat (limited to 'source/components/hardware')
-rw-r--r-- | source/components/hardware/hwacpi.c | 12 | ||||
-rw-r--r-- | source/components/hardware/hwsleep.c | 2 | ||||
-rw-r--r-- | source/components/hardware/hwtimer.c | 7 | ||||
-rw-r--r-- | source/components/hardware/hwxface.c | 2 | ||||
-rw-r--r-- | source/components/hardware/hwxfsleep.c | 2 |
5 files changed, 13 insertions, 12 deletions
diff --git a/source/components/hardware/hwacpi.c b/source/components/hardware/hwacpi.c index 9f9fec3..72e287a 100644 --- a/source/components/hardware/hwacpi.c +++ b/source/components/hardware/hwacpi.c @@ -141,13 +141,13 @@ AcpiHwSetMode ( Retry = 3000; while (Retry) { - if (AcpiHwGetMode() == Mode) + if (AcpiHwGetMode () == Mode) { ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Mode %X successfully enabled\n", Mode)); return_ACPI_STATUS (AE_OK); } - AcpiOsStall(1000); + AcpiOsStall (ACPI_USEC_PER_MSEC); Retry--; } @@ -186,22 +186,22 @@ AcpiHwGetMode ( */ if (!AcpiGbl_FADT.SmiCommand) { - return_UINT32 (ACPI_SYS_MODE_ACPI); + return_VALUE (ACPI_SYS_MODE_ACPI); } Status = AcpiReadBitRegister (ACPI_BITREG_SCI_ENABLE, &Value); if (ACPI_FAILURE (Status)) { - return_UINT32 (ACPI_SYS_MODE_LEGACY); + return_VALUE (ACPI_SYS_MODE_LEGACY); } if (Value) { - return_UINT32 (ACPI_SYS_MODE_ACPI); + return_VALUE (ACPI_SYS_MODE_ACPI); } else { - return_UINT32 (ACPI_SYS_MODE_LEGACY); + return_VALUE (ACPI_SYS_MODE_LEGACY); } } diff --git a/source/components/hardware/hwsleep.c b/source/components/hardware/hwsleep.c index d381755..4d47ef8 100644 --- a/source/components/hardware/hwsleep.c +++ b/source/components/hardware/hwsleep.c @@ -179,7 +179,7 @@ AcpiHwLegacySleep ( * to still read the right value. Ideally, this block would go * away entirely. */ - AcpiOsStall (10000000); + AcpiOsStall (10 * ACPI_USEC_PER_SEC); Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1_CONTROL, SleepEnableRegInfo->AccessBitMask); diff --git a/source/components/hardware/hwtimer.c b/source/components/hardware/hwtimer.c index 44de309..79caa70 100644 --- a/source/components/hardware/hwtimer.c +++ b/source/components/hardware/hwtimer.c @@ -203,10 +203,11 @@ AcpiGetTimerDuration ( /* * Compute Duration (Requires a 64-bit multiply and divide): * - * TimeElapsed = (DeltaTicks * 1000000) / PM_TIMER_FREQUENCY; + * TimeElapsed (microseconds) = + * (DeltaTicks * ACPI_USEC_PER_SEC) / ACPI_PM_TIMER_FREQUENCY; */ - Status = AcpiUtShortDivide (((UINT64) DeltaTicks) * 1000000, - PM_TIMER_FREQUENCY, &Quotient, NULL); + Status = AcpiUtShortDivide (((UINT64) DeltaTicks) * ACPI_USEC_PER_SEC, + ACPI_PM_TIMER_FREQUENCY, &Quotient, NULL); *TimeElapsed = (UINT32) Quotient; return_ACPI_STATUS (Status); diff --git a/source/components/hardware/hwxface.c b/source/components/hardware/hwxface.c index e4f8c80..1a1322b 100644 --- a/source/components/hardware/hwxface.c +++ b/source/components/hardware/hwxface.c @@ -377,7 +377,7 @@ ACPI_EXPORT_SYMBOL (AcpiReadBitRegister) * * PARAMETERS: RegisterId - ID of ACPI Bit Register to access * Value - Value to write to the register, in bit - * position zero. The bit is automaticallly + * position zero. The bit is automatically * shifted to the correct position. * * RETURN: Status diff --git a/source/components/hardware/hwxfsleep.c b/source/components/hardware/hwxfsleep.c index c753084..affa8d3 100644 --- a/source/components/hardware/hwxfsleep.c +++ b/source/components/hardware/hwxfsleep.c @@ -227,7 +227,7 @@ AcpiEnterSleepStateS4bios ( (UINT32) AcpiGbl_FADT.S4BiosRequest, 8); do { - AcpiOsStall(1000); + AcpiOsStall (ACPI_USEC_PER_MSEC); Status = AcpiReadBitRegister (ACPI_BITREG_WAKE_STATUS, &InValue); if (ACPI_FAILURE (Status)) { |