#ifndef HWDIAG_DEBUG_H_INCLUDED #define HWDIAG_DEBUG_H_INCLUDED extern int g_sasdiag_dbg_flag; #define DBG_ERR 0x00000001 #define DBG_PORT 0x00000002 #define DBG_IOCTL 0x00000004 #define DBG_TEST 0x00000008 #define DBG_MPIPAGE 0x00000010 #define DBG_GPIO 0x00000020 #define DBG_INIT 0x00000040 #define DBG_GET 0x00000080 #define DBG_FWDL 0x00000100 #define DBG_REG 0x00000200 #define DBG_CFG 0x00000400 #define DBG_IO 0x00001000 #define DBG_TOPO 0x00010000 #define DBG_RDDATA 0x10000000 #define DBG_WRDATA 0x20000000 #define DBG_DUMP 0x40000000 #define DBG_TESTDETAIL 0x80000000 // define common definitions //typedef bool BOOL; #define BOOL bool //#define CHAR char typedef char CHAR; #define INT8 char #define INT16 short #define INT32 int #define UCHAR unsigned char #define UINT8 unsigned char #define UINT16 unsigned short #define UINT32 unsigned int #define UINT64 unsigned long long #define STRING const char* #define FLOAT float //#define U8 UCHAR typedef unsigned char U8; //#define U16 UINT16 typedef unsigned short U16; //#define U32 UINT32 typedef unsigned int U32; //#define U64 UINT64 typedef unsigned long long U64; #define PHYSICAL_ADDRESS_T unsigned long long #if __x86_64__ #define SYSTEM_ADDRESS_T UINT64 #else #define SYSTEM_ADDRESS_T UINT32 #endif #define TRUE 1 #define FALSE 0 #define BOOL_ON TRUE #define BOOL_OFF FALSE #define ON TRUE #define OFF FALSE #define ACTIVE_HI 1 #define ACTIVE_LO 0 #define CLASS_NAME_LENGTH 64 #define DEBUG_MESSAGE_LENGTH 64 #define SECTOR_SIZE 512 #define TestBlockNumber 32 #undef NULL #define NULL (0) /* Check against debug current level */ #define DBG_PRINT(flag, fmt...) { \ if (flag == DBG_ERR) \ printk(fmt); \ else if (g_sasdiag_dbg_flag & flag) \ printk(fmt); \ else \ ; } #endif // include