diff options
-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 bedc0b1562b9..13478ecd4113 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) | |||
342 | mvebu_mbus_add_window_remap_by_id(port->io_target, port->io_attr, | 342 | mvebu_mbus_add_window_remap_by_id(port->io_target, port->io_attr, |
343 | port->iowin_base, port->iowin_size, | 343 | port->iowin_base, port->iowin_size, |
344 | iobase); | 344 | iobase); |
345 | |||
346 | pci_ioremap_io(iobase, port->iowin_base); | ||
347 | } | 345 | } |
348 | 346 | ||
349 | static void mvebu_pcie_handle_membase_change(struct mvebu_pcie_port *port) | 347 | 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, | |||
735 | * aligned on their size | 733 | * aligned on their size |
736 | */ | 734 | */ |
737 | if (res->flags & IORESOURCE_IO) | 735 | if (res->flags & IORESOURCE_IO) |
738 | return round_up(start, max((resource_size_t)SZ_64K, size)); | 736 | return round_up(start, max_t(resource_size_t, SZ_64K, size)); |
739 | else if (res->flags & IORESOURCE_MEM) | 737 | else if (res->flags & IORESOURCE_MEM) |
740 | return round_up(start, max((resource_size_t)SZ_1M, size)); | 738 | return round_up(start, max_t(resource_size_t, SZ_1M, size)); |
741 | else | 739 | else |
742 | return start; | 740 | return start; |
743 | } | 741 | } |
@@ -993,6 +991,10 @@ static int mvebu_pcie_probe(struct platform_device *pdev) | |||
993 | } | 991 | } |
994 | 992 | ||
995 | pcie->nports = i; | 993 | pcie->nports = i; |
994 | |||
995 | for (i = 0; i < (IO_SPACE_LIMIT - SZ_64K); i += SZ_64K) | ||
996 | pci_ioremap_io(i, pcie->io.start + i); | ||
997 | |||
996 | mvebu_pcie_msi_enable(pcie); | 998 | mvebu_pcie_msi_enable(pcie); |
997 | mvebu_pcie_enable(pcie); | 999 | mvebu_pcie_enable(pcie); |
998 | 1000 | ||