* updated pciutils/pci.ids (2022-01-21 -> 2022-01-28)
[t2-trunk.git] / architecture / riscv64 / package / linux / 0021-riscv-enable-generic-PCI-resource-mapping.patch
blob0d2fd2b2473124c4b441b66cef569aad4f63b2aa
1 From bdc2e9572166f05c1e7c250f2b862449cc34ed55 Mon Sep 17 00:00:00 2001
2 From: Stanislaw Kardach <kda@semihalf.com>
3 Date: Mon, 12 Apr 2021 13:10:12 +0200
4 Subject: [PATCH 21/23] riscv: enable generic PCI resource mapping
6 Enable the PCI resource mapping on RISC-V using the generic framework.
7 This allows userspace applications to mmap PCI resources using
8 /sys/devices/pci*/*/resource* interface.
9 The mmap has been tested with Intel x520-DA2 NIC card on a HiFive
10 Unmatched board (SiFive FU740 SoC).
12 Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
13 ---
14 arch/riscv/include/asm/pci.h | 2 ++
15 1 file changed, 2 insertions(+)
17 diff --git a/arch/riscv/include/asm/pci.h b/arch/riscv/include/asm/pci.h
18 index 658e112..7fd52a3 100644
19 --- a/arch/riscv/include/asm/pci.h
20 +++ b/arch/riscv/include/asm/pci.h
21 @@ -18,6 +18,8 @@
22 /* RISC-V shim does not initialize PCI bus */
23 #define pcibios_assign_all_busses() 1
25 +#define ARCH_GENERIC_PCI_MMAP_RESOURCE 1
27 extern int isa_dma_bridge_buggy;
29 #ifdef CONFIG_PCI
30 --
31 2.7.4