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 Some parts of the ACPI subsystem depend on ...



details:   https://anonhg.NetBSD.org/src/rev/93cb64f33c18
branches:  trunk
changeset: 836516:93cb64f33c18
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Oct 21 12:06:22 2018 +0000

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

diffstat:

 sys/arch/arm/fdt/acpi_fdt.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (42 lines):

diff -r 27e069bb9849 -r 93cb64f33c18 sys/arch/arm/fdt/acpi_fdt.c
--- a/sys/arch/arm/fdt/acpi_fdt.c       Sun Oct 21 11:56:26 2018 +0000
+++ b/sys/arch/arm/fdt/acpi_fdt.c       Sun Oct 21 12:06:22 2018 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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_poweroff(device_t);
 
+static struct acpi_pci_context acpi_fdt_pci_context;
+
 static const char * const compatible[] = {
        "netbsd,acpi",
        NULL
@@ -87,9 +89,13 @@
        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 | 



Home | Main Index | Thread Index | Old Index