1/* 2 * Copyright (c) 2011 ETH Zurich. 3 * All rights reserved. 4 * 5 * This file is distributed under the terms in the attached LICENSE file. 6 * If you do not find this file, copies can be found by writing to: 7 * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group. 8 */ 9 10#ifndef AHCI_DEBUG_H_ 11#define AHCI_DEBUG_H_ 12 13#include <stdio.h> 14 15/***************************************************************** 16 * Debug printer: 17 *****************************************************************/ 18 19#if defined(AHCI_LIB_DEBUG) || defined(GLOBAL_DEBUG) 20#define AHCI_DEBUG(x...) printf("ahci: " x) 21#else 22#define AHCI_DEBUG(x...) ((void)0) 23#endif 24#if defined(AHCI_LIB_DEBUG) || defined(GLOBAL_DEBUG) 25#define AHCI_TRACE_ENTER0() AHCI_TRACE_ENTER(" ") 26#define AHCI_TRACE_ENTER(x...) do { \ 27 printf("ahci: entering %s. ", __FUNCTION__); \ 28 printf(x); \ 29 printf("\n"); \ 30} while(0) 31#else 32#define AHCI_TRACE_ENTER0() ((void)0) 33#define AHCI_TRACE_ENTER(x...) ((void)0) 34#endif 35 36#endif // AHCI_DEBUG_H_ 37