Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/i2c Interrupt-driven I/O seems to completely go off ...



details:   https://anonhg.NetBSD.org/src/rev/624831baffc6
branches:  trunk
changeset: 744892:624831baffc6
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Feb 15 23:42:01 2020 +0000

description:
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.

diffstat:

 sys/dev/i2c/gttwsi_core.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r c9a9488bd38c -r 624831baffc6 sys/dev/i2c/gttwsi_core.c
--- a/sys/dev/i2c/gttwsi_core.c Sat Feb 15 23:19:37 2020 +0000
+++ b/sys/dev/i2c/gttwsi_core.c Sat Feb 15 23:42:01 2020 +0000
@@ -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 @@
        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;



Home | Main Index | Thread Index | Old Index