Skip to contentSkip to conversation

riscv: enable generic PCI resource mapping

PATCH New Stanislaw Kardach 1 participant 1 message Apr 12, 2021 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: enable generic PCI resource mapping

Enable the PCI resource mapping on RISC-V using the generic framework. This allows userspace applications to mmap PCI resources using /sys/devices/pci*/*/resource* interface.
The mmap has been tested with Intel x520-DA2 NIC card on a HiFive Unmatched board (SiFive FU740 SoC).

---
 arch/riscv/include/asm/pci.h | 2 ++
 1 file changed, 2 insertions(+)
arch/riscv/include/asm/pci.h +2 -0
index 658e112c3ce7..7fd52a30e605 100644
@@ -18,6 +18,8 @@
 /* RISC-V shim does not initialize PCI bus */
 #define pcibios_assign_all_busses() 1
 
+#define ARCH_GENERIC_PCI_MMAP_RESOURCE 1
+
 extern int isa_dma_bridge_buggy;
 
 #ifdef CONFIG_PCI
Signature · 7 lines
2.27.0


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv