diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2019-01-27 16:28:33 -0500 |
---|---|---|
committer | Paul Burton <paul.burton@mips.com> | 2019-01-29 14:47:02 -0500 |
commit | dcf300a69ac307053dfb35c2e33972e754a98bce (patch) | |
tree | 5d0b294999b3a7b63ac731769d351bb416ae6d64 /arch/mips/pci | |
parent | 1ca1c87f91d9dc50d6a38e2177b2032996e7901c (diff) |
MIPS: OCTEON: don't set octeon_dma_bar_type if PCI is disabled
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>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Fixes: a214720cbf50 ("Disable MSI also when pcie-octeon.pcie_disable on")
Cc: stable@vger.kernel.org # v3.3+
Cc: linux-mips@vger.kernel.org
Diffstat (limited to 'arch/mips/pci')
-rw-r--r-- | arch/mips/pci/pci-octeon.c | 10 |
1 files changed, 5 insertions, 5 deletions
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) | |||
568 | if (octeon_has_feature(OCTEON_FEATURE_PCIE)) | 568 | if (octeon_has_feature(OCTEON_FEATURE_PCIE)) |
569 | return 0; | 569 | return 0; |
570 | 570 | ||
571 | if (!octeon_is_pci_host()) { | ||
572 | pr_notice("Not in host mode, PCI Controller not initialized\n"); | ||
573 | return 0; | ||
574 | } | ||
575 | |||
571 | /* Point pcibios_map_irq() to the PCI version of it */ | 576 | /* Point pcibios_map_irq() to the PCI version of it */ |
572 | octeon_pcibios_map_irq = octeon_pci_pcibios_map_irq; | 577 | octeon_pcibios_map_irq = octeon_pci_pcibios_map_irq; |
573 | 578 | ||
@@ -579,11 +584,6 @@ static int __init octeon_pci_setup(void) | |||
579 | else | 584 | else |
580 | octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_BIG; | 585 | octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_BIG; |
581 | 586 | ||
582 | if (!octeon_is_pci_host()) { | ||
583 | pr_notice("Not in host mode, PCI Controller not initialized\n"); | ||
584 | return 0; | ||
585 | } | ||
586 | |||
587 | /* PCI I/O and PCI MEM values */ | 587 | /* PCI I/O and PCI MEM values */ |
588 | set_io_port_base(OCTEON_PCI_IOSPACE_BASE); | 588 | set_io_port_base(OCTEON_PCI_IOSPACE_BASE); |
589 | ioport_resource.start = 0; | 589 | ioport_resource.start = 0; |