/****************************************************************************** ** ** FILE NAME : ifxmips_ts.h ** PROJECT : UEIP ** MODULES : Thermal Sensor ** ** DATE : 16 Aug 2011 ** AUTHOR : Xu Liang ** DESCRIPTION : Thermal Sensor driver header file ** COPYRIGHT : Copyright (c) 2006 ** Infineon Technologies AG ** Am Campeon 1-12, 85579 Neubiberg, Germany ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** HISTORY ** $Date $Author $Comment ** Aug 16, 2011 Xu Liang Init Version *******************************************************************************/ #ifndef _IFXMIPS_TS_H_ #define _IFXMIPS_TS_H_ #include /* * #################################### * Definition * #################################### */ /* * Compile Options */ #define ENABLE_DEBUG 1 #define ENABLE_ASSERT 1 #define INLINE /* * Constant */ #define IFX_TS_MAJOR 0 /* * Debug/Assert/Error Message */ #define DBG_ENABLE_MASK_ERR (1 << 0) #define DBG_ENABLE_MASK_DEBUG_PRINT (1 << 1) #define DBG_ENABLE_MASK_ASSERT (1 << 2) #define err(format, arg...) do { if ( (g_dbg_enable & DBG_ENABLE_MASK_ERR) ) printk(KERN_ERR __FILE__ ":%d:%s: " format "\n", __LINE__, __FUNCTION__, ##arg); } while ( 0 ) #if defined(ENABLE_DEBUG) && ENABLE_DEBUG #undef dbg #define dbg(format, arg...) do { if ( (g_dbg_enable & DBG_ENABLE_MASK_DEBUG_PRINT) ) printk(KERN_WARNING __FILE__ ":%d:%s: " format "\n", __LINE__, __FUNCTION__, ##arg); } while ( 0 ) #else #if !defined(dbg) #define dbg(format, arg...) #endif #endif #if defined(ENABLE_ASSERT) && ENABLE_ASSERT #define ASSERT(cond, format, arg...) do { if ( (g_dbg_enable & DBG_ENABLE_MASK_ASSERT) && !(cond) ) printk(KERN_ERR __FILE__ ":%d:%s: " format "\n", __LINE__, __FUNCTION__, ##arg); } while ( 0 ) #else #define ASSERT(cond, format, arg...) #endif /* * #################################### * Data Type * #################################### */ /* * #################################### * Platform Header File * #################################### */ #endif // _IFXMIPS_TS_H_