]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
Pull pnpacpi into acpica branch
authorLen Brown <len.brown@intel.com>
Sat, 7 Jan 2006 08:50:18 +0000 (03:50 -0500)
committerLen Brown <len.brown@intel.com>
Sat, 7 Jan 2006 08:50:18 +0000 (03:50 -0500)
1  2 
arch/i386/kernel/mpparse.c
arch/ia64/pci/pci.c
drivers/acpi/pci_link.c
drivers/acpi/scan.c
drivers/pnp/pnpacpi/rsparser.c
include/asm-x86_64/mpspec.h

Simple merge
Simple merge
Simple merge
Simple merge
index b8b46ab54f4e6b77d9da0e1421f1eb1c296e8c3d,2424bd3620dc8703712e84aaf31da59698ac4a75..c6db14d30ed6d155ca323e698b9f06e08820669a
@@@ -453,6 -453,45 +453,45 @@@ pnpacpi_parse_fixed_mem32_option(struc
        return;
  }
  
 -              pnp_warn("PnPACPI: failed to convert resource type %d", r->id);
+ static void
+ pnpacpi_parse_address_option(struct pnp_option *option, struct acpi_resource *r)
+ {
+       struct acpi_resource_address64 addr, *p = &addr;
+       acpi_status status;
+       struct pnp_mem * mem;
+       struct pnp_port * port;
+       status = acpi_resource_to_address64(r, p);
+       if (!ACPI_SUCCESS(status)) {
 -              mem->min = mem->max = p->min_address_range;
++              pnp_warn("PnPACPI: failed to convert resource type %d", r->type);
+               return;
+       }
+       if (p->address_length == 0)
+               return;
+       if (p->resource_type == ACPI_MEMORY_RANGE) {
+               mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL);
+               if (!mem)
+                       return;
 -              mem->flags = (p->attribute.memory.read_write_attribute ==
++              mem->min = mem->max = p->minimum;
+               mem->size = p->address_length;
+               mem->align = 0;
 -              port->min = port->max = p->min_address_range;
++              mem->flags = (p->info.mem.write_protect ==
+                   ACPI_READ_WRITE_MEMORY) ? IORESOURCE_MEM_WRITEABLE : 0;
+               pnp_register_mem_resource(option,mem);
+       } else if (p->resource_type == ACPI_IO_RANGE) {
+               port = kcalloc(1, sizeof(struct pnp_port), GFP_KERNEL);
+               if (!port)
+                       return;
++              port->min = port->max = p->minimum;
+               port->size = p->address_length;
+               port->align = 0;
+               port->flags = PNP_PORT_FLAG_FIXED;
+               pnp_register_port_resource(option,port);
+       }
+ }
  struct acpipnp_parse_option_s {
        struct pnp_option *option;
        struct pnp_option *option_independent;
@@@ -495,7 -534,12 +534,12 @@@ static acpi_status pnpacpi_option_resou
                        pnpacpi_parse_fixed_mem32_option(option,
                                &res->data.fixed_memory32);
                        break;
 -              case ACPI_RSTYPE_ADDRESS16:
 -              case ACPI_RSTYPE_ADDRESS32:
 -              case ACPI_RSTYPE_ADDRESS64:
++              case ACPI_RESOURCE_TYPE_ADDRESS16:
++              case ACPI_RESOURCE_TYPE_ADDRESS32:
++              case ACPI_RESOURCE_TYPE_ADDRESS64:
+                       pnpacpi_parse_address_option(option, res);
+                       break;
 -              case ACPI_RSTYPE_START_DPF:
 +              case ACPI_RESOURCE_TYPE_START_DEPENDENT:
                        switch (res->data.start_dpf.compatibility_priority) {
                                case ACPI_GOOD_CONFIGURATION:
                                        priority = PNP_RES_PRIORITY_PREFERRED;
@@@ -559,20 -603,18 +603,18 @@@ static acpi_status pnpacpi_count_resour
        void *data)
  {
        int *res_cnt = (int *)data;
 -      switch (res->id) {
 -      case ACPI_RSTYPE_IRQ:
 -      case ACPI_RSTYPE_EXT_IRQ:
 -      case ACPI_RSTYPE_DMA:
 -      case ACPI_RSTYPE_IO:
 -      case ACPI_RSTYPE_FIXED_IO:
 -      case ACPI_RSTYPE_MEM24:
 -      case ACPI_RSTYPE_MEM32:
 -      case ACPI_RSTYPE_FIXED_MEM32:
 -      case ACPI_RSTYPE_ADDRESS16:
 -      case ACPI_RSTYPE_ADDRESS32:
 -      case ACPI_RSTYPE_ADDRESS64:
 +      switch (res->type) {
 +      case ACPI_RESOURCE_TYPE_IRQ:
 +      case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
 +      case ACPI_RESOURCE_TYPE_DMA:
 +      case ACPI_RESOURCE_TYPE_IO:
 +      case ACPI_RESOURCE_TYPE_FIXED_IO:
 +      case ACPI_RESOURCE_TYPE_MEMORY24:
 +      case ACPI_RESOURCE_TYPE_MEMORY32:
 +      case ACPI_RESOURCE_TYPE_FIXED_MEMORY32:
- #if 0
 +      case ACPI_RESOURCE_TYPE_ADDRESS16:
 +      case ACPI_RESOURCE_TYPE_ADDRESS32:
 +      case ACPI_RESOURCE_TYPE_ADDRESS64:
- #endif
                (*res_cnt) ++;
        default:
                return AE_OK;
@@@ -584,21 -626,19 +626,19 @@@ static acpi_status pnpacpi_type_resourc
        void *data)
  {
        struct acpi_resource **resource = (struct acpi_resource **)data;        
 -      switch (res->id) {
 -      case ACPI_RSTYPE_IRQ:
 -      case ACPI_RSTYPE_EXT_IRQ:
 -      case ACPI_RSTYPE_DMA:
 -      case ACPI_RSTYPE_IO:
 -      case ACPI_RSTYPE_FIXED_IO:
 -      case ACPI_RSTYPE_MEM24:
 -      case ACPI_RSTYPE_MEM32:
 -      case ACPI_RSTYPE_FIXED_MEM32:
 -      case ACPI_RSTYPE_ADDRESS16:
 -      case ACPI_RSTYPE_ADDRESS32:
 -      case ACPI_RSTYPE_ADDRESS64:
 -              (*resource)->id = res->id;
 +      switch (res->type) {
 +      case ACPI_RESOURCE_TYPE_IRQ:
 +      case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
 +      case ACPI_RESOURCE_TYPE_DMA:
 +      case ACPI_RESOURCE_TYPE_IO:
 +      case ACPI_RESOURCE_TYPE_FIXED_IO:
 +      case ACPI_RESOURCE_TYPE_MEMORY24:
 +      case ACPI_RESOURCE_TYPE_MEMORY32:
 +      case ACPI_RESOURCE_TYPE_FIXED_MEMORY32:
- #if 0
 +      case ACPI_RESOURCE_TYPE_ADDRESS16:
 +      case ACPI_RESOURCE_TYPE_ADDRESS32:
 +      case ACPI_RESOURCE_TYPE_ADDRESS64:
- #endif
 +              (*resource)->type = res->type;
                (*resource)++;
        default:
                return AE_OK;
Simple merge