Module Name:    src
Committed By:   jmcneill
Date:           Sun Oct 21 12:06:22 UTC 2018

Modified Files:
        src/sys/arch/arm/fdt: acpi_fdt.c

Log Message:
Some parts of the ACPI subsystem depend on a valid PCI chipset tag in the
ACPI softc. Provide one here, and assume segment 0.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/fdt/acpi_fdt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/fdt/acpi_fdt.c
diff -u src/sys/arch/arm/fdt/acpi_fdt.c:1.4 src/sys/arch/arm/fdt/acpi_fdt.c:1.5
--- src/sys/arch/arm/fdt/acpi_fdt.c:1.4	Sun Oct 21 00:42:05 2018
+++ src/sys/arch/arm/fdt/acpi_fdt.c	Sun Oct 21 12:06:22 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_fdt.c,v 1.4 2018/10/21 00:42:05 jmcneill Exp $ */
+/* $NetBSD: acpi_fdt.c,v 1.5 2018/10/21 12:06:22 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill <jmcne...@invisible.ca>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_fdt.c,v 1.4 2018/10/21 00:42:05 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_fdt.c,v 1.5 2018/10/21 12:06:22 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -53,6 +53,8 @@ static void	acpi_fdt_attach(device_t, de
 
 static void	acpi_fdt_poweroff(device_t);
 
+static struct acpi_pci_context acpi_fdt_pci_context;
+
 static const char * const compatible[] = {
 	"netbsd,acpi",
 	NULL
@@ -87,9 +89,13 @@ acpi_fdt_attach(device_t parent, device_
 	if (!acpi_probe())
 		aprint_error_dev(self, "failed to probe ACPI\n");
 
+	acpi_fdt_pci_context.ap_pc = arm_acpi_pci_chipset;
+	acpi_fdt_pci_context.ap_pc.pc_conf_v = &acpi_fdt_pci_context;
+	acpi_fdt_pci_context.ap_seg = 0;
+
 	aa.aa_iot = 0;
 	aa.aa_memt = faa->faa_bst;
-	aa.aa_pc = &arm_acpi_pci_chipset;
+	aa.aa_pc = &acpi_fdt_pci_context.ap_pc;
 	aa.aa_pciflags =
 	    /*PCI_FLAGS_IO_OKAY |*/ PCI_FLAGS_MEM_OKAY |
 	    PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | 

Reply via email to