mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-16 23:45:31 +08:00
2874c5fd28
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 3029 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
56 lines
1.6 KiB
C
56 lines
1.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* drivers/net/ethernet/ibm/emac/debug.h
|
|
*
|
|
* Driver for PowerPC 4xx on-chip ethernet controller, debug print routines.
|
|
*
|
|
* Copyright 2007 Benjamin Herrenschmidt, IBM Corp.
|
|
* <benh@kernel.crashing.org>
|
|
*
|
|
* Based on the arch/ppc version of the driver:
|
|
*
|
|
* Copyright (c) 2004, 2005 Zultys Technologies
|
|
* Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
|
|
*/
|
|
#ifndef __IBM_NEWEMAC_DEBUG_H
|
|
#define __IBM_NEWEMAC_DEBUG_H
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include "core.h"
|
|
|
|
#if defined(CONFIG_IBM_EMAC_DEBUG)
|
|
# define DBG_LEVEL 1
|
|
#else
|
|
# define DBG_LEVEL 0
|
|
#endif
|
|
|
|
#define EMAC_DBG(d, name, fmt, arg...) \
|
|
printk(KERN_DEBUG #name "%pOF: " fmt, d->ofdev->dev.of_node, ## arg)
|
|
|
|
#if DBG_LEVEL > 0
|
|
# define DBG(d,f,x...) EMAC_DBG(d, emac, f, ##x)
|
|
# define MAL_DBG(d,f,x...) EMAC_DBG(d, mal, f, ##x)
|
|
# define ZMII_DBG(d,f,x...) EMAC_DBG(d, zmii, f, ##x)
|
|
# define RGMII_DBG(d,f,x...) EMAC_DBG(d, rgmii, f, ##x)
|
|
# define NL "\n"
|
|
#else
|
|
# define DBG(f,x...) ((void)0)
|
|
# define MAL_DBG(d,f,x...) ((void)0)
|
|
# define ZMII_DBG(d,f,x...) ((void)0)
|
|
# define RGMII_DBG(d,f,x...) ((void)0)
|
|
#endif
|
|
#if DBG_LEVEL > 1
|
|
# define DBG2(d,f,x...) DBG(d,f, ##x)
|
|
# define MAL_DBG2(d,f,x...) MAL_DBG(d,f, ##x)
|
|
# define ZMII_DBG2(d,f,x...) ZMII_DBG(d,f, ##x)
|
|
# define RGMII_DBG2(d,f,x...) RGMII_DBG(d,f, ##x)
|
|
#else
|
|
# define DBG2(f,x...) ((void)0)
|
|
# define MAL_DBG2(d,f,x...) ((void)0)
|
|
# define ZMII_DBG2(d,f,x...) ((void)0)
|
|
# define RGMII_DBG2(d,f,x...) ((void)0)
|
|
#endif
|
|
|
|
#endif /* __IBM_NEWEMAC_DEBUG_H */
|