| .. | .. |
|---|
| 37 | 37 | return -EFAULT; |
|---|
| 38 | 38 | |
|---|
| 39 | 39 | if (!strncmp(buf, "test_j", 6)) |
|---|
| 40 | | - testmode = TEST_J; |
|---|
| 40 | + testmode = USB_TEST_J; |
|---|
| 41 | 41 | else if (!strncmp(buf, "test_k", 6)) |
|---|
| 42 | | - testmode = TEST_K; |
|---|
| 42 | + testmode = USB_TEST_K; |
|---|
| 43 | 43 | else if (!strncmp(buf, "test_se0_nak", 12)) |
|---|
| 44 | | - testmode = TEST_SE0_NAK; |
|---|
| 44 | + testmode = USB_TEST_SE0_NAK; |
|---|
| 45 | 45 | else if (!strncmp(buf, "test_packet", 11)) |
|---|
| 46 | | - testmode = TEST_PACKET; |
|---|
| 46 | + testmode = USB_TEST_PACKET; |
|---|
| 47 | 47 | else if (!strncmp(buf, "test_force_enable", 17)) |
|---|
| 48 | | - testmode = TEST_FORCE_EN; |
|---|
| 48 | + testmode = USB_TEST_FORCE_ENABLE; |
|---|
| 49 | 49 | else |
|---|
| 50 | 50 | testmode = 0; |
|---|
| 51 | 51 | |
|---|
| .. | .. |
|---|
| 78 | 78 | case 0: |
|---|
| 79 | 79 | seq_puts(s, "no test\n"); |
|---|
| 80 | 80 | break; |
|---|
| 81 | | - case TEST_J: |
|---|
| 81 | + case USB_TEST_J: |
|---|
| 82 | 82 | seq_puts(s, "test_j\n"); |
|---|
| 83 | 83 | break; |
|---|
| 84 | | - case TEST_K: |
|---|
| 84 | + case USB_TEST_K: |
|---|
| 85 | 85 | seq_puts(s, "test_k\n"); |
|---|
| 86 | 86 | break; |
|---|
| 87 | | - case TEST_SE0_NAK: |
|---|
| 87 | + case USB_TEST_SE0_NAK: |
|---|
| 88 | 88 | seq_puts(s, "test_se0_nak\n"); |
|---|
| 89 | 89 | break; |
|---|
| 90 | | - case TEST_PACKET: |
|---|
| 90 | + case USB_TEST_PACKET: |
|---|
| 91 | 91 | seq_puts(s, "test_packet\n"); |
|---|
| 92 | 92 | break; |
|---|
| 93 | | - case TEST_FORCE_EN: |
|---|
| 93 | + case USB_TEST_FORCE_ENABLE: |
|---|
| 94 | 94 | seq_puts(s, "test_force_enable\n"); |
|---|
| 95 | 95 | break; |
|---|
| 96 | 96 | default: |
|---|
| .. | .. |
|---|
| 183 | 183 | static int fifo_show(struct seq_file *seq, void *v) |
|---|
| 184 | 184 | { |
|---|
| 185 | 185 | struct dwc2_hsotg *hsotg = seq->private; |
|---|
| 186 | + int fifo_count = dwc2_hsotg_tx_fifo_count(hsotg); |
|---|
| 186 | 187 | u32 val; |
|---|
| 187 | 188 | int idx; |
|---|
| 188 | 189 | |
|---|
| .. | .. |
|---|
| 196 | 197 | |
|---|
| 197 | 198 | seq_puts(seq, "\nPeriodic TXFIFOs:\n"); |
|---|
| 198 | 199 | |
|---|
| 199 | | - for (idx = 1; idx < hsotg->num_of_eps; idx++) { |
|---|
| 200 | + for (idx = 1; idx <= fifo_count; idx++) { |
|---|
| 200 | 201 | val = dwc2_readl(hsotg, DPTXFSIZN(idx)); |
|---|
| 201 | 202 | |
|---|
| 202 | 203 | seq_printf(seq, "\tDPTXFIFO%2d: Size %d, Start 0x%08x\n", idx, |
|---|
| .. | .. |
|---|
| 701 | 702 | print_param(seq, p, besl); |
|---|
| 702 | 703 | print_param(seq, p, hird_threshold_en); |
|---|
| 703 | 704 | print_param(seq, p, hird_threshold); |
|---|
| 705 | + print_param(seq, p, service_interval); |
|---|
| 704 | 706 | print_param(seq, p, host_dma); |
|---|
| 705 | 707 | print_param(seq, p, g_dma); |
|---|
| 706 | 708 | print_param(seq, p, g_dma_desc); |
|---|
| .. | .. |
|---|
| 769 | 771 | int ret; |
|---|
| 770 | 772 | struct dentry *root; |
|---|
| 771 | 773 | |
|---|
| 772 | | - root = debugfs_create_dir(dev_name(hsotg->dev), NULL); |
|---|
| 774 | + root = debugfs_create_dir(dev_name(hsotg->dev), usb_debug_root); |
|---|
| 773 | 775 | hsotg->debug_root = root; |
|---|
| 774 | 776 | |
|---|
| 775 | 777 | debugfs_create_file("params", 0444, root, hsotg, ¶ms_fops); |
|---|