%b -> bitmask_snprintf()
This commit is contained in:
parent
ad533632da
commit
650553215e
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: esp.c,v 1.27 2000/06/05 07:59:51 nisimura Exp $ */
|
||||
/* $NetBSD: esp.c,v 1.28 2000/08/09 02:26:26 tv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -445,10 +445,15 @@ esp_dma_isintr(sc)
|
||||
|
||||
#ifdef ESP_DEBUG
|
||||
esp_dma_nest++;
|
||||
#endif
|
||||
|
||||
DPRINTF(("esp_dma_isintr = 0x%b\n",
|
||||
(*(volatile u_long *)IIOV(NEXT_P_INTRSTAT)),NEXT_INTR_BITS));
|
||||
if (esp_debug) {
|
||||
char sbuf[256];
|
||||
|
||||
bitmask_snprintf((*(volatile u_long *)IIOV(NEXT_P_INTRSTAT)),
|
||||
NEXT_INTR_BITS, sbuf, sizeof(sbuf));
|
||||
printf("esp_dma_isintr = 0x%s\n", sbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
while (esp_dma_isactive(sc)) {
|
||||
flushcount++;
|
||||
@ -568,10 +573,15 @@ esp_dma_reset(sc)
|
||||
|
||||
#ifdef ESP_DEBUG
|
||||
if (esp_debug) {
|
||||
printf(" *intrstat = 0x%b\n",
|
||||
(*(volatile u_long *)IIOV(NEXT_P_INTRSTAT)),NEXT_INTR_BITS);
|
||||
printf(" *intrmask = 0x%b\n",
|
||||
(*(volatile u_long *)IIOV(NEXT_P_INTRMASK)),NEXT_INTR_BITS);
|
||||
char sbuf[256];
|
||||
|
||||
bitmask_snprintf((*(volatile u_long *)IIOV(NEXT_P_INTRSTAT)),
|
||||
NEXT_INTR_BITS, sbuf, sizeof(sbuf));
|
||||
printf(" *intrstat = 0x%s\n", sbuf);
|
||||
|
||||
bitmask_snprintf((*(volatile u_long *)IIOV(NEXT_P_INTRMASK)),
|
||||
NEXT_INTR_BITS, sbuf, sizeof(sbuf));
|
||||
printf(" *intrmask = 0x%s\n", sbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1199,10 +1209,15 @@ esp_dmacb_shutdown(arg)
|
||||
|
||||
#ifdef ESP_DEBUG
|
||||
if (esp_debug) {
|
||||
printf(" *intrstat = 0x%b\n",
|
||||
(*(volatile u_long *)IIOV(NEXT_P_INTRSTAT)),NEXT_INTR_BITS);
|
||||
printf(" *intrmask = 0x%b\n",
|
||||
(*(volatile u_long *)IIOV(NEXT_P_INTRMASK)),NEXT_INTR_BITS);
|
||||
char sbuf[256];
|
||||
|
||||
bitmask_snprintf((*(volatile u_long *)IIOV(NEXT_P_INTRSTAT)),
|
||||
NEXT_INTR_BITS, sbuf, sizeof(sbuf));
|
||||
printf(" *intrstat = 0x%s\n", sbuf);
|
||||
|
||||
bitmask_snprintf((*(volatile u_long *)IIOV(NEXT_P_INTRMASK)),
|
||||
NEXT_INTR_BITS, sbuf, sizeof(sbuf));
|
||||
printf(" *intrmask = 0x%s\n", sbuf);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mb8795.c,v 1.17 1999/08/29 05:51:45 dbj Exp $ */
|
||||
/* $NetBSD: mb8795.c,v 1.18 2000/08/09 02:26:26 tv Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1998 Darrin B. Jewell
|
||||
* All rights reserved.
|
||||
@ -278,11 +278,6 @@ mb8795_rint(sc)
|
||||
|
||||
bus_space_write_1(sc->sc_bst,sc->sc_bsh, XE_RXSTAT, XE_RXSTAT_CLEAR);
|
||||
|
||||
#if 0
|
||||
printf("%s: rx interrupt, rxstat = %b\n",
|
||||
sc->sc_dev.dv_xname, rxstat, XE_RXSTAT_BITS);
|
||||
#endif
|
||||
|
||||
if (rxstat & XE_RXSTAT_RESET) {
|
||||
DPRINTF(("%s: rx reset packet\n",
|
||||
sc->sc_dev.dv_xname));
|
||||
@ -377,16 +372,28 @@ mb8795_rint(sc)
|
||||
splx(s);
|
||||
|
||||
}
|
||||
|
||||
DPRINTF(("%s: rx interrupt, rxstat = %b\n",
|
||||
sc->sc_dev.dv_xname, rxstat, XE_RXSTAT_BITS));
|
||||
|
||||
DPRINTF(("rxstat = 0x%b\n",
|
||||
bus_space_read_1(sc->sc_bst,sc->sc_bsh, XE_RXSTAT), XE_RXSTAT_BITS));
|
||||
DPRINTF(("rxmask = 0x%b\n",
|
||||
bus_space_read_1(sc->sc_bst,sc->sc_bsh, XE_RXMASK), XE_RXMASK_BITS));
|
||||
DPRINTF(("rxmode = 0x%b\n",
|
||||
bus_space_read_1(sc->sc_bst,sc->sc_bsh, XE_RXMODE), XE_RXMODE_BITS));
|
||||
#ifdef XE_DEBUG
|
||||
if (xe_debug) {
|
||||
char sbuf[256];
|
||||
|
||||
bitmask_snprintf(rxstat, XE_RXSTAT_BITS, sbuf, sizeof(sbuf));
|
||||
printf("%s: rx interrupt, rxstat = %s\n",
|
||||
sc->sc_dev.dv_xname, sbuf);
|
||||
|
||||
bitmask_snprintf(bus_space_read_1(sc->sc_bst,sc->sc_bsh, XE_RXSTAT),
|
||||
XE_RXSTAT_BITS, sbuf, sizeof(sbuf));
|
||||
printf("rxstat = 0x%s\n", sbuf);
|
||||
|
||||
bitmask_snprintf(bus_space_read_1(sc->sc_bst,sc->sc_bsh, XE_RXMASK),
|
||||
XE_RXMASK_BITS, sbuf, sizeof(sbuf));
|
||||
printf("rxmask = 0x%s\n", sbuf);
|
||||
|
||||
bitmask_snprintf(bus_space_read_1(sc->sc_bst,sc->sc_bsh, XE_RXMODE),
|
||||
XE_RXMODE_BITS, sbuf, sizeof(sbuf));
|
||||
printf("rxmode = 0x%s\n", sbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
@ -406,11 +413,6 @@ mb8795_tint(sc)
|
||||
txstat = bus_space_read_1(sc->sc_bst,sc->sc_bsh, XE_TXSTAT);
|
||||
txmask = bus_space_read_1(sc->sc_bst,sc->sc_bsh, XE_TXMASK);
|
||||
|
||||
#if 0
|
||||
DPRINTF(("%s: tx interrupt, txstat = %b\n",
|
||||
sc->sc_dev.dv_xname, txstat, XE_TXSTAT_BITS));
|
||||
#endif
|
||||
|
||||
if (txstat & XE_TXSTAT_SHORTED) {
|
||||
printf("%s: tx cable shorted\n", sc->sc_dev.dv_xname);
|
||||
ifp->if_oerrors++;
|
||||
@ -431,9 +433,11 @@ mb8795_tint(sc)
|
||||
|
||||
#if 0
|
||||
if (txstat & XE_TXSTAT_READY) {
|
||||
char sbuf[256];
|
||||
|
||||
panic("%s: unexpected tx interrupt %b",
|
||||
sc->sc_dev.dv_xname,txstat,XE_TXSTAT_BITS);
|
||||
bitmask_snprintf(txstat, XE_TXSTAT_BITS, sbuf, sizeof(sbuf));
|
||||
panic("%s: unexpected tx interrupt %s",
|
||||
sc->sc_dev.dv_xname, sbuf);
|
||||
|
||||
/* turn interrupt off */
|
||||
bus_space_write_1(sc->sc_bst,sc->sc_bsh, XE_TXMASK,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nextdma.c,v 1.21 2000/01/12 19:18:00 dbj Exp $ */
|
||||
/* $NetBSD: nextdma.c,v 1.22 2000/08/09 02:26:26 tv Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1998 Darrin B. Jewell
|
||||
* All rights reserved.
|
||||
@ -113,8 +113,16 @@ void
|
||||
nextdma_init(nd)
|
||||
struct nextdma_config *nd;
|
||||
{
|
||||
DPRINTF(("DMA init ipl (%ld) intr(0x%b)\n",
|
||||
NEXT_I_IPL(nd->nd_intr), NEXT_I_BIT(nd->nd_intr),NEXT_INTR_BITS));
|
||||
#ifdef ND_DEBUG
|
||||
if (nextdma_debug) {
|
||||
char sbuf[256];
|
||||
|
||||
bitmask_snprintf(NEXT_I_BIT(nd->nd_intr), NEXT_INTR_BITS,
|
||||
sbuf, sizeof(sbuf));
|
||||
printf("DMA init ipl (%ld) intr(0x%s)\n",
|
||||
NEXT_I_IPL(nd->nd_intr), sbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
nd->_nd_map = NULL;
|
||||
nd->_nd_idx = 0;
|
||||
@ -329,8 +337,9 @@ next_dma_print(nd)
|
||||
u_long dd_saved_limit;
|
||||
u_long dd_saved_start;
|
||||
u_long dd_saved_stop;
|
||||
char sbuf[256];
|
||||
|
||||
/* Read all of the registers before we print anything out,
|
||||
/* Read all of the registers before we print anything out,
|
||||
* in case something changes
|
||||
*/
|
||||
dd_csr = bus_space_read_4(nd->nd_bst, nd->nd_bsh, DD_CSR);
|
||||
@ -344,10 +353,13 @@ next_dma_print(nd)
|
||||
dd_saved_start = bus_space_read_4(nd->nd_bst, nd->nd_bsh, DD_SAVED_START);
|
||||
dd_saved_stop = bus_space_read_4(nd->nd_bst, nd->nd_bsh, DD_SAVED_STOP);
|
||||
|
||||
printf("NDMAP: *intrstat = 0x%b\n",
|
||||
(*(volatile u_long *)IIOV(NEXT_P_INTRSTAT)),NEXT_INTR_BITS);
|
||||
printf("NDMAP: *intrmask = 0x%b\n",
|
||||
(*(volatile u_long *)IIOV(NEXT_P_INTRMASK)),NEXT_INTR_BITS);
|
||||
bitmask_snprintf((*(volatile u_long *)IIOV(NEXT_P_INTRSTAT)),
|
||||
NEXT_INTR_BITS, sbuf, sizeof(sbuf));
|
||||
printf("NDMAP: *intrstat = 0x%s\n", sbuf);
|
||||
|
||||
bitmask_snprintf((*(volatile u_long *)IIOV(NEXT_P_INTRMASK)),
|
||||
NEXT_INTR_BITS, sbuf, sizeof(sbuf));
|
||||
printf("NDMAP: *intrmask = 0x%s\n", sbuf);
|
||||
|
||||
/* NDMAP is Next DMA Print (really!) */
|
||||
|
||||
@ -380,7 +392,9 @@ next_dma_print(nd)
|
||||
printf("NDMAP: nd->_nd_map_cont = NULL\n");
|
||||
}
|
||||
|
||||
printf("NDMAP: dd->dd_csr = 0x%b\n", dd_csr, DMACSR_BITS);
|
||||
bitmask_snprintf(dd_csr, DMACSR_BITS, sbuf, sizeof(sbuf));
|
||||
printf("NDMAP: dd->dd_csr = 0x%s\n", sbuf);
|
||||
|
||||
printf("NDMAP: dd->dd_saved_next = 0x%08x\n", dd_saved_next);
|
||||
printf("NDMAP: dd->dd_saved_limit = 0x%08x\n", dd_saved_limit);
|
||||
printf("NDMAP: dd->dd_saved_start = 0x%08x\n", dd_saved_start);
|
||||
@ -391,8 +405,10 @@ next_dma_print(nd)
|
||||
printf("NDMAP: dd->dd_start = 0x%08x\n", dd_start);
|
||||
printf("NDMAP: dd->dd_stop = 0x%08x\n", dd_stop);
|
||||
|
||||
printf("NDMAP: interrupt ipl (%ld) intr(0x%b)\n",
|
||||
NEXT_I_IPL(nd->nd_intr), NEXT_I_BIT(nd->nd_intr),NEXT_INTR_BITS);
|
||||
bitmask_snprintf(NEXT_I_BIT(nd->nd_intr), NEXT_INTR_BITS,
|
||||
sbuf, sizeof(sbuf));
|
||||
printf("NDMAP: interrupt ipl (%ld) intr(0x%s)\n",
|
||||
NEXT_I_IPL(nd->nd_intr), sbuf);
|
||||
}
|
||||
|
||||
/****************************************************************/
|
||||
@ -452,8 +468,16 @@ nextdma_intr(arg)
|
||||
if (!INTR_OCCURRED(nd->nd_intr)) return 0;
|
||||
/* Handle dma interrupts */
|
||||
|
||||
DPRINTF(("DMA interrupt ipl (%ld) intr(0x%b)\n",
|
||||
NEXT_I_IPL(nd->nd_intr), NEXT_I_BIT(nd->nd_intr),NEXT_INTR_BITS));
|
||||
#ifdef ND_DEBUG
|
||||
if (nextdma_debug) {
|
||||
char sbuf[256];
|
||||
|
||||
bitmask_snprintf(NEXT_I_BIT(nd->nd_intr), NEXT_INTR_BITS,
|
||||
sbuf, sizeof(sbuf));
|
||||
printf("DMA interrupt ipl (%ld) intr(0x%s)\n",
|
||||
NEXT_I_IPL(nd->nd_intr), sbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (!nd->_nd_map) {
|
||||
@ -467,8 +491,12 @@ nextdma_intr(arg)
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
if ((!(state & DMACSR_COMPLETE)) || (state & DMACSR_SUPDATE)) {
|
||||
char sbuf[256];
|
||||
|
||||
next_dma_print(nd);
|
||||
panic("DMA Unexpected dma state in interrupt (0x%b)",state,DMACSR_BITS);
|
||||
|
||||
bitmask_snprintf(state, DMACSR_BITS, sbuf, sizeof(sbuf));
|
||||
panic("DMA Unexpected dma state in interrupt (0x%s)", sbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -479,9 +507,12 @@ nextdma_intr(arg)
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (state & DMACSR_ENABLE) {
|
||||
char sbuf[256];
|
||||
|
||||
next_dma_print(nd);
|
||||
panic("DMA: unexpected DMA state at shutdown (0x%b)\n",
|
||||
state,DMACSR_BITS);
|
||||
|
||||
bitmask_snprintf(state, DMACSR_BITS, sbuf, sizeof(sbuf));
|
||||
panic("DMA: unexpected DMA state at shutdown (0x%s)\n", sbuf);
|
||||
}
|
||||
#endif
|
||||
bus_space_write_4(nd->nd_bst, nd->nd_bsh, DD_CSR,
|
||||
@ -522,8 +553,16 @@ nextdma_intr(arg)
|
||||
|
||||
}
|
||||
|
||||
DPRINTF(("DMA exiting interrupt ipl (%ld) intr(0x%b)\n",
|
||||
NEXT_I_IPL(nd->nd_intr), NEXT_I_BIT(nd->nd_intr),NEXT_INTR_BITS));
|
||||
#ifdef ND_DEBUG
|
||||
if (nextdma_debug) {
|
||||
char sbuf[256];
|
||||
|
||||
bitmask_snprintf(NEXT_I_BIT(nd->nd_intr), NEXT_INTR_BITS,
|
||||
sbuf, sizeof(sbuf));
|
||||
printf("DMA exiting interrupt ipl (%ld) intr(0x%s)\n",
|
||||
NEXT_I_IPL(nd->nd_intr), sbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
return(1);
|
||||
}
|
||||
@ -550,13 +589,24 @@ nextdma_start(nd, dmadir)
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (!nextdma_finished(nd)) {
|
||||
panic("DMA trying to start before previous finished on intr(0x%b)\n",
|
||||
NEXT_I_BIT(nd->nd_intr),NEXT_INTR_BITS);
|
||||
char sbuf[256];
|
||||
|
||||
bitmask_snprintf(NEXT_I_BIT(nd->nd_intr), NEXT_INTR_BITS,
|
||||
sbuf, sizeof(sbuf));
|
||||
panic("DMA trying to start before previous finished on intr(0x%s)\n", sbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
DPRINTF(("DMA start (%ld) intr(0x%b)\n",
|
||||
NEXT_I_IPL(nd->nd_intr), NEXT_I_BIT(nd->nd_intr),NEXT_INTR_BITS));
|
||||
#ifdef ND_DEBUG
|
||||
if (nextdma_debug) {
|
||||
char sbuf[256];
|
||||
|
||||
bitmask_snprintf(NEXT_I_BIT(nd->nd_intr), NEXT_INTR_BITS,
|
||||
sbuf, sizeof(sbuf));
|
||||
printf("DMA start (%ld) intr(0x%s)\n",
|
||||
NEXT_I_IPL(nd->nd_intr), sbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (nd->_nd_map) {
|
||||
@ -586,9 +636,16 @@ nextdma_start(nd, dmadir)
|
||||
|
||||
next_dma_rotate(nd);
|
||||
|
||||
DPRINTF(("DMA initiating DMA %s of %d segments on intr(0x%b)\n",
|
||||
(dmadir == DMACSR_SETREAD ? "read" : "write"), nd->_nd_map->dm_nsegs,
|
||||
NEXT_I_BIT(nd->nd_intr),NEXT_INTR_BITS));
|
||||
#ifdef ND_DEBUG
|
||||
if (nextdma_debug) {
|
||||
char sbuf[256];
|
||||
|
||||
bitmask_snprintf(NEXT_I_BIT(nd->nd_intr), NEXT_INTR_BITS,
|
||||
sbuf, sizeof(sbuf));
|
||||
printf("DMA initiating DMA %s of %d segments on intr(0x%s)\n",
|
||||
(dmadir == DMACSR_SETREAD ? "read" : "write"), nd->_nd_map->dm_nsegs, sbuf);
|
||||
}
|
||||
#endif
|
||||
|
||||
bus_space_write_4(nd->nd_bst, nd->nd_bsh, DD_CSR, 0);
|
||||
bus_space_write_4(nd->nd_bst, nd->nd_bsh, DD_CSR,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: isr.c,v 1.13 2000/07/02 04:40:42 cgd Exp $ */
|
||||
/* $NetBSD: isr.c,v 1.14 2000/08/09 02:26:26 tv Exp $ */
|
||||
|
||||
/*
|
||||
* This file was taken from mvme68k/mvme68k/isr.c
|
||||
@ -246,12 +246,17 @@ isrdispatch_autovec(pc, evec, frame)
|
||||
else if (++straycount > 50)
|
||||
panic("isr_dispatch_autovec: too many stray interrupts");
|
||||
else {
|
||||
char sbuf[256];
|
||||
|
||||
printf("isrdispatch_autovec: stray level %d interrupt\n", ipl);
|
||||
|
||||
printf(" *intrstat = 0x%b\n",
|
||||
(*(volatile u_long *)IIOV(NEXT_P_INTRSTAT)),NEXT_INTR_BITS);
|
||||
printf(" *intrmask = 0x%b\n",
|
||||
(*(volatile u_long *)IIOV(NEXT_P_INTRMASK)),NEXT_INTR_BITS);
|
||||
bitmask_snprintf((*(volatile u_long *)IIOV(NEXT_P_INTRSTAT)),
|
||||
NEXT_INTR_BITS, sbuf, sizeof(sbuf));
|
||||
printf(" *intrstat = 0x%s\n", sbuf);
|
||||
|
||||
bitmask_snprintf((*(volatile u_long *)IIOV(NEXT_P_INTRMASK)),
|
||||
NEXT_INTR_BITS, sbuf, sizeof(sbuf));
|
||||
printf(" *intrmask = 0x%s\n", sbuf);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user