hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/usb/dwc2/debugfs.c
....@@ -37,15 +37,15 @@
3737 return -EFAULT;
3838
3939 if (!strncmp(buf, "test_j", 6))
40
- testmode = TEST_J;
40
+ testmode = USB_TEST_J;
4141 else if (!strncmp(buf, "test_k", 6))
42
- testmode = TEST_K;
42
+ testmode = USB_TEST_K;
4343 else if (!strncmp(buf, "test_se0_nak", 12))
44
- testmode = TEST_SE0_NAK;
44
+ testmode = USB_TEST_SE0_NAK;
4545 else if (!strncmp(buf, "test_packet", 11))
46
- testmode = TEST_PACKET;
46
+ testmode = USB_TEST_PACKET;
4747 else if (!strncmp(buf, "test_force_enable", 17))
48
- testmode = TEST_FORCE_EN;
48
+ testmode = USB_TEST_FORCE_ENABLE;
4949 else
5050 testmode = 0;
5151
....@@ -78,19 +78,19 @@
7878 case 0:
7979 seq_puts(s, "no test\n");
8080 break;
81
- case TEST_J:
81
+ case USB_TEST_J:
8282 seq_puts(s, "test_j\n");
8383 break;
84
- case TEST_K:
84
+ case USB_TEST_K:
8585 seq_puts(s, "test_k\n");
8686 break;
87
- case TEST_SE0_NAK:
87
+ case USB_TEST_SE0_NAK:
8888 seq_puts(s, "test_se0_nak\n");
8989 break;
90
- case TEST_PACKET:
90
+ case USB_TEST_PACKET:
9191 seq_puts(s, "test_packet\n");
9292 break;
93
- case TEST_FORCE_EN:
93
+ case USB_TEST_FORCE_ENABLE:
9494 seq_puts(s, "test_force_enable\n");
9595 break;
9696 default:
....@@ -183,6 +183,7 @@
183183 static int fifo_show(struct seq_file *seq, void *v)
184184 {
185185 struct dwc2_hsotg *hsotg = seq->private;
186
+ int fifo_count = dwc2_hsotg_tx_fifo_count(hsotg);
186187 u32 val;
187188 int idx;
188189
....@@ -196,7 +197,7 @@
196197
197198 seq_puts(seq, "\nPeriodic TXFIFOs:\n");
198199
199
- for (idx = 1; idx < hsotg->num_of_eps; idx++) {
200
+ for (idx = 1; idx <= fifo_count; idx++) {
200201 val = dwc2_readl(hsotg, DPTXFSIZN(idx));
201202
202203 seq_printf(seq, "\tDPTXFIFO%2d: Size %d, Start 0x%08x\n", idx,
....@@ -701,6 +702,7 @@
701702 print_param(seq, p, besl);
702703 print_param(seq, p, hird_threshold_en);
703704 print_param(seq, p, hird_threshold);
705
+ print_param(seq, p, service_interval);
704706 print_param(seq, p, host_dma);
705707 print_param(seq, p, g_dma);
706708 print_param(seq, p, g_dma_desc);
....@@ -769,7 +771,7 @@
769771 int ret;
770772 struct dentry *root;
771773
772
- root = debugfs_create_dir(dev_name(hsotg->dev), NULL);
774
+ root = debugfs_create_dir(dev_name(hsotg->dev), usb_debug_root);
773775 hsotg->debug_root = root;
774776
775777 debugfs_create_file("params", 0444, root, hsotg, &params_fops);