From 9953686beffde0dea3bab1fa3351c7f987e5841f Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Sat, 9 Dec 2006 06:08:10 +0000 Subject: add macros for debug shizz --- sys/dev/pci/ahci.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c index d02a824da8b..83c5748137e 100644 --- a/sys/dev/pci/ahci.c +++ b/sys/dev/pci/ahci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahci.c,v 1.3 2006/12/09 06:03:34 dlg Exp $ */ +/* $OpenBSD: ahci.c,v 1.4 2006/12/09 06:08:09 dlg Exp $ */ /* * Copyright (c) 2006 David Gwynne @@ -30,6 +30,14 @@ #include #include +#ifdef AHCI_DEBUG +#define DPRINTF(m, f...) do { if (ahcidebug & (m)) printf(f); } while (0) +#define AHCI_D_VERBOSE 0x01 +int ahcidebug = AHCI_D_VERBOSE; +#else +#define DPRINTF(m, f...) +#endif + #define AHCI_PCI_BAR 0x24 #define AHCI_REG_CAP 0x000 /* HBA Capabilities */ -- cgit v1.2.3