Module Name: src Committed By: jmcneill Date: Fri Aug 5 21:20:27 UTC 2011
Modified Files: src/sys/dev/pci: coram.c Log Message: hide debug messages under CORAM_DEBUG To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/coram.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/coram.c diff -u src/sys/dev/pci/coram.c:1.3 src/sys/dev/pci/coram.c:1.4 --- src/sys/dev/pci/coram.c:1.3 Fri Aug 5 20:33:17 2011 +++ src/sys/dev/pci/coram.c Fri Aug 5 21:20:27 2011 @@ -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