summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorJag Raman <jag.raman@oracle.com>2017-08-15 17:02:58 -0400
committerDavid S. Miller <davem@davemloft.net>2017-08-15 21:33:51 -0700
commitf283ebd5642d837d372f5e580d550c34dd6eef3d (patch)
tree7ead610130e9310cdb73f48d410777c148441fe9 /drivers/tty
parent55bd2133fc3c5ee138d19b76ed8f9495b35d57ec (diff)
downloadlinux-stable-f283ebd5642d837d372f5e580d550c34dd6eef3d.tar.gz
linux-stable-f283ebd5642d837d372f5e580d550c34dd6eef3d.tar.bz2
linux-stable-f283ebd5642d837d372f5e580d550c34dd6eef3d.zip
sparc64: vcc: Add VCC debug message macros
Add C macros to print debug messages from VCC module Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/vcc.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/drivers/tty/vcc.c b/drivers/tty/vcc.c
index e1b809927cd6..4fd8dd0bda5e 100644
--- a/drivers/tty/vcc.c
+++ b/drivers/tty/vcc.c
@@ -5,6 +5,47 @@
#include <linux/module.h>
+#define DRV_MODULE_NAME "vcc"
+#define DRV_MODULE_VERSION "1.1"
+#define DRV_MODULE_RELDATE "July 1, 2017"
+
+MODULE_DESCRIPTION("Sun LDOM virtual console concentrator driver");
+MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_MODULE_VERSION);
+
+int vcc_dbg;
+int vcc_dbg_ldc;
+int vcc_dbg_vio;
+
+module_param(vcc_dbg, uint, 0664);
+module_param(vcc_dbg_ldc, uint, 0664);
+module_param(vcc_dbg_vio, uint, 0664);
+
+#define VCC_DBG_DRV 0x1
+#define VCC_DBG_LDC 0x2
+#define VCC_DBG_PKT 0x4
+
+#define vccdbg(f, a...) \
+ do { \
+ if (vcc_dbg & VCC_DBG_DRV) \
+ pr_info(f, ## a); \
+ } while (0) \
+
+#define vccdbgl(l) \
+ do { \
+ if (vcc_dbg & VCC_DBG_LDC) \
+ ldc_print(l); \
+ } while (0) \
+
+#define vccdbgp(pkt) \
+ do { \
+ if (vcc_dbg & VCC_DBG_PKT) { \
+ int i; \
+ for (i = 0; i < pkt.tag.stype; i++) \
+ pr_info("[%c]", pkt.data[i]); \
+ } \
+ } while (0) \
+
static int __init vcc_init(void)
{
return 0;