Module Name:    src
Committed By:   thorpej
Date:           Sat May  8 15:51:31 UTC 2021

Modified Files:
        src/sys/arch/macppc/dev [thorpej-i2c-spi-conf]: cuda.c
        src/sys/arch/sandpoint/sandpoint [thorpej-i2c-spi-conf]: autoconf.c
        src/sys/dev/acpi [thorpej-i2c-spi-conf]: acpi_i2c.c
        src/sys/dev/i2c [thorpej-i2c-spi-conf]: i2cvar.h
        src/sys/dev/ofw [thorpej-i2c-spi-conf]: ofw_i2c_subr.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.28.2.1 -r1.28.2.2 src/sys/arch/macppc/dev/cuda.c
cvs rdiff -u -r1.29.6.1 -r1.29.6.2 \
    src/sys/arch/sandpoint/sandpoint/autoconf.c
cvs rdiff -u -r1.11.4.1 -r1.11.4.2 src/sys/dev/acpi/acpi_i2c.c
cvs rdiff -u -r1.24.2.2 -r1.24.2.3 src/sys/dev/i2c/i2cvar.h
cvs rdiff -u -r1.1.6.1 -r1.1.6.2 src/sys/dev/ofw/ofw_i2c_subr.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/macppc/dev/cuda.c
diff -u src/sys/arch/macppc/dev/cuda.c:1.28.2.1 src/sys/arch/macppc/dev/cuda.c:1.28.2.2
--- src/sys/arch/macppc/dev/cuda.c:1.28.2.1	Sat May  8 11:40:02 2021
+++ src/sys/arch/macppc/dev/cuda.c	Sat May  8 15:51:30 2021
@@ -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 @@ cuda_i2c_enumerate_devices(device_t dev,
 		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);
 

Index: src/sys/arch/sandpoint/sandpoint/autoconf.c
diff -u src/sys/arch/sandpoint/sandpoint/autoconf.c:1.29.6.1 src/sys/arch/sandpoint/sandpoint/autoconf.c:1.29.6.2
--- src/sys/arch/sandpoint/sandpoint/autoconf.c:1.29.6.1	Sun Apr 25 23:19:16 2021
+++ src/sys/arch/sandpoint/sandpoint/autoconf.c	Sat May  8 15:51:30 2021
@@ -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 @@ sandpoint_i2c_enumerate_devices(device_t
 		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);
 

Index: src/sys/dev/acpi/acpi_i2c.c
diff -u src/sys/dev/acpi/acpi_i2c.c:1.11.4.1 src/sys/dev/acpi/acpi_i2c.c:1.11.4.2
--- src/sys/dev/acpi/acpi_i2c.c:1.11.4.1	Sun Apr 25 21:49:56 2021
+++ src/sys/dev/acpi/acpi_i2c.c	Sat May  8 15:51:30 2021
@@ -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 @@ acpi_i2c_enumerate_device(device_t dev, 
 	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);
 

Index: src/sys/dev/i2c/i2cvar.h
diff -u src/sys/dev/i2c/i2cvar.h:1.24.2.2 src/sys/dev/i2c/i2cvar.h:1.24.2.3
--- src/sys/dev/i2c/i2cvar.h:1.24.2.2	Sat May  8 14:23:15 2021
+++ src/sys/dev/i2c/i2cvar.h	Sat May  8 15:51:31 2021
@@ -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 @@ struct i2cbus_attach_args {
 	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 @@ struct i2c_attach_args {
 	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 */
 };
 
 /*

Index: src/sys/dev/ofw/ofw_i2c_subr.c
diff -u src/sys/dev/ofw/ofw_i2c_subr.c:1.1.6.1 src/sys/dev/ofw/ofw_i2c_subr.c:1.1.6.2
--- src/sys/dev/ofw/ofw_i2c_subr.c:1.1.6.1	Sun Apr 25 22:16:05 2021
+++ src/sys/dev/ofw/ofw_i2c_subr.c	Sat May  8 15:51:30 2021
@@ -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 @@ of_i2c_enumerate_devices_ext(device_t de
 		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);
 

Reply via email to