Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/acpica/acpi.c
Show First 20 Lines • Show All 803 Lines • ▼ Show 20 Lines | retval += printf(" flags %#x", device_get_flags(child)); | ||||
return (retval); | return (retval); | ||||
} | } | ||||
/* | /* | ||||
* If this device is an ACPI child but no one claimed it, attempt | * If this device is an ACPI child but no one claimed it, attempt | ||||
* to power it off. We'll power it back up when a driver is added. | * to power it off. We'll power it back up when a driver is added. | ||||
* | * | ||||
* XXX Disabled for now since many necessary devices (like fdc and | * XXX Disabled for now since many necessary devices (like | ||||
* ATA) don't claim the devices we created for them but still expect | * ATA) don't claim the devices we created for them but still expect | ||||
* them to be powered up. | * them to be powered up. | ||||
*/ | */ | ||||
static void | static void | ||||
acpi_probe_nomatch(device_t bus, device_t child) | acpi_probe_nomatch(device_t bus, device_t child) | ||||
{ | { | ||||
#ifdef ACPI_ENABLE_POWERDOWN_NODRIVER | #ifdef ACPI_ENABLE_POWERDOWN_NODRIVER | ||||
acpi_set_powerstate(child, ACPI_STATE_D3); | acpi_set_powerstate(child, ACPI_STATE_D3); | ||||
▲ Show 20 Lines • Show All 218 Lines • ▼ Show 20 Lines | if (resource_long_value(name, unit, "port", &value) == 0) { | ||||
* wide variety of resources not all of which include the | * wide variety of resources not all of which include the | ||||
* first port that is specified by the hint (typically | * first port that is specified by the hint (typically | ||||
* 0x3f0) (see the comment above fdc_isa_alloc_resources() | * 0x3f0) (see the comment above fdc_isa_alloc_resources() | ||||
* in fdc_isa.c). However, they do all seem to include | * in fdc_isa.c). However, they do all seem to include | ||||
* port + 2 (e.g. 0x3f2) so for a floppy device, look for | * port + 2 (e.g. 0x3f2) so for a floppy device, look for | ||||
* 'value + 2' in the port resources instead of the hint | * 'value + 2' in the port resources instead of the hint | ||||
* value. | * value. | ||||
*/ | */ | ||||
if (strcmp(name, "fdc") == 0) | |||||
value += 2; | |||||
if (acpi_match_resource_hint(child, SYS_RES_IOPORT, value)) | if (acpi_match_resource_hint(child, SYS_RES_IOPORT, value)) | ||||
matches++; | matches++; | ||||
else | else | ||||
continue; | continue; | ||||
} | } | ||||
if (resource_long_value(name, unit, "maddr", &value) == 0) { | if (resource_long_value(name, unit, "maddr", &value) == 0) { | ||||
if (acpi_match_resource_hint(child, SYS_RES_MEMORY, value)) | if (acpi_match_resource_hint(child, SYS_RES_MEMORY, value)) | ||||
matches++; | matches++; | ||||
▲ Show 20 Lines • Show All 3,098 Lines • Show Last 20 Lines |