[5cbccd4] | 1 | /*
|
---|
[e0a5d4c] | 2 | * Copyright (c) 2018 Ondrej Hlavaty, Jan Hrach
|
---|
[5cbccd4] | 3 | * All rights reserved.
|
---|
| 4 | *
|
---|
| 5 | * Redistribution and use in source and binary forms, with or without
|
---|
| 6 | * modification, are permitted provided that the following conditions
|
---|
| 7 | * are met:
|
---|
| 8 | *
|
---|
| 9 | * - Redistributions of source code must retain the above copyright
|
---|
| 10 | * notice, this list of conditions and the following disclaimer.
|
---|
| 11 | * - Redistributions in binary form must reproduce the above copyright
|
---|
| 12 | * notice, this list of conditions and the following disclaimer in the
|
---|
| 13 | * documentation and/or other materials provided with the distribution.
|
---|
| 14 | * - The name of the author may not be used to endorse or promote products
|
---|
| 15 | * derived from this software without specific prior written permission.
|
---|
| 16 | *
|
---|
| 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
---|
| 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
| 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
---|
| 20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
---|
| 21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
---|
| 22 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
---|
| 23 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
| 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
---|
| 25 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
| 26 | */
|
---|
| 27 |
|
---|
| 28 | /** @addtogroup drvusbxhci
|
---|
| 29 | * @{
|
---|
| 30 | */
|
---|
| 31 | /** @file
|
---|
| 32 | *
|
---|
| 33 | * Utility functions for debugging and logging purposes.
|
---|
| 34 | */
|
---|
| 35 |
|
---|
| 36 | #ifndef XHCI_DEBUG_H
|
---|
| 37 | #define XHCI_DEBUG_H
|
---|
| 38 |
|
---|
[91ca111] | 39 | /**
|
---|
| 40 | * As the debug header is likely to be included in every file, avoid including
|
---|
| 41 | * all headers of xhci to support "include what you use".
|
---|
| 42 | */
|
---|
[cb89430] | 43 | struct xhci_hc;
|
---|
| 44 | struct xhci_cap_regs;
|
---|
| 45 | struct xhci_port_regs;
|
---|
| 46 | struct xhci_trb;
|
---|
[91ca111] | 47 | struct xhci_extcap;
|
---|
[41abf3c] | 48 | struct xhci_slot_ctx;
|
---|
| 49 | struct xhci_endpoint_ctx;
|
---|
[36fb6d7] | 50 | struct xhci_input_ctx;
|
---|
[5cbccd4] | 51 |
|
---|
[3dd80f8] | 52 | extern void xhci_dump_cap_regs(const struct xhci_cap_regs *);
|
---|
| 53 | extern void xhci_dump_port(const struct xhci_port_regs *);
|
---|
| 54 | extern void xhci_dump_state(const struct xhci_hc *);
|
---|
| 55 | extern void xhci_dump_ports(const struct xhci_hc *);
|
---|
[62ba2cbe] | 56 |
|
---|
[3dd80f8] | 57 | extern const char *xhci_trb_str_type(unsigned);
|
---|
| 58 | extern void xhci_dump_trb(const struct xhci_trb *trb);
|
---|
[91ca111] | 59 |
|
---|
[3dd80f8] | 60 | extern const char *xhci_ec_str_id(unsigned);
|
---|
| 61 | extern void xhci_dump_extcap(const struct xhci_extcap *);
|
---|
[5cbccd4] | 62 |
|
---|
[3dd80f8] | 63 | extern void xhci_dump_slot_ctx(const struct xhci_slot_ctx *);
|
---|
| 64 | extern void xhci_dump_endpoint_ctx(const struct xhci_endpoint_ctx *);
|
---|
[ae3a941] | 65 | extern void xhci_dump_input_ctx(const struct xhci_hc *,
|
---|
| 66 | const struct xhci_input_ctx *);
|
---|
[36fb6d7] | 67 |
|
---|
[5cbccd4] | 68 | #endif
|
---|
| 69 | /**
|
---|
| 70 | * @}
|
---|
| 71 | */
|
---|