diff options
Diffstat (limited to 'drivers/usb/dwc3/debugfs.c')
-rw-r--r-- | drivers/usb/dwc3/debugfs.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c index da1ad77d8d51..fcfa91517ea1 100644 --- a/drivers/usb/dwc3/debugfs.c +++ b/drivers/usb/dwc3/debugfs.c | |||
@@ -51,18 +51,13 @@ | |||
51 | #include "gadget.h" | 51 | #include "gadget.h" |
52 | #include "io.h" | 52 | #include "io.h" |
53 | 53 | ||
54 | struct dwc3_register { | ||
55 | const char *name; | ||
56 | u32 offset; | ||
57 | }; | ||
58 | |||
59 | #define dump_register(nm) \ | 54 | #define dump_register(nm) \ |
60 | { \ | 55 | { \ |
61 | .name = __stringify(nm), \ | 56 | .name = __stringify(nm), \ |
62 | .offset = DWC3_ ##nm, \ | 57 | .offset = DWC3_ ##nm, \ |
63 | } | 58 | } |
64 | 59 | ||
65 | static const struct dwc3_register dwc3_regs[] = { | 60 | static const struct debugfs_reg32 dwc3_regs[] = { |
66 | dump_register(GSBUSCFG0), | 61 | dump_register(GSBUSCFG0), |
67 | dump_register(GSBUSCFG1), | 62 | dump_register(GSBUSCFG1), |
68 | dump_register(GTXTHRCFG), | 63 | dump_register(GTXTHRCFG), |
@@ -382,15 +377,10 @@ static const struct dwc3_register dwc3_regs[] = { | |||
382 | static int dwc3_regdump_show(struct seq_file *s, void *unused) | 377 | static int dwc3_regdump_show(struct seq_file *s, void *unused) |
383 | { | 378 | { |
384 | struct dwc3 *dwc = s->private; | 379 | struct dwc3 *dwc = s->private; |
385 | int i; | ||
386 | 380 | ||
387 | seq_printf(s, "DesignWare USB3 Core Register Dump\n"); | 381 | seq_printf(s, "DesignWare USB3 Core Register Dump\n"); |
388 | 382 | debugfs_print_regs32(s, dwc3_regs, ARRAY_SIZE(dwc3_regs), | |
389 | for (i = 0; i < ARRAY_SIZE(dwc3_regs); i++) { | 383 | dwc->regs, ""); |
390 | seq_printf(s, "%-20s : %08x\n", dwc3_regs[i].name, | ||
391 | dwc3_readl(dwc->regs, dwc3_regs[i].offset)); | ||
392 | } | ||
393 | |||
394 | return 0; | 384 | return 0; |
395 | } | 385 | } |
396 | 386 | ||