summaryrefslogtreecommitdiff
path: root/drivers/pnp/pnpacpi
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2010-03-05 10:47:57 -0700
committerLen Brown <len.brown@intel.com>2010-03-14 20:08:38 -0400
commit7e0e9c042790d4ea44c6a00ddaad8b8bbcc3f17f (patch)
treeb0caf1f008ae1f2f2f32bfecfaba7c8ba9986c6f /drivers/pnp/pnpacpi
parentfa35b49260b615d634bfa1f767aa315fa323c2e9 (diff)
PNPACPI: add bus number support
Add support for bus number resources. This is for bridges with a range of bus numbers behind them. Previously, PNP ignored bus number resources. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/pnp/pnpacpi')
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index 0d7d61da63fc..54514aa35b09 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -265,6 +265,14 @@ static void pnpacpi_parse_allocated_memresource(struct pnp_dev *dev,
pnp_add_mem_resource(dev, start, end, flags);
}
+static void pnpacpi_parse_allocated_busresource(struct pnp_dev *dev,
+ u64 start, u64 len)
+{
+ u64 end = start + len - 1;
+
+ pnp_add_bus_resource(dev, start, end);
+}
+
static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev,
struct acpi_resource *res)
{
@@ -290,6 +298,9 @@ static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev,
p->minimum, p->address_length,
p->granularity == 0xfff ? ACPI_DECODE_10 :
ACPI_DECODE_16, window);
+ else if (p->resource_type == ACPI_BUS_NUMBER_RANGE)
+ pnpacpi_parse_allocated_busresource(dev, p->minimum,
+ p->address_length);
}
static void pnpacpi_parse_allocated_ext_address_space(struct pnp_dev *dev,
@@ -309,6 +320,9 @@ static void pnpacpi_parse_allocated_ext_address_space(struct pnp_dev *dev,
p->minimum, p->address_length,
p->granularity == 0xfff ? ACPI_DECODE_10 :
ACPI_DECODE_16, window);
+ else if (p->resource_type == ACPI_BUS_NUMBER_RANGE)
+ pnpacpi_parse_allocated_busresource(dev, p->minimum,
+ p->address_length);
}
static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res,