Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/acpica/acpi_timer.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Locate the ACPI timer using the FADT, set up and allocate the I/O resources | * Locate the ACPI timer using the FADT, set up and allocate the I/O resources | ||||
* we will be using. | * we will be using. | ||||
*/ | */ | ||||
static void | static void | ||||
acpi_timer_identify(driver_t *driver, device_t parent) | acpi_timer_identify(driver_t *driver, device_t parent) | ||||
{ | { | ||||
device_t dev; | device_t dev; | ||||
u_long rlen, rstart; | rman_res_t rlen, rstart; | ||||
int rid, rtype; | int rid, rtype; | ||||
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); | ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); | ||||
if (acpi_disabled("timer") || (acpi_quirks & ACPI_Q_TIMER) || | if (acpi_disabled("timer") || (acpi_quirks & ACPI_Q_TIMER) || | ||||
acpi_timer_dev || acpi_timer_disabled || | acpi_timer_dev || acpi_timer_disabled || | ||||
AcpiGbl_FADT.PmTimerLength == 0) | AcpiGbl_FADT.PmTimerLength == 0) | ||||
return_VOID; | return_VOID; | ||||
Show All 13 Lines | |||||
break; | break; | ||||
default: | default: | ||||
return_VOID; | return_VOID; | ||||
} | } | ||||
rid = 0; | rid = 0; | ||||
rlen = AcpiGbl_FADT.PmTimerLength; | rlen = AcpiGbl_FADT.PmTimerLength; | ||||
rstart = AcpiGbl_FADT.XPmTimerBlock.Address; | rstart = AcpiGbl_FADT.XPmTimerBlock.Address; | ||||
if (bus_set_resource(dev, rtype, rid, rstart, rlen)) | if (bus_set_resource(dev, rtype, rid, rstart, rlen)) | ||||
device_printf(dev, "couldn't set resource (%s 0x%lx+0x%lx)\n", | device_printf(dev, "couldn't set resource (%s 0x%jx+0x%jx)\n", | ||||
(rtype == SYS_RES_IOPORT) ? "port" : "mem", rstart, rlen); | (rtype == SYS_RES_IOPORT) ? "port" : "mem", rstart, rlen); | ||||
return_VOID; | return_VOID; | ||||
} | } | ||||
static int | static int | ||||
acpi_timer_probe(device_t dev) | acpi_timer_probe(device_t dev) | ||||
{ | { | ||||
char desc[40]; | char desc[40]; | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |