00001 /* ========================================================================== 00002 * 00003 * Synopsys HS OTG Linux Software Driver and documentation (hereinafter, 00004 * "Software") is an Unsupported proprietary work of Synopsys, Inc. unless 00005 * otherwise expressly agreed to in writing between Synopsys and you. 00006 * 00007 * The Software IS NOT an item of Licensed Software or Licensed Product under 00008 * any End User Software License Agreement or Agreement for Licensed Product 00009 * with Synopsys or any supplement thereto. You are permitted to use and 00010 * redistribute this Software in source and binary forms, with or without 00011 * modification, provided that redistributions of source code must retain this 00012 * notice. You may not view, use, disclose, copy or distribute this file or 00013 * any information contained herein except pursuant to this license grant from 00014 * Synopsys. If you do not agree with this notice, including the disclaimer 00015 * below, then you are not authorized to use the Software. 00016 * 00017 * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS" BASIS 00018 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00019 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00020 * ARE HEREBY DISCLAIMED. IN NO EVENT SHALL SYNOPSYS BE LIABLE FOR ANY DIRECT, 00021 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00022 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00023 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00024 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00025 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00026 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 00027 * DAMAGE. 00028 * ========================================================================== */ 00029 00030 #ifndef __DWC_OTG_DBG_H__ 00031 #define __DWC_OTG_DBG_H__ 00032 00041 extern uint32_t g_dbg_lvl; 00045 static inline uint32_t SET_DEBUG_LEVEL(const uint32_t new) 00046 { 00047 uint32_t old = g_dbg_lvl; 00048 g_dbg_lvl = new; 00049 return old; 00050 } 00051 00053 #define DBG_CIL (0x2) 00054 00056 #define DBG_CILV (0x20) 00057 00059 #define DBG_PCD (0x4) 00060 00062 #define DBG_PCDV (0x40) 00063 00064 #define DBG_HCD (0x8) 00065 00067 #define DBG_HCDV (0x80) 00068 00070 #define DBG_HCD_URB (0x800) 00071 00073 #define DBG_ANY (0xFF) 00074 00076 #define DBG_OFF 0 00077 00079 #define USB_DWC "DWC_otg: " 00080 00098 #ifdef DEBUG 00099 00100 # define DWC_DEBUGPL(lvl, x...) do{ if ((lvl)&g_dbg_lvl)__DWC_DEBUG(USB_DWC x ); }while(0) 00101 # define DWC_DEBUGP(x...) DWC_DEBUGPL(DBG_ANY, x ) 00102 00103 # define CHK_DEBUG_LEVEL(level) ((level) & g_dbg_lvl) 00104 00105 #else 00106 00107 # define DWC_DEBUGPL(lvl, x...) do{}while(0) 00108 # define DWC_DEBUGP(x...) 00109 00110 # define CHK_DEBUG_LEVEL(level) (0) 00111 00112 #endif /*DEBUG*/ 00113 #endif