CVS commit: src/sys/arch/hpcmips/tx

2023-09-10 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 10 20:55:30 UTC 2023

Modified Files:
src/sys/arch/hpcmips/tx: tx39sib.c

Log Message:
rewrite tx39sib debug code to use debug.h DPRINTF definition.
also debug code uses dbg_bitmask_print(), thus build fails without the header.

fixes TX39SIBDEBUG enabled build.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hpcmips/tx/tx39sib.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/arch/hpcmips/tx/tx39sib.c
diff -u src/sys/arch/hpcmips/tx/tx39sib.c:1.23 src/sys/arch/hpcmips/tx/tx39sib.c:1.24
--- src/sys/arch/hpcmips/tx/tx39sib.c:1.23	Sat Aug  7 16:18:54 2021
+++ src/sys/arch/hpcmips/tx/tx39sib.c	Sun Sep 10 20:55:30 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: tx39sib.c,v 1.23 2021/08/07 16:18:54 thorpej Exp $ */
+/*	$NetBSD: tx39sib.c,v 1.24 2023/09/10 20:55:30 andvar Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -34,9 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tx39sib.c,v 1.23 2021/08/07 16:18:54 thorpej Exp $");
-
-#undef TX39SIBDEBUG
+__KERNEL_RCSID(0, "$NetBSD: tx39sib.c,v 1.24 2023/09/10 20:55:30 andvar Exp $");
 
 #include 
 #include 
@@ -53,11 +51,10 @@ __KERNEL_RCSID(0, "$NetBSD: tx39sib.c,v 
 #include "locators.h"
 
 #ifdef TX39SIBDEBUG
-int	tx39sibdebug = 0;
-#define	DPRINTF(arg) if (tx39sibdebug) printf arg;
-#else
-#define	DPRINTF(arg)
+#define DPRINTF_ENABLE
+#define DPRINTF_DEBUG	tx39sibdebug
 #endif
+#include 
 
 int	tx39sib_match(device_t, cfdata_t, void *);
 void	tx39sib_attach(device_t, device_t, void *);



CVS commit: src/sys/arch/hpcmips/tx

2023-09-10 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 10 20:55:30 UTC 2023

Modified Files:
src/sys/arch/hpcmips/tx: tx39sib.c

Log Message:
rewrite tx39sib debug code to use debug.h DPRINTF definition.
also debug code uses dbg_bitmask_print(), thus build fails without the header.

fixes TX39SIBDEBUG enabled build.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hpcmips/tx/tx39sib.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/hpcmips/tx

2023-09-10 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 10 20:41:57 UTC 2023

Modified Files:
src/sys/arch/hpcmips/tx: tx39biu.c

Log Message:
rewrite old style tx39biu_dump function declaration
and constify char *rowsel[], char *colsel[].

fixes TX39BIU_DEBUG enabled build.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hpcmips/tx/tx39biu.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/arch/hpcmips/tx/tx39biu.c
diff -u src/sys/arch/hpcmips/tx/tx39biu.c:1.17 src/sys/arch/hpcmips/tx/tx39biu.c:1.18
--- src/sys/arch/hpcmips/tx/tx39biu.c:1.17	Sat Aug  7 16:18:54 2021
+++ src/sys/arch/hpcmips/tx/tx39biu.c	Sun Sep 10 20:41:57 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: tx39biu.c,v 1.17 2021/08/07 16:18:54 thorpej Exp $ */
+/*	$NetBSD: tx39biu.c,v 1.18 2023/09/10 20:41:57 andvar Exp $ */
 
 /*-
  * Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tx39biu.c,v 1.17 2021/08/07 16:18:54 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tx39biu.c,v 1.18 2023/09/10 20:41:57 andvar Exp $");
 
 #include "opt_tx39_watchdogtimer.h"
 #include "opt_tx39biu_debug.h"
@@ -163,12 +163,11 @@ tx39biu_intr(void *arg)
 
 #ifdef TX39BIU_DEBUG
 void
-tx39biu_dump(tc)
-	tx_chipset_tag_t tc;	
+tx39biu_dump(tx_chipset_tag_t tc)	
 {
-	char *rowsel[] = {"18,17:9", "22,18,20,19,17:9", "20,22,21,19,17:9",
+	const char *rowsel[] = {"18,17:9", "22,18,20,19,17:9", "20,22,21,19,17:9",
 			  "22,23,21,19,17:9"};
-	char *colsel[] = {"22,20,18,8:1", "19,18,8:2", "21,20,18,8:2",
+	const char *colsel[] = {"22,20,18,8:1", "19,18,8:2", "21,20,18,8:2",
 			  "23,22,20,18,8:2", "24,22,20,18,8:2",
 			  "18,p,X,8:0","22,p,X,21,8:0", "18,p,X,21,8:1",
 			  "22,p,X,23,21,8:1", "24,23,21,8:2"};



CVS commit: src/sys/arch/hpcmips/tx

2023-09-10 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 10 20:41:57 UTC 2023

Modified Files:
src/sys/arch/hpcmips/tx: tx39biu.c

Log Message:
rewrite old style tx39biu_dump function declaration
and constify char *rowsel[], char *colsel[].

fixes TX39BIU_DEBUG enabled build.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hpcmips/tx/tx39biu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/hpcmips/tx

2023-09-10 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 10 20:28:25 UTC 2023

Modified Files:
src/sys/arch/hpcmips/tx: tx39ir.c

Log Message:
tx39ir(4): rewrite code to use DPRINTF definition from debug.h.
custom one had wrong vrpiu_debug variable in if block (likely copy pasta)
debug code also calls dbg_bitmask_print(), thus was failing to build.
remove unneeded #undef TX39IRDEBUG.

Fixes TX39IRDEBUG build (tested with hpcmips TX3912 kernel config).


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hpcmips/tx/tx39ir.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/arch/hpcmips/tx/tx39ir.c
diff -u src/sys/arch/hpcmips/tx/tx39ir.c:1.10 src/sys/arch/hpcmips/tx/tx39ir.c:1.11
--- src/sys/arch/hpcmips/tx/tx39ir.c:1.10	Sat Oct 27 17:17:54 2012
+++ src/sys/arch/hpcmips/tx/tx39ir.c	Sun Sep 10 20:28:25 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: tx39ir.c,v 1.10 2012/10/27 17:17:54 chs Exp $ */
+/*	$NetBSD: tx39ir.c,v 1.11 2023/09/10 20:28:25 andvar Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -34,9 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tx39ir.c,v 1.10 2012/10/27 17:17:54 chs Exp $");
-
-#undef TX39IRDEBUG
+__KERNEL_RCSID(0, "$NetBSD: tx39ir.c,v 1.11 2023/09/10 20:28:25 andvar Exp $");
 
 #include 
 #include 
@@ -53,11 +51,10 @@ __KERNEL_RCSID(0, "$NetBSD: tx39ir.c,v 1
 #include  /* XXX */
 
 #ifdef TX39IRDEBUG
