Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi Remove the homegrown attempt to match the paren...



details:   https://anonhg.NetBSD.org/src/rev/8e7f2fa91780
branches:  trunk
changeset: 756682:8e7f2fa91780
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Wed Jul 28 16:26:56 2010 +0000

description:
Remove the homegrown attempt to match the parent PCI bus. This was only used
for descriptive purposes, and for such purposes the ACPIVERBOSE output is
much better.

diffstat:

 sys/dev/acpi/smbus_acpi.c |  45 ++-------------------------------------------
 1 files changed, 2 insertions(+), 43 deletions(-)

diffs (76 lines):

diff -r 515e631d4767 -r 8e7f2fa91780 sys/dev/acpi/smbus_acpi.c
--- a/sys/dev/acpi/smbus_acpi.c Wed Jul 28 16:02:33 2010 +0000
+++ b/sys/dev/acpi/smbus_acpi.c Wed Jul 28 16:26:56 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: smbus_acpi.c,v 1.10 2010/04/15 07:02:24 jruoho Exp $ */
+/* $NetBSD: smbus_acpi.c,v 1.11 2010/07/28 16:26:56 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: smbus_acpi.c,v 1.10 2010/04/15 07:02:24 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smbus_acpi.c,v 1.11 2010/07/28 16:26:56 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -176,12 +176,9 @@
        struct acpi_attach_args *aa = aux;
        struct i2cbus_attach_args iba;
        ACPI_STATUS rv;
-       ACPI_HANDLE native_dev, native_bus;
-       ACPI_DEVICE_INFO *native_dev_info, *native_bus_info;
        ACPI_BUFFER smi_buf;
        ACPI_OBJECT *e, *p;
        struct SMB_INFO *info;
-       int pci_bus, pci_dev, pci_func;
 
        aprint_naive("\n");
 
@@ -229,44 +226,6 @@
        }
        aprint_normal("\n");
 
-       /*
-        * Retrieve and display native controller info
-        */
-       rv = AcpiGetParent(sc->sc_devnode->ad_handle, &native_dev);
-
-       native_bus_info = native_dev_info = NULL;
-
-       if (ACPI_SUCCESS(rv))
-               rv = AcpiGetParent(native_dev, &native_bus);
-
-       if (ACPI_SUCCESS(rv))
-               rv = AcpiGetObjectInfo(native_bus, &native_bus_info);
-
-       if (ACPI_SUCCESS(rv) &&
-           acpi_match_hid(native_bus_info, pcibus_acpi_ids) != 0) {
-
-               rv = AcpiGetObjectInfo(native_dev, &native_dev_info);
-
-               if (ACPI_SUCCESS(rv)) {
-                       pci_bus = native_bus_info->Address;
-                       pci_dev = ACPI_ADR_PCI_DEV(native_dev_info->Address);
-                       pci_func = ACPI_ADR_PCI_FUNC(native_dev_info->Address);
-                       aprint_debug_dev(self, "Native i2c host controller"
-                           " is on PCI bus %d dev %d func %d\n",
-                           pci_bus, pci_dev, pci_func);
-                       /*
-                        * XXX We really need a mechanism to prevent the
-                        * XXX native controller from attaching
-                        */
-               }
-       }
-
-       if (native_bus_info != NULL)
-               ACPI_FREE(native_bus_info);
-
-       if (native_dev_info != NULL)
-               ACPI_FREE(native_dev_info);
-
        memset(&iba, 0, sizeof(iba));
        iba.iba_tag = &sc->sc_i2c_tag;
        config_found_ia(self, "i2cbus", &iba, iicbus_print);



Home | Main Index | Thread Index | Old Index