Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/acpica/acpi_resource.c
Show First 20 Lines • Show All 625 Lines • ▼ Show 20 Lines | return; | ||||
device_printf(dev, "memory range not supported\n"); | device_printf(dev, "memory range not supported\n"); | ||||
} | } | ||||
static void | static void | ||||
acpi_res_set_irq(device_t dev, void *context, uint8_t *irq, int count, | acpi_res_set_irq(device_t dev, void *context, uint8_t *irq, int count, | ||||
int trig, int pol) | int trig, int pol) | ||||
{ | { | ||||
struct acpi_res_context *cp = (struct acpi_res_context *)context; | struct acpi_res_context *cp = (struct acpi_res_context *)context; | ||||
rman_res_t intr; | int i; | ||||
if (cp == NULL || irq == NULL) | if (cp == NULL || irq == NULL) | ||||
return; | return; | ||||
/* This implements no resource relocation. */ | for (i = 0; i < count; i++) | ||||
if (count != 1) | bus_set_resource(dev, SYS_RES_IRQ, cp->ar_nirq++, irq[i], 1); | ||||
return; | |||||
intr = *irq; | |||||
bus_set_resource(dev, SYS_RES_IRQ, cp->ar_nirq++, intr, 1); | |||||
} | } | ||||
static void | static void | ||||
acpi_res_set_ext_irq(device_t dev, void *context, uint32_t *irq, int count, | acpi_res_set_ext_irq(device_t dev, void *context, uint32_t *irq, int count, | ||||
int trig, int pol) | int trig, int pol) | ||||
{ | { | ||||
struct acpi_res_context *cp = (struct acpi_res_context *)context; | struct acpi_res_context *cp = (struct acpi_res_context *)context; | ||||
rman_res_t intr; | int i; | ||||
if (cp == NULL || irq == NULL) | if (cp == NULL || irq == NULL) | ||||
return; | return; | ||||
/* This implements no resource relocation. */ | for (i = 0; i < count; i++) | ||||
if (count != 1) | bus_set_resource(dev, SYS_RES_IRQ, cp->ar_nirq++, irq[i], 1); | ||||
return; | |||||
intr = *irq; | |||||
bus_set_resource(dev, SYS_RES_IRQ, cp->ar_nirq++, intr, 1); | |||||
} | } | ||||
static void | static void | ||||
acpi_res_set_drq(device_t dev, void *context, uint8_t *drq, int count) | acpi_res_set_drq(device_t dev, void *context, uint8_t *drq, int count) | ||||
{ | { | ||||
struct acpi_res_context *cp = (struct acpi_res_context *)context; | struct acpi_res_context *cp = (struct acpi_res_context *)context; | ||||
jhb: This is for ISA DMA channels, and I think you can leave it be as only doing 1. | |||||
if (cp == NULL || drq == NULL) | if (cp == NULL || drq == NULL) | ||||
return; | return; | ||||
/* This implements no resource relocation. */ | /* This implements no resource relocation. */ | ||||
if (count != 1) | if (count != 1) | ||||
return; | return; | ||||
bus_set_resource(dev, SYS_RES_DRQ, cp->ar_ndrq++, *drq, 1); | bus_set_resource(dev, SYS_RES_DRQ, cp->ar_ndrq++, *drq, 1); | ||||
▲ Show 20 Lines • Show All 137 Lines • Show Last 20 Lines |
This is for ISA DMA channels, and I think you can leave it be as only doing 1.