Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci hide debug messages under CORAM_DEBUG
details: https://anonhg.NetBSD.org/src/rev/00086a91e900
branches: trunk
changeset: 767987:00086a91e900
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri Aug 05 21:20:27 2011 +0000
description:
hide debug messages under CORAM_DEBUG
diffstat:
sys/dev/pci/coram.c | 30 +++++++++++++++++++++++++-----
1 files changed, 25 insertions(+), 5 deletions(-)
diffs (124 lines):
diff -r 0eda2a79f913 -r 00086a91e900 sys/dev/pci/coram.c
--- a/sys/dev/pci/coram.c Fri Aug 05 21:19:23 2011 +0000
+++ b/sys/dev/pci/coram.c Fri Aug 05 21:20:27 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: coram.c,v 1.3 2011/08/05 20:33:17 jmcneill Exp $ */
+/* $NetBSD: coram.c,v 1.4 2011/08/05 21:20:27 jmcneill Exp $ */
/*
* Copyright (c) 2008, 2011 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: coram.c,v 1.3 2011/08/05 20:33:17 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: coram.c,v 1.4 2011/08/05 21:20:27 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -51,6 +51,8 @@
#include <dev/i2c/cx24227var.h>
#include <dev/i2c/mt2131var.h>
+/* #define CORAM_DEBUG */
+
static int coram_match(device_t, cfdata_t, void *);
static void coram_attach(device_t, device_t, void *);
static int coram_detach(device_t, int);
@@ -415,8 +417,6 @@
struct coram_softc *sc;
sc = device_private(dv);
- device_printf(sc->sc_dev, "%s\n", __func__);
-
return true;
}
@@ -629,7 +629,9 @@
{
struct coram_softc *sc = cookie;
+#ifdef CORAM_DEBUG
device_printf(sc->sc_dev, "%s\n", __func__);
+#endif
//KASSERT(sc->sc_tsbuf == NULL);
@@ -652,7 +654,9 @@
{
struct coram_softc *sc = cookie;
+#ifdef CORAM_DEBUG
device_printf(sc->sc_dev, "%s\n", __func__);
+#endif
coram_mpeg_halt(sc);
@@ -701,7 +705,9 @@
{
struct coram_softc *sc = cookie;
+#ifdef CORAM_DEBUG
device_printf(sc->sc_dev, "%s\n", __func__);
+#endif
coram_mpeg_trigger(sc, sc->sc_tsbuf);
@@ -713,7 +719,9 @@
{
struct coram_softc *sc = cookie;
+#ifdef CORAM_DEBUG
device_printf(sc->sc_dev, "%s\n", __func__);
+#endif
coram_mpeg_halt(sc);
bus_space_write_4(sc->sc_memt, sc->sc_memh, PCI_INT_MSK, 0);
@@ -808,7 +816,9 @@
{
uint32_t v;
+#ifdef CORAM_DEBUG
device_printf(sc->sc_dev, "%s\n", __func__);
+#endif
bus_space_write_4(sc->sc_memt, sc->sc_memh, VID_C_DMA_CTL, 0);
@@ -909,14 +919,22 @@
bus_space_write_4(sc->sc_memt, sc->sc_memh, PCI_INT_MSK, v);
v = bus_space_read_4(sc->sc_memt, sc->sc_memh, VID_C_GEN_CTL);
+#ifdef CORAM_DEBUG
printf("%s, %06x %08x\n", __func__, VID_C_GEN_CTL, v);
+#endif
v = bus_space_read_4(sc->sc_memt, sc->sc_memh, VID_C_SOP_STATUS);
+#ifdef CORAM_DEBUG
printf("%s, %06x %08x\n", __func__, VID_C_SOP_STATUS, v);
+#endif
delay(100*1000);
v = bus_space_read_4(sc->sc_memt, sc->sc_memh, VID_C_GEN_CTL);
+#ifdef CORAM_DEBUG
printf("%s, %06x %08x\n", __func__, VID_C_GEN_CTL, v);
+#endif
v = bus_space_read_4(sc->sc_memt, sc->sc_memh, VID_C_SOP_STATUS);
+#ifdef CORAM_DEBUG
printf("%s, %06x %08x\n", __func__, VID_C_SOP_STATUS, v);
+#endif
return 0;
}
@@ -988,11 +1006,13 @@
bpl = (bpl + 7) & ~7;
cdt = csc->csc_cdt;
lines = csc->csc_fifosz / bpl;
+#ifdef CORAM_DEBUG
printf("%s %d lines\n", __func__, lines);
+#endif
/* fill in CDT */
for (i = 0; i < lines; i++) {
-#if 1
+#ifdef CORAM_DEBUG
printf("CDT ent %08x, %08x\n", cdt + (16 * i),
csc->csc_fifo + (bpl * i));
#endif
Home |
Main Index |
Thread Index |
Old Index