blob: 57d27cdc43b0ba20d86a03f175634aef2bbd94ba [file] [log] [blame]
Felipe Balbi72246da2011-08-19 18:10:58 +03001/**
2 * debug.h - DesignWare USB3 DRD Controller Debug Header
3 *
4 * Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com
Felipe Balbi72246da2011-08-19 18:10:58 +03005 *
6 * Authors: Felipe Balbi <balbi@ti.com>,
7 * Sebastian Andrzej Siewior <bigeasy@linutronix.de>
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions, and the following disclaimer,
14 * without modification.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. The names of the above-listed copyright holders may not be used
19 * to endorse or promote products derived from this software without
20 * specific prior written permission.
21 *
22 * ALTERNATIVELY, this software may be distributed under the terms of the
23 * GNU General Public License ("GPL") version 2, as published by the Free
24 * Software Foundation.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
27 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
28 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
30 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 */
38
39#include "core.h"
40
41#ifdef CONFIG_DEBUG_FS
Vijayavardhan Vennapusaffeb26b2013-02-14 16:33:30 +053042extern void dbg_event(u8, const char*, int);
43extern void dbg_print(u8, const char*, int, const char*);
44extern void dbg_done(u8, const u32, int);
45extern void dbg_queue(u8, const struct usb_request*, int);
46extern void dbg_setup(u8, const struct usb_ctrlrequest*);
Felipe Balbi72246da2011-08-19 18:10:58 +030047extern int dwc3_debugfs_init(struct dwc3 *);
48extern void dwc3_debugfs_exit(struct dwc3 *);
Vijayavardhan Vennapusa8a011c92013-07-29 09:06:48 +053049extern void dbg_print_reg(const char *name, int reg);
Felipe Balbi72246da2011-08-19 18:10:58 +030050#else
Olav Haugan8096f142013-12-16 17:38:08 -080051static inline void dbg_event(u8 ep_num, const char *name, int status)
Vijayavardhan Vennapusaffeb26b2013-02-14 16:33:30 +053052{ }
Olav Haugan8096f142013-12-16 17:38:08 -080053static inline void dbg_print(u8 ep_num, const char *name, int status,
54 const char *extra)
Vijayavardhan Vennapusaffeb26b2013-02-14 16:33:30 +053055{ }
Olav Haugan8096f142013-12-16 17:38:08 -080056static inline void dbg_done(u8 ep_num, const u32 count, int status)
Vijayavardhan Vennapusaffeb26b2013-02-14 16:33:30 +053057{ }
Olav Haugan8096f142013-12-16 17:38:08 -080058static inline void dbg_queue(u8 ep_num, const struct usb_request *req,
59 int status)
Vijayavardhan Vennapusaffeb26b2013-02-14 16:33:30 +053060{ }
Olav Haugan8096f142013-12-16 17:38:08 -080061static inline void dbg_setup(u8 ep_num, const struct usb_ctrlrequest *req)
Vijayavardhan Vennapusaffeb26b2013-02-14 16:33:30 +053062{ }
Vijayavardhan Vennapusa8a011c92013-07-29 09:06:48 +053063static inline void dbg_print_reg(const char *name, int reg)
64{ }
Felipe Balbi72246da2011-08-19 18:10:58 +030065static inline int dwc3_debugfs_init(struct dwc3 *d)
66{ return 0; }
67static inline void dwc3_debugfs_exit(struct dwc3 *d)
68{ }
69#endif
70