pcie-microsemi: Add support for the Vera-board root complex
Subsystems (4)
PATCH 1/4 pcie-microsemi: Add support for the Vera-board root complex
From: "Wesley W. Terpstra" <[email protected]>
[Changes by AF:
- Rebase on 4.18 kernel
- Squash previous commits
]
--- drivers/pci/controller/Kconfig | 7 + drivers/pci/controller/Makefile | 1 + drivers/pci/controller/pcie-microsemi.c | 778 ++++++++++++++++++++++++ 3 files changed, 786 insertions(+) create mode 100644 drivers/pci/controller/pcie-microsemi.c
drivers/pci/controller/Kconfig +7 -0
@@ -268,5 +268,12 @@ config VMD To compile this driver as a module, choose M here: the module will be called vmd. +config PCIE_MICROSEMI + bool "Microsemi AXI PCIe host bridge support" + depends on OF_PCI + help + Say 'Y' here if you want kernel to support the Microsemi AXI PCIe + Host Bridge driver. + source "drivers/pci/controller/dwc/Kconfig" endmenu
drivers/pci/controller/Makefile +1 -0
@@ -28,6 +28,7 @@ obj-$(CONFIG_PCIE_ROCKCHIP_HOST) += pcie-rockchip-host.o obj-$(CONFIG_PCIE_MEDIATEK) += pcie-mediatek.o obj-$(CONFIG_PCIE_TANGO_SMP8759) += pcie-tango.o obj-$(CONFIG_VMD) += vmd.o +obj-$(CONFIG_PCIE_MICROSEMI) += pcie-microsemi.o # pcie-hisi.o quirks are needed even without CONFIG_PCIE_DW obj-y += dwc/
drivers/pci/controller/pcie-microsemi.c new file +778 -0
778 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 2/4 riscv/smpboot: Fix mm_grab() typo
Rename the mm_grab() function to mmgrab() to fix compilation failure.
--- arch/riscv/kernel/smpboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kernel/smpboot.c +1 -1
@@ -165,7 +165,7 @@ asmlinkage void smp_callin(void)struct mm_struct *mm = &init_mm;/* All kernel threads share the same mm context. */ -mm_grab (mm); +mmgrab (mm); current->active_mm = mm;trap_init ();
Signature · 1 line
2.17.1
PATCH 3/4 riscv/smpboot: Add missing include
In reply to Alistair FrancisAdd missing mm header include.
--- arch/riscv/kernel/smpboot.c | 1 + 1 file changed, 1 insertion(+)
arch/riscv/kernel/smpboot.c +1 -0
@@ -21,6 +21,7 @@#include <linux/kernel.h> #include <linux/mm.h> #include <linux/sched.h> +#include <linux/sched/mm.h> #include <linux/kernel_stat.h> #include <linux/notifier.h> #include <linux/cpu.h>
Signature · 1 line
2.17.1
PATCH 4/4 irq-riscv-plic: Update function name
In reply to Alistair FrancisUpdate the function riscv_of_processor_hart() name to the new riscv_of_processor_hartid() name.
--- drivers/irqchip/irq-riscv-plic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-riscv-plic.c +1 -1
@@ -343,7 +343,7 @@ static int plic_init(struct device_node *node, struct device_node *parent)/* skip any contexts that lead to inactive harts */ if (of_device_is_compatible (parent.np,"riscv,cpu-intc" ) && parent.np->parent && -riscv_of_processor_hart (parent.np->parent) <0 ) +riscv_of_processor_hartid (parent.np->parent) <0 )continue ; parent_irq =irq_create_of_mapping (&parent);
Signature · 1 line
2.17.1
PATCH 4/4 irq-riscv-plic: Update function name
Quoted 4 lines · Alistair Francis
Update the function
riscv_of_processor_hart()name to the newriscv_of_processor_hartid()name.Signed-off-by Alistair Francis <[email protected]>
I am a little confused with how all these forks and branches work. This series is meant for this branch:
https://github.com/riscv/riscv-linux/tree/riscv-all
I'll also submit a GitHub PR.
Alistair
Quoted 20 lines
--- drivers/irqchip/irq-riscv-plic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/irqchip/irq-riscv-plic.c +1
-2@@ -343,7 +343,7 @@ static int plic_init(struct device_node *node, struct device_node *parent)/* skip any contexts that lead to inactive harts */ if (of_device_is_compatible (parent.np,"riscv,cpu-intc" ) && parent.np->parent && -riscv_of_processor_hart (parent.np->parent) <0 ) +riscv_of_processor_hartid (parent.np->parent) <0 )continue ; parent_irq =irq_create_of_mapping (&parent); --2.17.1
PATCH 4/4 irq-riscv-plic: Update function name
Quoted 5 lines · On Mon, 06 Aug 2018 16:30:43 PDT (-0700), alistair23 at gmail.com wrote:
Quoted 3 lines · Alistair Francis
Update the function
riscv_of_processor_hart()name to the newriscv_of_processor_hartid()name.
Quoted 7 lines
Quoted 1 line
Signed-off-by Alistair Francis <[email protected]>I am a little confused with how all these forks and branches work. This series is meant for this branch:
https://github.com/riscv/riscv-linux/tree/riscv-allI'll also submit a GitHub PR.
These were all on a WIP branch, which means it might not work. I've updated the branch but I'm not 100% ready to send it out, thanks for the fixes though!
PATCH 1/4 pcie-microsemi: Add support for the Vera-board root complex
In reply to Alistair FrancisHi,
Quoted 8 lines · Alistair Francis
From: "Wesley W. Terpstra" <[email protected]>
[Changes by AF:
- Rebase on 4.18 kernel
- Squash previous commits
]Signed-off-by Alistair Francis <[email protected]>---
[...]
drivers/pci/controller/pcie-microsemi.c line 768
Quoted 4 lines
drivers/pci/controller/pcie-microsemi.c new file +4
-0+static const struct of_device_id microsemi_pcie_of_match[] = { + { .compatible ="ms-pf,axi-pcie-host" , }, + {} +};
Two comments here:
- I don't see ms-pf in Documentation/devicetree/bindings/vendor-prefixes.txt For Microsemi, only mscc is listed.
- Are the devicetree bindings for this device documented somewhere? It might be a good idea to get them into Documentation/devicetree/bindings, or add a link to them either to the commit message or the code itself.
Thanks,
Jonathan Neusch?fer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20180807/79692e77/attachment.sig>
PATCH 1/4 pcie-microsemi: Add support for the Vera-board root complex
Quoted 19 lines · Jonathan Neusch?fer
Hi,
Quoted 8 lines · Alistair Francis
From: "Wesley W. Terpstra" <[email protected]>
[Changes by AF:
- Rebase on 4.18 kernel
- Squash previous commits
]Signed-off-by Alistair Francis <[email protected]>---
[...]
drivers/pci/controller/pcie-microsemi.c line 768
Quoted 4 lines
drivers/pci/controller/pcie-microsemi.c new file +4
-0+static const struct of_device_id microsemi_pcie_of_match[] = { + { .compatible ="ms-pf,axi-pcie-host" , }, + {} +};Two comments here:
Quoted 5 lines
- I don't see ms-pf in
Documentation/devicetree/bindings/vendor-prefixes.txtFor Microsemi, only mscc is listed.
- Are the devicetree bindings for this device documented somewhere? It might be a good idea to get them intoDocumentation/devicetree/bindings, or add a link to them either to the commit message or the code itself.
Thanks for the comments. My goal with this patch was just to get the MicroSemi PCIe drivers into the main riscv-all tree. This patch is just copied from an old branch from the RISC-V fork GitHub.
I'm happy to help get this into mainline though if that's ok with SiFive and MicroSemi guys.
Alistair
Quoted 4 lines
Thanks,
Jonathan Neusch?fer