| 1 | /*
|
|---|
| 2 | * Copyright (c) 2017 Ondrej Hlavaty
|
|---|
| 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 |
|
|---|
| 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 | */
|
|---|
| 43 | struct xhci_hc;
|
|---|
| 44 | struct xhci_cap_regs;
|
|---|
| 45 | struct xhci_port_regs;
|
|---|
| 46 | struct xhci_trb;
|
|---|
| 47 | struct xhci_extcap;
|
|---|
| 48 |
|
|---|
| 49 | void xhci_dump_cap_regs(const struct xhci_cap_regs *);
|
|---|
| 50 | void xhci_dump_port(const struct xhci_port_regs *);
|
|---|
| 51 | void xhci_dump_state(const struct xhci_hc *);
|
|---|
| 52 | void xhci_dump_ports(const struct xhci_hc *);
|
|---|
| 53 |
|
|---|
| 54 | const char *xhci_trb_str_type(unsigned);
|
|---|
| 55 | void xhci_dump_trb(const struct xhci_trb *trb);
|
|---|
| 56 |
|
|---|
| 57 | const char *xhci_ec_str_id(unsigned);
|
|---|
| 58 | void xhci_dump_extcap(const struct xhci_extcap *);
|
|---|
| 59 |
|
|---|
| 60 | #endif
|
|---|
| 61 | /**
|
|---|
| 62 | * @}
|
|---|
| 63 | */
|
|---|