lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200617102556.3792821-2-noltari@gmail.com>
Date:   Wed, 17 Jun 2020 12:25:54 +0200
From:   Álvaro Fernández Rojas 
        <noltari@...il.com>
To:     bhelgaas@...gle.com, robh+dt@...nel.org, tsbogend@...ha.franken.de,
        lorenzo.pieralisi@....com, p.zabel@...gutronix.de,
        jiaxun.yang@...goat.com, paulburton@...nel.org, info@...ux.net,
        allison@...utok.net, kstewart@...uxfoundation.org,
        tglx@...utronix.de, jonas.gorski@...il.com, f.fainelli@...il.com,
        bcm-kernel-feedback-list@...adcom.com, linux-pci@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mips@...r.kernel.org
Cc:     Álvaro Fernández Rojas 
        <noltari@...il.com>
Subject: [PATCH 1/3] mips: bmips: add PCI support

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@...il.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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