PageRenderTime 52ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/drivers/net/wireless/tiwlan1251/pform/common/inc/osDebug.h

http://github.com/CyanogenMod/cm-kernel
C Header | 142 lines | 84 code | 24 blank | 34 comment | 1 complexity | f69ba477bec35d6542c6675024534b37 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.0
  1. /****************************************************************************
  2. **+-----------------------------------------------------------------------+**
  3. **| |**
  4. **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |**
  5. **| All rights reserved. |**
  6. **| |**
  7. **| Redistribution and use in source and binary forms, with or without |**
  8. **| modification, are permitted provided that the following conditions |**
  9. **| are met: |**
  10. **| |**
  11. **| * Redistributions of source code must retain the above copyright |**
  12. **| notice, this list of conditions and the following disclaimer. |**
  13. **| * Redistributions in binary form must reproduce the above copyright |**
  14. **| notice, this list of conditions and the following disclaimer in |**
  15. **| the documentation and/or other materials provided with the |**
  16. **| distribution. |**
  17. **| * Neither the name Texas Instruments nor the names of its |**
  18. **| contributors may be used to endorse or promote products derived |**
  19. **| from this software without specific prior written permission. |**
  20. **| |**
  21. **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |**
  22. **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |**
  23. **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |**
  24. **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |**
  25. **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |**
  26. **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |**
  27. **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |**
  28. **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |**
  29. **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |**
  30. **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |**
  31. **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |**
  32. **| |**
  33. **+-----------------------------------------------------------------------+**
  34. ****************************************************************************/
  35. #ifndef __OSDEBUG_H_
  36. #define __OSDEBUG_H_
  37. #ifdef TI_DBG
  38. #ifdef TIWLAN_MSM7000
  39. #define debugFunction(a,b,c)
  40. #endif
  41. #define IF_TIDEBUG(f) if (!((TiDebugFlag & (f))^(f)))
  42. extern unsigned long TiDebugFlag;
  43. #define PRINT(F, A) IF_TIDEBUG( F ) { DbgPrint(A); }
  44. #define PRINTF(F, A) IF_TIDEBUG( F ) { DbgPrint A; }
  45. #define DBG_INIT 0x0001
  46. #define DBG_REGISTRY 0x0002
  47. #define DBG_NDIS_CALLS 0x0004
  48. #define DBG_NDIS_OIDS 0x0008
  49. #define DBG_PCI_RES 0x0010
  50. #define DBG_INTERRUPT 0x0020
  51. #define DBG_IOCTL 0x0040
  52. #define DBG_RECV 0x0080
  53. #define DBG_SEND 0x0100
  54. #define DBG_SEV_INFO 0x0001
  55. #define DBG_SEV_LOUD 0x0002
  56. #define DBG_SEV_VERY_LOUD 0x0004
  57. #define DBG_SEV_WARNING 0x0008
  58. #define DBG_SEV_ERROR 0x0010
  59. #define DBG_SEV_FATAL_ERROR 0x0020
  60. #define DBG_INIT_INFO ((DBG_INIT << 16) | DBG_SEV_INFO)
  61. #define DBG_INIT_LOUD ((DBG_INIT << 16) | DBG_SEV_LOUD)
  62. #define DBG_INIT_VERY_LOUD ((DBG_INIT << 16) | DBG_SEV_VERY_LOUD)
  63. #define DBG_INIT_WARNING ((DBG_INIT << 16) | DBG_SEV_WARNING)
  64. #define DBG_INIT_ERROR ((DBG_INIT << 16) | DBG_SEV_ERROR)
  65. #define DBG_INIT_FATAL_ERROR ((DBG_INIT << 16) | DBG_SEV_FATAL_ERROR)
  66. #define DBG_REGISTRY_INFO ((DBG_REGISTRY << 16) | DBG_SEV_INFO)
  67. #define DBG_REGISTRY_LOUD ((DBG_REGISTRY << 16) | DBG_SEV_LOUD)
  68. #define DBG_REGISTRY_VERY_LOUD ((DBG_REGISTRY << 16) | DBG_SEV_VERY_LOUD)
  69. #define DBG_REGISTRY_WARNING ((DBG_REGISTRY << 16) | DBG_SEV_WARNING)
  70. #define DBG_REGISTRY_ERROR ((DBG_REGISTRY << 16) | DBG_SEV_ERROR)
  71. #define DBG_REGISTRY_FATAL_ERROR ((DBG_REGISTRY << 16) | DBG_SEV_FATAL_ERROR)
  72. #define DBG_NDIS_CALLS_INFO ((DBG_NDIS_CALLS << 16) | DBG_SEV_INFO)
  73. #define DBG_NDIS_CALLS_LOUD ((DBG_NDIS_CALLS << 16) | DBG_SEV_LOUD)
  74. #define DBG_NDIS_CALLS_VERY_LOUD ((DBG_NDIS_CALLS << 16) | DBG_SEV_VERY_LOUD)
  75. #define DBG_NDIS_CALLS_WARNING ((DBG_NDIS_CALLS << 16) | DBG_SEV_WARNING)
  76. #define DBG_NDIS_CALLS_ERROR ((DBG_NDIS_CALLS << 16) | DBG_SEV_ERROR)
  77. #define DBG_NDIS_CALLS_FATAL_ERROR ((DBG_NDIS_CALLS << 16) | DBG_SEV_FATAL_ERROR)
  78. #define DBG_NDIS_OIDS_INFO ((DBG_NDIS_OIDS << 16) | DBG_SEV_INFO)
  79. #define DBG_NDIS_OIDS_LOUD ((DBG_NDIS_OIDS << 16) | DBG_SEV_LOUD)
  80. #define DBG_NDIS_OIDS_VERY_LOUD ((DBG_NDIS_OIDS << 16) | DBG_SEV_VERY_LOUD)
  81. #define DBG_NDIS_OIDS_WARNING ((DBG_NDIS_OIDS << 16) | DBG_SEV_WARNING)
  82. #define DBG_NDIS_OIDS_ERROR ((DBG_NDIS_OIDS << 16) | DBG_SEV_ERROR)
  83. #define DBG_NDIS_OIDS_FATAL_ERROR ((DBG_NDIS_OIDS << 16) | DBG_SEV_FATAL_ERROR)
  84. #define DBG_PCI_RES_INFO ((DBG_PCI_RES << 16) | DBG_SEV_INFO)
  85. #define DBG_PCI_RES_LOUD ((DBG_PCI_RES << 16) | DBG_SEV_LOUD)
  86. #define DBG_PCI_RES_VERY_LOUD ((DBG_PCI_RES << 16) | DBG_SEV_VERY_LOUD)
  87. #define DBG_PCI_RES_WARNING ((DBG_PCI_RES << 16) | DBG_SEV_WARNING)
  88. #define DBG_PCI_RES_ERROR ((DBG_PCI_RES << 16) | DBG_SEV_ERROR)
  89. #define DBG_PCI_RES_FATAL_ERROR ((DBG_PCI_RES << 16) | DBG_SEV_FATAL_ERROR)
  90. #define DBG_INTERRUPT_INFO ((DBG_INTERRUPT << 16) | DBG_SEV_INFO)
  91. #define DBG_INTERRUPT_LOUD ((DBG_INTERRUPT << 16) | DBG_SEV_LOUD)
  92. #define DBG_INTERRUPT_VERY_LOUD ((DBG_INTERRUPT << 16) | DBG_SEV_VERY_LOUD)
  93. #define DBG_INTERRUPT_WARNING ((DBG_INTERRUPT << 16) | DBG_SEV_WARNING)
  94. #define DBG_INTERRUPT_ERROR ((DBG_INTERRUPT << 16) | DBG_SEV_ERROR)
  95. #define DBG_INTERRUPT_FATAL_ERROR ((DBG_INTERRUPT << 16) | DBG_SEV_FATAL_ERROR)
  96. #define DBG_IOCTL_INFO ((DBG_IOCTL << 16) | DBG_SEV_INFO)
  97. #define DBG_IOCTL_LOUD ((DBG_IOCTL << 16) | DBG_SEV_LOUD)
  98. #define DBG_IOCTL_VERY_LOUD ((DBG_IOCTL << 16) | DBG_SEV_VERY_LOUD)
  99. #define DBG_IOCTL_WARNING ((DBG_IOCTL << 16) | DBG_SEV_WARNING)
  100. #define DBG_IOCTL_ERROR ((DBG_IOCTL << 16) | DBG_SEV_ERROR)
  101. #define DBG_IOCTL_FATAL_ERROR ((DBG_IOCTL << 16) | DBG_SEV_FATAL_ERROR)
  102. #define DBG_RECV_INFO ((DBG_RECV << 16) | DBG_SEV_INFO)
  103. #define DBG_RECV_LOUD ((DBG_RECV << 16) | DBG_SEV_LOUD)
  104. #define DBG_RECV_VERY_LOUD ((DBG_RECV << 16) | DBG_SEV_VERY_LOUD)
  105. #define DBG_RECV_WARNING ((DBG_RECV << 16) | DBG_SEV_WARNING)
  106. #define DBG_RECV_ERROR ((DBG_RECV << 16) | DBG_SEV_ERROR)
  107. #define DBG_RECV_FATAL_ERROR ((DBG_RECV << 16) | DBG_SEV_FATAL_ERROR)
  108. #define DBG_SEND_INFO ((DBG_SEND << 16) | DBG_SEV_INFO)
  109. #define DBG_SEND_LOUD ((DBG_SEND << 16) | DBG_SEV_LOUD)
  110. #define DBG_SEND_VERY_LOUD ((DBG_SEND << 16) | DBG_SEV_VERY_LOUD)
  111. #define DBG_SEND_WARNING ((DBG_SEND << 16) | DBG_SEV_WARNING)
  112. #define DBG_SEND_ERROR ((DBG_SEND << 16) | DBG_SEV_ERROR)
  113. #define DBG_SEND_FATAL_ERROR ((DBG_SEND << 16) | DBG_SEV_FATAL_ERROR)
  114. #else
  115. #define PRINT(F, A)
  116. #define PRINTF(F, A)
  117. #endif
  118. #endif /* __OSDEBUG_H_*/