bdc 264 drivers/usb/gadget/udc/bdc/bdc.h #define gadget_to_bdc(g) container_of(g, struct bdc, gadget) bdc 353 drivers/usb/gadget/udc/bdc/bdc.h struct bdc *bdc; bdc 444 drivers/usb/gadget/udc/bdc/bdc.h void (*sr_handler[2])(struct bdc *, struct bdc_sr *); bdc 446 drivers/usb/gadget/udc/bdc/bdc.h void (*sr_xsf_ep0[3])(struct bdc *, struct bdc_sr *); bdc 469 drivers/usb/gadget/udc/bdc/bdc.h void bdc_notify_xfr(struct bdc *, u32); bdc 470 drivers/usb/gadget/udc/bdc/bdc.h void bdc_softconn(struct bdc *); bdc 471 drivers/usb/gadget/udc/bdc/bdc.h void bdc_softdisconn(struct bdc *); bdc 472 drivers/usb/gadget/udc/bdc/bdc.h int bdc_run(struct bdc *); bdc 473 drivers/usb/gadget/udc/bdc/bdc.h int bdc_stop(struct bdc *); bdc 474 drivers/usb/gadget/udc/bdc/bdc.h int bdc_reset(struct bdc *); bdc 475 drivers/usb/gadget/udc/bdc/bdc.h int bdc_udc_init(struct bdc *); bdc 476 drivers/usb/gadget/udc/bdc/bdc.h void bdc_udc_exit(struct bdc *); bdc 477 drivers/usb/gadget/udc/bdc/bdc.h int bdc_reinit(struct bdc *); bdc 481 drivers/usb/gadget/udc/bdc/bdc.h void bdc_sr_uspc(struct bdc *, struct bdc_sr *); bdc 483 drivers/usb/gadget/udc/bdc/bdc.h void bdc_sr_xsf(struct bdc *, struct bdc_sr *); bdc 485 drivers/usb/gadget/udc/bdc/bdc.h void bdc_xsf_ep0_setup_recv(struct bdc *, struct bdc_sr *); bdc 486 drivers/usb/gadget/udc/bdc/bdc.h void bdc_xsf_ep0_data_start(struct bdc *, struct bdc_sr *); bdc 487 drivers/usb/gadget/udc/bdc/bdc.h void bdc_xsf_ep0_status_start(struct bdc *, struct bdc_sr *); bdc 17 drivers/usb/gadget/udc/bdc/bdc_cmd.c static int bdc_issue_cmd(struct bdc *bdc, u32 cmd_sc, u32 param0, bdc 24 drivers/usb/gadget/udc/bdc/bdc_cmd.c bdc_writel(bdc->regs, BDC_CMDPAR0, param0); bdc 25 drivers/usb/gadget/udc/bdc/bdc_cmd.c bdc_writel(bdc->regs, BDC_CMDPAR1, param1); bdc 26 drivers/usb/gadget/udc/bdc/bdc_cmd.c bdc_writel(bdc->regs, BDC_CMDPAR2, param2); bdc 31 drivers/usb/gadget/udc/bdc/bdc_cmd.c bdc_writel(bdc->regs, BDC_CMDSC, cmd_sc | BDC_CMD_CWS | BDC_CMD_SRD); bdc 33 drivers/usb/gadget/udc/bdc/bdc_cmd.c temp = bdc_readl(bdc->regs, BDC_CMDSC); bdc 34 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_dbg_ratelimited(bdc->dev, "cmdsc=%x", temp); bdc 37 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_dbg(bdc->dev, bdc 44 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_err(bdc->dev, bdc 51 drivers/usb/gadget/udc/bdc/bdc_cmd.c static int bdc_submit_cmd(struct bdc *bdc, u32 cmd_sc, bdc 57 drivers/usb/gadget/udc/bdc/bdc_cmd.c temp = bdc_readl(bdc->regs, BDC_CMDSC); bdc 58 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_dbg(bdc->dev, bdc 64 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_err(bdc->dev, "command processor busy: %x\n", cmd_status); bdc 67 drivers/usb/gadget/udc/bdc/bdc_cmd.c ret = bdc_issue_cmd(bdc, cmd_sc, param0, param1, param2); bdc 70 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_dbg(bdc->dev, "command completed successfully\n"); bdc 75 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_err(bdc->dev, "command parameter error\n"); bdc 80 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_err(bdc->dev, "Invalid device/ep state\n"); bdc 85 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_err(bdc->dev, "Command failed?\n"); bdc 90 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_err(bdc->dev, "BDC Internal error\n"); bdc 95 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_err(bdc->dev, bdc 101 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_dbg(bdc->dev, "Unknown command completion code:%x\n", ret); bdc 108 drivers/usb/gadget/udc/bdc/bdc_cmd.c int bdc_dconfig_ep(struct bdc *bdc, struct bdc_ep *ep) bdc 113 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_dbg(bdc->dev, "%s ep->ep_num =%d cmd_sc=%x\n", __func__, bdc 116 drivers/usb/gadget/udc/bdc/bdc_cmd.c return bdc_submit_cmd(bdc, cmd_sc, 0, 0, 0); bdc 122 drivers/usb/gadget/udc/bdc/bdc_cmd.c struct bdc *bdc = ep->bdc; bdc 128 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_dbg(bdc->dev, "%s ep:%p bd:%p\n", __func__, ep, bd); bdc 134 drivers/usb/gadget/udc/bdc/bdc_cmd.c int bdc_config_ep(struct bdc *bdc, struct bdc_ep *ep) bdc 150 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_dbg(bdc->dev, "%s: param0=%08x param1=%08x", bdc 160 drivers/usb/gadget/udc/bdc/bdc_cmd.c switch (bdc->gadget.speed) { bdc 202 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_err(bdc->dev, "UNKNOWN speed ERR\n"); bdc 208 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_dbg(bdc->dev, "cmd_sc=%x param2=%08x\n", cmd_sc, param2); bdc 209 drivers/usb/gadget/udc/bdc/bdc_cmd.c ret = bdc_submit_cmd(bdc, cmd_sc, param0, param1, param2); bdc 211 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_err(bdc->dev, "command failed :%x\n", ret); bdc 223 drivers/usb/gadget/udc/bdc/bdc_cmd.c int bdc_ep_bla(struct bdc *bdc, struct bdc_ep *ep, dma_addr_t dma_addr) bdc 228 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_dbg(bdc->dev, "%s: add=%08llx\n", __func__, bdc 236 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_dbg(bdc->dev, "cmd_sc=%x\n", cmd_sc); bdc 238 drivers/usb/gadget/udc/bdc/bdc_cmd.c return bdc_submit_cmd(bdc, cmd_sc, param0, param1, 0); bdc 242 drivers/usb/gadget/udc/bdc/bdc_cmd.c int bdc_address_device(struct bdc *bdc, u32 add) bdc 247 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_dbg(bdc->dev, "%s: add=%d\n", __func__, add); bdc 251 drivers/usb/gadget/udc/bdc/bdc_cmd.c return bdc_submit_cmd(bdc, cmd_sc, 0, 0, param2); bdc 255 drivers/usb/gadget/udc/bdc/bdc_cmd.c int bdc_function_wake_fh(struct bdc *bdc, u8 intf) bdc 261 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_dbg(bdc->dev, "%s intf=%d\n", __func__, intf); bdc 264 drivers/usb/gadget/udc/bdc/bdc_cmd.c param0 |= (bdc->dev_addr << 25); bdc 267 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_dbg(bdc->dev, "param0=%08x param1=%08x\n", param0, param1); bdc 269 drivers/usb/gadget/udc/bdc/bdc_cmd.c return bdc_submit_cmd(bdc, cmd_sc, param0, param1, 0); bdc 273 drivers/usb/gadget/udc/bdc/bdc_cmd.c int bdc_function_wake(struct bdc *bdc, u8 intf) bdc 278 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_dbg(bdc->dev, "%s intf=%d", __func__, intf); bdc 282 drivers/usb/gadget/udc/bdc/bdc_cmd.c return bdc_submit_cmd(bdc, cmd_sc, 0, 0, param2); bdc 286 drivers/usb/gadget/udc/bdc/bdc_cmd.c int bdc_ep_set_stall(struct bdc *bdc, int epnum) bdc 290 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_dbg(bdc->dev, "%s epnum=%d\n", __func__, epnum); bdc 294 drivers/usb/gadget/udc/bdc/bdc_cmd.c return bdc_submit_cmd(bdc, cmd_sc, 0, 0, 0); bdc 298 drivers/usb/gadget/udc/bdc/bdc_cmd.c int bdc_ep_clear_stall(struct bdc *bdc, int epnum) bdc 304 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_dbg(bdc->dev, "%s: epnum=%d\n", __func__, epnum); bdc 305 drivers/usb/gadget/udc/bdc/bdc_cmd.c ep = bdc->bdc_ep_array[epnum]; bdc 313 drivers/usb/gadget/udc/bdc/bdc_cmd.c ret = bdc_ep_set_stall(bdc, epnum); bdc 325 drivers/usb/gadget/udc/bdc/bdc_cmd.c ret = bdc_submit_cmd(bdc, cmd_sc, 0, 0, 0); bdc 327 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_err(bdc->dev, "command failed:%x\n", ret); bdc 330 drivers/usb/gadget/udc/bdc/bdc_cmd.c bdc_notify_xfr(bdc, epnum); bdc 336 drivers/usb/gadget/udc/bdc/bdc_cmd.c int bdc_stop_ep(struct bdc *bdc, int epnum) bdc 342 drivers/usb/gadget/udc/bdc/bdc_cmd.c ep = bdc->bdc_ep_array[epnum]; bdc 343 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_dbg(bdc->dev, "%s: ep:%s ep->flags:%08x\n", __func__, bdc 347 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_err(bdc->dev, "stop endpoint called for disabled ep\n"); bdc 357 drivers/usb/gadget/udc/bdc/bdc_cmd.c ret = bdc_submit_cmd(bdc, cmd_sc, 0, 0, 0); bdc 359 drivers/usb/gadget/udc/bdc/bdc_cmd.c dev_err(bdc->dev, bdc 365 drivers/usb/gadget/udc/bdc/bdc_cmd.c bdc_dump_epsts(bdc); bdc 13 drivers/usb/gadget/udc/bdc/bdc_cmd.h int bdc_address_device(struct bdc *, u32); bdc 14 drivers/usb/gadget/udc/bdc/bdc_cmd.h int bdc_config_ep(struct bdc *, struct bdc_ep *); bdc 15 drivers/usb/gadget/udc/bdc/bdc_cmd.h int bdc_dconfig_ep(struct bdc *, struct bdc_ep *); bdc 16 drivers/usb/gadget/udc/bdc/bdc_cmd.h int bdc_stop_ep(struct bdc *, int); bdc 17 drivers/usb/gadget/udc/bdc/bdc_cmd.h int bdc_ep_set_stall(struct bdc *, int); bdc 18 drivers/usb/gadget/udc/bdc/bdc_cmd.h int bdc_ep_clear_stall(struct bdc *, int); bdc 20 drivers/usb/gadget/udc/bdc/bdc_cmd.h int bdc_ep_bla(struct bdc *, struct bdc_ep *, dma_addr_t); bdc 21 drivers/usb/gadget/udc/bdc/bdc_cmd.h int bdc_function_wake(struct bdc*, u8); bdc 22 drivers/usb/gadget/udc/bdc/bdc_cmd.h int bdc_function_wake_fh(struct bdc*, u8); bdc 32 drivers/usb/gadget/udc/bdc/bdc_core.c static int poll_oip(struct bdc *bdc, int usec) bdc 37 drivers/usb/gadget/udc/bdc/bdc_core.c status = bdc_readl(bdc->regs, BDC_BDCSC); bdc 39 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, bdc 47 drivers/usb/gadget/udc/bdc/bdc_core.c dev_err(bdc->dev, "Err: operation timedout BDCSC: 0x%08x\n", status); bdc 53 drivers/usb/gadget/udc/bdc/bdc_core.c int bdc_stop(struct bdc *bdc) bdc 58 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "%s ()\n\n", __func__); bdc 59 drivers/usb/gadget/udc/bdc/bdc_core.c temp = bdc_readl(bdc->regs, BDC_BDCSC); bdc 62 drivers/usb/gadget/udc/bdc/bdc_core.c dev_vdbg(bdc->dev, "BDC already halted\n"); bdc 67 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_writel(bdc->regs, BDC_BDCSC, temp); bdc 69 drivers/usb/gadget/udc/bdc/bdc_core.c ret = poll_oip(bdc, BDC_COP_TIMEOUT); bdc 71 drivers/usb/gadget/udc/bdc/bdc_core.c dev_err(bdc->dev, "bdc stop operation failed"); bdc 77 drivers/usb/gadget/udc/bdc/bdc_core.c int bdc_reset(struct bdc *bdc) bdc 82 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "%s ()\n", __func__); bdc 84 drivers/usb/gadget/udc/bdc/bdc_core.c ret = bdc_stop(bdc); bdc 88 drivers/usb/gadget/udc/bdc/bdc_core.c temp = bdc_readl(bdc->regs, BDC_BDCSC); bdc 91 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_writel(bdc->regs, BDC_BDCSC, temp); bdc 92 drivers/usb/gadget/udc/bdc/bdc_core.c ret = poll_oip(bdc, BDC_COP_TIMEOUT); bdc 94 drivers/usb/gadget/udc/bdc/bdc_core.c dev_err(bdc->dev, "bdc reset operation failed"); bdc 100 drivers/usb/gadget/udc/bdc/bdc_core.c int bdc_run(struct bdc *bdc) bdc 105 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "%s ()\n", __func__); bdc 106 drivers/usb/gadget/udc/bdc/bdc_core.c temp = bdc_readl(bdc->regs, BDC_BDCSC); bdc 109 drivers/usb/gadget/udc/bdc/bdc_core.c dev_warn(bdc->dev, "bdc is already in running state\n"); bdc 115 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_writel(bdc->regs, BDC_BDCSC, temp); bdc 116 drivers/usb/gadget/udc/bdc/bdc_core.c ret = poll_oip(bdc, BDC_COP_TIMEOUT); bdc 118 drivers/usb/gadget/udc/bdc/bdc_core.c dev_err(bdc->dev, "bdc run operation failed:%d", ret); bdc 121 drivers/usb/gadget/udc/bdc/bdc_core.c temp = bdc_readl(bdc->regs, BDC_BDCSC); bdc 123 drivers/usb/gadget/udc/bdc/bdc_core.c dev_err(bdc->dev, "bdc not in normal mode after RUN op :%d\n", bdc 135 drivers/usb/gadget/udc/bdc/bdc_core.c void bdc_softconn(struct bdc *bdc) bdc 139 drivers/usb/gadget/udc/bdc/bdc_core.c uspc = bdc_readl(bdc->regs, BDC_USPC); bdc 143 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "%s () uspc=%08x\n", __func__, uspc); bdc 144 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_writel(bdc->regs, BDC_USPC, uspc); bdc 148 drivers/usb/gadget/udc/bdc/bdc_core.c void bdc_softdisconn(struct bdc *bdc) bdc 152 drivers/usb/gadget/udc/bdc/bdc_core.c uspc = bdc_readl(bdc->regs, BDC_USPC); bdc 155 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "%s () uspc=%x\n", __func__, uspc); bdc 156 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_writel(bdc->regs, BDC_USPC, uspc); bdc 160 drivers/usb/gadget/udc/bdc/bdc_core.c static int scratchpad_setup(struct bdc *bdc) bdc 166 drivers/usb/gadget/udc/bdc/bdc_core.c sp_buff_size = BDC_SPB(bdc_readl(bdc->regs, BDC_BDCCFG0)); bdc 167 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "%s() sp_buff_size=%d\n", __func__, sp_buff_size); bdc 169 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "Scratchpad buffer not needed\n"); bdc 174 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "Allocating %d bytes for scratchpad\n", sp_buff_size); bdc 175 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->scratchpad.buff = dma_alloc_coherent(bdc->dev, sp_buff_size, bdc 176 drivers/usb/gadget/udc/bdc/bdc_core.c &bdc->scratchpad.sp_dma, bdc 179 drivers/usb/gadget/udc/bdc/bdc_core.c if (!bdc->scratchpad.buff) bdc 182 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->sp_buff_size = sp_buff_size; bdc 183 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->scratchpad.size = sp_buff_size; bdc 184 drivers/usb/gadget/udc/bdc/bdc_core.c low32 = lower_32_bits(bdc->scratchpad.sp_dma); bdc 185 drivers/usb/gadget/udc/bdc/bdc_core.c upp32 = upper_32_bits(bdc->scratchpad.sp_dma); bdc 188 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_writel(bdc->regs, BDC_SPBBAL, low32); bdc 189 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_writel(bdc->regs, BDC_SPBBAH, upp32); bdc 193 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->scratchpad.buff = NULL; bdc 199 drivers/usb/gadget/udc/bdc/bdc_core.c static int setup_srr(struct bdc *bdc, int interrupter) bdc 201 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "%s() NUM_SR_ENTRIES:%d\n", __func__, NUM_SR_ENTRIES); bdc 203 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_writel(bdc->regs, BDC_SRRINT(0), BDC_SRR_RWS | BDC_SRR_RST); bdc 204 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->srr.dqp_index = 0; bdc 206 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->srr.sr_bds = dma_alloc_coherent(bdc->dev, bdc 208 drivers/usb/gadget/udc/bdc/bdc_core.c &bdc->srr.dma_addr, GFP_KERNEL); bdc 209 drivers/usb/gadget/udc/bdc/bdc_core.c if (!bdc->srr.sr_bds) bdc 216 drivers/usb/gadget/udc/bdc/bdc_core.c static void bdc_mem_init(struct bdc *bdc, bool reinit) bdc 224 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "%s ()\n", __func__); bdc 225 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->ep0_state = WAIT_FOR_SETUP; bdc 226 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->dev_addr = 0; bdc 227 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->srr.eqp_index = 0; bdc 228 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->srr.dqp_index = 0; bdc 229 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->zlp_needed = false; bdc 230 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->delayed_status = false; bdc 232 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_writel(bdc->regs, BDC_SPBBAL, bdc->scratchpad.sp_dma); bdc 236 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_writel(bdc->regs, BDC_SRRINT(0), temp); bdc 237 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "bdc->srr.sr_bds =%p\n", bdc->srr.sr_bds); bdc 238 drivers/usb/gadget/udc/bdc/bdc_core.c temp = lower_32_bits(bdc->srr.dma_addr); bdc 241 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "SRRBAL[0]=%08x NUM_SR_ENTRIES:%d size:%d\n", bdc 245 drivers/usb/gadget/udc/bdc/bdc_core.c upp32 = upper_32_bits(bdc->srr.dma_addr); bdc 250 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_writel(bdc->regs, BDC_SRRBAL(0), low32); bdc 251 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_writel(bdc->regs, BDC_SRRBAH(0), upp32); bdc 253 drivers/usb/gadget/udc/bdc/bdc_core.c temp = bdc_readl(bdc->regs, BDC_SRRINT(0)); bdc 256 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_writel(bdc->regs, BDC_SRRINT(0), temp); bdc 259 drivers/usb/gadget/udc/bdc/bdc_core.c temp = bdc_readl(bdc->regs, BDC_INTCTLS(0)); bdc 262 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_writel(bdc->regs, BDC_INTCTLS(0), temp); bdc 264 drivers/usb/gadget/udc/bdc/bdc_core.c usb2_pm = bdc_readl(bdc->regs, BDC_USPPM2); bdc 265 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "usb2_pm=%08x", usb2_pm); bdc 268 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_writel(bdc->regs, BDC_USPPM2, usb2_pm); bdc 271 drivers/usb/gadget/udc/bdc/bdc_core.c usb2_pm = bdc_readl(bdc->regs, BDC_USPPM2); bdc 272 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "usb2_pm=%08x\n", usb2_pm); bdc 275 drivers/usb/gadget/udc/bdc/bdc_core.c temp = bdc_readl(bdc->regs, BDC_BDCSC); bdc 278 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_writel(bdc->regs, BDC_BDCSC, temp); bdc 286 drivers/usb/gadget/udc/bdc/bdc_core.c temp = bdc_readl(bdc->regs, BDC_BDCSC); bdc 288 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_writel(bdc->regs, BDC_BDCSC, temp); bdc 290 drivers/usb/gadget/udc/bdc/bdc_core.c memset(bdc->scratchpad.buff, 0, bdc->sp_buff_size); bdc 292 drivers/usb/gadget/udc/bdc/bdc_core.c memset(bdc->srr.sr_bds, 0, bdc 297 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->sr_handler[0] = bdc_sr_xsf; bdc 298 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->sr_handler[1] = bdc_sr_uspc; bdc 301 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->sr_xsf_ep0[0] = bdc_xsf_ep0_setup_recv; bdc 302 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->sr_xsf_ep0[1] = bdc_xsf_ep0_data_start; bdc 303 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->sr_xsf_ep0[2] = bdc_xsf_ep0_status_start; bdc 308 drivers/usb/gadget/udc/bdc/bdc_core.c static void bdc_mem_free(struct bdc *bdc) bdc 310 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "%s\n", __func__); bdc 312 drivers/usb/gadget/udc/bdc/bdc_core.c if (bdc->srr.sr_bds) bdc 313 drivers/usb/gadget/udc/bdc/bdc_core.c dma_free_coherent(bdc->dev, bdc 315 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->srr.sr_bds, bdc->srr.dma_addr); bdc 318 drivers/usb/gadget/udc/bdc/bdc_core.c if (bdc->scratchpad.buff) bdc 319 drivers/usb/gadget/udc/bdc/bdc_core.c dma_free_coherent(bdc->dev, bdc->sp_buff_size, bdc 320 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->scratchpad.buff, bdc->scratchpad.sp_dma); bdc 323 drivers/usb/gadget/udc/bdc/bdc_core.c dma_pool_destroy(bdc->bd_table_pool); bdc 326 drivers/usb/gadget/udc/bdc/bdc_core.c kfree(bdc->bdc_ep_array); bdc 328 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->srr.sr_bds = NULL; bdc 329 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->scratchpad.buff = NULL; bdc 330 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->bd_table_pool = NULL; bdc 331 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->bdc_ep_array = NULL; bdc 338 drivers/usb/gadget/udc/bdc/bdc_core.c int bdc_reinit(struct bdc *bdc) bdc 342 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "%s\n", __func__); bdc 343 drivers/usb/gadget/udc/bdc/bdc_core.c ret = bdc_stop(bdc); bdc 347 drivers/usb/gadget/udc/bdc/bdc_core.c ret = bdc_reset(bdc); bdc 352 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_mem_init(bdc, true); bdc 353 drivers/usb/gadget/udc/bdc/bdc_core.c ret = bdc_run(bdc); bdc 355 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->reinit = false; bdc 361 drivers/usb/gadget/udc/bdc/bdc_core.c static int bdc_mem_alloc(struct bdc *bdc) bdc 366 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, bdc 369 drivers/usb/gadget/udc/bdc/bdc_core.c page_size = BDC_PGS(bdc_readl(bdc->regs, BDC_BDCCFG0)); bdc 374 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "page_size=%d\n", page_size); bdc 377 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->bd_table_pool = bdc 378 drivers/usb/gadget/udc/bdc/bdc_core.c dma_pool_create("BDC BD tables", bdc->dev, NUM_BDS_PER_TABLE * 16, bdc 381 drivers/usb/gadget/udc/bdc/bdc_core.c if (!bdc->bd_table_pool) bdc 384 drivers/usb/gadget/udc/bdc/bdc_core.c if (scratchpad_setup(bdc)) bdc 388 drivers/usb/gadget/udc/bdc/bdc_core.c num_ieps = NUM_NCS(bdc_readl(bdc->regs, BDC_FSCNIC)); bdc 389 drivers/usb/gadget/udc/bdc/bdc_core.c num_oeps = NUM_NCS(bdc_readl(bdc->regs, BDC_FSCNOC)); bdc 391 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->num_eps = num_ieps + num_oeps + 2; bdc 392 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, bdc 394 drivers/usb/gadget/udc/bdc/bdc_core.c num_ieps, num_oeps, bdc->num_eps); bdc 396 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->bdc_ep_array = kcalloc(bdc->num_eps, sizeof(struct bdc_ep *), bdc 398 drivers/usb/gadget/udc/bdc/bdc_core.c if (!bdc->bdc_ep_array) bdc 401 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "Allocating sr report0\n"); bdc 402 drivers/usb/gadget/udc/bdc/bdc_core.c if (setup_srr(bdc, 0)) bdc 407 drivers/usb/gadget/udc/bdc/bdc_core.c dev_warn(bdc->dev, "Couldn't initialize memory\n"); bdc 408 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_mem_free(bdc); bdc 414 drivers/usb/gadget/udc/bdc/bdc_core.c static void bdc_hw_exit(struct bdc *bdc) bdc 416 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "%s ()\n", __func__); bdc 417 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_mem_free(bdc); bdc 421 drivers/usb/gadget/udc/bdc/bdc_core.c static int bdc_hw_init(struct bdc *bdc) bdc 425 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "%s ()\n", __func__); bdc 426 drivers/usb/gadget/udc/bdc/bdc_core.c ret = bdc_reset(bdc); bdc 428 drivers/usb/gadget/udc/bdc/bdc_core.c dev_err(bdc->dev, "err resetting bdc abort bdc init%d\n", ret); bdc 431 drivers/usb/gadget/udc/bdc/bdc_core.c ret = bdc_mem_alloc(bdc); bdc 433 drivers/usb/gadget/udc/bdc/bdc_core.c dev_err(bdc->dev, "Mem alloc failed, aborting\n"); bdc 436 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_mem_init(bdc, 0); bdc 437 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_dbg_regs(bdc); bdc 438 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "HW Init done\n"); bdc 443 drivers/usb/gadget/udc/bdc/bdc_core.c static int bdc_phy_init(struct bdc *bdc) bdc 448 drivers/usb/gadget/udc/bdc/bdc_core.c for (phy_num = 0; phy_num < bdc->num_phys; phy_num++) { bdc 449 drivers/usb/gadget/udc/bdc/bdc_core.c ret = phy_init(bdc->phys[phy_num]); bdc 452 drivers/usb/gadget/udc/bdc/bdc_core.c ret = phy_power_on(bdc->phys[phy_num]); bdc 454 drivers/usb/gadget/udc/bdc/bdc_core.c phy_exit(bdc->phys[phy_num]); bdc 463 drivers/usb/gadget/udc/bdc/bdc_core.c phy_power_off(bdc->phys[phy_num]); bdc 464 drivers/usb/gadget/udc/bdc/bdc_core.c phy_exit(bdc->phys[phy_num]); bdc 470 drivers/usb/gadget/udc/bdc/bdc_core.c static void bdc_phy_exit(struct bdc *bdc) bdc 474 drivers/usb/gadget/udc/bdc/bdc_core.c for (phy_num = 0; phy_num < bdc->num_phys; phy_num++) { bdc 475 drivers/usb/gadget/udc/bdc/bdc_core.c phy_power_off(bdc->phys[phy_num]); bdc 476 drivers/usb/gadget/udc/bdc/bdc_core.c phy_exit(bdc->phys[phy_num]); bdc 482 drivers/usb/gadget/udc/bdc/bdc_core.c struct bdc *bdc; bdc 505 drivers/usb/gadget/udc/bdc/bdc_core.c bdc = devm_kzalloc(dev, sizeof(*bdc), GFP_KERNEL); bdc 506 drivers/usb/gadget/udc/bdc/bdc_core.c if (!bdc) bdc 509 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->clk = clk; bdc 512 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->regs = devm_ioremap_resource(dev, res); bdc 513 drivers/usb/gadget/udc/bdc/bdc_core.c if (IS_ERR(bdc->regs)) { bdc 520 drivers/usb/gadget/udc/bdc/bdc_core.c spin_lock_init(&bdc->lock); bdc 521 drivers/usb/gadget/udc/bdc/bdc_core.c platform_set_drvdata(pdev, bdc); bdc 522 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->irq = irq; bdc 523 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->dev = dev; bdc 524 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(dev, "bdc->regs: %p irq=%d\n", bdc->regs, bdc->irq); bdc 526 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->num_phys = of_count_phandle_with_args(dev->of_node, bdc 528 drivers/usb/gadget/udc/bdc/bdc_core.c if (bdc->num_phys > 0) { bdc 529 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->phys = devm_kcalloc(dev, bdc->num_phys, bdc 531 drivers/usb/gadget/udc/bdc/bdc_core.c if (!bdc->phys) bdc 534 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->num_phys = 0; bdc 536 drivers/usb/gadget/udc/bdc/bdc_core.c dev_info(dev, "Using %d phy(s)\n", bdc->num_phys); bdc 538 drivers/usb/gadget/udc/bdc/bdc_core.c for (phy_num = 0; phy_num < bdc->num_phys; phy_num++) { bdc 539 drivers/usb/gadget/udc/bdc/bdc_core.c bdc->phys[phy_num] = devm_of_phy_get_by_index( bdc 541 drivers/usb/gadget/udc/bdc/bdc_core.c if (IS_ERR(bdc->phys[phy_num])) { bdc 542 drivers/usb/gadget/udc/bdc/bdc_core.c ret = PTR_ERR(bdc->phys[phy_num]); bdc 543 drivers/usb/gadget/udc/bdc/bdc_core.c dev_err(bdc->dev, bdc 549 drivers/usb/gadget/udc/bdc/bdc_core.c ret = bdc_phy_init(bdc); bdc 551 drivers/usb/gadget/udc/bdc/bdc_core.c dev_err(bdc->dev, "BDC phy init failure:%d\n", ret); bdc 555 drivers/usb/gadget/udc/bdc/bdc_core.c temp = bdc_readl(bdc->regs, BDC_BDCCAP1); bdc 568 drivers/usb/gadget/udc/bdc/bdc_core.c ret = bdc_hw_init(bdc); bdc 573 drivers/usb/gadget/udc/bdc/bdc_core.c ret = bdc_udc_init(bdc); bdc 581 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_hw_exit(bdc); bdc 583 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_phy_exit(bdc); bdc 589 drivers/usb/gadget/udc/bdc/bdc_core.c struct bdc *bdc; bdc 591 drivers/usb/gadget/udc/bdc/bdc_core.c bdc = platform_get_drvdata(pdev); bdc 592 drivers/usb/gadget/udc/bdc/bdc_core.c dev_dbg(bdc->dev, "%s ()\n", __func__); bdc 593 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_udc_exit(bdc); bdc 594 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_hw_exit(bdc); bdc 595 drivers/usb/gadget/udc/bdc/bdc_core.c bdc_phy_exit(bdc); bdc 596 drivers/usb/gadget/udc/bdc/bdc_core.c clk_disable_unprepare(bdc->clk); bdc 603 drivers/usb/gadget/udc/bdc/bdc_core.c struct bdc *bdc = dev_get_drvdata(dev); bdc 605 drivers/usb/gadget/udc/bdc/bdc_core.c clk_disable_unprepare(bdc->clk); bdc 611 drivers/usb/gadget/udc/bdc/bdc_core.c struct bdc *bdc = dev_get_drvdata(dev); bdc 614 drivers/usb/gadget/udc/bdc/bdc_core.c ret = clk_prepare_enable(bdc->clk); bdc 616 drivers/usb/gadget/udc/bdc/bdc_core.c dev_err(bdc->dev, "err enabling the clock\n"); bdc 619 drivers/usb/gadget/udc/bdc/bdc_core.c ret = bdc_reinit(bdc); bdc 621 drivers/usb/gadget/udc/bdc/bdc_core.c dev_err(bdc->dev, "err in bdc reinit\n"); bdc 13 drivers/usb/gadget/udc/bdc/bdc_dbg.c void bdc_dbg_regs(struct bdc *bdc) bdc 17 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "bdc->regs:%p\n", bdc->regs); bdc 18 drivers/usb/gadget/udc/bdc/bdc_dbg.c temp = bdc_readl(bdc->regs, BDC_BDCCFG0); bdc 19 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "bdccfg0:0x%08x\n", temp); bdc 20 drivers/usb/gadget/udc/bdc/bdc_dbg.c temp = bdc_readl(bdc->regs, BDC_BDCCFG1); bdc 21 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "bdccfg1:0x%08x\n", temp); bdc 22 drivers/usb/gadget/udc/bdc/bdc_dbg.c temp = bdc_readl(bdc->regs, BDC_BDCCAP0); bdc 23 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "bdccap0:0x%08x\n", temp); bdc 24 drivers/usb/gadget/udc/bdc/bdc_dbg.c temp = bdc_readl(bdc->regs, BDC_BDCCAP1); bdc 25 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "bdccap1:0x%08x\n", temp); bdc 26 drivers/usb/gadget/udc/bdc/bdc_dbg.c temp = bdc_readl(bdc->regs, BDC_USPC); bdc 27 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "uspc:0x%08x\n", temp); bdc 28 drivers/usb/gadget/udc/bdc/bdc_dbg.c temp = bdc_readl(bdc->regs, BDC_DVCSA); bdc 29 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "dvcsa:0x%08x\n", temp); bdc 30 drivers/usb/gadget/udc/bdc/bdc_dbg.c temp = bdc_readl(bdc->regs, BDC_DVCSB); bdc 31 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "dvcsb:0x%x08\n", temp); bdc 34 drivers/usb/gadget/udc/bdc/bdc_dbg.c void bdc_dump_epsts(struct bdc *bdc) bdc 38 drivers/usb/gadget/udc/bdc/bdc_dbg.c temp = bdc_readl(bdc->regs, BDC_EPSTS0); bdc 39 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "BDC_EPSTS0:0x%08x\n", temp); bdc 41 drivers/usb/gadget/udc/bdc/bdc_dbg.c temp = bdc_readl(bdc->regs, BDC_EPSTS1); bdc 42 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "BDC_EPSTS1:0x%x\n", temp); bdc 44 drivers/usb/gadget/udc/bdc/bdc_dbg.c temp = bdc_readl(bdc->regs, BDC_EPSTS2); bdc 45 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "BDC_EPSTS2:0x%08x\n", temp); bdc 47 drivers/usb/gadget/udc/bdc/bdc_dbg.c temp = bdc_readl(bdc->regs, BDC_EPSTS3); bdc 48 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "BDC_EPSTS3:0x%08x\n", temp); bdc 50 drivers/usb/gadget/udc/bdc/bdc_dbg.c temp = bdc_readl(bdc->regs, BDC_EPSTS4); bdc 51 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "BDC_EPSTS4:0x%08x\n", temp); bdc 53 drivers/usb/gadget/udc/bdc/bdc_dbg.c temp = bdc_readl(bdc->regs, BDC_EPSTS5); bdc 54 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "BDC_EPSTS5:0x%08x\n", temp); bdc 56 drivers/usb/gadget/udc/bdc/bdc_dbg.c temp = bdc_readl(bdc->regs, BDC_EPSTS6); bdc 57 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "BDC_EPSTS6:0x%08x\n", temp); bdc 59 drivers/usb/gadget/udc/bdc/bdc_dbg.c temp = bdc_readl(bdc->regs, BDC_EPSTS7); bdc 60 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "BDC_EPSTS7:0x%08x\n", temp); bdc 63 drivers/usb/gadget/udc/bdc/bdc_dbg.c void bdc_dbg_srr(struct bdc *bdc, u32 srr_num) bdc 69 drivers/usb/gadget/udc/bdc/bdc_dbg.c sr = bdc->srr.sr_bds; bdc 70 drivers/usb/gadget/udc/bdc/bdc_dbg.c addr = bdc->srr.dma_addr; bdc 71 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "bdc_dbg_srr sr:%p dqp_index:%d\n", bdc 72 drivers/usb/gadget/udc/bdc/bdc_dbg.c sr, bdc->srr.dqp_index); bdc 74 drivers/usb/gadget/udc/bdc/bdc_dbg.c sr = &bdc->srr.sr_bds[i]; bdc 75 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "%llx %08x %08x %08x %08x\n", bdc 85 drivers/usb/gadget/udc/bdc/bdc_dbg.c void bdc_dbg_bd_list(struct bdc *bdc, struct bdc_ep *ep) bdc 94 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, bdc 98 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, bdc 108 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, bdc 116 drivers/usb/gadget/udc/bdc/bdc_dbg.c dev_vdbg(bdc->dev, "\n\n"); bdc 15 drivers/usb/gadget/udc/bdc/bdc_dbg.h void bdc_dbg_bd_list(struct bdc *, struct bdc_ep*); bdc 16 drivers/usb/gadget/udc/bdc/bdc_dbg.h void bdc_dbg_srr(struct bdc *, u32); bdc 17 drivers/usb/gadget/udc/bdc/bdc_dbg.h void bdc_dbg_regs(struct bdc *); bdc 18 drivers/usb/gadget/udc/bdc/bdc_dbg.h void bdc_dump_epsts(struct bdc *); bdc 20 drivers/usb/gadget/udc/bdc/bdc_dbg.h static inline void bdc_dbg_regs(struct bdc *bdc) bdc 23 drivers/usb/gadget/udc/bdc/bdc_dbg.h static inline void bdc_dbg_srr(struct bdc *bdc, u32 srr_num) bdc 26 drivers/usb/gadget/udc/bdc/bdc_dbg.h static inline void bdc_dbg_bd_list(struct bdc *bdc, struct bdc_ep *ep) bdc 29 drivers/usb/gadget/udc/bdc/bdc_dbg.h static inline void bdc_dump_epsts(struct bdc *bdc) bdc 55 drivers/usb/gadget/udc/bdc/bdc_ep.c struct bdc *bdc = ep->bdc; bdc 59 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s ep:%s num_tabs:%d\n", bdc 63 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s already freed\n", ep->name); bdc 73 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "bd_table:%p index:%d\n", bd_table, index); bdc 75 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "bd_table not allocated\n"); bdc 79 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "bd dma pool not allocated\n"); bdc 83 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, bdc 88 drivers/usb/gadget/udc/bdc/bdc_ep.c dma_pool_free(bdc->bd_table_pool, bdc 125 drivers/usb/gadget/udc/bdc/bdc_ep.c struct bdc *bdc = ep->bdc; bdc 136 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, bdc 154 drivers/usb/gadget/udc/bdc/bdc_ep.c bd_table->start_bd = dma_pool_zalloc(bdc->bd_table_pool, bdc 164 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, bdc 219 drivers/usb/gadget/udc/bdc/bdc_ep.c struct bdc *bdc = ep->bdc; bdc 225 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s %llx\n", bdc 238 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "dma_first_bd:%llx dma_last_bd:%llx\n", bdc 247 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, "%s FATAL err, bd not found\n", __func__); bdc 263 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_vdbg(ep->bdc->dev, bdc 292 drivers/usb/gadget/udc/bdc/bdc_ep.c struct bdc *bdc = ep->bdc; bdc 311 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_vdbg(bdc->dev, "chain_bd1:%d chain_bd2:%d\n", bdc 335 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_vdbg(bdc->dev, "available_bd:%d\n", available_bd); bdc 341 drivers/usb/gadget/udc/bdc/bdc_ep.c void bdc_notify_xfr(struct bdc *bdc, u32 epnum) bdc 343 drivers/usb/gadget/udc/bdc/bdc_ep.c struct bdc_ep *ep = bdc->bdc_ep_array[epnum]; bdc 345 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_vdbg(bdc->dev, "%s epnum:%d\n", __func__, epnum); bdc 353 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc_writel(bdc->regs, BDC_XSFNTF, epnum); bdc 363 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_vdbg(ep->bdc->dev, bdc 384 drivers/usb/gadget/udc/bdc/bdc_ep.c static int setup_first_bd_ep0(struct bdc *bdc, struct bdc_req *req, u32 *dword3) bdc 391 drivers/usb/gadget/udc/bdc/bdc_ep.c switch (bdc->ep0_state) { bdc 394 drivers/usb/gadget/udc/bdc/bdc_ep.c if (bdc->setup_pkt.bRequestType & USB_DIR_IN) bdc 398 drivers/usb/gadget/udc/bdc/bdc_ep.c wValue = le16_to_cpu(bdc->setup_pkt.wValue); bdc 400 drivers/usb/gadget/udc/bdc/bdc_ep.c (req_len % bdc->gadget.ep0->maxpacket == 0)) { bdc 401 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "ZLP needed wVal:%d len:%d MaxP:%d\n", bdc 403 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->gadget.ep0->maxpacket); bdc 404 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->zlp_needed = true; bdc 410 drivers/usb/gadget/udc/bdc/bdc_ep.c if (!le16_to_cpu(bdc->setup_pkt.wLength) || bdc 411 drivers/usb/gadget/udc/bdc/bdc_ep.c !(bdc->setup_pkt.bRequestType & USB_DIR_IN)) bdc 415 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, bdc 417 drivers/usb/gadget/udc/bdc/bdc_ep.c ep0_state_string[bdc->ep0_state]); bdc 425 drivers/usb/gadget/udc/bdc/bdc_ep.c static int setup_bd_list_xfr(struct bdc *bdc, struct bdc_req *req, int num_bds) bdc 446 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_vdbg(bdc->dev, "%s ep:%s num_bds:%d tfs:%d r_len:%d bd:%p\n", bdc 457 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = setup_first_bd_ep0(bdc, req, &dword3); bdc 478 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, "Err bd pointing to wrong addr\n"); bdc 490 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_vdbg(bdc->dev, "buf_add:%08llx req_len:%d bd:%p eqp:%d\n", bdc 509 drivers/usb/gadget/udc/bdc/bdc_ep.c static int bdc_queue_xfr(struct bdc *bdc, struct bdc_req *req) bdc 516 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s req:%p\n", __func__, req); bdc 517 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "eqp_bdi:%d hwd_bdi:%d\n", bdc 527 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = setup_bd_list_xfr(bdc, req, num_bds); bdc 531 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc_dbg_bd_list(bdc, ep); bdc 532 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc_notify_xfr(bdc, ep->ep_num); bdc 541 drivers/usb/gadget/udc/bdc/bdc_ep.c struct bdc *bdc = ep->bdc; bdc 546 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s ep:%s status:%d\n", __func__, ep->name, status); bdc 549 drivers/usb/gadget/udc/bdc/bdc_ep.c usb_gadget_unmap_request(&bdc->gadget, &req->usb_req, ep->dir); bdc 551 drivers/usb/gadget/udc/bdc/bdc_ep.c spin_unlock(&bdc->lock); bdc 553 drivers/usb/gadget/udc/bdc/bdc_ep.c spin_lock(&bdc->lock); bdc 561 drivers/usb/gadget/udc/bdc/bdc_ep.c struct bdc *bdc; bdc 565 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc = ep->bdc; bdc 566 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s() ep->ep_num=%d\n", __func__, ep->ep_num); bdc 568 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = bdc_stop_ep(bdc, ep->ep_num); bdc 581 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = bdc_dconfig_ep(bdc, ep); bdc 583 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_warn(bdc->dev, bdc 604 drivers/usb/gadget/udc/bdc/bdc_ep.c struct bdc *bdc; bdc 607 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc = ep->bdc; bdc 608 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s NUM_TABLES:%d %d\n", bdc 613 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, "ep bd list allocation failed:%d\n", ret); bdc 616 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc_dbg_bd_list(bdc, ep); bdc 623 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = bdc_config_ep(bdc, ep); bdc 639 drivers/usb/gadget/udc/bdc/bdc_ep.c static int ep0_queue_status_stage(struct bdc *bdc) bdc 644 drivers/usb/gadget/udc/bdc/bdc_ep.c status_req = &bdc->status_req; bdc 645 drivers/usb/gadget/udc/bdc/bdc_ep.c ep = bdc->bdc_ep_array[1]; bdc 651 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc_queue_xfr(bdc, status_req); bdc 659 drivers/usb/gadget/udc/bdc/bdc_ep.c struct bdc *bdc; bdc 662 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc = ep->bdc; bdc 663 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s()\n", __func__); bdc 668 drivers/usb/gadget/udc/bdc/bdc_ep.c if (bdc->delayed_status) { bdc 669 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->delayed_status = false; bdc 671 drivers/usb/gadget/udc/bdc/bdc_ep.c if (bdc->ep0_state == WAIT_FOR_STATUS_START) { bdc 673 drivers/usb/gadget/udc/bdc/bdc_ep.c ep0_queue_status_stage(bdc); bdc 674 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_state = WAIT_FOR_STATUS_XMIT; bdc 687 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = usb_gadget_map_request(&bdc->gadget, &req->usb_req, ep->dir); bdc 689 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, "dma mapping failed %s\n", ep->name); bdc 693 drivers/usb/gadget/udc/bdc/bdc_ep.c return bdc_queue_xfr(bdc, req); bdc 697 drivers/usb/gadget/udc/bdc/bdc_ep.c static int ep0_queue_data_stage(struct bdc *bdc) bdc 701 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s\n", __func__); bdc 702 drivers/usb/gadget/udc/bdc/bdc_ep.c ep = bdc->bdc_ep_array[1]; bdc 703 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_req.ep = ep; bdc 704 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_req.usb_req.complete = NULL; bdc 706 drivers/usb/gadget/udc/bdc/bdc_ep.c return ep0_queue(ep, &bdc->ep0_req); bdc 712 drivers/usb/gadget/udc/bdc/bdc_ep.c struct bdc *bdc; bdc 718 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc = ep->bdc; bdc 724 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = usb_gadget_map_request(&bdc->gadget, &req->usb_req, ep->dir); bdc 726 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, "dma mapping failed\n"); bdc 730 drivers/usb/gadget/udc/bdc/bdc_ep.c return bdc_queue_xfr(bdc, req); bdc 744 drivers/usb/gadget/udc/bdc/bdc_ep.c struct bdc *bdc; bdc 748 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc = ep->bdc; bdc 758 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s ep:%s start:%d end:%d\n", bdc 760 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "ep_dequeue ep=%p ep->desc=%p\n", bdc 763 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = bdc_stop_ep(bdc, ep->ep_num); bdc 774 drivers/usb/gadget/udc/bdc/bdc_ep.c tmp_32 = bdc_readl(bdc->regs, BDC_EPSTS0); bdc 776 drivers/usb/gadget/udc/bdc/bdc_ep.c tmp_32 = bdc_readl(bdc->regs, BDC_EPSTS1); bdc 806 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, bdc 808 drivers/usb/gadget/udc/bdc/bdc_ep.c start_pending, end_pending, bdc->gadget.speed); bdc 818 drivers/usb/gadget/udc/bdc/bdc_ep.c if (bdc->gadget.speed == USB_SPEED_UNKNOWN) bdc 847 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc_dbg_bd_list(bdc, ep); bdc 853 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = bdc_ep_bla(bdc, ep, next_bd_dma); bdc 855 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, "error in ep_bla:%d\n", ret); bdc 866 drivers/usb/gadget/udc/bdc/bdc_ep.c struct bdc *bdc; bdc 869 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc = ep->bdc; bdc 870 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s ep:%s value=%d\n", __func__, ep->name, value); bdc 873 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "Halt\n"); bdc 875 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_state = WAIT_FOR_SETUP; bdc 877 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = bdc_ep_set_stall(bdc, ep->ep_num); bdc 879 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, "failed to set STALL on %s\n", bdc 885 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "Before Clear\n"); bdc 886 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = bdc_ep_clear_stall(bdc, ep->ep_num); bdc 888 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, "failed to clear STALL on %s\n", bdc 892 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "After Clear\n"); bdc 899 drivers/usb/gadget/udc/bdc/bdc_ep.c void bdc_free_ep(struct bdc *bdc) bdc 904 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s\n", __func__); bdc 905 drivers/usb/gadget/udc/bdc/bdc_ep.c for (epnum = 1; epnum < bdc->num_eps; epnum++) { bdc 906 drivers/usb/gadget/udc/bdc/bdc_ep.c ep = bdc->bdc_ep_array[epnum]; bdc 922 drivers/usb/gadget/udc/bdc/bdc_ep.c static int bdc_set_test_mode(struct bdc *bdc) bdc 926 drivers/usb/gadget/udc/bdc/bdc_ep.c usb2_pm = bdc_readl(bdc->regs, BDC_USPPM2); bdc 928 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s\n", __func__); bdc 929 drivers/usb/gadget/udc/bdc/bdc_ep.c switch (bdc->test_mode) { bdc 935 drivers/usb/gadget/udc/bdc/bdc_ep.c usb2_pm |= bdc->test_mode << 28; bdc 940 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "usb2_pm=%08x", usb2_pm); bdc 941 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc_writel(bdc->regs, BDC_USPPM2, usb2_pm); bdc 950 drivers/usb/gadget/udc/bdc/bdc_ep.c static void handle_xsr_succ_status(struct bdc *bdc, struct bdc_ep *ep, bdc 964 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s ep:%p\n", __func__, ep); bdc 965 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc_dbg_srr(bdc, 0); bdc 973 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_warn(bdc->dev, "xfr srr with no BD's queued\n"); bdc 998 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_warn(bdc->dev, "bd doesn't exist?\n"); bdc 1040 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, bdc 1049 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "short xfr on %d\n", ep->ep_num); bdc 1062 drivers/usb/gadget/udc/bdc/bdc_ep.c void bdc_xsf_ep0_setup_recv(struct bdc *bdc, struct bdc_sr *sreport) bdc 1067 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, bdc 1069 drivers/usb/gadget/udc/bdc/bdc_ep.c __func__, ep0_state_string[bdc->ep0_state]); bdc 1071 drivers/usb/gadget/udc/bdc/bdc_ep.c setup_pkt = &bdc->setup_pkt; bdc 1075 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_state = WAIT_FOR_STATUS_START; bdc 1077 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_state = WAIT_FOR_DATA_START; bdc 1080 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, bdc 1082 drivers/usb/gadget/udc/bdc/bdc_ep.c __func__, ep0_state_string[bdc->ep0_state]); bdc 1086 drivers/usb/gadget/udc/bdc/bdc_ep.c static void ep0_stall(struct bdc *bdc) bdc 1088 drivers/usb/gadget/udc/bdc/bdc_ep.c struct bdc_ep *ep = bdc->bdc_ep_array[1]; bdc 1091 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s\n", __func__); bdc 1092 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->delayed_status = false; bdc 1104 drivers/usb/gadget/udc/bdc/bdc_ep.c static int ep0_set_address(struct bdc *bdc, struct usb_ctrlrequest *ctrl) bdc 1106 drivers/usb/gadget/udc/bdc/bdc_ep.c enum usb_device_state state = bdc->gadget.state; bdc 1111 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, bdc 1122 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = bdc_address_device(bdc, addr); bdc 1127 drivers/usb/gadget/udc/bdc/bdc_ep.c usb_gadget_set_state(&bdc->gadget, USB_STATE_ADDRESS); bdc 1129 drivers/usb/gadget/udc/bdc/bdc_ep.c usb_gadget_set_state(&bdc->gadget, USB_STATE_DEFAULT); bdc 1131 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->dev_addr = addr; bdc 1134 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_warn(bdc->dev, bdc 1144 drivers/usb/gadget/udc/bdc/bdc_ep.c static int ep0_handle_feature_dev(struct bdc *bdc, u16 wValue, bdc 1147 drivers/usb/gadget/udc/bdc/bdc_ep.c enum usb_device_state state = bdc->gadget.state; bdc 1150 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s set:%d dev state:%d\n", bdc 1154 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "USB_DEVICE_REMOTE_WAKEUP\n"); bdc 1156 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->devstatus |= REMOTE_WAKE_ENABLE; bdc 1158 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->devstatus &= ~REMOTE_WAKE_ENABLE; bdc 1162 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "USB_DEVICE_TEST_MODE\n"); bdc 1164 drivers/usb/gadget/udc/bdc/bdc_ep.c (bdc->gadget.speed != USB_SPEED_HIGH) || !set) bdc 1167 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->test_mode = wIndex >> 8; bdc 1171 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "USB_DEVICE_U1_ENABLE\n"); bdc 1173 drivers/usb/gadget/udc/bdc/bdc_ep.c if (bdc->gadget.speed != USB_SPEED_SUPER || bdc 1177 drivers/usb/gadget/udc/bdc/bdc_ep.c usppms = bdc_readl(bdc->regs, BDC_USPPMS); bdc 1183 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->devstatus |= (1 << USB_DEV_STAT_U1_ENABLED); bdc 1187 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->devstatus &= ~(1 << USB_DEV_STAT_U1_ENABLED); bdc 1189 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc_writel(bdc->regs, BDC_USPPMS, usppms); bdc 1193 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "USB_DEVICE_U2_ENABLE\n"); bdc 1195 drivers/usb/gadget/udc/bdc/bdc_ep.c if (bdc->gadget.speed != USB_SPEED_SUPER || bdc 1199 drivers/usb/gadget/udc/bdc/bdc_ep.c usppms = bdc_readl(bdc->regs, BDC_USPPMS); bdc 1203 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->devstatus |= (1 << USB_DEV_STAT_U2_ENABLED); bdc 1207 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->devstatus &= ~(1 << USB_DEV_STAT_U2_ENABLED); bdc 1209 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc_writel(bdc->regs, BDC_USPPMS, usppms); bdc 1213 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "USB_DEVICE_LTM_ENABLE?\n"); bdc 1214 drivers/usb/gadget/udc/bdc/bdc_ep.c if (bdc->gadget.speed != USB_SPEED_SUPER || bdc 1219 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, "Unknown wValue:%d\n", wValue); bdc 1227 drivers/usb/gadget/udc/bdc/bdc_ep.c static int ep0_handle_feature(struct bdc *bdc, bdc 1230 drivers/usb/gadget/udc/bdc/bdc_ep.c enum usb_device_state state = bdc->gadget.state; bdc 1239 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, bdc 1242 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->gadget.speed, set); bdc 1246 drivers/usb/gadget/udc/bdc/bdc_ep.c return ep0_handle_feature_dev(bdc, wValue, wIndex, set); bdc 1248 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "USB_RECIP_INTERFACE\n"); bdc 1255 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "SET REMOTE_WAKEUP\n"); bdc 1256 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->devstatus |= REMOTE_WAKE_ENABLE; bdc 1258 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "CLEAR REMOTE_WAKEUP\n"); bdc 1259 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->devstatus &= ~REMOTE_WAKE_ENABLE; bdc 1265 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "USB_RECIP_ENDPOINT\n"); bdc 1284 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "ep0 stall already cleared\n"); bdc 1287 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "epnum=%d\n", epnum); bdc 1288 drivers/usb/gadget/udc/bdc/bdc_ep.c ep = bdc->bdc_ep_array[epnum]; bdc 1294 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, "Unknown recipient\n"); bdc 1302 drivers/usb/gadget/udc/bdc/bdc_ep.c static int ep0_handle_status(struct bdc *bdc, bdc 1305 drivers/usb/gadget/udc/bdc/bdc_ep.c enum usb_device_state state = bdc->gadget.state; bdc 1315 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s\n", __func__); bdc 1316 drivers/usb/gadget/udc/bdc/bdc_ep.c usb_status = bdc->devstatus; bdc 1319 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, bdc 1321 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->devstatus); bdc 1323 drivers/usb/gadget/udc/bdc/bdc_ep.c if (bdc->gadget.speed == USB_SPEED_SUPER) bdc 1328 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "USB_RECIP_INTERFACE\n"); bdc 1329 drivers/usb/gadget/udc/bdc/bdc_ep.c if (bdc->gadget.speed == USB_SPEED_SUPER) { bdc 1334 drivers/usb/gadget/udc/bdc/bdc_ep.c if (bdc->devstatus & REMOTE_WAKE_ENABLE) bdc 1343 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "USB_RECIP_ENDPOINT\n"); bdc 1354 drivers/usb/gadget/udc/bdc/bdc_ep.c ep = bdc->bdc_ep_array[epnum]; bdc 1356 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, "ISSUE, GET_STATUS for invalid EP ?"); bdc 1364 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, "Unknown recipient for get_status\n"); bdc 1368 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "usb_status=%08x\n", usb_status); bdc 1369 drivers/usb/gadget/udc/bdc/bdc_ep.c *(__le16 *)bdc->ep0_response_buff = cpu_to_le16(usb_status); bdc 1370 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_req.usb_req.length = 2; bdc 1371 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_req.usb_req.buf = &bdc->ep0_response_buff; bdc 1372 drivers/usb/gadget/udc/bdc/bdc_ep.c ep0_queue_data_stage(bdc); bdc 1383 drivers/usb/gadget/udc/bdc/bdc_ep.c static int ep0_set_sel(struct bdc *bdc, bdc 1389 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s\n", __func__); bdc 1392 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, "%s Wrong wLength:%d\n", __func__, wLength); bdc 1395 drivers/usb/gadget/udc/bdc/bdc_ep.c ep = bdc->bdc_ep_array[1]; bdc 1396 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_req.ep = ep; bdc 1397 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_req.usb_req.length = 6; bdc 1398 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_req.usb_req.buf = bdc->ep0_response_buff; bdc 1399 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_req.usb_req.complete = ep0_set_sel_cmpl; bdc 1400 drivers/usb/gadget/udc/bdc/bdc_ep.c ep0_queue_data_stage(bdc); bdc 1409 drivers/usb/gadget/udc/bdc/bdc_ep.c static int ep0_queue_zlp(struct bdc *bdc) bdc 1413 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s\n", __func__); bdc 1414 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_req.ep = bdc->bdc_ep_array[1]; bdc 1415 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_req.usb_req.length = 0; bdc 1416 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_req.usb_req.complete = NULL; bdc 1417 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_state = WAIT_FOR_DATA_START; bdc 1418 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = bdc_queue_xfr(bdc, &bdc->ep0_req); bdc 1420 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, "err queueing zlp :%d\n", ret); bdc 1423 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_state = WAIT_FOR_DATA_XMIT; bdc 1429 drivers/usb/gadget/udc/bdc/bdc_ep.c static int handle_control_request(struct bdc *bdc) bdc 1431 drivers/usb/gadget/udc/bdc/bdc_ep.c enum usb_device_state state = bdc->gadget.state; bdc 1437 drivers/usb/gadget/udc/bdc/bdc_ep.c setup_pkt = &bdc->setup_pkt; bdc 1438 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s\n", __func__); bdc 1442 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "USB_REQ_SET_ADDRESS\n"); bdc 1443 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = ep0_set_address(bdc, setup_pkt); bdc 1444 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->devstatus &= DEVSTATUS_CLEAR; bdc 1448 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "USB_REQ_SET_CONFIGURATION\n"); bdc 1450 drivers/usb/gadget/udc/bdc/bdc_ep.c usb_gadget_set_state(&bdc->gadget, bdc 1460 drivers/usb/gadget/udc/bdc/bdc_ep.c &bdc->gadget, bdc 1467 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "USB_REQ_SET_FEATURE\n"); bdc 1468 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = ep0_handle_feature(bdc, setup_pkt, 1); bdc 1472 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "USB_REQ_CLEAR_FEATURE\n"); bdc 1473 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = ep0_handle_feature(bdc, setup_pkt, 0); bdc 1477 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "USB_REQ_GET_STATUS\n"); bdc 1478 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = ep0_handle_status(bdc, setup_pkt); bdc 1482 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "USB_REQ_SET_SEL\n"); bdc 1483 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = ep0_set_sel(bdc, setup_pkt); bdc 1487 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_warn(bdc->dev, bdc 1499 drivers/usb/gadget/udc/bdc/bdc_ep.c spin_unlock(&bdc->lock); bdc 1500 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = bdc->gadget_driver->setup(&bdc->gadget, setup_pkt); bdc 1501 drivers/usb/gadget/udc/bdc/bdc_ep.c spin_lock(&bdc->lock); bdc 1508 drivers/usb/gadget/udc/bdc/bdc_ep.c void bdc_xsf_ep0_data_start(struct bdc *bdc, struct bdc_sr *sreport) bdc 1513 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s\n", __func__); bdc 1514 drivers/usb/gadget/udc/bdc/bdc_ep.c ep = bdc->bdc_ep_array[1]; bdc 1521 drivers/usb/gadget/udc/bdc/bdc_ep.c if (bdc->ep0_state != WAIT_FOR_DATA_START) bdc 1522 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_warn(bdc->dev, bdc 1524 drivers/usb/gadget/udc/bdc/bdc_ep.c ep0_state_string[bdc->ep0_state]); bdc 1526 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = handle_control_request(bdc); bdc 1532 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->delayed_status = true; bdc 1536 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_state = WAIT_FOR_DATA_XMIT; bdc 1537 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, bdc 1538 drivers/usb/gadget/udc/bdc/bdc_ep.c "ep0_state:%s", ep0_state_string[bdc->ep0_state]); bdc 1542 drivers/usb/gadget/udc/bdc/bdc_ep.c ep0_stall(bdc); bdc 1546 drivers/usb/gadget/udc/bdc/bdc_ep.c void bdc_xsf_ep0_status_start(struct bdc *bdc, struct bdc_sr *sreport) bdc 1552 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, bdc 1554 drivers/usb/gadget/udc/bdc/bdc_ep.c __func__, ep0_state_string[bdc->ep0_state]); bdc 1555 drivers/usb/gadget/udc/bdc/bdc_ep.c ep = bdc->bdc_ep_array[1]; bdc 1558 drivers/usb/gadget/udc/bdc/bdc_ep.c if (bdc->zlp_needed) bdc 1559 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->zlp_needed = false; bdc 1567 drivers/usb/gadget/udc/bdc/bdc_ep.c if ((bdc->ep0_state != WAIT_FOR_STATUS_START) && bdc 1568 drivers/usb/gadget/udc/bdc/bdc_ep.c (bdc->ep0_state != WAIT_FOR_DATA_XMIT)) bdc 1569 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, bdc 1571 drivers/usb/gadget/udc/bdc/bdc_ep.c ep0_state_string[bdc->ep0_state]); bdc 1574 drivers/usb/gadget/udc/bdc/bdc_ep.c if (bdc->ep0_state == WAIT_FOR_DATA_XMIT) { bdc 1575 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_state = STATUS_PENDING; bdc 1577 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, bdc 1581 drivers/usb/gadget/udc/bdc/bdc_ep.c setup_pkt = &bdc->setup_pkt; bdc 1588 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = handle_control_request(bdc); bdc 1590 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->delayed_status = true; bdc 1597 drivers/usb/gadget/udc/bdc/bdc_ep.c ep0_queue_status_stage(bdc); bdc 1598 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_state = WAIT_FOR_STATUS_XMIT; bdc 1599 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, bdc 1600 drivers/usb/gadget/udc/bdc/bdc_ep.c "ep0_state:%s", ep0_state_string[bdc->ep0_state]); bdc 1604 drivers/usb/gadget/udc/bdc/bdc_ep.c ep0_stall(bdc); bdc 1608 drivers/usb/gadget/udc/bdc/bdc_ep.c static void ep0_xsf_complete(struct bdc *bdc, struct bdc_sr *sreport) bdc 1610 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s\n", __func__); bdc 1611 drivers/usb/gadget/udc/bdc/bdc_ep.c switch (bdc->ep0_state) { bdc 1613 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_state = WAIT_FOR_STATUS_START; bdc 1616 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->ep0_state = WAIT_FOR_SETUP; bdc 1617 drivers/usb/gadget/udc/bdc/bdc_ep.c if (bdc->test_mode) { bdc 1620 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "test_mode:%d\n", bdc->test_mode); bdc 1621 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = bdc_set_test_mode(bdc); bdc 1623 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, "Err in setting Test mode\n"); bdc 1626 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->test_mode = 0; bdc 1630 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc_xsf_ep0_status_start(bdc, sreport); bdc 1634 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, bdc 1636 drivers/usb/gadget/udc/bdc/bdc_ep.c ep0_state_string[bdc->ep0_state]); bdc 1642 drivers/usb/gadget/udc/bdc/bdc_ep.c void bdc_sr_xsf(struct bdc *bdc, struct bdc_sr *sreport) bdc 1649 drivers/usb/gadget/udc/bdc/bdc_ep.c ep = bdc->bdc_ep_array[ep_num]; bdc 1651 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, "xsf for ep not enabled\n"); bdc 1658 drivers/usb/gadget/udc/bdc/bdc_ep.c if (bdc->devstatus & FUNC_WAKE_ISSUED) { bdc 1659 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->devstatus &= ~(FUNC_WAKE_ISSUED); bdc 1660 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s clearing FUNC_WAKE_ISSUED flag\n", bdc 1664 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg_ratelimited(bdc->dev, "%s sr_status=%d ep:%s\n", bdc 1670 drivers/usb/gadget/udc/bdc/bdc_ep.c handle_xsr_succ_status(bdc, ep, sreport); bdc 1672 drivers/usb/gadget/udc/bdc/bdc_ep.c ep0_xsf_complete(bdc, sreport); bdc 1679 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, bdc 1683 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->sr_xsf_ep0[sr_status - XSF_SETUP_RECV](bdc, sreport); bdc 1688 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "Babble on ep0 zlp_need:%d\n", bdc 1689 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->zlp_needed); bdc 1694 drivers/usb/gadget/udc/bdc/bdc_ep.c if (bdc->zlp_needed) { bdc 1696 drivers/usb/gadget/udc/bdc/bdc_ep.c ep0_queue_zlp(bdc); bdc 1700 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_warn(bdc->dev, "Babble on ep not handled\n"); bdc 1703 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_warn(bdc->dev, "sr status not handled:%x\n", sr_status); bdc 1714 drivers/usb/gadget/udc/bdc/bdc_ep.c struct bdc *bdc; bdc 1725 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc = ep->bdc; bdc 1726 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s ep:%p req:%p\n", __func__, ep, req); bdc 1727 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "queuing request %p to %s length %d zero:%d\n", bdc 1731 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_warn(bdc->dev, bdc 1738 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_warn(bdc->dev, bdc 1743 drivers/usb/gadget/udc/bdc/bdc_ep.c spin_lock_irqsave(&bdc->lock, flags); bdc 1744 drivers/usb/gadget/udc/bdc/bdc_ep.c if (ep == bdc->bdc_ep_array[1]) bdc 1749 drivers/usb/gadget/udc/bdc/bdc_ep.c spin_unlock_irqrestore(&bdc->lock, flags); bdc 1760 drivers/usb/gadget/udc/bdc/bdc_ep.c struct bdc *bdc; bdc 1768 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc = ep->bdc; bdc 1769 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s ep:%s req:%p\n", __func__, ep->name, req); bdc 1770 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc_dbg_bd_list(bdc, ep); bdc 1771 drivers/usb/gadget/udc/bdc/bdc_ep.c spin_lock_irqsave(&bdc->lock, flags); bdc 1778 drivers/usb/gadget/udc/bdc/bdc_ep.c spin_unlock_irqrestore(&bdc->lock, flags); bdc 1779 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, "usb_req !=req n"); bdc 1790 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc_dbg_bd_list(bdc, ep); bdc 1791 drivers/usb/gadget/udc/bdc/bdc_ep.c spin_unlock_irqrestore(&bdc->lock, flags); bdc 1800 drivers/usb/gadget/udc/bdc/bdc_ep.c struct bdc *bdc; bdc 1804 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc = ep->bdc; bdc 1805 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s ep:%s value=%d\n", __func__, ep->name, value); bdc 1806 drivers/usb/gadget/udc/bdc/bdc_ep.c spin_lock_irqsave(&bdc->lock, flags); bdc 1814 drivers/usb/gadget/udc/bdc/bdc_ep.c spin_unlock_irqrestore(&bdc->lock, flags); bdc 1833 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(ep->bdc->dev, "%s ep:%s req:%p\n", __func__, ep->name, req); bdc 1855 drivers/usb/gadget/udc/bdc/bdc_ep.c struct bdc *bdc; bdc 1869 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc = ep->bdc; bdc 1872 drivers/usb/gadget/udc/bdc/bdc_ep.c if (ep == bdc->bdc_ep_array[1]) bdc 1875 drivers/usb/gadget/udc/bdc/bdc_ep.c if (!bdc->gadget_driver bdc 1876 drivers/usb/gadget/udc/bdc/bdc_ep.c || bdc->gadget.speed == USB_SPEED_UNKNOWN) { bdc 1880 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s Enabling %s\n", __func__, ep->name); bdc 1881 drivers/usb/gadget/udc/bdc/bdc_ep.c spin_lock_irqsave(&bdc->lock, flags); bdc 1885 drivers/usb/gadget/udc/bdc/bdc_ep.c spin_unlock_irqrestore(&bdc->lock, flags); bdc 1894 drivers/usb/gadget/udc/bdc/bdc_ep.c struct bdc *bdc; bdc 1902 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc = ep->bdc; bdc 1905 drivers/usb/gadget/udc/bdc/bdc_ep.c if (ep == bdc->bdc_ep_array[1]) { bdc 1906 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_warn(bdc->dev, "%s called for ep0\n", __func__); bdc 1909 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, bdc 1914 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_warn(bdc->dev, "%s is already disabled\n", ep->name); bdc 1917 drivers/usb/gadget/udc/bdc/bdc_ep.c spin_lock_irqsave(&bdc->lock, flags); bdc 1919 drivers/usb/gadget/udc/bdc/bdc_ep.c spin_unlock_irqrestore(&bdc->lock, flags); bdc 1935 drivers/usb/gadget/udc/bdc/bdc_ep.c static int init_ep(struct bdc *bdc, u32 epnum, u32 dir) bdc 1939 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s epnum=%d dir=%d\n", __func__, epnum, dir); bdc 1944 drivers/usb/gadget/udc/bdc/bdc_ep.c ep->bdc = bdc; bdc 1955 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->bdc_ep_array[ep->ep_num] = ep; bdc 1960 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->gadget.ep0 = &ep->usb_ep; bdc 1967 drivers/usb/gadget/udc/bdc/bdc_ep.c bdc->bdc_ep_array[ep->ep_num] = ep; bdc 1976 drivers/usb/gadget/udc/bdc/bdc_ep.c list_add_tail(&ep->usb_ep.ep_list, &bdc->gadget.ep_list); bdc 1982 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "ep=%p ep->usb_ep.name=%s epnum=%d ep->epnum=%d\n", bdc 1991 drivers/usb/gadget/udc/bdc/bdc_ep.c int bdc_init_ep(struct bdc *bdc) bdc 1996 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_dbg(bdc->dev, "%s()\n", __func__); bdc 1997 drivers/usb/gadget/udc/bdc/bdc_ep.c INIT_LIST_HEAD(&bdc->gadget.ep_list); bdc 1999 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = init_ep(bdc, 1, 0); bdc 2001 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, "init ep ep0 fail %d\n", ret); bdc 2005 drivers/usb/gadget/udc/bdc/bdc_ep.c for (epnum = 2; epnum <= bdc->num_eps / 2; epnum++) { bdc 2007 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = init_ep(bdc, epnum, 0); bdc 2009 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, bdc 2016 drivers/usb/gadget/udc/bdc/bdc_ep.c ret = init_ep(bdc, epnum, 1); bdc 2018 drivers/usb/gadget/udc/bdc/bdc_ep.c dev_err(bdc->dev, bdc 12 drivers/usb/gadget/udc/bdc/bdc_ep.h int bdc_init_ep(struct bdc *); bdc 15 drivers/usb/gadget/udc/bdc/bdc_ep.h void bdc_free_ep(struct bdc *); bdc 25 drivers/usb/gadget/udc/bdc/bdc_pci.c struct platform_device *bdc; bdc 44 drivers/usb/gadget/udc/bdc/bdc_pci.c struct platform_device *bdc; bdc 60 drivers/usb/gadget/udc/bdc/bdc_pci.c bdc = platform_device_alloc(BRCM_BDC_NAME, PLATFORM_DEVID_AUTO); bdc 61 drivers/usb/gadget/udc/bdc/bdc_pci.c if (!bdc) bdc 76 drivers/usb/gadget/udc/bdc/bdc_pci.c ret = platform_device_add_resources(bdc, res, ARRAY_SIZE(res)); bdc 80 drivers/usb/gadget/udc/bdc/bdc_pci.c platform_device_put(bdc); bdc 86 drivers/usb/gadget/udc/bdc/bdc_pci.c dma_set_coherent_mask(&bdc->dev, pci->dev.coherent_dma_mask); bdc 88 drivers/usb/gadget/udc/bdc/bdc_pci.c bdc->dev.dma_mask = pci->dev.dma_mask; bdc 89 drivers/usb/gadget/udc/bdc/bdc_pci.c bdc->dev.dma_parms = pci->dev.dma_parms; bdc 90 drivers/usb/gadget/udc/bdc/bdc_pci.c bdc->dev.parent = &pci->dev; bdc 91 drivers/usb/gadget/udc/bdc/bdc_pci.c glue->bdc = bdc; bdc 93 drivers/usb/gadget/udc/bdc/bdc_pci.c ret = platform_device_add(bdc); bdc 96 drivers/usb/gadget/udc/bdc/bdc_pci.c platform_device_put(bdc); bdc 107 drivers/usb/gadget/udc/bdc/bdc_pci.c platform_device_unregister(glue->bdc); bdc 60 drivers/usb/gadget/udc/bdc/bdc_udc.c static void srr_dqp_index_advc(struct bdc *bdc, u32 srr_num) bdc 64 drivers/usb/gadget/udc/bdc/bdc_udc.c srr = &bdc->srr; bdc 65 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg_ratelimited(bdc->dev, "srr->dqp_index:%d\n", srr->dqp_index); bdc 73 drivers/usb/gadget/udc/bdc/bdc_udc.c static void bdc_uspc_connected(struct bdc *bdc) bdc 79 drivers/usb/gadget/udc/bdc/bdc_udc.c temp = bdc_readl(bdc->regs, BDC_USPC); bdc 81 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "%s speed=%x\n", __func__, speed); bdc 86 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget.ep0->maxpacket = EP0_MAX_PKT_SIZE; bdc 87 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget.speed = USB_SPEED_SUPER; bdc 89 drivers/usb/gadget/udc/bdc/bdc_udc.c usppms = bdc_readl(bdc->regs, BDC_USPPMS); bdc 93 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc_writel(bdc->regs, BDC_USPPMS, usppms); bdc 98 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget.ep0->maxpacket = 64; bdc 99 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget.speed = USB_SPEED_HIGH; bdc 104 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget.ep0->maxpacket = 64; bdc 105 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget.speed = USB_SPEED_FULL; bdc 110 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget.ep0->maxpacket = 8; bdc 111 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget.speed = USB_SPEED_LOW; bdc 114 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_err(bdc->dev, "UNDEFINED SPEED\n"); bdc 117 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "connected at %s\n", conn_speed_str[speed]); bdc 119 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->bdc_ep_array[1]->desc = &bdc_gadget_ep0_desc; bdc 120 drivers/usb/gadget/udc/bdc/bdc_udc.c ret = bdc_config_ep(bdc, bdc->bdc_ep_array[1]); bdc 122 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_err(bdc->dev, "EP0 config failed\n"); bdc 123 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->bdc_ep_array[1]->usb_ep.desc = &bdc_gadget_ep0_desc; bdc 124 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->bdc_ep_array[1]->flags |= BDC_EP_ENABLED; bdc 125 drivers/usb/gadget/udc/bdc/bdc_udc.c usb_gadget_set_state(&bdc->gadget, USB_STATE_DEFAULT); bdc 129 drivers/usb/gadget/udc/bdc/bdc_udc.c static void bdc_uspc_disconnected(struct bdc *bdc, bool reinit) bdc 133 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "%s\n", __func__); bdc 138 drivers/usb/gadget/udc/bdc/bdc_udc.c ep = bdc->bdc_ep_array[1]; bdc 143 drivers/usb/gadget/udc/bdc/bdc_udc.c if (bdc->gadget_driver && bdc->gadget_driver->disconnect) { bdc 144 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_unlock(&bdc->lock); bdc 145 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget_driver->disconnect(&bdc->gadget); bdc 146 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_lock(&bdc->lock); bdc 149 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget.speed = USB_SPEED_UNKNOWN; bdc 150 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->devstatus &= DEVSTATUS_CLEAR; bdc 151 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->delayed_status = false; bdc 152 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->reinit = reinit; bdc 153 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->test_mode = false; bdc 159 drivers/usb/gadget/udc/bdc/bdc_udc.c struct bdc *bdc = container_of(work, struct bdc, func_wake_notify.work); bdc 162 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "%s\n", __func__); bdc 163 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_lock_irqsave(&bdc->lock, flags); bdc 168 drivers/usb/gadget/udc/bdc/bdc_udc.c if (bdc->devstatus & FUNC_WAKE_ISSUED) { bdc 169 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "FUNC_WAKE_ISSUED FLAG IS STILL SET\n"); bdc 171 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc_function_wake_fh(bdc, 0); bdc 172 drivers/usb/gadget/udc/bdc/bdc_udc.c schedule_delayed_work(&bdc->func_wake_notify, bdc 175 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_unlock_irqrestore(&bdc->lock, flags); bdc 179 drivers/usb/gadget/udc/bdc/bdc_udc.c static void handle_link_state_change(struct bdc *bdc, u32 uspc) bdc 183 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "Link state change"); bdc 187 drivers/usb/gadget/udc/bdc/bdc_udc.c if ((bdc->gadget.speed != USB_SPEED_UNKNOWN) && bdc 188 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget_driver->suspend) { bdc 189 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "Entered Suspend mode\n"); bdc 190 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_unlock(&bdc->lock); bdc 191 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->devstatus |= DEVICE_SUSPENDED; bdc 192 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget_driver->suspend(&bdc->gadget); bdc 193 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_lock(&bdc->lock); bdc 197 drivers/usb/gadget/udc/bdc/bdc_udc.c if (bdc->devstatus & REMOTE_WAKEUP_ISSUED) { bdc 198 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->devstatus &= ~REMOTE_WAKEUP_ISSUED; bdc 199 drivers/usb/gadget/udc/bdc/bdc_udc.c if (bdc->gadget.speed == USB_SPEED_SUPER) { bdc 200 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc_function_wake_fh(bdc, 0); bdc 201 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->devstatus |= FUNC_WAKE_ISSUED; bdc 210 drivers/usb/gadget/udc/bdc/bdc_udc.c &bdc->func_wake_notify, bdc 212 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "sched func_wake_notify\n"); bdc 218 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "Resumed from Suspend\n"); bdc 219 drivers/usb/gadget/udc/bdc/bdc_udc.c if (bdc->devstatus & DEVICE_SUSPENDED) { bdc 220 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget_driver->resume(&bdc->gadget); bdc 221 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->devstatus &= ~DEVICE_SUSPENDED; bdc 225 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "link state:%d\n", link_state); bdc 230 drivers/usb/gadget/udc/bdc/bdc_udc.c void bdc_sr_uspc(struct bdc *bdc, struct bdc_sr *sreport) bdc 237 drivers/usb/gadget/udc/bdc/bdc_udc.c uspc = bdc_readl(bdc->regs, BDC_USPC); bdc 238 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "%s uspc=0x%08x\n", __func__, uspc); bdc 252 drivers/usb/gadget/udc/bdc/bdc_udc.c if (bdc->pullup) { bdc 253 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "Do a softconnect\n"); bdc 255 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc_softconn(bdc); bdc 256 drivers/usb/gadget/udc/bdc/bdc_udc.c usb_gadget_set_state(&bdc->gadget, USB_STATE_POWERED); bdc 261 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "Port reset or disconn\n"); bdc 262 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc_uspc_disconnected(bdc, disconn); bdc 266 drivers/usb/gadget/udc/bdc/bdc_udc.c handle_link_state_change(bdc, uspc); bdc 277 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "Connected\n"); bdc 278 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc_uspc_connected(bdc); bdc 279 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->devstatus &= ~(DEVICE_SUSPENDED); bdc 281 drivers/usb/gadget/udc/bdc/bdc_udc.c uspc = bdc_readl(bdc->regs, BDC_USPC); bdc 283 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "uspc=%x\n", uspc); bdc 284 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc_writel(bdc->regs, BDC_USPC, clear_flags); bdc 292 drivers/usb/gadget/udc/bdc/bdc_udc.c struct bdc *bdc = _bdc; bdc 296 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_lock(&bdc->lock); bdc 297 drivers/usb/gadget/udc/bdc/bdc_udc.c status = bdc_readl(bdc->regs, BDC_BDCSC); bdc 299 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_unlock(&bdc->lock); bdc 302 drivers/usb/gadget/udc/bdc/bdc_udc.c srr_int = bdc_readl(bdc->regs, BDC_SRRINT(0)); bdc 305 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_warn(bdc->dev, "Global irq pending but SRR IP is 0\n"); bdc 306 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_unlock(&bdc->lock); bdc 311 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, bdc 313 drivers/usb/gadget/udc/bdc/bdc_udc.c __func__, eqp_index, dqp_index, bdc->srr.dqp_index); bdc 317 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "SRR empty?\n"); bdc 318 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_unlock(&bdc->lock); bdc 322 drivers/usb/gadget/udc/bdc/bdc_udc.c while (bdc->srr.dqp_index != eqp_index) { bdc 323 drivers/usb/gadget/udc/bdc/bdc_udc.c sreport = &bdc->srr.sr_bds[bdc->srr.dqp_index]; bdc 327 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg_ratelimited(bdc->dev, "sr_type=%d\n", sr_type); bdc 330 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->sr_handler[0](bdc, sreport); bdc 334 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->sr_handler[1](bdc, sreport); bdc 337 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_warn(bdc->dev, "SR:%d not handled\n", sr_type); bdc 340 drivers/usb/gadget/udc/bdc/bdc_udc.c srr_dqp_index_advc(bdc, 0); bdc 343 drivers/usb/gadget/udc/bdc/bdc_udc.c srr_int = bdc_readl(bdc->regs, BDC_SRRINT(0)); bdc 346 drivers/usb/gadget/udc/bdc/bdc_udc.c srr_int |= ((bdc->srr.dqp_index) << 16); bdc 348 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc_writel(bdc->regs, BDC_SRRINT(0), srr_int); bdc 349 drivers/usb/gadget/udc/bdc/bdc_udc.c srr_int = bdc_readl(bdc->regs, BDC_SRRINT(0)); bdc 350 drivers/usb/gadget/udc/bdc/bdc_udc.c if (bdc->reinit) { bdc 351 drivers/usb/gadget/udc/bdc/bdc_udc.c ret = bdc_reinit(bdc); bdc 353 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_err(bdc->dev, "err in bdc reinit\n"); bdc 356 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_unlock(&bdc->lock); bdc 365 drivers/usb/gadget/udc/bdc/bdc_udc.c struct bdc *bdc = gadget_to_bdc(gadget); bdc 369 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "%s()\n", __func__); bdc 370 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_lock_irqsave(&bdc->lock, flags); bdc 371 drivers/usb/gadget/udc/bdc/bdc_udc.c if (bdc->gadget_driver) { bdc 372 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_err(bdc->dev, "%s is already bound to %s\n", bdc 373 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget.name, bdc 374 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget_driver->driver.name); bdc 383 drivers/usb/gadget/udc/bdc/bdc_udc.c ret = bdc_run(bdc); bdc 385 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_err(bdc->dev, "%s bdc run fail\n", __func__); bdc 388 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget_driver = driver; bdc 389 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget.dev.driver = &driver->driver; bdc 391 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_unlock_irqrestore(&bdc->lock, flags); bdc 398 drivers/usb/gadget/udc/bdc/bdc_udc.c struct bdc *bdc = gadget_to_bdc(gadget); bdc 401 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "%s()\n", __func__); bdc 402 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_lock_irqsave(&bdc->lock, flags); bdc 403 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc_stop(bdc); bdc 404 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget_driver = NULL; bdc 405 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget.dev.driver = NULL; bdc 406 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_unlock_irqrestore(&bdc->lock, flags); bdc 413 drivers/usb/gadget/udc/bdc/bdc_udc.c struct bdc *bdc = gadget_to_bdc(gadget); bdc 417 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "%s() is_on:%d\n", __func__, is_on); bdc 421 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_lock_irqsave(&bdc->lock, flags); bdc 423 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc_softdisconn(bdc); bdc 424 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->pullup = false; bdc 431 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->pullup = true; bdc 437 drivers/usb/gadget/udc/bdc/bdc_udc.c uspc = bdc_readl(bdc->regs, BDC_USPC); bdc 439 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc_softconn(bdc); bdc 441 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_unlock_irqrestore(&bdc->lock, flags); bdc 449 drivers/usb/gadget/udc/bdc/bdc_udc.c struct bdc *bdc = gadget_to_bdc(gadget); bdc 452 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "%s()\n", __func__); bdc 454 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_lock_irqsave(&bdc->lock, flags); bdc 456 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->devstatus |= 1 << USB_DEVICE_SELF_POWERED; bdc 458 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->devstatus &= ~(1 << USB_DEVICE_SELF_POWERED); bdc 460 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_unlock_irqrestore(&bdc->lock, flags); bdc 467 drivers/usb/gadget/udc/bdc/bdc_udc.c struct bdc *bdc = gadget_to_bdc(gadget); bdc 473 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, bdc 475 drivers/usb/gadget/udc/bdc/bdc_udc.c __func__, bdc->devstatus); bdc 477 drivers/usb/gadget/udc/bdc/bdc_udc.c if (!(bdc->devstatus & REMOTE_WAKE_ENABLE)) bdc 480 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_lock_irqsave(&bdc->lock, flags); bdc 481 drivers/usb/gadget/udc/bdc/bdc_udc.c uspc = bdc_readl(bdc->regs, BDC_USPC); bdc 483 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "link_state =%d portsc=%x", link_state, uspc); bdc 485 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_warn(bdc->dev, bdc 491 drivers/usb/gadget/udc/bdc/bdc_udc.c if (bdc->gadget.speed == USB_SPEED_SUPER) bdc 492 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->devstatus |= REMOTE_WAKEUP_ISSUED; bdc 498 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc_writel(bdc->regs, BDC_USPC, uspc); bdc 499 drivers/usb/gadget/udc/bdc/bdc_udc.c uspc = bdc_readl(bdc->regs, BDC_USPC); bdc 501 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "link_state =%d portsc=%x", link_state, uspc); bdc 503 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_unlock_irqrestore(&bdc->lock, flags); bdc 517 drivers/usb/gadget/udc/bdc/bdc_udc.c int bdc_udc_init(struct bdc *bdc) bdc 522 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "%s()\n", __func__); bdc 523 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget.ops = &bdc_gadget_ops; bdc 524 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget.max_speed = USB_SPEED_SUPER; bdc 525 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget.speed = USB_SPEED_UNKNOWN; bdc 526 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget.dev.parent = bdc->dev; bdc 528 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget.sg_supported = false; bdc 531 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->gadget.name = BRCM_BDC_NAME; bdc 532 drivers/usb/gadget/udc/bdc/bdc_udc.c ret = devm_request_irq(bdc->dev, bdc->irq, bdc_udc_interrupt, bdc 533 drivers/usb/gadget/udc/bdc/bdc_udc.c IRQF_SHARED , BRCM_BDC_NAME, bdc); bdc 535 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_err(bdc->dev, bdc 537 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->irq, ret); bdc 541 drivers/usb/gadget/udc/bdc/bdc_udc.c ret = bdc_init_ep(bdc); bdc 543 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_err(bdc->dev, "bdc init ep fail: %d\n", ret); bdc 547 drivers/usb/gadget/udc/bdc/bdc_udc.c ret = usb_add_gadget_udc(bdc->dev, &bdc->gadget); bdc 549 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_err(bdc->dev, "failed to register udc\n"); bdc 552 drivers/usb/gadget/udc/bdc/bdc_udc.c usb_gadget_set_state(&bdc->gadget, USB_STATE_NOTATTACHED); bdc 553 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->bdc_ep_array[1]->desc = &bdc_gadget_ep0_desc; bdc 558 drivers/usb/gadget/udc/bdc/bdc_udc.c ret = bdc_ep_enable(bdc->bdc_ep_array[1]); bdc 560 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_err(bdc->dev, "fail to enable %s\n", bdc 561 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc->bdc_ep_array[1]->name); bdc 564 drivers/usb/gadget/udc/bdc/bdc_udc.c INIT_DELAYED_WORK(&bdc->func_wake_notify, bdc_func_wake_timer); bdc 566 drivers/usb/gadget/udc/bdc/bdc_udc.c temp = bdc_readl(bdc->regs, BDC_BDCSC); bdc 568 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc_writel(bdc->regs, BDC_BDCSC, temp); bdc 571 drivers/usb/gadget/udc/bdc/bdc_udc.c usb_del_gadget_udc(&bdc->gadget); bdc 573 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc_free_ep(bdc); bdc 578 drivers/usb/gadget/udc/bdc/bdc_udc.c void bdc_udc_exit(struct bdc *bdc) bdc 582 drivers/usb/gadget/udc/bdc/bdc_udc.c dev_dbg(bdc->dev, "%s()\n", __func__); bdc 583 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_lock_irqsave(&bdc->lock, flags); bdc 584 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc_ep_disable(bdc->bdc_ep_array[1]); bdc 585 drivers/usb/gadget/udc/bdc/bdc_udc.c spin_unlock_irqrestore(&bdc->lock, flags); bdc 587 drivers/usb/gadget/udc/bdc/bdc_udc.c usb_del_gadget_udc(&bdc->gadget); bdc 588 drivers/usb/gadget/udc/bdc/bdc_udc.c bdc_free_ep(bdc);