Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/fdt Process "ranges" property even when linux,p...
details: https://anonhg.NetBSD.org/src/rev/97f60624d910
branches: trunk
changeset: 368928:97f60624d910
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Aug 13 16:01:34 2022 +0000
description:
Process "ranges" property even when linux,pci-probe-only is set.
When the linux,pci-probe-only flag is set, we still need to process the
ranges property to determine whether or not to set PCI_FLAGS_IO_OKAY and
PCI_FLAGS_MEM_OKAY flags on the bus.
diffstat:
sys/arch/arm/fdt/pcihost_fdt.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (42 lines):
diff -r 1c79694a2fed -r 97f60624d910 sys/arch/arm/fdt/pcihost_fdt.c
--- a/sys/arch/arm/fdt/pcihost_fdt.c Sat Aug 13 10:53:38 2022 +0000
+++ b/sys/arch/arm/fdt/pcihost_fdt.c Sat Aug 13 16:01:34 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcihost_fdt.c,v 1.27 2021/09/06 14:03:17 jmcneill Exp $ */
+/* $NetBSD: pcihost_fdt.c,v 1.28 2022/08/13 16:01:34 jmcneill Exp $ */
/*-
* Copyright (c) 2018 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcihost_fdt.c,v 1.27 2021/09/06 14:03:17 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcihost_fdt.c,v 1.28 2022/08/13 16:01:34 jmcneill Exp $");
#include <sys/param.h>
@@ -250,8 +250,6 @@
const int chosen = OF_finddevice("/chosen");
if (chosen <= 0 || of_getprop_uint32(chosen, "linux,pci-probe-only", &probe_only))
probe_only = 0;
- if (probe_only)
- return 0;
if (sc->sc_pci_ranges != NULL) {
ranges = sc->sc_pci_ranges;
@@ -350,8 +348,12 @@
}
}
- error = pci_configure_bus(&sc->sc_pc, pcires, sc->sc_bus_min,
- PCIHOST_CACHELINE_SIZE);
+ if (probe_only) {
+ error = 0;
+ } else {
+ error = pci_configure_bus(&sc->sc_pc, pcires, sc->sc_bus_min,
+ PCIHOST_CACHELINE_SIZE);
+ }
pciconf_resource_fini(pcires);
Home |
Main Index |
Thread Index |
Old Index