]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - drivers/sk98lin/h/skdebug.h
2f22cfea7e06cd7d89ce40dd2a934913e88f61a8
[karo-tx-uboot.git] / drivers / sk98lin / h / skdebug.h
1 /******************************************************************************
2  *
3  * Name:        skdebug.h
4  * Project:     GEnesis, PCI Gigabit Ethernet Adapter
5  * Version:     $Revision$
6  * Date:        $Date$
7  * Purpose:     SK specific DEBUG support
8  *
9  ******************************************************************************/
10
11 /******************************************************************************
12  *
13  *      (C)Copyright 1998-2002 SysKonnect GmbH.
14  *
15  *      This program is free software; you can redistribute it and/or modify
16  *      it under the terms of the GNU General Public License as published by
17  *      the Free Software Foundation; either version 2 of the License, or
18  *      (at your option) any later version.
19  *
20  *      The information in this file is provided "AS IS" without warranty.
21  *
22  ******************************************************************************/
23
24 /******************************************************************************
25  *
26  * History:
27  *      $Log$
28  *      Revision 1.1  2007-03-09 09:43:58  lothar
29  *      Initial revision
30  *
31  *      Revision 1.12  2002/07/15 15:37:13  rschmidt
32  *      Power Management support
33  *      Editorial changes
34  *
35  *      Revision 1.11  2002/04/25 11:04:39  rschmidt
36  *      Editorial changes
37  *
38  *      Revision 1.10  1999/11/22 13:47:40  cgoos
39  *      Changed license header to GPL.
40  *
41  *      Revision 1.9  1999/09/14 14:02:43  rwahl
42  *      Added SK_DBGMOD_PECP.
43  *
44  *      Revision 1.8  1998/11/25 08:31:54  gklug
45  *      fix: no C++ comments allowed in common sources
46  *
47  *      Revision 1.7  1998/11/24 16:47:24  swolf
48  *      Driver may now define its own SK_DBG_MSG() (eg. in "h/skdrv1st.h").
49  *
50  *      Revision 1.6  1998/10/28 10:23:55  rassmann
51  *      ADDED SK_DBGMOD_ADDR.
52  *
53  *      Revision 1.5  1998/10/22 09:43:55  gklug
54  *      add: CSUM module
55  *
56  *      Revision 1.4  1998/10/01 07:54:44  gklug
57  *      add: PNMI debug module
58  *
59  *      Revision 1.3  1998/09/18 08:32:34  afischer
60  *      Macros changed according ssr-spec.:
61  *              SK_DBG_MODCHK -> SK_DBG_CHKMOD
62  *              SK_DBG_CATCHK -> SK_DBG_CHKCAT
63  *
64  *      Revision 1.2  1998/07/03 14:38:25  malthoff
65  *      Add category SK_DBGCAT_FATAL.
66  *
67  *      Revision 1.1  1998/06/19 13:39:01  malthoff
68  *      created.
69  *
70  *
71  ******************************************************************************/
72
73 #ifndef __INC_SKDEBUG_H
74 #define __INC_SKDEBUG_H
75
76 #ifdef  DEBUG
77 #ifndef SK_DBG_MSG
78 #define SK_DBG_MSG(pAC,comp,cat,arg) \
79                 if ( ((comp) & SK_DBG_CHKMOD(pAC)) &&   \
80                       ((cat) & SK_DBG_CHKCAT(pAC)) ) {  \
81                         SK_DBG_PRINTF arg ;             \
82                 }
83 #endif
84 #else
85 #define SK_DBG_MSG(pAC,comp,lev,arg)
86 #endif
87
88 /* PLS NOTE:
89  * =========
90  * Due to any restrictions of kernel printf routines do not use other
91  * format identifiers as: %x %d %c %s .
92  * Never use any combined format identifiers such as: %lx %ld in your
93  * printf - argument (arg) because some OS specific kernel printfs may
94  * only support some basic identifiers.
95  */
96
97 /* Debug modules */
98
99 #define SK_DBGMOD_MERR  0x00000001L     /* general module error indication */
100 #define SK_DBGMOD_HWM   0x00000002L     /* Hardware init module */
101 #define SK_DBGMOD_RLMT  0x00000004L     /* RLMT module */
102 #define SK_DBGMOD_VPD   0x00000008L     /* VPD module */
103 #define SK_DBGMOD_I2C   0x00000010L     /* I2C module */
104 #define SK_DBGMOD_PNMI  0x00000020L     /* PNMI module */
105 #define SK_DBGMOD_CSUM  0x00000040L     /* CSUM module */
106 #define SK_DBGMOD_ADDR  0x00000080L     /* ADDR module */
107 #define SK_DBGMOD_PECP  0x00000100L     /* PECP module */
108 #define SK_DBGMOD_POWM  0x00000200L     /* Power Management module */
109
110 /* Debug events */
111
112 #define SK_DBGCAT_INIT  0x00000001L     /* module/driver initialization */
113 #define SK_DBGCAT_CTRL  0x00000002L     /* controlling devices */
114 #define SK_DBGCAT_ERR   0x00000004L     /* error handling paths */
115 #define SK_DBGCAT_TX    0x00000008L     /* transmit path */
116 #define SK_DBGCAT_RX    0x00000010L     /* receive path */
117 #define SK_DBGCAT_IRQ   0x00000020L     /* general IRQ handling */
118 #define SK_DBGCAT_QUEUE 0x00000040L     /* any queue management */
119 #define SK_DBGCAT_DUMP  0x00000080L     /* large data output e.g. hex dump */
120 #define SK_DBGCAT_FATAL 0x00000100L     /* fatal error */
121
122 #endif  /* __INC_SKDEBUG_H */