diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2010-03-05 12:47:57 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-03-14 20:08:38 -0400 |
commit | 7e0e9c042790d4ea44c6a00ddaad8b8bbcc3f17f (patch) | |
tree | b0caf1f008ae1f2f2f32bfecfaba7c8ba9986c6f /drivers/pnp/pnpacpi | |
parent | fa35b49260b615d634bfa1f767aa315fa323c2e9 (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.c | 14 |
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, | |||
265 | pnp_add_mem_resource(dev, start, end, flags); | 265 | pnp_add_mem_resource(dev, start, end, flags); |
266 | } | 266 | } |
267 | 267 | ||
268 | static void pnpacpi_parse_allocated_busresource(struct pnp_dev *dev, | ||
269 | u64 start, u64 len) | ||
270 | { | ||
271 | u64 end = start + len - 1; | ||
272 | |||
273 | pnp_add_bus_resource(dev, start, end); | ||
274 | } | ||
275 | |||
268 | static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev, | 276 | static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev, |
269 | struct acpi_resource *res) | 277 | struct acpi_resource *res) |
270 | { | 278 | { |
@@ -290,6 +298,9 @@ static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev, | |||
290 | p->minimum, p->address_length, | 298 | p->minimum, p->address_length, |
291 | p->granularity == 0xfff ? ACPI_DECODE_10 : | 299 | p->granularity == 0xfff ? ACPI_DECODE_10 : |
292 | ACPI_DECODE_16, window); | 300 | ACPI_DECODE_16, window); |
301 | else if (p->resource_type == ACPI_BUS_NUMBER_RANGE) | ||
302 | pnpacpi_parse_allocated_busresource(dev, p->minimum, | ||
303 | p->address_length); | ||
293 | } | 304 | } |
294 | 305 | ||
295 | static void pnpacpi_parse_allocated_ext_address_space(struct pnp_dev *dev, | 306 | 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, | |||
309 | p->minimum, p->address_length, | 320 | p->minimum, p->address_length, |
310 | p->granularity == 0xfff ? ACPI_DECODE_10 : | 321 | p->granularity == 0xfff ? ACPI_DECODE_10 : |
311 | ACPI_DECODE_16, window); | 322 | ACPI_DECODE_16, window); |
323 | else if (p->resource_type == ACPI_BUS_NUMBER_RANGE) | ||
324 | pnpacpi_parse_allocated_busresource(dev, p->minimum, | ||
325 | p->address_length); | ||
312 | } | 326 | } |
313 | 327 | ||
314 | static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, | 328 | static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, |