aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/musb/musb_debugfs.c')
-rw-r--r--drivers/usb/musb/musb_debugfs.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/drivers/usb/musb/musb_debugfs.c b/drivers/usb/musb/musb_debugfs.c
index ad3701a97389..48131aa8472c 100644
--- a/drivers/usb/musb/musb_debugfs.c
+++ b/drivers/usb/musb/musb_debugfs.c
@@ -59,20 +59,12 @@ static const struct musb_register_map musb_regmap[] = {
59 { "RxMaxPp", MUSB_RXMAXP, 16 }, 59 { "RxMaxPp", MUSB_RXMAXP, 16 },
60 { "RxCSR", MUSB_RXCSR, 16 }, 60 { "RxCSR", MUSB_RXCSR, 16 },
61 { "RxCount", MUSB_RXCOUNT, 16 }, 61 { "RxCount", MUSB_RXCOUNT, 16 },
62 { "ConfigData", MUSB_CONFIGDATA,8 },
63 { "IntrRxE", MUSB_INTRRXE, 16 }, 62 { "IntrRxE", MUSB_INTRRXE, 16 },
64 { "IntrTxE", MUSB_INTRTXE, 16 }, 63 { "IntrTxE", MUSB_INTRTXE, 16 },
65 { "IntrUsbE", MUSB_INTRUSBE, 8 }, 64 { "IntrUsbE", MUSB_INTRUSBE, 8 },
66 { "DevCtl", MUSB_DEVCTL, 8 }, 65 { "DevCtl", MUSB_DEVCTL, 8 },
67 { "BabbleCtl", MUSB_BABBLE_CTL,8 },
68 { "TxFIFOsz", MUSB_TXFIFOSZ, 8 },
69 { "RxFIFOsz", MUSB_RXFIFOSZ, 8 },
70 { "TxFIFOadd", MUSB_TXFIFOADD, 16 },
71 { "RxFIFOadd", MUSB_RXFIFOADD, 16 },
72 { "VControl", 0x68, 32 }, 66 { "VControl", 0x68, 32 },
73 { "HWVers", 0x69, 16 }, 67 { "HWVers", 0x69, 16 },
74 { "EPInfo", MUSB_EPINFO, 8 },
75 { "RAMInfo", MUSB_RAMINFO, 8 },
76 { "LinkInfo", MUSB_LINKINFO, 8 }, 68 { "LinkInfo", MUSB_LINKINFO, 8 },
77 { "VPLen", MUSB_VPLEN, 8 }, 69 { "VPLen", MUSB_VPLEN, 8 },
78 { "HS_EOF1", MUSB_HS_EOF1, 8 }, 70 { "HS_EOF1", MUSB_HS_EOF1, 8 },
@@ -103,6 +95,16 @@ static const struct musb_register_map musb_regmap[] = {
103 { "DMA_CNTLch7", 0x274, 16 }, 95 { "DMA_CNTLch7", 0x274, 16 },
104 { "DMA_ADDRch7", 0x278, 32 }, 96 { "DMA_ADDRch7", 0x278, 32 },
105 { "DMA_COUNTch7", 0x27C, 32 }, 97 { "DMA_COUNTch7", 0x27C, 32 },
98#ifndef CONFIG_BLACKFIN
99 { "ConfigData", MUSB_CONFIGDATA,8 },
100 { "BabbleCtl", MUSB_BABBLE_CTL,8 },
101 { "TxFIFOsz", MUSB_TXFIFOSZ, 8 },
102 { "RxFIFOsz", MUSB_RXFIFOSZ, 8 },
103 { "TxFIFOadd", MUSB_TXFIFOADD, 16 },
104 { "RxFIFOadd", MUSB_RXFIFOADD, 16 },
105 { "EPInfo", MUSB_EPINFO, 8 },
106 { "RAMInfo", MUSB_RAMINFO, 8 },
107#endif
106 { } /* Terminating Entry */ 108 { } /* Terminating Entry */
107}; 109};
108 110
@@ -197,30 +199,30 @@ static ssize_t musb_test_mode_write(struct file *file,
197 if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count))) 199 if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count)))
198 return -EFAULT; 200 return -EFAULT;
199 201
200 if (!strncmp(buf, "force host", 9)) 202 if (strstarts(buf, "force host"))
201 test = MUSB_TEST_FORCE_HOST; 203 test = MUSB_TEST_FORCE_HOST;
202 204
203 if (!strncmp(buf, "fifo access", 11)) 205 if (strstarts(buf, "fifo access"))
204 test = MUSB_TEST_FIFO_ACCESS; 206 test = MUSB_TEST_FIFO_ACCESS;
205 207
206 if (!strncmp(buf, "force full-speed", 15)) 208 if (strstarts(buf, "force full-speed"))
207 test = MUSB_TEST_FORCE_FS; 209 test = MUSB_TEST_FORCE_FS;
208 210
209 if (!strncmp(buf, "force high-speed", 15)) 211 if (strstarts(buf, "force high-speed"))
210 test = MUSB_TEST_FORCE_HS; 212 test = MUSB_TEST_FORCE_HS;
211 213
212 if (!strncmp(buf, "test packet", 10)) { 214 if (strstarts(buf, "test packet")) {
213 test = MUSB_TEST_PACKET; 215 test = MUSB_TEST_PACKET;
214 musb_load_testpacket(musb); 216 musb_load_testpacket(musb);
215 } 217 }
216 218
217 if (!strncmp(buf, "test K", 6)) 219 if (strstarts(buf, "test K"))
218 test = MUSB_TEST_K; 220 test = MUSB_TEST_K;
219 221
220 if (!strncmp(buf, "test J", 6)) 222 if (strstarts(buf, "test J"))
221 test = MUSB_TEST_J; 223 test = MUSB_TEST_J;
222 224
223 if (!strncmp(buf, "test SE0 NAK", 12)) 225 if (strstarts(buf, "test SE0 NAK"))
224 test = MUSB_TEST_SE0_NAK; 226 test = MUSB_TEST_SE0_NAK;
225 227
226 musb_writeb(musb->mregs, MUSB_TESTMODE, test); 228 musb_writeb(musb->mregs, MUSB_TESTMODE, test);