diff options
Diffstat (limited to 'drivers/usb/gadget/pxa2xx_udc.h')
-rw-r--r-- | drivers/usb/gadget/pxa2xx_udc.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/usb/gadget/pxa2xx_udc.h b/drivers/usb/gadget/pxa2xx_udc.h index 97a8c45ccd81..b67e3ff5e4eb 100644 --- a/drivers/usb/gadget/pxa2xx_udc.h +++ b/drivers/usb/gadget/pxa2xx_udc.h | |||
@@ -129,6 +129,10 @@ struct pxa2xx_udc { | |||
129 | struct pxa2xx_udc_mach_info *mach; | 129 | struct pxa2xx_udc_mach_info *mach; |
130 | u64 dma_mask; | 130 | u64 dma_mask; |
131 | struct pxa2xx_ep ep [PXA_UDC_NUM_ENDPOINTS]; | 131 | struct pxa2xx_ep ep [PXA_UDC_NUM_ENDPOINTS]; |
132 | |||
133 | #ifdef CONFIG_USB_GADGET_DEBUG_FS | ||
134 | struct dentry *debugfs_udc; | ||
135 | #endif | ||
132 | }; | 136 | }; |
133 | 137 | ||
134 | /*-------------------------------------------------------------------------*/ | 138 | /*-------------------------------------------------------------------------*/ |
@@ -155,13 +159,15 @@ static struct pxa2xx_udc *the_controller; | |||
155 | 159 | ||
156 | #ifdef DEBUG | 160 | #ifdef DEBUG |
157 | 161 | ||
162 | static int is_vbus_present(void); | ||
163 | |||
158 | static const char *state_name[] = { | 164 | static const char *state_name[] = { |
159 | "EP0_IDLE", | 165 | "EP0_IDLE", |
160 | "EP0_IN_DATA_PHASE", "EP0_OUT_DATA_PHASE", | 166 | "EP0_IN_DATA_PHASE", "EP0_OUT_DATA_PHASE", |
161 | "EP0_END_XFER", "EP0_STALL" | 167 | "EP0_END_XFER", "EP0_STALL" |
162 | }; | 168 | }; |
163 | 169 | ||
164 | #ifdef VERBOSE | 170 | #ifdef VERBOSE_DEBUG |
165 | # define UDC_DEBUG DBG_VERBOSE | 171 | # define UDC_DEBUG DBG_VERBOSE |
166 | #else | 172 | #else |
167 | # define UDC_DEBUG DBG_NORMAL | 173 | # define UDC_DEBUG DBG_NORMAL |
@@ -207,7 +213,7 @@ dump_state(struct pxa2xx_udc *dev) | |||
207 | unsigned i; | 213 | unsigned i; |
208 | 214 | ||
209 | DMSG("%s %s, uicr %02X.%02X, usir %02X.%02x, ufnr %02X.%02X\n", | 215 | DMSG("%s %s, uicr %02X.%02X, usir %02X.%02x, ufnr %02X.%02X\n", |
210 | is_usb_connected() ? "host " : "disconnected", | 216 | is_vbus_present() ? "host " : "disconnected", |
211 | state_name[dev->ep0state], | 217 | state_name[dev->ep0state], |
212 | UICR1, UICR0, USIR1, USIR0, UFNRH, UFNRL); | 218 | UICR1, UICR0, USIR1, USIR0, UFNRH, UFNRL); |
213 | dump_udccr("udccr"); | 219 | dump_udccr("udccr"); |
@@ -224,7 +230,7 @@ dump_state(struct pxa2xx_udc *dev) | |||
224 | } else | 230 | } else |
225 | DMSG("ep0 driver '%s'\n", dev->driver->driver.name); | 231 | DMSG("ep0 driver '%s'\n", dev->driver->driver.name); |
226 | 232 | ||
227 | if (!is_usb_connected()) | 233 | if (!is_vbus_present()) |
228 | return; | 234 | return; |
229 | 235 | ||
230 | dump_udccs0 ("udccs0"); | 236 | dump_udccs0 ("udccs0"); |
@@ -233,7 +239,7 @@ dump_state(struct pxa2xx_udc *dev) | |||
233 | dev->stats.read.bytes, dev->stats.read.ops); | 239 | dev->stats.read.bytes, dev->stats.read.ops); |
234 | 240 | ||
235 | for (i = 1; i < PXA_UDC_NUM_ENDPOINTS; i++) { | 241 | for (i = 1; i < PXA_UDC_NUM_ENDPOINTS; i++) { |
236 | if (dev->ep [i].desc == 0) | 242 | if (dev->ep [i].desc == NULL) |
237 | continue; | 243 | continue; |
238 | DMSG ("udccs%d = %02x\n", i, *dev->ep->reg_udccs); | 244 | DMSG ("udccs%d = %02x\n", i, *dev->ep->reg_udccs); |
239 | } | 245 | } |