diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-06-21 10:19:34 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-06-25 08:44:23 -0400 |
commit | b2a5d3e2cf65e46522b695b76f93ec1b0f6cad30 (patch) | |
tree | 953f10f1497d994255ac65148e8caf3750f11a8b | |
parent | 1fa051018d85b829e4b9a7ed20147df8760293ee (diff) |
PCI: rcar: Drop gen2 dummy I/O port region
Previously we added a dummy I/O port region even though the R-Car
controller doesn't support PCI port I/O. This resulted in bogus root bus
resources like this:
pci_bus 0000:00: root bus resource [io 0xee080000-0xee0810ff]
pci_bus 0000:00: root bus resource [mem 0xee080000-0xee0810ff]
Drop the unused dummy I/O port region and set struct hw_pci.io_optional so
the ARM PCI code doesn't add a default one for us.
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r-- | drivers/pci/host/pci-rcar-gen2.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c index 9980a4bdae7e..ddf776556c78 100644 --- a/drivers/pci/host/pci-rcar-gen2.c +++ b/drivers/pci/host/pci-rcar-gen2.c | |||
@@ -97,7 +97,6 @@ | |||
97 | struct rcar_pci_priv { | 97 | struct rcar_pci_priv { |
98 | struct device *dev; | 98 | struct device *dev; |
99 | void __iomem *reg; | 99 | void __iomem *reg; |
100 | struct resource io_res; | ||
101 | struct resource mem_res; | 100 | struct resource mem_res; |
102 | struct resource *cfg_res; | 101 | struct resource *cfg_res; |
103 | unsigned busnr; | 102 | unsigned busnr; |
@@ -273,7 +272,6 @@ static int rcar_pci_setup(int nr, struct pci_sys_data *sys) | |||
273 | rcar_pci_setup_errirq(priv); | 272 | rcar_pci_setup_errirq(priv); |
274 | 273 | ||
275 | /* Add PCI resources */ | 274 | /* Add PCI resources */ |
276 | pci_add_resource(&sys->resources, &priv->io_res); | ||
277 | pci_add_resource(&sys->resources, &priv->mem_res); | 275 | pci_add_resource(&sys->resources, &priv->mem_res); |
278 | 276 | ||
279 | /* Setup bus number based on platform device id / of bus-range */ | 277 | /* Setup bus number based on platform device id / of bus-range */ |
@@ -371,14 +369,6 @@ static int rcar_pci_probe(struct platform_device *pdev) | |||
371 | return -ENOMEM; | 369 | return -ENOMEM; |
372 | 370 | ||
373 | priv->mem_res = *mem_res; | 371 | priv->mem_res = *mem_res; |
374 | /* | ||
375 | * The controller does not support/use port I/O, | ||
376 | * so setup a dummy port I/O region here. | ||
377 | */ | ||
378 | priv->io_res.start = priv->mem_res.start; | ||
379 | priv->io_res.end = priv->mem_res.end; | ||
380 | priv->io_res.flags = IORESOURCE_IO; | ||
381 | |||
382 | priv->cfg_res = cfg_res; | 372 | priv->cfg_res = cfg_res; |
383 | 373 | ||
384 | priv->irq = platform_get_irq(pdev, 0); | 374 | priv->irq = platform_get_irq(pdev, 0); |
@@ -421,6 +411,7 @@ static int rcar_pci_probe(struct platform_device *pdev) | |||
421 | hw_private[0] = priv; | 411 | hw_private[0] = priv; |
422 | memset(&hw, 0, sizeof(hw)); | 412 | memset(&hw, 0, sizeof(hw)); |
423 | hw.nr_controllers = ARRAY_SIZE(hw_private); | 413 | hw.nr_controllers = ARRAY_SIZE(hw_private); |
414 | hw.io_optional = 1; | ||
424 | hw.private_data = hw_private; | 415 | hw.private_data = hw_private; |
425 | hw.map_irq = rcar_pci_map_irq; | 416 | hw.map_irq = rcar_pci_map_irq; |
426 | hw.ops = &rcar_pci_ops; | 417 | hw.ops = &rcar_pci_ops; |