summaryrefslogtreecommitdiffstats
path: root/arch/riscv
diff options
context:
space:
mode:
authorStanislaw Kardach <kda@semihalf.com>2021-04-12 13:10:12 +0200
committerPalmer Dabbelt <palmerdabbelt@google.com>2021-05-25 22:50:49 -0700
commitdb756746807b5cb64bbe2e6ac4ff38d18b7787ed (patch)
tree1d4e4f73966f6ae51b51188a0b67bb4b7c0cb445 /arch/riscv
parent8f3e136ff378a2b22dbc0ca2a6e58022e6df36d2 (diff)
downloadlinux-db756746807b5cb64bbe2e6ac4ff38d18b7787ed.tar.gz
linux-db756746807b5cb64bbe2e6ac4ff38d18b7787ed.tar.bz2
linux-db756746807b5cb64bbe2e6ac4ff38d18b7787ed.zip
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). Signed-off-by: Stanislaw Kardach <kda@semihalf.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv')
-rw-r--r--arch/riscv/include/asm/pci.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/pci.h b/arch/riscv/include/asm/pci.h
index 658e112c3ce7..7fd52a30e605 100644
--- a/arch/riscv/include/asm/pci.h
+++ b/arch/riscv/include/asm/pci.h
@@ -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