]>
git.ipfire.org Git - people/ms/u-boot.git/blob - drivers/bcm570x_debug.h
2 /******************************************************************************/
4 /* Broadcom BCM5700 Linux Network Driver, Copyright (c) 2000 Broadcom */
6 /* All rights reserved. */
8 /* This program is free software; you can redistribute it and/or modify */
9 /* it under the terms of the GNU General Public License as published by */
10 /* the Free Software Foundation, located in the file LICENSE. */
13 /* 02/25/00 Hav Khauv Initial version. */
14 /******************************************************************************/
23 /******************************************************************************/
25 /******************************************************************************/
27 /* Code path for controlling output debug messages. */
28 /* Define your code path here. */
29 #define CP_INIT 0x010000
30 #define CP_SEND 0x020000
31 #define CP_RCV 0x040000
32 #define CP_INT 0x080000
33 #define CP_UINIT 0x100000
34 #define CP_RESET 0x200000
36 #define CP_ALL (CP_INIT | CP_SEND | CP_RCV | CP_INT | \
39 #define CP_MASK 0xffff0000
42 /* Debug message levels. */
43 #define LV_VERBOSE 0x03
44 #define LV_INFORM 0x02
48 #define LV_MASK 0xffff
51 /* Code path and messsage level combined. These are the first argument of */
52 /* the DbgMessage macro. */
53 #define INIT_V (CP_INIT | LV_VERBOSE)
54 #define INIT_I (CP_INIT | LV_INFORM)
55 #define INIT_W (CP_INIT | LV_WARN)
56 #define SEND_V (CP_SEND | LV_VERBOSE)
57 #define SEND_I (CP_SEND | LV_INFORM)
58 #define SEND_W (CP_SEND | LV_WARN)
59 #define RCV_V (CP_RCV | LV_VERBOSE)
60 #define RCV_I (CP_RCV | LV_INFORM)
61 #define RCV_W (CP_RCV | LV_WARN)
62 #define INT_V (CP_INT | LV_VERBOSE)
63 #define INT_I (CP_INT | LV_INFORM)
64 #define INT_W (CP_INT | LV_WARN)
65 #define UINIT_V (CP_UINIT | LV_VERBOSE)
66 #define UINIT_I (CP_UINIT | LV_INFORM)
67 #define UINIT_W (CP_UINIT | LV_WARN)
68 #define RESET_V (CP_RESET | LV_VERBOSE)
69 #define RESET_I (CP_RESET | LV_INFORM)
70 #define RESET_W (CP_RESET | LV_WARN)
71 #define CPALL_V (CP_ALL | LV_VERBOSE)
72 #define CPALL_I (CP_ALL | LV_INFORM)
73 #define CPALL_W (CP_ALL | LV_WARN)
76 /* All code path message levels. */
77 #define FATAL (CP_ALL | LV_FATAL)
78 #define WARN (CP_ALL | LV_WARN)
79 #define INFORM (CP_ALL | LV_INFORM)
80 #define VERBOSE (CP_ALL | LV_VERBOSE)
83 /* These constants control the message output. */
84 /* Set your debug message output level and code path here. */
86 #define DBG_MSG_CP CP_ALL /* Where to output messages. */
90 #define DBG_MSG_LV LV_VERBOSE /* Level of message output. */
93 /* DbgMessage macro. */
95 #define DbgMessage(CNTRL, MESSAGE) \
96 if((CNTRL & DBG_MSG_CP) && ((CNTRL & LV_MASK) <= DBG_MSG_LV)) \
98 #define DbgBreak() DbgBreakPoint()
102 #define DbgMessage(CNTRL, MESSAGE)
105 #define STATIC static