Merge ACPI resource manager changes From FreeBSD:
authorYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Tue, 23 Oct 2007 03:04:49 +0000 (03:04 +0000)
committerYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Tue, 23 Oct 2007 03:04:49 +0000 (03:04 +0000)
commitc8b4f0e613d57a5efac4b22c9c49c75482f25bad
tree3e15740e6e57daaaaff904de32d68b78bcb816d0
parent7297045efc4edfb90b6d5cff33fb5bfbe6119150
Merge ACPI resource manager changes From FreeBSD:

acpi.c,v 1.158, acpivar.h,v 1.70
  Associate a device_t with an ACPI_HANDLE.  This make AcpiWalkNamespace more
  useful.  If ACPI-CA allowed null object handlers, we wouldn't need the
  placeholder function.

acpi.c,v 1.159-1.160 and others:
  Add support to ACPI to manage its own resources.  Previously, resource
  allocation was passed up to nexus.  Now, we probe sysresource objects and
  manage the resources they describe in a local rman pool.  This helps
  devices which attach/detach varying resources (like the _CST object) and
  module loads/unloads.  The allocation/release routines now check to see if
  the resource is described in a child sysresource object and if so,
  allocate from the local rman.  Sysresource objects add their resources to
  the pool and reserve them upon boot.  This means sysresources need to be
  probed before other ACPI devices.

  Changes include:
  * Add ordering to the child device probe.  The current order is:  system
  resource objects, embedded controllers, then everything else.
  * Make acpi_MatchHid take a handle instead of a device_t arg.
  * Replace acpi_{get,set}_resource with the generic equivalents.

acpi.c,v 1.175:
  Call device_identify routines after doing the namespace walk.  This is
  needed so that sysresource objects are created first to reserve all regions,
  then other devices can allocate from them.  Otherwise, acpi_timer (the only
  ACPI device with an identify routine), would allocate its resources from
  the nexus, causing the later sysresource reserve to fail.

  Debugging by:   Taku YAMAMOTO, Andrea Campi

And add ACPI attachment to some devices trying to obtain resources
from the ISA bus.
15 files changed:
sys/dev/acpica5/acpi.c
sys/dev/acpica5/acpi_acad.c
sys/dev/acpica5/acpi_button.c
sys/dev/acpica5/acpi_cmbat.c
sys/dev/acpica5/acpi_ec.c
sys/dev/acpica5/acpi_isab.c
sys/dev/acpica5/acpi_lid.c
sys/dev/acpica5/acpi_resource.c
sys/dev/acpica5/acpivar.h
sys/dev/disk/fd/fd.c
sys/dev/misc/atkbdc_layer/atkbdc_isa.c
sys/dev/misc/joy/joy.c
sys/dev/misc/ppc/ppc.c
sys/dev/serial/sio/sio.c
sys/platform/pc32/acpica5/acpi_toshiba.c