rtlwifi: Fix kernel oops on ARM SOC
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / linux / acpi_pmtmr.h
blob1d0ef1ae80362d50f1b620b54c01313d6c46b936
1 #ifndef _ACPI_PMTMR_H_
2 #define _ACPI_PMTMR_H_
4 #include <linux/clocksource.h>
6 /* Number of PMTMR ticks expected during calibration run */
7 #define PMTMR_TICKS_PER_SEC 3579545
9 /* limit it to 24 bits */
10 #define ACPI_PM_MASK CLOCKSOURCE_MASK(24)
12 /* Overrun value */
13 #define ACPI_PM_OVRRUN (1<<24)
15 #ifdef CONFIG_X86_PM_TIMER
17 extern u32 acpi_pm_read_verified(void);
18 extern u32 pmtmr_ioport;
20 static inline u32 acpi_pm_read_early(void)
22 if (!pmtmr_ioport)
23 return 0;
24 /* mask the output to 24 bits */
25 return acpi_pm_read_verified() & ACPI_PM_MASK;
28 #else
30 static inline u32 acpi_pm_read_early(void)
32 return 0;
35 #endif
37 #endif