hifiveu: bump target to 5.15
[openwrt/staging/wigyori.git] / target / linux / hifiveu / patches-5.15 / 0007-riscv-enable-generic-PCI-resource-mapping.patch
1 From 512834e96c3dd8778278836e2d132d9381c1f129 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 7/7] riscv: enable generic PCI resource mapping
5
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).
11
12 Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
13 ---
14 arch/riscv/include/asm/pci.h | 2 ++
15 1 file changed, 2 insertions(+)
16
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
24
25 +#define ARCH_GENERIC_PCI_MMAP_RESOURCE 1
26 +
27 extern int isa_dma_bridge_buggy;
28
29 #ifdef CONFIG_PCI
30 --
31 2.7.4
32