summaryrefslogtreecommitdiff
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authorNate Lawson <njl@FreeBSD.org>2004-03-17 17:50:55 +0000
committerNate Lawson <njl@FreeBSD.org>2004-03-17 17:50:55 +0000
commit5f96beb9e08be2b08309a6b98967246b64272ade (patch)
treea1c3f00139d832c8e80338cfc56c8b1aaffd88ab /sys/dev/acpica
parent902aa2e784bda6cef99fb99db6acd4f435a3ff09 (diff)
Notes
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/Osd/OsdInterrupt.c4
-rw-r--r--sys/dev/acpica/acpi.c2
-rw-r--r--sys/dev/acpica/acpi_ec.c8
-rw-r--r--sys/dev/acpica/acpi_resource.c7
-rw-r--r--sys/dev/acpica/acpi_timer.c2
5 files changed, 11 insertions, 12 deletions
diff --git a/sys/dev/acpica/Osd/OsdInterrupt.c b/sys/dev/acpica/Osd/OsdInterrupt.c
index e95ee80e64709..42974cca0652b 100644
--- a/sys/dev/acpica/Osd/OsdInterrupt.c
+++ b/sys/dev/acpica/Osd/OsdInterrupt.c
@@ -90,8 +90,8 @@ AcpiOsInstallInterruptHandler(UINT32 InterruptNumber, OSD_HANDLER ServiceRoutine
InterruptNumber = InterruptOverride;
}
bus_set_resource(sc->acpi_dev, SYS_RES_IRQ, 0, InterruptNumber, 1);
- if ((sc->acpi_irq = bus_alloc_resource(sc->acpi_dev, SYS_RES_IRQ, &sc->acpi_irq_rid, 0, ~0, 1,
- RF_SHAREABLE | RF_ACTIVE)) == NULL) {
+ if ((sc->acpi_irq = bus_alloc_resource_any(sc->acpi_dev, SYS_RES_IRQ,
+ &sc->acpi_irq_rid, RF_SHAREABLE | RF_ACTIVE)) == NULL) {
device_printf(sc->acpi_dev, "could not allocate SCI interrupt\n");
return_ACPI_STATUS(AE_ALREADY_EXISTS);
}
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 4b7a34e14d740..187999a471be3 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -882,7 +882,7 @@ acpi_bus_alloc_gas(device_t dev, int *rid, ACPI_GENERIC_ADDRESS *gas)
}
bus_set_resource(dev, type, *rid, gas->Address, gas->RegisterBitWidth / 8);
- return (bus_alloc_resource(dev, type, rid, 0, ~0, 1, RF_ACTIVE));
+ return (bus_alloc_resource_any(dev, type, rid, RF_ACTIVE));
}
/*
diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c
index 5eca9a8b6df2a..4b2ac8abdded1 100644
--- a/sys/dev/acpica/acpi_ec.c
+++ b/sys/dev/acpica/acpi_ec.c
@@ -530,8 +530,8 @@ acpi_ec_attach(device_t dev)
/* Attach bus resources for data and command/status ports. */
sc->ec_data_rid = 0;
- sc->ec_data_res = bus_alloc_resource(sc->ec_dev, SYS_RES_IOPORT,
- &sc->ec_data_rid, 0, ~0, 1, RF_ACTIVE);
+ sc->ec_data_res = bus_alloc_resource_any(sc->ec_dev, SYS_RES_IOPORT,
+ &sc->ec_data_rid, RF_ACTIVE);
if (sc->ec_data_res == NULL) {
device_printf(dev, "can't allocate data port\n");
errval = ENXIO;
@@ -541,8 +541,8 @@ acpi_ec_attach(device_t dev)
sc->ec_data_handle = rman_get_bushandle(sc->ec_data_res);
sc->ec_csr_rid = 1;
- sc->ec_csr_res = bus_alloc_resource(sc->ec_dev, SYS_RES_IOPORT,
- &sc->ec_csr_rid, 0, ~0, 1, RF_ACTIVE);
+ sc->ec_csr_res = bus_alloc_resource_any(sc->ec_dev, SYS_RES_IOPORT,
+ &sc->ec_csr_rid, RF_ACTIVE);
if (sc->ec_csr_res == NULL) {
device_printf(dev, "can't allocate command/status port\n");
errval = ENXIO;
diff --git a/sys/dev/acpica/acpi_resource.c b/sys/dev/acpica/acpi_resource.c
index 23ac064fbe449..e471f82fb9127 100644
--- a/sys/dev/acpica/acpi_resource.c
+++ b/sys/dev/acpica/acpi_resource.c
@@ -593,12 +593,11 @@ acpi_sysresource_attach(device_t dev)
*/
for (i = 0; i < 100; i++) {
rid = i;
- res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, 1, 0);
+ res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, 0);
rid = i;
- res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, 0, ~0, 1, 0);
+ res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, 0);
rid = i;
- res = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1,
- RF_SHAREABLE);
+ res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE);
}
return (0);
diff --git a/sys/dev/acpica/acpi_timer.c b/sys/dev/acpica/acpi_timer.c
index d9867c69f229b..41e16b6384a87 100644
--- a/sys/dev/acpica/acpi_timer.c
+++ b/sys/dev/acpica/acpi_timer.c
@@ -176,7 +176,7 @@ acpi_timer_identify(driver_t *driver, device_t parent)
? SYS_RES_IOPORT : SYS_RES_MEMORY;
rstart = AcpiGbl_FADT->XPmTmrBlk.Address;
bus_set_resource(dev, rtype, rid, rstart, rlen);
- acpi_timer_reg = bus_alloc_resource(dev, rtype, &rid, 0, ~0, 1, RF_ACTIVE);
+ acpi_timer_reg = bus_alloc_resource_any(dev, rtype, &rid, RF_ACTIVE);
if (acpi_timer_reg == NULL) {
device_printf(dev, "couldn't allocate I/O resource (%s 0x%lx)\n",
rtype == SYS_RES_IOPORT ? "port" : "mem", rstart);