Module Name: src Committed By: thorpej Date: Sat Feb 15 23:42:01 UTC 2020
Modified Files: src/sys/dev/i2c: gttwsi_core.c Log Message: Interrupt-driven I/O seems to completely go off the rails, at least on AllWinner implementations of this controller, so force polled mode for now. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/dev/i2c/gttwsi_core.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/dev/i2c/gttwsi_core.c diff -u src/sys/dev/i2c/gttwsi_core.c:1.15 src/sys/dev/i2c/gttwsi_core.c:1.16 --- src/sys/dev/i2c/gttwsi_core.c:1.15 Mon Jan 13 12:53:46 2020 +++ src/sys/dev/i2c/gttwsi_core.c Sat Feb 15 23:42:01 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: gttwsi_core.c,v 1.15 2020/01/13 12:53:46 thorpej Exp $ */ +/* $NetBSD: gttwsi_core.c,v 1.16 2020/02/15 23:42:01 thorpej Exp $ */ /* * Copyright (c) 2008 Eiji Kawauchi. * All rights reserved. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gttwsi_core.c,v 1.15 2020/01/13 12:53:46 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gttwsi_core.c,v 1.16 2020/02/15 23:42:01 thorpej Exp $"); #include "locators.h" #include <sys/param.h> @@ -317,6 +317,13 @@ gttwsi_wait(struct gttwsi_softc *sc, uin uint32_t status; int timo, error = 0; + /* + * XXX Interrupt-driven mode seems to be horribly broken, + * XXX at least on AllWinner implementations. Force polled + * XXX mode for now. + */ + flags |= I2C_F_POLL; + DELAY(5); if (!(flags & I2C_F_POLL)) control |= CONTROL_INTEN;