svn commit: r354309 - head/sys/dev/ichiic

Vladimir Kondratyev wulf at FreeBSD.org
Sun Nov 3 21:01:54 UTC 2019


Author: wulf
Date: Sun Nov  3 21:01:53 2019
New Revision: 354309
URL: https://svnweb.freebsd.org/changeset/base/354309

Log:
  [ig4] Remove dead code inherited from DragonflyBSD

Modified:
  head/sys/dev/ichiic/ig4_iic.c
  head/sys/dev/ichiic/ig4_var.h

Modified: head/sys/dev/ichiic/ig4_iic.c
==============================================================================
--- head/sys/dev/ichiic/ig4_iic.c	Sun Nov  3 21:00:55 2019	(r354308)
+++ head/sys/dev/ichiic/ig4_iic.c	Sun Nov  3 21:01:53 2019	(r354309)
@@ -68,18 +68,12 @@ __FBSDID("$FreeBSD$");
 #include <dev/acpica/acpivar.h>
 #endif
 
-#include <dev/pci/pcivar.h>
-#include <dev/pci/pcireg.h>
 #include <dev/iicbus/iicbus.h>
 #include <dev/iicbus/iiconf.h>
 
 #include <dev/ichiic/ig4_reg.h>
 #include <dev/ichiic/ig4_var.h>
 
-#define TRANS_NORMAL	1
-#define TRANS_PCALL	2
-#define TRANS_BLOCK	3
-
 #define DO_POLL(sc)	(cold || kdb_active || SCHEDULER_STOPPED() || sc->poll)
 
 /*
@@ -290,21 +284,7 @@ set_slave_addr(ig4iic_softc_t *sc, uint8_t slave)
 
 	/*
 	 * Wait for TXFIFO to drain before disabling the controller.
-	 *
-	 * If a write message has not been completed it's really a
-	 * programming error, but for now in that case issue an extra
-	 * byte + STOP.
-	 *
-	 * If a read message has not been completed it's also a programming
-	 * error, for now just ignore it.
 	 */
-	wait_status(sc, IG4_STATUS_TX_NOTFULL);
-	if (sc->write_started) {
-		reg_write(sc, IG4_REG_DATA_CMD, IG4_DATA_STOP);
-		sc->write_started = 0;
-	}
-	if (sc->read_started)
-		sc->read_started = 0;
 	wait_status(sc, IG4_STATUS_TX_EMPTY);
 
 	set_controller(sc, 0);

Modified: head/sys/dev/ichiic/ig4_var.h
==============================================================================
--- head/sys/dev/ichiic/ig4_var.h	Sun Nov  3 21:00:55 2019	(r354308)
+++ head/sys/dev/ichiic/ig4_var.h	Sun Nov  3 21:01:53 2019	(r354309)
@@ -43,7 +43,6 @@
 #include "pci_if.h"
 #include "iicbus_if.h"
 
-enum ig4_op { IG4_IDLE, IG4_READ, IG4_WRITE };
 enum ig4_vers { IG4_HASWELL, IG4_ATOM, IG4_SKYLAKE, IG4_APL };
 
 struct ig4_hw {
@@ -78,17 +77,12 @@ struct ig4iic_softc {
 	void		*intr_handle;
 	int		intr_type;
 	enum ig4_vers	version;
-	enum ig4_op	op;
 	struct ig4_cfg	cfg;
-	int		cmd;
 	uint32_t	intr_mask;
-	int		error;
 	uint8_t		last_slave;
 	int		platform_attached : 1;
 	int		use_10bit : 1;
 	int		slave_valid : 1;
-	int		read_started : 1;
-	int		write_started : 1;
 	int		poll: 1;
 
 	/*


More information about the svn-src-all mailing list