-int	tx39ir_debug = 1;
-#define	DPRINTF(arg) if (vrpiu_debug) printf arg;
-#else
-#define	DPRINTF(arg)
+#define DPRINTF_ENABLE
+#define DPRINTF_DEBUG	tx39ir_debug
 #endif
+#include 
 
 int	tx39ir_match(device_t, cfdata_t, void *);
 void	tx39ir_attach(device_t, device_t, void *);



CVS commit: src/sys/arch/hpcmips/tx

2023-09-10 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 10 20:28:25 UTC 2023

Modified Files:
src/sys/arch/hpcmips/tx: tx39ir.c

Log Message:
tx39ir(4): rewrite code to use DPRINTF definition from debug.h.
custom one had wrong vrpiu_debug variable in if block (likely copy pasta)
debug code also calls dbg_bitmask_print(), thus was failing to build.
remove unneeded #undef TX39IRDEBUG.

Fixes TX39IRDEBUG build (tested with hpcmips TX3912 kernel config).


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hpcmips/tx/tx39ir.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/hpcmips/tx

2023-09-10 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 10 14:11:34 UTC 2023

Modified Files:
src/sys/arch/hpcmips/tx: tx39io.c

Log Message:
nix whitespace before semicolon.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hpcmips/tx/tx39io.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/arch/hpcmips/tx/tx39io.c
diff -u src/sys/arch/hpcmips/tx/tx39io.c:1.23 src/sys/arch/hpcmips/tx/tx39io.c:1.24
--- src/sys/arch/hpcmips/tx/tx39io.c:1.23	Sat Oct 27 17:17:54 2012
+++ src/sys/arch/hpcmips/tx/tx39io.c	Sun Sep 10 14:11:33 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: tx39io.c,v 1.23 2012/10/27 17:17:54 chs Exp $ */
+/*	$NetBSD: tx39io.c,v 1.24 2023/09/10 14:11:33 andvar Exp $ */
 
 /*-
  * Copyright (c) 1999-2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tx39io.c,v 1.23 2012/10/27 17:17:54 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tx39io.c,v 1.24 2023/09/10 14:11:33 andvar Exp $");
 
 #include 
 #include 
@@ -238,7 +238,7 @@ mfio_out(hpcio_chip_t arg, int port, int
 static int
 mfio_in(hpcio_chip_t arg, int port)
 {
-	struct tx39io_softc *sc __attribute__((__unused__)) = arg->hc_sc ;
+	struct tx39io_softc *sc __attribute__((__unused__)) = arg->hc_sc;
 
 	DPRINTF("port #%d\n", port);
 	return (tx_conf_read(sc->sc_tc, TX39_IOMFIODATAIN_REG) & (1 << port));



CVS commit: src/sys/arch/hpcmips/tx

2023-09-10 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 10 14:11:34 UTC 2023

Modified Files:
src/sys/arch/hpcmips/tx: tx39io.c

Log Message:
nix whitespace before semicolon.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hpcmips/tx/tx39io.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.