diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2014-01-07 17:34:14 -0700 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-01-07 17:34:14 -0700 |
commit | 1ecf38c8ae5fab7397f7af65a5064a040940a0a1 (patch) | |
tree | 2eac64e90a091151ba620baddea5aa704c8c6a9b /drivers | |
parent | 133a36051bc5db5c0a20df41079c246166eab23c (diff) | |
parent | 06489002a175680e18b4c0dd0beb6aff2a6d3781 (diff) | |
download | op-kernel-dev-1ecf38c8ae5fab7397f7af65a5064a040940a0a1.zip op-kernel-dev-1ecf38c8ae5fab7397f7af65a5064a040940a0a1.tar.gz |
Merge branch 'pci/host-mvebu' into next
* pci/host-mvebu:
PCI: mvebu: Use max_t() instead of max(resource_size_t,)
PCI: mvebu: Call pci_ioremap_io() at startup instead of dynamically
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/host/pci-mvebu.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c index bedc0b1..13478ec 100644 --- a/drivers/pci/host/pci-mvebu.c +++ b/drivers/pci/host/pci-mvebu.c @@ -342,8 +342,6 @@ static void mvebu_pcie_handle_iobase_change(struct mvebu_pcie_port *port) mvebu_mbus_add_window_remap_by_id(port->io_target, port->io_attr, port->iowin_base, port->iowin_size, iobase); - - pci_ioremap_io(iobase, port->iowin_base); } static void mvebu_pcie_handle_membase_change(struct mvebu_pcie_port *port) @@ -735,9 +733,9 @@ static resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev, * aligned on their size */ if (res->flags & IORESOURCE_IO) - return round_up(start, max((resource_size_t)SZ_64K, size)); + return round_up(start, max_t(resource_size_t, SZ_64K, size)); else if (res->flags & IORESOURCE_MEM) - return round_up(start, max((resource_size_t)SZ_1M, size)); + return round_up(start, max_t(resource_size_t, SZ_1M, size)); else return start; } @@ -993,6 +991,10 @@ static int mvebu_pcie_probe(struct platform_device *pdev) } pcie->nports = i; + + for (i = 0; i < (IO_SPACE_LIMIT - SZ_64K); i += SZ_64K) + pci_ioremap_io(i, pcie->io.start + i); + mvebu_pcie_msi_enable(pcie); mvebu_pcie_enable(pcie); |