Skip to content

Commit

Permalink
MIPS: OCTEON: don't set octeon_dma_bar_type if PCI is disabled
Browse files Browse the repository at this point in the history
Don't set octeon_dma_bar_type if PCI is disabled. This avoids creation
of the MSI irqchip later on, and saves a bit of memory.

Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Paul Burton <[email protected]>
Fixes: a214720 ("Disable MSI also when pcie-octeon.pcie_disable on")
Cc: [email protected] # v3.3+
Cc: [email protected]
  • Loading branch information
aakoskin authored and paulburton committed Jan 29, 2019
1 parent 1ca1c87 commit dcf300a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arch/mips/pci/pci-octeon.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,11 @@ static int __init octeon_pci_setup(void)
if (octeon_has_feature(OCTEON_FEATURE_PCIE))
return 0;

if (!octeon_is_pci_host()) {
pr_notice("Not in host mode, PCI Controller not initialized\n");
return 0;
}

/* Point pcibios_map_irq() to the PCI version of it */
octeon_pcibios_map_irq = octeon_pci_pcibios_map_irq;

Expand All @@ -579,11 +584,6 @@ static int __init octeon_pci_setup(void)
else
octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_BIG;

if (!octeon_is_pci_host()) {
pr_notice("Not in host mode, PCI Controller not initialized\n");
return 0;
}

/* PCI I/O and PCI MEM values */
set_io_port_base(OCTEON_PCI_IOSPACE_BASE);
ioport_resource.start = 0;
Expand Down

0 comments on commit dcf300a

Please sign in to comment.