Changeset defaab2 in mainline for uspace/drv/bus/usb/xhci/debug.c
- Timestamp:
- 2018-01-20T22:46:24Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 217e981
- Parents:
- 9d3536e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/debug.c
r9d3536e rdefaab2 45 45 46 46 #define DUMP_REG_FIELD(ptr, title, size, ...) \ 47 usb_log_debug 2(PX "%" PRIu##size, title, XHCI_REG_RD_FIELD(ptr, size, ##__VA_ARGS__))47 usb_log_debug(PX "%" PRIu##size, title, XHCI_REG_RD_FIELD(ptr, size, ##__VA_ARGS__)) 48 48 49 49 #define DUMP_REG_RANGE(ptr, title, size, ...) \ 50 usb_log_debug 2(PX "%" PRIu##size, title, XHCI_REG_RD_RANGE(ptr, size, ##__VA_ARGS__))50 usb_log_debug(PX "%" PRIu##size, title, XHCI_REG_RD_RANGE(ptr, size, ##__VA_ARGS__)) 51 51 52 52 #define DUMP_REG_FLAG(ptr, title, size, ...) \ 53 usb_log_debug 2(PX "%s", title, XHCI_REG_RD_FLAG(ptr, size, ##__VA_ARGS__) ? "true" : "false")53 usb_log_debug(PX "%s", title, XHCI_REG_RD_FLAG(ptr, size, ##__VA_ARGS__) ? "true" : "false") 54 54 55 55 #define DUMP_REG_INNER(set, title, field, size, type, ...) \ … … 63 63 void xhci_dump_cap_regs(const xhci_cap_regs_t *cap) 64 64 { 65 usb_log_debug 2("Capabilities:");65 usb_log_debug("Capabilities:"); 66 66 67 67 DUMP_REG(cap, XHCI_CAP_LENGTH); … … 72 72 DUMP_REG(cap, XHCI_CAP_IST); 73 73 DUMP_REG(cap, XHCI_CAP_ERST_MAX); 74 usb_log_debug 2(PX "%u", "Max Scratchpad bufs", xhci_get_max_spbuf(cap));74 usb_log_debug(PX "%u", "Max Scratchpad bufs", xhci_get_max_spbuf(cap)); 75 75 DUMP_REG(cap, XHCI_CAP_SPR); 76 76 DUMP_REG(cap, XHCI_CAP_U1EL); … … 149 149 void xhci_dump_state(const xhci_hc_t *hc) 150 150 { 151 usb_log_debug 2("Operational registers:");151 usb_log_debug("Operational registers:"); 152 152 153 153 DUMP_REG(hc->op_regs, XHCI_OP_RS); … … 182 182 DUMP_REG(hc->rt_regs, XHCI_RT_MFINDEX); 183 183 184 usb_log_debug 2("Interrupter 0 state:");184 usb_log_debug("Interrupter 0 state:"); 185 185 DUMP_REG(&hc->rt_regs->ir[0], XHCI_INTR_IP); 186 186 DUMP_REG(&hc->rt_regs->ir[0], XHCI_INTR_IE); … … 201 201 const size_t num_ports = XHCI_REG_RD(hc->cap_regs, XHCI_CAP_MAX_PORTS); 202 202 for (size_t i = 0; i < num_ports; i++) { 203 usb_log_debug 2("Port %zu state:", i);203 usb_log_debug("Port %zu state:", i); 204 204 205 205 xhci_dump_port(&hc->op_regs->portrs[i]); … … 264 264 void xhci_dump_trb(const xhci_trb_t *trb) 265 265 { 266 usb_log_debug 2("TRB(%p): type %s, cycle %u, status 0x%#08" PRIx32 ", parameter 0x%#016" PRIx64, trb, xhci_trb_str_type(TRB_TYPE(*trb)), TRB_CYCLE(*trb), trb->status, trb->parameter);266 usb_log_debug("TRB(%p): type %s, cycle %u, status 0x%#08" PRIx32 ", parameter 0x%#016" PRIx64, trb, xhci_trb_str_type(TRB_TYPE(*trb)), TRB_CYCLE(*trb), trb->status, trb->parameter); 267 267 } 268 268
Note:
See TracChangeset
for help on using the changeset viewer.