Source-Changes-HG archive

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

[src/thorpej-i2c-spi-conf]: src/sys/dev/ofw There are no more consumers of i2...



details:   https://anonhg.NetBSD.org/src/rev/70717fa4341a
branches:  thorpej-i2c-spi-conf
changeset: 1020789:70717fa4341a
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat May 08 15:51:30 2021 +0000

description:
There are no more consumers of i2c attach args "cookie" and "cookietype",
so garbage-collect them.

diffstat:

 sys/arch/macppc/dev/cuda.c              |   6 ++----
 sys/arch/sandpoint/sandpoint/autoconf.c |   6 ++----
 sys/dev/acpi/acpi_i2c.c                 |   6 ++----
 sys/dev/i2c/i2cvar.h                    |  24 +-----------------------
 sys/dev/ofw/ofw_i2c_subr.c              |   6 ++----
 5 files changed, 9 insertions(+), 39 deletions(-)

diffs (153 lines):

diff -r a6b6def931d4 -r 70717fa4341a sys/arch/macppc/dev/cuda.c
--- a/sys/arch/macppc/dev/cuda.c        Sat May 08 15:44:12 2021 +0000
+++ b/sys/arch/macppc/dev/cuda.c        Sat May 08 15:51:30 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cuda.c,v 1.28.2.1 2021/05/08 11:40:02 thorpej Exp $ */
+/*     $NetBSD: cuda.c,v 1.28.2.2 2021/05/08 15:51:30 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2006 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cuda.c,v 1.28.2.1 2021/05/08 11:40:02 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cuda.c,v 1.28.2.2 2021/05/08 15:51:30 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -195,8 +195,6 @@
                args->ia->ia_prop = props;
                /* Child gets no handle. */
                devhandle_invalidate(&args->ia->ia_devhandle);
-               args->ia->ia_cookie = 0;                        /* XXX */
-               args->ia->ia_cookietype = I2C_COOKIE_NONE;      /* XXX */
 
                cbrv = args->callback(dev, args);
 
diff -r a6b6def931d4 -r 70717fa4341a sys/arch/sandpoint/sandpoint/autoconf.c
--- a/sys/arch/sandpoint/sandpoint/autoconf.c   Sat May 08 15:44:12 2021 +0000
+++ b/sys/arch/sandpoint/sandpoint/autoconf.c   Sat May 08 15:51:30 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.29.6.1 2021/04/25 23:19:16 thorpej Exp $        */
+/*     $NetBSD: autoconf.c,v 1.29.6.2 2021/05/08 15:51:30 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.29.6.1 2021/04/25 23:19:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.29.6.2 2021/05/08 15:51:30 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -190,8 +190,6 @@
                args->ia->ia_prop = props;
                /* no devhandle for child devices. */
                devhandle_invalidate(&args->ia->ia_devhandle);
-               args->ia->ia_cookie = 0;                        /* XXX */
-               args->ia->ia_cookietype = I2C_COOKIE_NONE;      /* XXX */
 
                cbrv = args->callback(dev, args);
 
diff -r a6b6def931d4 -r 70717fa4341a sys/dev/acpi/acpi_i2c.c
--- a/sys/dev/acpi/acpi_i2c.c   Sat May 08 15:44:12 2021 +0000
+++ b/sys/dev/acpi/acpi_i2c.c   Sat May 08 15:51:30 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_i2c.c,v 1.11.4.1 2021/04/25 21:49:56 thorpej Exp $ */
+/* $NetBSD: acpi_i2c.c,v 1.11.4.2 2021/05/08 15:51:30 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2017, 2021 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_i2c.c,v 1.11.4.1 2021/04/25 21:49:56 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_i2c.c,v 1.11.4.2 2021/05/08 15:51:30 thorpej Exp $");
 
 #include <dev/acpi/acpireg.h>
 #include <dev/acpi/acpivar.h>
@@ -105,8 +105,6 @@
        args->ia->ia_clist_size = clist_size;
        args->ia->ia_prop = props;
        args->ia->ia_devhandle = devhandle_from_acpi(ad->ad_handle);
-       args->ia->ia_cookie = (uint64_t)ad->ad_handle;  /* XXX */
-       args->ia->ia_cookietype = I2C_COOKIE_ACPI;      /* XXX */
 
        cbrv = args->callback(dev, args);
 
diff -r a6b6def931d4 -r 70717fa4341a sys/dev/i2c/i2cvar.h
--- a/sys/dev/i2c/i2cvar.h      Sat May 08 15:44:12 2021 +0000
+++ b/sys/dev/i2c/i2cvar.h      Sat May 08 15:51:30 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i2cvar.h,v 1.24.2.2 2021/05/08 14:23:15 thorpej Exp $  */
+/*     $NetBSD: i2cvar.h,v 1.24.2.3 2021/05/08 15:51:31 thorpej Exp $  */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -134,13 +134,6 @@
        int iba_bus;                    /* bus number (optional) */
 };
 
-/* Type of value stored in "ia_cookie" */
-enum i2c_cookie_type {
-       I2C_COOKIE_NONE,                /* Cookie is not valid */
-       I2C_COOKIE_OF,                  /* Cookie is an OF node phandle */
-       I2C_COOKIE_ACPI,                /* Cookie is an ACPI handle */
-};
-
 /* Used to attach devices on the i2c bus. */
 struct i2c_attach_args {
        i2c_tag_t       ia_tag;         /* our controller */
@@ -153,21 +146,6 @@
        size_t          ia_clist_size;  /* size of compatible strlist */
        prop_dictionary_t ia_prop;      /* property dictionary for the device */
        devhandle_t     ia_devhandle;   /* device handle for the device */
-
-       /*
-        * The following is of limited usefulness and should only be used
-        * in rare cases where we really know what we are doing. Example:
-        * a machine dependent i2c driver (located in sys/arch/$arch/dev)
-        * needing to access some firmware properties.
-        * Depending on the firmware in use, an identifier for the device
-        * may be present. Example: on OpenFirmware machines the device
-        * tree OF node - if available. This info is hard to transport
-        * down to MD drivers through the MI i2c bus otherwise.
-        *
-        * On ACPI platforms this is the ACPI_HANDLE of the device.
-        */
-       uintptr_t       ia_cookie;      /* OF node in openfirmware machines */
-       enum i2c_cookie_type ia_cookietype; /* Value type of cookie */
 };
 
 /*
diff -r a6b6def931d4 -r 70717fa4341a sys/dev/ofw/ofw_i2c_subr.c
--- a/sys/dev/ofw/ofw_i2c_subr.c        Sat May 08 15:44:12 2021 +0000
+++ b/sys/dev/ofw/ofw_i2c_subr.c        Sat May 08 15:51:30 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofw_i2c_subr.c,v 1.1.6.1 2021/04/25 22:16:05 thorpej Exp $     */
+/*     $NetBSD: ofw_i2c_subr.c,v 1.1.6.2 2021/05/08 15:51:30 thorpej Exp $     */
 
 /*
  * Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw_i2c_subr.c,v 1.1.6.1 2021/04/25 22:16:05 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_i2c_subr.c,v 1.1.6.2 2021/05/08 15:51:30 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -133,8 +133,6 @@
                args->ia->ia_clist_size = clist_size;
                args->ia->ia_prop = props;
                args->ia->ia_devhandle = devhandle_from_of(node);
-               args->ia->ia_cookie = node;                     /* XXX */
-               args->ia->ia_cookietype = I2C_COOKIE_OF;        /* XXX */
 
                cbrv = args->callback(dev, args);
 



Home | Main Index | Thread Index | Old Index