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.
This commit is contained in:
parent
86465dbe5a
commit
839cd8df19
|
@ -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.
|
* Copyright (c) 2008 Eiji Kawauchi.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#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 "locators.h"
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
@ -317,6 +317,13 @@ gttwsi_wait(struct gttwsi_softc *sc, uint32_t control, uint32_t expect,
|
||||||
uint32_t status;
|
uint32_t status;
|
||||||
int timo, error = 0;
|
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);
|
DELAY(5);
|
||||||
if (!(flags & I2C_F_POLL))
|
if (!(flags & I2C_F_POLL))
|
||||||
control |= CONTROL_INTEN;
|
control |= CONTROL_INTEN;
|
||||||
|
|
Loading…
Reference in New Issue