From 919f025ab7d91e1930ca1437aa1607f4607916b4 Mon Sep 17 00:00:00 2001 From: kettenis Date: Sat, 12 Jun 2021 16:30:16 +0000 Subject: [PATCH] Enable dwpcie(4) and add support for the PCIe host bridge found on the SiFive FU740 SoC. ok drahn@ --- sys/arch/riscv64/conf/GENERIC | 4 +++- sys/arch/riscv64/conf/RAMDISK | 4 +++- sys/dev/fdt/dwpcie.c | 5 +++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/arch/riscv64/conf/GENERIC b/sys/arch/riscv64/conf/GENERIC index 0bedad70fc9..55ddd18c757 100644 --- a/sys/arch/riscv64/conf/GENERIC +++ b/sys/arch/riscv64/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.12 2021/05/19 19:32:25 kettenis Exp $ +# $OpenBSD: GENERIC,v 1.13 2021/06/12 16:30:16 kettenis Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -63,6 +63,8 @@ ukphy* at mii? dwmmc* at fdt? sdmmc* at dwmmc? +dwpcie* at fdt? +pci* at dwpcie? pciecam* at fdt? pci* at pciecam? diff --git a/sys/arch/riscv64/conf/RAMDISK b/sys/arch/riscv64/conf/RAMDISK index 3c409bc04d2..1aef9cace65 100644 --- a/sys/arch/riscv64/conf/RAMDISK +++ b/sys/arch/riscv64/conf/RAMDISK @@ -1,4 +1,4 @@ -# $OpenBSD: RAMDISK,v 1.13 2021/05/19 23:29:42 jsg Exp $ +# $OpenBSD: RAMDISK,v 1.14 2021/06/12 16:30:16 kettenis Exp $ machine riscv64 maxusers 4 @@ -59,6 +59,8 @@ ukphy* at mii? dwmmc* at fdt? sdmmc* at dwmmc? +dwpcie* at fdt? +pci* at dwpcie? pciecam* at fdt? pci* at pciecam? diff --git a/sys/dev/fdt/dwpcie.c b/sys/dev/fdt/dwpcie.c index 974bd6bc052..44dbe2935f5 100644 --- a/sys/dev/fdt/dwpcie.c +++ b/sys/dev/fdt/dwpcie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dwpcie.c,v 1.29 2021/05/17 17:25:13 kettenis Exp $ */ +/* $OpenBSD: dwpcie.c,v 1.30 2021/06/12 16:30:16 kettenis Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -250,7 +250,8 @@ dwpcie_match(struct device *parent, void *match, void *aux) return (OF_is_compatible(faa->fa_node, "amlogic,g12a-pcie") || OF_is_compatible(faa->fa_node, "marvell,armada8k-pcie") || OF_is_compatible(faa->fa_node, "fsl,imx8mm-pcie") || - OF_is_compatible(faa->fa_node, "fsl,imx8mq-pcie")); + OF_is_compatible(faa->fa_node, "fsl,imx8mq-pcie") || + OF_is_compatible(faa->fa_node, "sifive,fu740-pcie")); } void dwpcie_attach_deferred(struct device *); -- 2.20.1