Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/hpcmips/tx Add TX39IO_MFIOOUTPORT_OFF option (debug...



details:   https://anonhg.NetBSD.org/src/rev/5f890773fd1c
branches:  trunk
changeset: 479863:5f890773fd1c
user:      uch <uch%NetBSD.org@localhost>
date:      Thu Dec 23 16:58:07 1999 +0000

description:
Add TX39IO_MFIOOUTPORT_OFF option (debugging use)

diffstat:

 sys/arch/hpcmips/tx/tx39io.c |  15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (53 lines):

diff -r 9721ba7ae68b -r 5f890773fd1c sys/arch/hpcmips/tx/tx39io.c
--- a/sys/arch/hpcmips/tx/tx39io.c      Thu Dec 23 16:57:14 1999 +0000
+++ b/sys/arch/hpcmips/tx/tx39io.c      Thu Dec 23 16:58:07 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tx39io.c,v 1.2 1999/12/07 17:08:11 uch Exp $ */
+/*     $NetBSD: tx39io.c,v 1.3 1999/12/23 16:58:07 uch Exp $ */
 
 /*
  * Copyright (c) 1999, by UCHIYAMA Yasushi
@@ -40,6 +40,7 @@
 
 #define TX39IO_ATTACH_DUMMYHANDLER 0
 #undef TX39IO_MFIOOUTPORT_ON
+#undef TX39IO_MFIOOUTPORT_OFF
 
 int    tx39io_match __P((struct device*, struct cfdata*, void*));
 void   tx39io_attach __P((struct device*, struct device*, void*));
@@ -64,7 +65,7 @@
 #define STD_OUT                2
 #define STD_INOUT      3
 
-struct {
+const struct {
        char *std_pin_name;
        int  std_type;
 } mfio_map[TX39_IO_MFIO_MAX] = {
@@ -297,17 +298,25 @@
        }
        
        if (ISSET(reg_dir, i)) {
-#ifdef TX39IO_MFIOOUTPORT_ON
+#if defined TX39IO_MFIOOUTPORT_ON || defined TX39IO_MFIOOUTPORT_OFF
                txreg_t reg;
                if (io) {
 #ifdef TX392X                  
                        reg = tx_conf_read(tc, TX39_IODATAINOUT_REG);
+#ifdef TX39IO_MFIOOUTPORT_ON
                        reg |= (1 << (i + 16));
+#else
+                       reg &= ~(1 << (i + 16));
+#endif
                        tx_conf_write(tc, TX39_IODATAINOUT_REG, reg);
 #endif /* TX392X */
                } else {
                        reg = tx_conf_read(tc, TX39_IOMFIODATAOUT_REG);
+#ifdef TX39IO_MFIOOUTPORT_ON
                        reg |= (1 << i);
+#else
+                       reg &= ~(1 << i);
+#endif
                        tx_conf_write(tc, TX39_IOMFIODATAOUT_REG, reg);
                }
 #endif /* TX39IO_MFIOOUTPORT_ON */



Home | Main Index | Thread Index | Old Index