aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2012-12-30 19:05:46 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-10 06:36:20 -0500
commitc41679a4481d5bf9908d99644d47b2e8ff6f028f (patch)
tree89a95a2f59b1406722644bf47976a071f9835e71 /drivers/acpi/acpica
parentc8d586f8ed0146d81186131df66cdbb19c41acda (diff)
ACPICA: Add time macros for various timer/time manipulation.
Constants for time manipulation, including constants for the 100 nanosecond timers. Chao Guan, Bob Moore, Lv Zheng. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica')
-rw-r--r--drivers/acpi/acpica/hwsleep.c2
-rw-r--r--drivers/acpi/acpica/hwtimer.c7
-rw-r--r--drivers/acpi/acpica/hwxfsleep.c2
3 files changed, 6 insertions, 5 deletions
diff --git a/drivers/acpi/acpica/hwsleep.c b/drivers/acpi/acpica/hwsleep.c
index 691a5fb10d4d..675a8f865063 100644
--- a/drivers/acpi/acpica/hwsleep.c
+++ b/drivers/acpi/acpica/hwsleep.c
@@ -177,7 +177,7 @@ acpi_status acpi_hw_legacy_sleep(u8 sleep_state)
177 * to still read the right value. Ideally, this block would go 177 * to still read the right value. Ideally, this block would go
178 * away entirely. 178 * away entirely.
179 */ 179 */
180 acpi_os_stall(10000000); 180 acpi_os_stall(10 * ACPI_USEC_PER_SEC);
181 181
182 status = acpi_hw_register_write(ACPI_REGISTER_PM1_CONTROL, 182 status = acpi_hw_register_write(ACPI_REGISTER_PM1_CONTROL,
183 sleep_enable_reg_info-> 183 sleep_enable_reg_info->
diff --git a/drivers/acpi/acpica/hwtimer.c b/drivers/acpi/acpica/hwtimer.c
index bfdce22f3798..4e741d85e6b4 100644
--- a/drivers/acpi/acpica/hwtimer.c
+++ b/drivers/acpi/acpica/hwtimer.c
@@ -176,10 +176,11 @@ acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed)
176 /* 176 /*
177 * Compute Duration (Requires a 64-bit multiply and divide): 177 * Compute Duration (Requires a 64-bit multiply and divide):
178 * 178 *
179 * time_elapsed = (delta_ticks * 1000000) / PM_TIMER_FREQUENCY; 179 * time_elapsed (microseconds) =
180 * (delta_ticks * ACPI_USEC_PER_SEC) / ACPI_PM_TIMER_FREQUENCY;
180 */ 181 */
181 status = acpi_ut_short_divide(((u64) delta_ticks) * 1000000, 182 status = acpi_ut_short_divide(((u64)delta_ticks) * ACPI_USEC_PER_SEC,
182 PM_TIMER_FREQUENCY, &quotient, NULL); 183 ACPI_PM_TIMER_FREQUENCY, &quotient, NULL);
183 184
184 *time_elapsed = (u32) quotient; 185 *time_elapsed = (u32) quotient;
185 return_ACPI_STATUS(status); 186 return_ACPI_STATUS(status);
diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c
index 6fcee00cb34b..ca4df0f1a621 100644
--- a/drivers/acpi/acpica/hwxfsleep.c
+++ b/drivers/acpi/acpica/hwxfsleep.c
@@ -207,7 +207,7 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)
207 (u32)acpi_gbl_FADT.s4_bios_request, 8); 207 (u32)acpi_gbl_FADT.s4_bios_request, 8);
208 208
209 do { 209 do {
210 acpi_os_stall(1000); 210 acpi_os_stall(ACPI_USEC_PER_MSEC);
211 status = 211 status =
212 acpi_read_bit_register(ACPI_BITREG_WAKE_STATUS, &in_value); 212 acpi_read_bit_register(ACPI_BITREG_WAKE_STATUS, &in_value);
213 if (ACPI_FAILURE(status)) { 213 if (ACPI_FAILURE(status)) {