diff mbox series

MIPS: OCTEON: don't set octeon_dma_bar_type if PCI is disabled

Message ID 20190127212833.16520-1-aaro.koskinen@iki.fi (mailing list archive)
State Mainlined
Commit dcf300a69ac307053dfb35c2e33972e754a98bce
Headers show
Series MIPS: OCTEON: don't set octeon_dma_bar_type if PCI is disabled | expand

Commit Message

Aaro Koskinen Jan. 27, 2019, 9:28 p.m. UTC
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 <aaro.koskinen@iki.fi>
---
 arch/mips/pci/pci-octeon.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Paul Burton Jan. 29, 2019, 7:51 p.m. UTC | #1
Hello,

Aaro Koskinen wrote:
> 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 <aaro.koskinen@iki.fi>

Applied to mips-fixes.

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paul.burton@mips.com to report it. ]
diff mbox series

Patch

diff --git a/arch/mips/pci/pci-octeon.c b/arch/mips/pci/pci-octeon.c
index 5017d5843c5a..fc29b85cfa92 100644
--- a/arch/mips/pci/pci-octeon.c
+++ b/arch/mips/pci/pci-octeon.c
@@ -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;
 
@@ -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;