diff options
| author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-07-27 22:15:10 +0000 |
|---|---|---|
| committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-07-27 22:15:10 +0000 |
| commit | b5875be0451b92bdd99663c8305ae46bd6a7d90c (patch) | |
| tree | 68a6a5f79ac618c79ba3777c21faaea9aec2f0b4 /libdde-linux26/contrib/include/linux/acpi_pmtmr.h | |
| parent | ce6a36c7f7c88e7ca0fda816f9282237bb86829d (diff) | |
| parent | 7996a3d79d55b7f879dfd62e202bbfe2963718d3 (diff) | |
Merge branch 'upstream-merged'
Diffstat (limited to 'libdde-linux26/contrib/include/linux/acpi_pmtmr.h')
| -rw-r--r-- | libdde-linux26/contrib/include/linux/acpi_pmtmr.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/libdde-linux26/contrib/include/linux/acpi_pmtmr.h b/libdde-linux26/contrib/include/linux/acpi_pmtmr.h new file mode 100644 index 00000000..7e3d2859 --- /dev/null +++ b/libdde-linux26/contrib/include/linux/acpi_pmtmr.h @@ -0,0 +1,40 @@ +#ifndef _ACPI_PMTMR_H_ +#define _ACPI_PMTMR_H_ + +#include <linux/clocksource.h> + +/* Number of PMTMR ticks expected during calibration run */ +#define PMTMR_TICKS_PER_SEC 3579545 + +/* limit it to 24 bits */ +#define ACPI_PM_MASK CLOCKSOURCE_MASK(24) + +/* Overrun value */ +#define ACPI_PM_OVRRUN (1<<24) + +#ifdef CONFIG_X86_PM_TIMER + +extern u32 acpi_pm_read_verified(void); +extern u32 pmtmr_ioport; + +static inline u32 acpi_pm_read_early(void) +{ + if (!pmtmr_ioport) + return 0; + /* mask the output to 24 bits */ + return acpi_pm_read_verified() & ACPI_PM_MASK; +} + +extern void pmtimer_wait(unsigned); + +#else + +static inline u32 acpi_pm_read_early(void) +{ + return 0; +} + +#endif + +#endif + |
