Subject: kern/23598: Suspended TMS on NS PC87366 cannot be woken
To: None <gnats-bugs@gnats.netbsd.org>
From: None <ahodgen@kill-9.org>
List: netbsd-bugs
Date: 11/30/2003 01:08:09
>Number: 23598
>Category: kern
>Synopsis: Suspended TMS on NS PC87366 cannot be woken
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Nov 30 01:12:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: ahodgen@kill-9.org
>Release: NetBSD 1.6ZF
>Organization:
>Environment:
System: NetBSD 1.6ZF NetBSD 1.6ZF (NET4801) #8: Sat Nov 29 18:47:19 EST 2003 ahodgen@coors:/db/netbsd/src/sys/arch/i386/compile/obj/NET4801 i386
Architecture: i386
Machine: i386
>Description:
Temperature monitoring for National Semiconductor PC87366 will not wake up
if the module is suspended or has never been initialized.
>How-To-Repeat:
Boot soekris net4801 with the following config line:
nsclpcsio* at isa?
>Fix:
Index: sys/dev/isa/nsclpcsio_isa.c
===================================================================
RCS file: /cvsroot/src/sys/dev/isa/nsclpcsio_isa.c,v
retrieving revision 1.5
diff -c -r1.5 nsclpcsio_isa.c
*** sys/dev/isa/nsclpcsio_isa.c 2002/10/22 16:18:26 1.5
--- sys/dev/isa/nsclpcsio_isa.c 2003/11/30 00:10:23
***************
*** 188,197 ****
}
printf("%s: TMS at 0x%x\n", sc->sc_dev.dv_xname, tms_iobase);
! if (bus_space_read_1(sc->sc_tms_iot, sc->sc_tms_ioh, 0x08) & 1) {
printf("%s: TMS in standby mode\n", sc->sc_dev.dv_xname);
! /* XXX awake it ??? */
! return;
}
/* Initialize sensor meta data */
--- 188,215 ----
}
printf("%s: TMS at 0x%x\n", sc->sc_dev.dv_xname, tms_iobase);
! val = bus_space_read_1(sc->sc_tms_iot, sc->sc_tms_ioh, 0x08);
! if (val & 1) {
printf("%s: TMS in standby mode\n", sc->sc_dev.dv_xname);
! /*
! * Pretend that TMS has never been initialized and
! * enable all of the temperature sensors. The documentation
! * implies that writing an 0x0f to offset 0x09 will do this,
! * however I had to do this to each in practice
! */
! bus_space_write_1(sc->sc_tms_iot, sc->sc_tms_ioh, 0x08, 0x00);
! bus_space_write_1(sc->sc_tms_iot, sc->sc_tms_ioh, 0x09, 0x00);
! bus_space_write_1(sc->sc_tms_iot, sc->sc_tms_ioh, 0x0a, 0x01);
! bus_space_write_1(sc->sc_tms_iot, sc->sc_tms_ioh, 0x09, 0x01);
! bus_space_write_1(sc->sc_tms_iot, sc->sc_tms_ioh, 0x0a, 0x01);
! bus_space_write_1(sc->sc_tms_iot, sc->sc_tms_ioh, 0x09, 0x02);
! bus_space_write_1(sc->sc_tms_iot, sc->sc_tms_ioh, 0x0a, 0x01);
! val = bus_space_read_1(sc->sc_tms_iot, sc->sc_tms_ioh, 0x08);
! if (!(val & 1)) {
! printf("%s: TMS awoken\n", sc->sc_dev.dv_xname);
! } else {
! return;
! }
}
/* Initialize sensor meta data */
>Release-Note:
>Audit-Trail:
>Unformatted: