diff options
| author | Mian Yousaf Kaukab <yousaf.kaukab@intel.com> | 2015-01-09 07:38:55 -0500 |
|---|---|---|
| committer | Felipe Balbi <balbi@ti.com> | 2015-01-12 16:33:43 -0500 |
| commit | 364f8e933869699167db935e13b41b1d92ab369d (patch) | |
| tree | 9116f8f46e6d25bc8d455534cb9f54b96b289bdb /drivers/usb/dwc2 | |
| parent | ea5a8774a273c62047abb3cb5cca69c8368d05da (diff) | |
usb: dwc2: gadget: fix debug loop limits
< 15 check doesn't show debug information for endpoint 15.
It is possible to have less than 15 endpoints so use limit
provided by hardware configuration.
Tested-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc2')
| -rw-r--r-- | drivers/usb/dwc2/gadget.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index c43ce7e8809a..7dfda954aba1 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c | |||
| @@ -3156,14 +3156,14 @@ static void s3c_hsotg_dump(struct dwc2_hsotg *hsotg) | |||
| 3156 | 3156 | ||
| 3157 | /* show periodic fifo settings */ | 3157 | /* show periodic fifo settings */ |
| 3158 | 3158 | ||
| 3159 | for (idx = 1; idx <= 15; idx++) { | 3159 | for (idx = 1; idx < hsotg->num_of_eps; idx++) { |
| 3160 | val = readl(regs + DPTXFSIZN(idx)); | 3160 | val = readl(regs + DPTXFSIZN(idx)); |
| 3161 | dev_info(dev, "DPTx[%d] FSize=%d, StAddr=0x%08x\n", idx, | 3161 | dev_info(dev, "DPTx[%d] FSize=%d, StAddr=0x%08x\n", idx, |
| 3162 | val >> FIFOSIZE_DEPTH_SHIFT, | 3162 | val >> FIFOSIZE_DEPTH_SHIFT, |
| 3163 | val & FIFOSIZE_STARTADDR_MASK); | 3163 | val & FIFOSIZE_STARTADDR_MASK); |
| 3164 | } | 3164 | } |
| 3165 | 3165 | ||
| 3166 | for (idx = 0; idx < 15; idx++) { | 3166 | for (idx = 0; idx < hsotg->num_of_eps; idx++) { |
| 3167 | dev_info(dev, | 3167 | dev_info(dev, |
| 3168 | "ep%d-in: EPCTL=0x%08x, SIZ=0x%08x, DMA=0x%08x\n", idx, | 3168 | "ep%d-in: EPCTL=0x%08x, SIZ=0x%08x, DMA=0x%08x\n", idx, |
| 3169 | readl(regs + DIEPCTL(idx)), | 3169 | readl(regs + DIEPCTL(idx)), |
| @@ -3221,7 +3221,7 @@ static int state_show(struct seq_file *seq, void *v) | |||
| 3221 | 3221 | ||
| 3222 | seq_puts(seq, "\nEndpoint status:\n"); | 3222 | seq_puts(seq, "\nEndpoint status:\n"); |
| 3223 | 3223 | ||
| 3224 | for (idx = 0; idx < 15; idx++) { | 3224 | for (idx = 0; idx < hsotg->num_of_eps; idx++) { |
| 3225 | u32 in, out; | 3225 | u32 in, out; |
| 3226 | 3226 | ||
| 3227 | in = readl(regs + DIEPCTL(idx)); | 3227 | in = readl(regs + DIEPCTL(idx)); |
| @@ -3280,7 +3280,7 @@ static int fifo_show(struct seq_file *seq, void *v) | |||
| 3280 | 3280 | ||
| 3281 | seq_puts(seq, "\nPeriodic TXFIFOs:\n"); | 3281 | seq_puts(seq, "\nPeriodic TXFIFOs:\n"); |
| 3282 | 3282 | ||
| 3283 | for (idx = 1; idx <= 15; idx++) { | 3283 | for (idx = 1; idx < hsotg->num_of_eps; idx++) { |
| 3284 | val = readl(regs + DPTXFSIZN(idx)); | 3284 | val = readl(regs + DPTXFSIZN(idx)); |
| 3285 | 3285 | ||
| 3286 | seq_printf(seq, "\tDPTXFIFO%2d: Size %d, Start 0x%08x\n", idx, | 3286 | seq_printf(seq, "\tDPTXFIFO%2d: Size %d, Start 0x%08x\n", idx, |
