fix file specification in comments
[linux-2.6-block.git] / drivers / net / ibm_emac / ibm_emac_debug.h
CommitLineData
37448f7d 1/*
f30c2269 2 * drivers/net/ibm_emac/ibm_emac_debug.h
37448f7d
ES
3 *
4 * Driver for PowerPC 4xx on-chip ethernet controller, debug print routines.
5 *
6 * Copyright (c) 2004, 2005 Zultys Technologies
7 * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 */
15#ifndef __IBM_EMAC_DEBUG_H_
16#define __IBM_EMAC_DEBUG_H_
17
37448f7d
ES
18#include <linux/init.h>
19#include "ibm_emac_core.h"
20#include "ibm_emac_mal.h"
21
22#if defined(CONFIG_IBM_EMAC_DEBUG)
23void emac_dbg_register(int idx, struct ocp_enet_private *dev);
24void mal_dbg_register(int idx, struct ibm_ocp_mal *mal);
25int emac_init_debug(void) __init;
26void emac_fini_debug(void) __exit;
27void emac_dbg_dump_all(void);
28# define DBG_LEVEL 1
29#else
30# define emac_dbg_register(x,y) ((void)0)
31# define mal_dbg_register(x,y) ((void)0)
32# define emac_init_debug() ((void)0)
33# define emac_fini_debug() ((void)0)
34# define emac_dbg_dump_all() ((void)0)
35# define DBG_LEVEL 0
36#endif
37
38#if DBG_LEVEL > 0
39# define DBG(f,x...) printk("emac" f, ##x)
40# define MAL_DBG(f,x...) printk("mal" f, ##x)
41# define ZMII_DBG(f,x...) printk("zmii" f, ##x)
42# define RGMII_DBG(f,x...) printk("rgmii" f, ##x)
43# define NL "\n"
44#else
45# define DBG(f,x...) ((void)0)
46# define MAL_DBG(f,x...) ((void)0)
47# define ZMII_DBG(f,x...) ((void)0)
48# define RGMII_DBG(f,x...) ((void)0)
49#endif
50#if DBG_LEVEL > 1
51# define DBG2(f,x...) DBG(f, ##x)
52# define MAL_DBG2(f,x...) MAL_DBG(f, ##x)
53# define ZMII_DBG2(f,x...) ZMII_DBG(f, ##x)
54# define RGMII_DBG2(f,x...) RGMII_DBG(f, ##x)
55#else
56# define DBG2(f,x...) ((void)0)
57# define MAL_DBG2(f,x...) ((void)0)
58# define ZMII_DBG2(f,x...) ((void)0)
59# define RGMII_DBG2(f,x...) ((void)0)
60#endif
61
62#endif /* __IBM_EMAC_DEBUG_H_ */