diff options
Diffstat (limited to 'drivers/char/hpet.c')
-rw-r--r-- | drivers/char/hpet.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 0159c463f0f9..e605259e3753 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c | |||
@@ -49,6 +49,8 @@ | |||
49 | #define HPET_USER_FREQ (64) | 49 | #define HPET_USER_FREQ (64) |
50 | #define HPET_DRIFT (500) | 50 | #define HPET_DRIFT (500) |
51 | 51 | ||
52 | #define HPET_RANGE_SIZE 1024 /* from HPET spec */ | ||
53 | |||
52 | static u32 hpet_nhpet, hpet_max_freq = HPET_USER_FREQ; | 54 | static u32 hpet_nhpet, hpet_max_freq = HPET_USER_FREQ; |
53 | 55 | ||
54 | /* A lock for concurrent access by app and isr hpet activity. */ | 56 | /* A lock for concurrent access by app and isr hpet activity. */ |
@@ -922,6 +924,21 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data) | |||
922 | for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next) | 924 | for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next) |
923 | if (hpetp->hp_hpet == hdp->hd_address) | 925 | if (hpetp->hp_hpet == hdp->hd_address) |
924 | return -EBUSY; | 926 | return -EBUSY; |
927 | } else if (res->id == ACPI_RSTYPE_FIXED_MEM32) { | ||
928 | struct acpi_resource_fixed_mem32 *fixmem32; | ||
929 | |||
930 | fixmem32 = &res->data.fixed_memory32; | ||
931 | if (!fixmem32) | ||
932 | return -EINVAL; | ||
933 | |||
934 | hdp->hd_phys_address = fixmem32->range_base_address; | ||
935 | hdp->hd_address = ioremap(fixmem32->range_base_address, | ||
936 | HPET_RANGE_SIZE); | ||
937 | |||
938 | for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next) | ||
939 | if (hpetp->hp_hpet == hdp->hd_address) { | ||
940 | return -EBUSY; | ||
941 | } | ||
925 | } else if (res->id == ACPI_RSTYPE_EXT_IRQ) { | 942 | } else if (res->id == ACPI_RSTYPE_EXT_IRQ) { |
926 | struct acpi_resource_ext_irq *irqp; | 943 | struct acpi_resource_ext_irq *irqp; |
927 | int i; | 944 | int i; |