it_check(): check values from IT_RES48 and IT_RES52, if both are default
values specified by the chip, continue attaching the driver (previously only checking IT_RES48 was enough and IT_RES52 was ignored).
This commit is contained in:
parent
5d3a49100a
commit
045e0f2d3d
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: it.c,v 1.1 2006/05/13 09:02:19 xtraeme Exp $ */
|
||||
/* $NetBSD: it.c,v 1.2 2006/06/05 15:59:47 xtraeme Exp $ */
|
||||
/* $OpenBSD: it.c,v 1.19 2006/04/10 00:57:54 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: it.c,v 1.1 2006/05/13 09:02:19 xtraeme Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: it.c,v 1.2 2006/06/05 15:59:47 xtraeme Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -199,7 +199,7 @@ it_check(bus_space_tag_t iot, int base)
|
|||
bus_space_write_1(iot, ioh, IT_ADDR, IT_RES52);
|
||||
cr1 = bus_space_read_1(iot, ioh, IT_DATA);
|
||||
|
||||
if (cr0 == IT_RES48_DEFAULT || cr1 == IT_RES52_DEFAULT)
|
||||
if (cr0 == IT_RES48_DEFAULT && cr1 == IT_RES52_DEFAULT)
|
||||
rv = 1;
|
||||
|
||||
bus_space_unmap(iot, ioh, 8);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: itvar.h,v 1.1 2006/05/13 09:02:19 xtraeme Exp $ */
|
||||
/* $NetBSD: itvar.h,v 1.2 2006/06/05 15:59:47 xtraeme Exp $ */
|
||||
/* $OpenBSD: itvar.h,v 1.2 2003/11/05 20:57:10 grange Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -76,7 +76,7 @@
|
|||
#define IT_RES48 0x48
|
||||
#define IT_RES48_DEFAULT 0x2d
|
||||
#define IT_RES52 0x52
|
||||
#define IT_RES52_DEFAULT 0x7d
|
||||
#define IT_RES52_DEFAULT 0x7f
|
||||
|
||||
#define IT_VREF (4096) /* Vref = 4.096 V */
|
||||
|
||||
|
|
Loading…
Reference in New Issue