summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/acpica/acpi_timer.c')
-rw-r--r--sys/dev/acpica/acpi_timer.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/acpica/acpi_timer.c b/sys/dev/acpica/acpi_timer.c
index b511a6f..2cc966c 100644
--- a/sys/dev/acpica/acpi_timer.c
+++ b/sys/dev/acpica/acpi_timer.c
@@ -119,7 +119,7 @@ acpi_timer_identify(driver_t *driver, device_t parent)
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
if (acpi_disabled("timer") || (acpi_quirks & ACPI_Q_TIMER) ||
- AcpiGbl_FADT == NULL || acpi_timer_dev)
+ acpi_timer_dev)
return_VOID;
if ((dev = BUS_ADD_CHILD(parent, 0, "acpi_timer", 0)) == NULL) {
@@ -129,10 +129,10 @@ acpi_timer_identify(driver_t *driver, device_t parent)
acpi_timer_dev = dev;
rid = 0;
- rtype = AcpiGbl_FADT->XPmTmrBlk.AddressSpaceId ?
+ rtype = AcpiGbl_FADT.XPmTimerBlock.SpaceId ?
SYS_RES_IOPORT : SYS_RES_MEMORY;
- rlen = AcpiGbl_FADT->PmTmLen;
- rstart = AcpiGbl_FADT->XPmTmrBlk.Address;
+ rlen = AcpiGbl_FADT.PmTimerLength;
+ rstart = AcpiGbl_FADT.XPmTimerBlock.Address;
if (bus_set_resource(dev, rtype, rid, rstart, rlen))
device_printf(dev, "couldn't set resource (%s 0x%lx+0x%lx)\n",
(rtype == SYS_RES_IOPORT) ? "port" : "mem", rstart, rlen);
@@ -151,18 +151,18 @@ acpi_timer_probe(device_t dev)
return (ENXIO);
rid = 0;
- rtype = AcpiGbl_FADT->XPmTmrBlk.AddressSpaceId ?
+ rtype = AcpiGbl_FADT.XPmTimerBlock.SpaceId ?
SYS_RES_IOPORT : SYS_RES_MEMORY;
acpi_timer_reg = bus_alloc_resource_any(dev, rtype, &rid, RF_ACTIVE);
if (acpi_timer_reg == NULL) {
device_printf(dev, "couldn't allocate resource (%s 0x%lx)\n",
(rtype == SYS_RES_IOPORT) ? "port" : "mem",
- (u_long)AcpiGbl_FADT->XPmTmrBlk.Address);
+ (u_long)AcpiGbl_FADT.XPmTimerBlock.Address);
return (ENXIO);
}
acpi_timer_bsh = rman_get_bushandle(acpi_timer_reg);
acpi_timer_bst = rman_get_bustag(acpi_timer_reg);
- if (AcpiGbl_FADT->TmrValExt != 0)
+ if (AcpiGbl_FADT.Flags & ACPI_FADT_32BIT_TIMER)
acpi_timer_timecounter.tc_counter_mask = 0xffffffff;
else
acpi_timer_timecounter.tc_counter_mask = 0x00ffffff;
@@ -192,7 +192,7 @@ acpi_timer_probe(device_t dev)
tc_init(&acpi_timer_timecounter);
sprintf(desc, "%d-bit timer at 3.579545MHz",
- AcpiGbl_FADT->TmrValExt ? 32 : 24);
+ (AcpiGbl_FADT.Flags & ACPI_FADT_32BIT_TIMER) ? 32 : 24);
device_set_desc_copy(dev, desc);
/* Release the resource, we'll allocate it again during attach. */
@@ -208,7 +208,7 @@ acpi_timer_attach(device_t dev)
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
rid = 0;
- rtype = AcpiGbl_FADT->XPmTmrBlk.AddressSpaceId ?
+ rtype = AcpiGbl_FADT.XPmTimerBlock.SpaceId ?
SYS_RES_IOPORT : SYS_RES_MEMORY;
acpi_timer_reg = bus_alloc_resource_any(dev, rtype, &rid, RF_ACTIVE);
if (acpi_timer_reg == NULL)
OpenPOWER on IntegriCloud