From: "Álvaro Fernández Rojas" <noltari@gmail.com>
To: bhelgaas@google.com, robh+dt@kernel.org,
tsbogend@alpha.franken.de, lorenzo.pieralisi@arm.com,
p.zabel@pengutronix.de, jiaxun.yang@flygoat.com,
paulburton@kernel.org, info@metux.net, allison@lohutok.net,
kstewart@linuxfoundation.org, tglx@linutronix.de,
jonas.gorski@gmail.com, f.fainelli@gmail.com,
bcm-kernel-feedback-list@broadcom.com, linux-pci@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mips@vger.kernel.org
Cc: "Álvaro Fernández Rojas" <noltari@gmail.com>
Subject: [PATCH 1/3] mips: bmips: add PCI support
Date: Wed, 17 Jun 2020 12:25:54 +0200 [thread overview]
Message-ID: <20200617102556.3792821-2-noltari@gmail.com> (raw)
In-Reply-To: <20200617102556.3792821-1-noltari@gmail.com>
BMIPS SoCs with PCI: BCM6358, BCM6368.
BMIPS SoCs with PCIe (gen1): BCM6328, BCM6362, BCM63268.
BMIPS SoCs with PCIe (gen2): BCM6318.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
arch/mips/Kconfig | 1 +
arch/mips/pci/Makefile | 1 +
arch/mips/pci/fixup-bmips.c | 17 +++++++++++++++++
3 files changed, 19 insertions(+)
create mode 100644 arch/mips/pci/fixup-bmips.c
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 6fee1a133e9d..357026cb51de 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -230,6 +230,7 @@ config BMIPS_GENERIC
select ARCH_HAS_SYNC_DMA_FOR_CPU_ALL
select ARCH_HAS_PHYS_TO_DMA
select BOOT_RAW
+ select HAVE_PCI
select NO_EXCEPT_FILL
select USE_OF
select CEVT_R4K
diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile
index 0f68d6849978..e38285c10d45 100644
--- a/arch/mips/pci/Makefile
+++ b/arch/mips/pci/Makefile
@@ -29,6 +29,7 @@ obj-$(CONFIG_PCI_XTALK_BRIDGE) += pci-xtalk-bridge.o
# These are still pretty much in the old state, watch, go blind.
#
obj-$(CONFIG_ATH79) += fixup-ath79.o
+obj-$(CONFIG_BMIPS_GENERIC) += fixup-bmips.o
obj-$(CONFIG_MIPS_COBALT) += fixup-cobalt.o
obj-$(CONFIG_LEMOTE_FULOONG2E) += fixup-fuloong2e.o ops-loongson2.o
obj-$(CONFIG_LEMOTE_MACH2F) += fixup-lemote2f.o ops-loongson2.o
diff --git a/arch/mips/pci/fixup-bmips.c b/arch/mips/pci/fixup-bmips.c
new file mode 100644
index 000000000000..581cff562ead
--- /dev/null
+++ b/arch/mips/pci/fixup-bmips.c
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (C) 2020 Álvaro Fernández Rojas <noltari@gmail.com>
+ */
+
+#include <linux/of_pci.h>
+#include <linux/pci.h>
+
+int pcibios_plat_dev_init(struct pci_dev *dev)
+{
+ return PCIBIOS_SUCCESSFUL;
+}
+
+int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+{
+ return of_irq_parse_and_map_pci(dev, slot, pin);
+}
--
2.27.0
next prev parent reply other threads:[~2020-06-17 10:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-17 10:25 [PATCH 0/3] mips: bmips: add BCM6328 PCIe support Álvaro Fernández Rojas
2020-06-17 10:25 ` Álvaro Fernández Rojas [this message]
2020-06-17 11:09 ` [PATCH 1/3] mips: bmips: add PCI support Thomas Bogendoerfer
2020-06-17 10:25 ` [PATCH 2/3] dt-bindings: Document BCM6328 PCIe Host Controller Álvaro Fernández Rojas
2020-06-17 17:07 ` Rob Herring
2020-06-17 21:50 ` Florian Fainelli
2020-06-17 10:25 ` [PATCH 3/3] pci: add BCM6328 PCIe controller support Álvaro Fernández Rojas
2020-06-17 15:50 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200617102556.3792821-2-noltari@gmail.com \
--to=noltari@gmail.com \
--cc=allison@lohutok.net \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=info@metux.net \
--cc=jiaxun.yang@flygoat.com \
--cc=jonas.gorski@gmail.com \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=p.zabel@pengutronix.de \
--cc=paulburton@kernel.org \
--cc=robh+dt@kernel.org \
--cc=tglx@linutronix.de \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).