mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 09:50:04 +00:00
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
This commit is contained in:
commit
1ecf38c8ae
1 changed files with 6 additions and 4 deletions
|
@ -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,
|
mvebu_mbus_add_window_remap_by_id(port->io_target, port->io_attr,
|
||||||
port->iowin_base, port->iowin_size,
|
port->iowin_base, port->iowin_size,
|
||||||
iobase);
|
iobase);
|
||||||
|
|
||||||
pci_ioremap_io(iobase, port->iowin_base);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mvebu_pcie_handle_membase_change(struct mvebu_pcie_port *port)
|
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
|
* aligned on their size
|
||||||
*/
|
*/
|
||||||
if (res->flags & IORESOURCE_IO)
|
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)
|
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
|
else
|
||||||
return start;
|
return start;
|
||||||
}
|
}
|
||||||
|
@ -993,6 +991,10 @@ static int mvebu_pcie_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
pcie->nports = i;
|
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_msi_enable(pcie);
|
||||||
mvebu_pcie_enable(pcie);
|
mvebu_pcie_enable(pcie);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue