aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/hpet.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2005-09-30 19:03:00 -0400
committerLen Brown <len.brown@intel.com>2005-12-10 00:20:25 -0500
commit50eca3eb89d73d9f0aa070b126c7ee6a616016ab (patch)
treeb2d06d21b34b9bd17eea4c53cff1f3866fa1b21d /drivers/char/hpet.c
parent3d5271f9883cba7b54762bc4fe027d4172f06db7 (diff)
[ACPI] ACPICA 20050930
Completed a major overhaul of the Resource Manager code - specifically, optimizations in the area of the AML/internal resource conversion code. The code has been optimized to simplify and eliminate duplicated code, CPU stack use has been decreased by optimizing function parameters and local variables, and naming conventions across the manager have been standardized for clarity and ease of maintenance (this includes function, parameter, variable, and struct/typedef names.) All Resource Manager dispatch and information tables have been moved to a single location for clarity and ease of maintenance. One new file was created, named "rsinfo.c". The ACPI return macros (return_ACPI_STATUS, etc.) have been modified to guarantee that the argument is not evaluated twice, making them less prone to macro side-effects. However, since there exists the possibility of additional stack use if a particular compiler cannot optimize them (such as in the debug generation case), the original macros are optionally available. Note that some invocations of the return_VALUE macro may now cause size mismatch warnings; the return_UINT8 and return_UINT32 macros are provided to eliminate these. (From Randy Dunlap) Implemented a new mechanism to enable debug tracing for individual control methods. A new external interface, acpi_debug_trace(), is provided to enable this mechanism. The intent is to allow the host OS to easily enable and disable tracing for problematic control methods. This interface can be easily exposed to a user or debugger interface if desired. See the file psxface.c for details. acpi_ut_callocate() will now return a valid pointer if a length of zero is specified - a length of one is used and a warning is issued. This matches the behavior of acpi_ut_allocate(). Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/char/hpet.c')
-rw-r--r--drivers/char/hpet.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 5172d4e1236..66a2fee06eb 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -927,9 +927,9 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
if (ACPI_SUCCESS(status)) {
unsigned long size;
- size = addr.max_address_range - addr.min_address_range + 1;
- hdp->hd_phys_address = addr.min_address_range;
- hdp->hd_address = ioremap(addr.min_address_range, size);
+ size = addr.maximum - addr.minimum + 1;
+ hdp->hd_phys_address = addr.minimum;
+ hdp->hd_address = ioremap(addr.minimum, size);
if (hpet_is_known(hdp)) {
printk(KERN_DEBUG "%s: 0x%lx is busy\n",
@@ -937,15 +937,15 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
iounmap(hdp->hd_address);
return -EBUSY;
}
- } else if (res->type == ACPI_RSTYPE_FIXED_MEM32) {
- struct acpi_resource_fixed_mem32 *fixmem32;
+ } else if (res->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) {
+ struct acpi_resource_fixed_memory32 *fixmem32;
fixmem32 = &res->data.fixed_memory32;
if (!fixmem32)
return -EINVAL;
- hdp->hd_phys_address = fixmem32->range_base_address;
- hdp->hd_address = ioremap(fixmem32->range_base_address,
+ hdp->hd_phys_address = fixmem32->address;
+ hdp->hd_address = ioremap(fixmem32->address,
HPET_RANGE_SIZE);
if (hpet_is_known(hdp)) {
@@ -954,20 +954,20 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
iounmap(hdp->hd_address);
return -EBUSY;
}
- } else if (res->type == ACPI_RSTYPE_EXT_IRQ) {
- struct acpi_resource_ext_irq *irqp;
+ } else if (res->type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ) {
+ struct acpi_resource_extended_irq *irqp;
int i;
irqp = &res->data.extended_irq;
- if (irqp->number_of_interrupts > 0) {
- hdp->hd_nirqs = irqp->number_of_interrupts;
+ if (irqp->interrupt_count > 0) {
+ hdp->hd_nirqs = irqp->interrupt_count;
for (i = 0; i < hdp->hd_nirqs; i++) {
int rc =
acpi_register_gsi(irqp->interrupts[i],
- irqp->edge_level,
- irqp->active_high_low);
+ irqp->triggering,
+ irqp->polarity);
if (rc < 0)
return AE_ERROR;
hdp->hd_irq[i] = rc;