Lines Matching refs:udc

102 	struct pxa_udc *udc = s->private;  in state_dbg_show()  local
107 if (!udc->driver) in state_dbg_show()
114 udc->driver ? udc->driver->driver.name : "(none)"); in state_dbg_show()
116 tmp = udc_readl(udc, UDCCR); in state_dbg_show()
135 udc_readl(udc, UDCICR0), udc_readl(udc, UDCICR1)); in state_dbg_show()
137 udc_readl(udc, UDCISR0), udc_readl(udc, UDCISR1)); in state_dbg_show()
138 pos += seq_printf(s, "udcfnr=%d\n", udc_readl(udc, UDCFNR)); in state_dbg_show()
141 udc->stats.irqs_reset, udc->stats.irqs_suspend, in state_dbg_show()
142 udc->stats.irqs_resume, udc->stats.irqs_reconfig); in state_dbg_show()
151 struct pxa_udc *udc = s->private; in queues_dbg_show() local
157 if (!udc->driver) in queues_dbg_show()
162 ep = &udc->pxa_ep[i]; in queues_dbg_show()
186 struct pxa_udc *udc = s->private; in eps_dbg_show() local
192 if (!udc->driver) in eps_dbg_show()
195 ep = &udc->pxa_ep[0]; in eps_dbg_show()
206 ep = &udc->pxa_ep[i]; in eps_dbg_show()
207 tmp = i? udc_ep_readl(ep, UDCCR) : udc_readl(udc, UDCCR); in eps_dbg_show()
264 static void pxa_init_debugfs(struct pxa_udc *udc) in pxa_init_debugfs() argument
268 root = debugfs_create_dir(udc->gadget.name, NULL); in pxa_init_debugfs()
272 state = debugfs_create_file("udcstate", 0400, root, udc, in pxa_init_debugfs()
276 queues = debugfs_create_file("queues", 0400, root, udc, in pxa_init_debugfs()
280 eps = debugfs_create_file("epstate", 0400, root, udc, in pxa_init_debugfs()
285 udc->debugfs_root = root; in pxa_init_debugfs()
286 udc->debugfs_state = state; in pxa_init_debugfs()
287 udc->debugfs_queues = queues; in pxa_init_debugfs()
288 udc->debugfs_eps = eps; in pxa_init_debugfs()
297 dev_err(udc->dev, "debugfs is not available\n"); in pxa_init_debugfs()
300 static void pxa_cleanup_debugfs(struct pxa_udc *udc) in pxa_cleanup_debugfs() argument
302 debugfs_remove(udc->debugfs_eps); in pxa_cleanup_debugfs()
303 debugfs_remove(udc->debugfs_queues); in pxa_cleanup_debugfs()
304 debugfs_remove(udc->debugfs_state); in pxa_cleanup_debugfs()
305 debugfs_remove(udc->debugfs_root); in pxa_cleanup_debugfs()
306 udc->debugfs_eps = NULL; in pxa_cleanup_debugfs()
307 udc->debugfs_queues = NULL; in pxa_cleanup_debugfs()
308 udc->debugfs_state = NULL; in pxa_cleanup_debugfs()
309 udc->debugfs_root = NULL; in pxa_cleanup_debugfs()
313 static inline void pxa_init_debugfs(struct pxa_udc *udc) in pxa_init_debugfs() argument
317 static inline void pxa_cleanup_debugfs(struct pxa_udc *udc) in pxa_cleanup_debugfs() argument
372 static struct pxa_ep *find_pxa_ep(struct pxa_udc *udc, in find_pxa_ep() argument
377 int cfg = udc->config; in find_pxa_ep()
378 int iface = udc->last_interface; in find_pxa_ep()
379 int alt = udc->last_alternate; in find_pxa_ep()
381 if (udc_usb_ep == &udc->udc_usb_ep[0]) in find_pxa_ep()
382 return &udc->pxa_ep[0]; in find_pxa_ep()
385 ep = &udc->pxa_ep[i]; in find_pxa_ep()
402 static void update_pxa_ep_matches(struct pxa_udc *udc) in update_pxa_ep_matches() argument
408 udc_usb_ep = &udc->udc_usb_ep[i]; in update_pxa_ep_matches()
410 udc_usb_ep->pxa_ep = find_pxa_ep(udc, udc_usb_ep); in update_pxa_ep_matches()
420 struct pxa_udc *udc = ep->dev; in pio_irq_enable() local
422 u32 udcicr0 = udc_readl(udc, UDCICR0); in pio_irq_enable()
423 u32 udcicr1 = udc_readl(udc, UDCICR1); in pio_irq_enable()
426 udc_writel(udc, UDCICR0, udcicr0 | (3 << (index * 2))); in pio_irq_enable()
428 udc_writel(udc, UDCICR1, udcicr1 | (3 << ((index - 16) * 2))); in pio_irq_enable()
437 struct pxa_udc *udc = ep->dev; in pio_irq_disable() local
439 u32 udcicr0 = udc_readl(udc, UDCICR0); in pio_irq_disable()
440 u32 udcicr1 = udc_readl(udc, UDCICR1); in pio_irq_disable()
443 udc_writel(udc, UDCICR0, udcicr0 & ~(3 << (index * 2))); in pio_irq_disable()
445 udc_writel(udc, UDCICR1, udcicr1 & ~(3 << ((index - 16) * 2))); in pio_irq_disable()
455 static inline void udc_set_mask_UDCCR(struct pxa_udc *udc, int mask) in udc_set_mask_UDCCR() argument
457 u32 udccr = udc_readl(udc, UDCCR); in udc_set_mask_UDCCR()
458 udc_writel(udc, UDCCR, in udc_set_mask_UDCCR()
469 static inline void udc_clear_mask_UDCCR(struct pxa_udc *udc, int mask) in udc_clear_mask_UDCCR() argument
471 u32 udccr = udc_readl(udc, UDCCR); in udc_clear_mask_UDCCR()
472 udc_writel(udc, UDCCR, in udc_clear_mask_UDCCR()
567 static void set_ep0state(struct pxa_udc *udc, int state) in set_ep0state() argument
569 struct pxa_ep *ep = &udc->pxa_ep[0]; in set_ep0state()
570 char *old_stname = EP0_STNAME(udc); in set_ep0state()
572 udc->ep0state = state; in set_ep0state()
574 EP0_STNAME(udc), udc_ep_readl(ep, UDCCSR), in set_ep0state()
1414 struct pxa_udc *udc; in pxa_ep_enable() local
1447 udc = ep->dev; in pxa_ep_enable()
1449 if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) { in pxa_ep_enable()
1518 static void dplus_pullup(struct pxa_udc *udc, int on) in dplus_pullup() argument
1521 if (gpio_is_valid(udc->mach->gpio_pullup)) in dplus_pullup()
1522 gpio_set_value(udc->mach->gpio_pullup, in dplus_pullup()
1523 !udc->mach->gpio_pullup_inverted); in dplus_pullup()
1524 if (udc->mach->udc_command) in dplus_pullup()
1525 udc->mach->udc_command(PXA2XX_UDC_CMD_CONNECT); in dplus_pullup()
1527 if (gpio_is_valid(udc->mach->gpio_pullup)) in dplus_pullup()
1528 gpio_set_value(udc->mach->gpio_pullup, in dplus_pullup()
1529 udc->mach->gpio_pullup_inverted); in dplus_pullup()
1530 if (udc->mach->udc_command) in dplus_pullup()
1531 udc->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT); in dplus_pullup()
1533 udc->pullup_on = on; in dplus_pullup()
1542 struct pxa_udc *udc = to_gadget_udc(_gadget); in pxa_udc_get_frame() local
1544 return (udc_readl(udc, UDCFNR) & 0x7ff); in pxa_udc_get_frame()
1555 struct pxa_udc *udc = to_gadget_udc(_gadget); in pxa_udc_wakeup() local
1558 if ((udc_readl(udc, UDCCR) & UDCCR_DWRE) == 0) in pxa_udc_wakeup()
1560 udc_set_mask_UDCCR(udc, UDCCR_UDR); in pxa_udc_wakeup()
1564 static void udc_enable(struct pxa_udc *udc);
1565 static void udc_disable(struct pxa_udc *udc);
1580 static int should_enable_udc(struct pxa_udc *udc) in should_enable_udc() argument
1584 put_on = ((udc->pullup_on) && (udc->driver)); in should_enable_udc()
1585 put_on &= ((udc->vbus_sensed) || (!udc->transceiver)); in should_enable_udc()
1601 static int should_disable_udc(struct pxa_udc *udc) in should_disable_udc() argument
1605 put_off = ((!udc->pullup_on) || (!udc->driver)); in should_disable_udc()
1606 put_off |= ((!udc->vbus_sensed) && (udc->transceiver)); in should_disable_udc()
1620 struct pxa_udc *udc = to_gadget_udc(_gadget); in pxa_udc_pullup() local
1622 if (!gpio_is_valid(udc->mach->gpio_pullup) && !udc->mach->udc_command) in pxa_udc_pullup()
1625 dplus_pullup(udc, is_active); in pxa_udc_pullup()
1627 if (should_enable_udc(udc)) in pxa_udc_pullup()
1628 udc_enable(udc); in pxa_udc_pullup()
1629 if (should_disable_udc(udc)) in pxa_udc_pullup()
1630 udc_disable(udc); in pxa_udc_pullup()
1634 static void udc_enable(struct pxa_udc *udc);
1635 static void udc_disable(struct pxa_udc *udc);
1649 struct pxa_udc *udc = to_gadget_udc(_gadget); in pxa_udc_vbus_session() local
1651 udc->vbus_sensed = is_active; in pxa_udc_vbus_session()
1652 if (should_enable_udc(udc)) in pxa_udc_vbus_session()
1653 udc_enable(udc); in pxa_udc_vbus_session()
1654 if (should_disable_udc(udc)) in pxa_udc_vbus_session()
1655 udc_disable(udc); in pxa_udc_vbus_session()
1674 struct pxa_udc *udc; in pxa_udc_vbus_draw() local
1676 udc = to_gadget_udc(_gadget); in pxa_udc_vbus_draw()
1677 if (udc->transceiver) in pxa_udc_vbus_draw()
1678 return otg_set_power(udc->transceiver, mA); in pxa_udc_vbus_draw()
1698 static void udc_disable(struct pxa_udc *udc) in udc_disable() argument
1700 if (!udc->enabled) in udc_disable()
1703 udc_writel(udc, UDCICR0, 0); in udc_disable()
1704 udc_writel(udc, UDCICR1, 0); in udc_disable()
1706 udc_clear_mask_UDCCR(udc, UDCCR_UDE); in udc_disable()
1707 clk_disable(udc->clk); in udc_disable()
1709 ep0_idle(udc); in udc_disable()
1710 udc->gadget.speed = USB_SPEED_UNKNOWN; in udc_disable()
1712 udc->enabled = 0; in udc_disable()
1755 static void udc_enable(struct pxa_udc *udc) in udc_enable() argument
1757 if (udc->enabled) in udc_enable()
1760 udc_writel(udc, UDCICR0, 0); in udc_enable()
1761 udc_writel(udc, UDCICR1, 0); in udc_enable()
1762 udc_clear_mask_UDCCR(udc, UDCCR_UDE); in udc_enable()
1764 clk_enable(udc->clk); in udc_enable()
1766 ep0_idle(udc); in udc_enable()
1767 udc->gadget.speed = USB_SPEED_FULL; in udc_enable()
1768 memset(&udc->stats, 0, sizeof(udc->stats)); in udc_enable()
1770 udc_set_mask_UDCCR(udc, UDCCR_UDE); in udc_enable()
1771 ep_write_UDCCSR(&udc->pxa_ep[0], UDCCSR0_ACM); in udc_enable()
1773 if (udc_readl(udc, UDCCR) & UDCCR_EMCE) in udc_enable()
1774 dev_err(udc->dev, "Configuration errors, udc disabled\n"); in udc_enable()
1782 udc_writel(udc, UDCICR1, in udc_enable()
1787 pio_irq_enable(&udc->pxa_ep[0]); in udc_enable()
1789 udc->enabled = 1; in udc_enable()
1810 struct pxa_udc *udc = the_controller; in usb_gadget_probe_driver() local
1816 if (!udc) in usb_gadget_probe_driver()
1818 if (udc->driver) in usb_gadget_probe_driver()
1822 udc->driver = driver; in usb_gadget_probe_driver()
1823 udc->gadget.dev.driver = &driver->driver; in usb_gadget_probe_driver()
1824 dplus_pullup(udc, 1); in usb_gadget_probe_driver()
1826 retval = device_add(&udc->gadget.dev); in usb_gadget_probe_driver()
1828 dev_err(udc->dev, "device_add error %d\n", retval); in usb_gadget_probe_driver()
1831 retval = bind(&udc->gadget); in usb_gadget_probe_driver()
1833 dev_err(udc->dev, "bind to driver %s --> error %d\n", in usb_gadget_probe_driver()
1837 dev_dbg(udc->dev, "registered gadget driver '%s'\n", in usb_gadget_probe_driver()
1840 if (udc->transceiver) { in usb_gadget_probe_driver()
1841 retval = otg_set_peripheral(udc->transceiver, &udc->gadget); in usb_gadget_probe_driver()
1843 dev_err(udc->dev, "can't bind to transceiver\n"); in usb_gadget_probe_driver()
1848 if (should_enable_udc(udc)) in usb_gadget_probe_driver()
1849 udc_enable(udc); in usb_gadget_probe_driver()
1854 driver->unbind(&udc->gadget); in usb_gadget_probe_driver()
1856 device_del(&udc->gadget.dev); in usb_gadget_probe_driver()
1858 udc->driver = NULL; in usb_gadget_probe_driver()
1859 udc->gadget.dev.driver = NULL; in usb_gadget_probe_driver()
1873 static void stop_activity(struct pxa_udc *udc, struct usb_gadget_driver *driver) in stop_activity() argument
1878 if (udc->gadget.speed == USB_SPEED_UNKNOWN) in stop_activity()
1880 udc->gadget.speed = USB_SPEED_UNKNOWN; in stop_activity()
1883 pxa_ep_disable(&udc->udc_usb_ep[i].usb_ep); in stop_activity()
1886 driver->disconnect(&udc->gadget); in stop_activity()
1897 struct pxa_udc *udc = the_controller; in usb_gadget_unregister_driver() local
1899 if (!udc) in usb_gadget_unregister_driver()
1901 if (!driver || driver != udc->driver || !driver->unbind) in usb_gadget_unregister_driver()
1904 stop_activity(udc, driver); in usb_gadget_unregister_driver()
1905 udc_disable(udc); in usb_gadget_unregister_driver()
1906 dplus_pullup(udc, 0); in usb_gadget_unregister_driver()
1908 driver->unbind(&udc->gadget); in usb_gadget_unregister_driver()
1909 udc->driver = NULL; in usb_gadget_unregister_driver()
1911 device_del(&udc->gadget.dev); in usb_gadget_unregister_driver()
1912 dev_info(udc->dev, "unregistered gadget driver '%s'\n", in usb_gadget_unregister_driver()
1915 if (udc->transceiver) in usb_gadget_unregister_driver()
1916 return otg_set_peripheral(udc->transceiver, NULL); in usb_gadget_unregister_driver()
1926 static void handle_ep0_ctrl_req(struct pxa_udc *udc, in handle_ep0_ctrl_req() argument
1929 struct pxa_ep *ep = &udc->pxa_ep[0]; in handle_ep0_ctrl_req()
1971 set_ep0state(udc, IN_DATA_STAGE); in handle_ep0_ctrl_req()
1973 set_ep0state(udc, OUT_DATA_STAGE); in handle_ep0_ctrl_req()
1979 i = udc->driver->setup(&udc->gadget, &u.r); in handle_ep0_ctrl_req()
1990 set_ep0state(udc, STALL); in handle_ep0_ctrl_req()
2042 static void handle_ep0(struct pxa_udc *udc, int fifo_irq, int opc_irq) in handle_ep0() argument
2045 struct pxa_ep *ep = &udc->pxa_ep[0]; in handle_ep0()
2054 EP0_STNAME(udc), req, udccsr0, udc_ep_readl(ep, UDCBCR), in handle_ep0()
2061 ep0_idle(udc); in handle_ep0()
2066 set_ep0state(udc, SETUP_STAGE); in handle_ep0()
2069 switch (udc->ep0state) { in handle_ep0()
2081 handle_ep0_ctrl_req(udc, req); in handle_ep0()
2107 ep0_idle(udc); in handle_ep0()
2113 ep0_idle(udc); in handle_ep0()
2189 static void pxa27x_change_configuration(struct pxa_udc *udc, int config) in pxa27x_change_configuration() argument
2193 dev_dbg(udc->dev, "config=%d\n", config); in pxa27x_change_configuration()
2195 udc->config = config; in pxa27x_change_configuration()
2196 udc->last_interface = 0; in pxa27x_change_configuration()
2197 udc->last_alternate = 0; in pxa27x_change_configuration()
2205 set_ep0state(udc, WAIT_ACK_SET_CONF_INTERF); in pxa27x_change_configuration()
2206 udc->driver->setup(&udc->gadget, &req); in pxa27x_change_configuration()
2207 ep_write_UDCCSR(&udc->pxa_ep[0], UDCCSR0_AREN); in pxa27x_change_configuration()
2219 static void pxa27x_change_interface(struct pxa_udc *udc, int iface, int alt) in pxa27x_change_interface() argument
2223 dev_dbg(udc->dev, "interface=%d, alternate setting=%d\n", iface, alt); in pxa27x_change_interface()
2225 udc->last_interface = iface; in pxa27x_change_interface()
2226 udc->last_alternate = alt; in pxa27x_change_interface()
2234 set_ep0state(udc, WAIT_ACK_SET_CONF_INTERF); in pxa27x_change_interface()
2235 udc->driver->setup(&udc->gadget, &req); in pxa27x_change_interface()
2236 ep_write_UDCCSR(&udc->pxa_ep[0], UDCCSR0_AREN); in pxa27x_change_interface()
2246 static void irq_handle_data(int irq, struct pxa_udc *udc) in irq_handle_data() argument
2250 u32 udcisr0 = udc_readl(udc, UDCISR0) & UDCCISR0_EP_MASK; in irq_handle_data()
2251 u32 udcisr1 = udc_readl(udc, UDCISR1) & UDCCISR1_EP_MASK; in irq_handle_data()
2254 udc->pxa_ep[0].stats.irqs++; in irq_handle_data()
2255 udc_writel(udc, UDCISR0, UDCISR_INT(0, UDCISR_INT_MASK)); in irq_handle_data()
2256 handle_ep0(udc, !!(udcisr0 & UDCICR_FIFOERR), in irq_handle_data()
2265 udc_writel(udc, UDCISR0, UDCISR_INT(i, UDCISR_INT_MASK)); in irq_handle_data()
2267 WARN_ON(i >= ARRAY_SIZE(udc->pxa_ep)); in irq_handle_data()
2268 if (i < ARRAY_SIZE(udc->pxa_ep)) { in irq_handle_data()
2269 ep = &udc->pxa_ep[i]; in irq_handle_data()
2276 udc_writel(udc, UDCISR1, UDCISR_INT(i - 16, UDCISR_INT_MASK)); in irq_handle_data()
2280 WARN_ON(i >= ARRAY_SIZE(udc->pxa_ep)); in irq_handle_data()
2281 if (i < ARRAY_SIZE(udc->pxa_ep)) { in irq_handle_data()
2282 ep = &udc->pxa_ep[i]; in irq_handle_data()
2294 static void irq_udc_suspend(struct pxa_udc *udc) in irq_udc_suspend() argument
2296 udc_writel(udc, UDCISR1, UDCISR1_IRSU); in irq_udc_suspend()
2297 udc->stats.irqs_suspend++; in irq_udc_suspend()
2299 if (udc->gadget.speed != USB_SPEED_UNKNOWN in irq_udc_suspend()
2300 && udc->driver && udc->driver->suspend) in irq_udc_suspend()
2301 udc->driver->suspend(&udc->gadget); in irq_udc_suspend()
2302 ep0_idle(udc); in irq_udc_suspend()
2309 static void irq_udc_resume(struct pxa_udc *udc) in irq_udc_resume() argument
2311 udc_writel(udc, UDCISR1, UDCISR1_IRRU); in irq_udc_resume()
2312 udc->stats.irqs_resume++; in irq_udc_resume()
2314 if (udc->gadget.speed != USB_SPEED_UNKNOWN in irq_udc_resume()
2315 && udc->driver && udc->driver->resume) in irq_udc_resume()
2316 udc->driver->resume(&udc->gadget); in irq_udc_resume()
2323 static void irq_udc_reconfig(struct pxa_udc *udc) in irq_udc_reconfig() argument
2326 u32 udccr = udc_readl(udc, UDCCR); in irq_udc_reconfig()
2328 udc_writel(udc, UDCISR1, UDCISR1_IRCC); in irq_udc_reconfig()
2329 udc->stats.irqs_reconfig++; in irq_udc_reconfig()
2332 config_change = (config != udc->config); in irq_udc_reconfig()
2333 pxa27x_change_configuration(udc, config); in irq_udc_reconfig()
2337 pxa27x_change_interface(udc, interface, alternate); in irq_udc_reconfig()
2340 update_pxa_ep_matches(udc); in irq_udc_reconfig()
2341 udc_set_mask_UDCCR(udc, UDCCR_SMAC); in irq_udc_reconfig()
2348 static void irq_udc_reset(struct pxa_udc *udc) in irq_udc_reset() argument
2350 u32 udccr = udc_readl(udc, UDCCR); in irq_udc_reset()
2351 struct pxa_ep *ep = &udc->pxa_ep[0]; in irq_udc_reset()
2353 dev_info(udc->dev, "USB reset\n"); in irq_udc_reset()
2354 udc_writel(udc, UDCISR1, UDCISR1_IRRS); in irq_udc_reset()
2355 udc->stats.irqs_reset++; in irq_udc_reset()
2358 dev_dbg(udc->dev, "USB reset start\n"); in irq_udc_reset()
2359 stop_activity(udc, udc->driver); in irq_udc_reset()
2361 udc->gadget.speed = USB_SPEED_FULL; in irq_udc_reset()
2362 memset(&udc->stats, 0, sizeof udc->stats); in irq_udc_reset()
2366 ep0_idle(udc); in irq_udc_reset()
2378 struct pxa_udc *udc = _dev; in pxa_udc_irq() local
2379 u32 udcisr0 = udc_readl(udc, UDCISR0); in pxa_udc_irq()
2380 u32 udcisr1 = udc_readl(udc, UDCISR1); in pxa_udc_irq()
2381 u32 udccr = udc_readl(udc, UDCCR); in pxa_udc_irq()
2384 dev_vdbg(udc->dev, "Interrupt, UDCISR0:0x%08x, UDCISR1:0x%08x, " in pxa_udc_irq()
2389 irq_udc_suspend(udc); in pxa_udc_irq()
2391 irq_udc_resume(udc); in pxa_udc_irq()
2393 irq_udc_reconfig(udc); in pxa_udc_irq()
2395 irq_udc_reset(udc); in pxa_udc_irq()
2398 irq_handle_data(irq, udc); in pxa_udc_irq()
2460 struct pxa_udc *udc = &memory; in pxa_udc_probe() local
2466 udc->irq = platform_get_irq(pdev, 0); in pxa_udc_probe()
2467 if (udc->irq < 0) in pxa_udc_probe()
2468 return udc->irq; in pxa_udc_probe()
2470 udc->dev = &pdev->dev; in pxa_udc_probe()
2471 udc->mach = pdev->dev.platform_data; in pxa_udc_probe()
2472 udc->transceiver = otg_get_transceiver(); in pxa_udc_probe()
2474 gpio = udc->mach->gpio_pullup; in pxa_udc_probe()
2479 udc->mach->gpio_pullup_inverted); in pxa_udc_probe()
2487 udc->clk = clk_get(&pdev->dev, NULL); in pxa_udc_probe()
2488 if (IS_ERR(udc->clk)) { in pxa_udc_probe()
2489 retval = PTR_ERR(udc->clk); in pxa_udc_probe()
2494 udc->regs = ioremap(regs->start, resource_size(regs)); in pxa_udc_probe()
2495 if (!udc->regs) { in pxa_udc_probe()
2500 device_initialize(&udc->gadget.dev); in pxa_udc_probe()
2501 udc->gadget.dev.parent = &pdev->dev; in pxa_udc_probe()
2502 udc->gadget.dev.dma_mask = NULL; in pxa_udc_probe()
2503 udc->vbus_sensed = 0; in pxa_udc_probe()
2505 the_controller = udc; in pxa_udc_probe()
2506 platform_set_drvdata(pdev, udc); in pxa_udc_probe()
2507 udc_init_data(udc); in pxa_udc_probe()
2508 pxa_eps_setup(udc); in pxa_udc_probe()
2511 retval = request_irq(udc->irq, pxa_udc_irq, in pxa_udc_probe()
2512 IRQF_SHARED, driver_name, udc); in pxa_udc_probe()
2514 dev_err(udc->dev, "%s: can't get irq %i, err %d\n", in pxa_udc_probe()
2519 pxa_init_debugfs(udc); in pxa_udc_probe()
2522 iounmap(udc->regs); in pxa_udc_probe()
2524 clk_put(udc->clk); in pxa_udc_probe()
2525 udc->clk = NULL; in pxa_udc_probe()
2536 struct pxa_udc *udc = platform_get_drvdata(_dev); in pxa_udc_remove() local
2537 int gpio = udc->mach->gpio_pullup; in pxa_udc_remove()
2539 usb_gadget_unregister_driver(udc->driver); in pxa_udc_remove()
2540 free_irq(udc->irq, udc); in pxa_udc_remove()
2541 pxa_cleanup_debugfs(udc); in pxa_udc_remove()
2545 otg_put_transceiver(udc->transceiver); in pxa_udc_remove()
2547 udc->transceiver = NULL; in pxa_udc_remove()
2550 clk_put(udc->clk); in pxa_udc_remove()
2551 iounmap(udc->regs); in pxa_udc_remove()
2558 struct pxa_udc *udc = platform_get_drvdata(_dev); in pxa_udc_shutdown() local
2560 if (udc_readl(udc, UDCCR) & UDCCR_UDE) in pxa_udc_shutdown()
2561 udc_disable(udc); in pxa_udc_shutdown()
2582 struct pxa_udc *udc = platform_get_drvdata(_dev); in pxa_udc_suspend() local
2585 ep = &udc->pxa_ep[0]; in pxa_udc_suspend()
2586 udc->udccsr0 = udc_ep_readl(ep, UDCCSR); in pxa_udc_suspend()
2588 ep = &udc->pxa_ep[i]; in pxa_udc_suspend()
2595 udc_disable(udc); in pxa_udc_suspend()
2596 udc->pullup_resume = udc->pullup_on; in pxa_udc_suspend()
2597 dplus_pullup(udc, 0); in pxa_udc_suspend()
2612 struct pxa_udc *udc = platform_get_drvdata(_dev); in pxa_udc_resume() local
2615 ep = &udc->pxa_ep[0]; in pxa_udc_resume()
2616 udc_ep_writel(ep, UDCCSR, udc->udccsr0 & (UDCCSR0_FST | UDCCSR0_DME)); in pxa_udc_resume()
2618 ep = &udc->pxa_ep[i]; in pxa_udc_resume()
2625 dplus_pullup(udc, udc->pullup_resume); in pxa_udc_resume()
2626 if (should_enable_udc(udc)) in pxa_udc_resume()
2627 udc_enable(udc); in pxa_udc_resume()