/kernel/linux/linux-5.10/drivers/usb/cdns3/ |
H A D | gadget.c | 74 static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep, 77 static int cdns3_ep_run_stream_transfer(struct cdns3_endpoint *priv_ep, 114 struct cdns3_endpoint *priv_ep) in cdns3_get_dma_pos() 118 dma_index = readl(&priv_dev->regs->ep_traddr) - priv_ep->trb_pool_dma; in cdns3_get_dma_pos() 185 dma_addr_t cdns3_trb_virt_to_dma(struct cdns3_endpoint *priv_ep, in cdns3_trb_virt_to_dma() argument 188 u32 offset = (char *)trb - (char *)priv_ep->trb_pool; in cdns3_trb_virt_to_dma() 190 return priv_ep->trb_pool_dma + offset; in cdns3_trb_virt_to_dma() 193 static int cdns3_ring_size(struct cdns3_endpoint *priv_ep) in cdns3_ring_size() argument 195 switch (priv_ep->type) { in cdns3_ring_size() 201 if (priv_ep in cdns3_ring_size() 113 cdns3_get_dma_pos(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep) cdns3_get_dma_pos() argument 208 cdns3_free_trb_pool(struct cdns3_endpoint *priv_ep) cdns3_free_trb_pool() argument 226 cdns3_allocate_trb_pool(struct cdns3_endpoint *priv_ep) cdns3_allocate_trb_pool() argument 276 cdns3_ep_stall_flush(struct cdns3_endpoint *priv_ep) cdns3_ep_stall_flush() argument 339 cdns3_ep_inc_enq(struct cdns3_endpoint *priv_ep) cdns3_ep_inc_enq() argument 349 cdns3_ep_inc_deq(struct cdns3_endpoint *priv_ep) cdns3_ep_inc_deq() argument 398 cdns3_start_all_request(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep) cdns3_start_all_request() argument 494 cdns3_wa2_descmiss_copy_data(struct cdns3_endpoint *priv_ep, struct usb_request *request) cdns3_wa2_descmiss_copy_data() argument 524 cdns3_wa2_gadget_giveback(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep, struct cdns3_request *priv_req) cdns3_wa2_gadget_giveback() argument 564 cdns3_wa2_gadget_ep_queue(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep, struct cdns3_request *priv_req) cdns3_wa2_gadget_ep_queue() argument 632 cdns3_wa2_remove_old_request(struct cdns3_endpoint *priv_ep) cdns3_wa2_remove_old_request() argument 662 cdns3_wa2_descmissing_packet(struct cdns3_endpoint *priv_ep) cdns3_wa2_descmissing_packet() argument 808 cdns3_gadget_giveback(struct cdns3_endpoint *priv_ep, struct cdns3_request *priv_req, int status) cdns3_gadget_giveback() argument 851 cdns3_wa1_restore_cycle_bit(struct cdns3_endpoint *priv_ep) cdns3_wa1_restore_cycle_bit() argument 900 struct cdns3_endpoint *priv_ep = priv_req->priv_ep; cdns3_prepare_aligned_request_buf() local 951 cdns3_wa1_update_guard(struct cdns3_endpoint *priv_ep, struct cdns3_trb *trb) cdns3_wa1_update_guard() argument 973 cdns3_wa1_tray_restore_cycle_bit(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep) cdns3_wa1_tray_restore_cycle_bit() argument 986 cdns3_ep_run_stream_transfer(struct cdns3_endpoint *priv_ep, struct usb_request *request) cdns3_ep_run_stream_transfer() argument 1091 cdns3_rearm_drdy_if_needed(struct cdns3_endpoint *priv_ep) cdns3_rearm_drdy_if_needed() argument 1111 cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep, struct usb_request *request) cdns3_ep_run_transfer() argument 1417 struct cdns3_endpoint *priv_ep; cdns3_set_hw_configuration() local 1479 cdns3_trb_handled(struct cdns3_endpoint *priv_ep, struct cdns3_request *priv_req) cdns3_trb_handled() argument 1542 cdns3_transfer_completed(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep) cdns3_transfer_completed() argument 1646 cdns3_rearm_transfer(struct cdns3_endpoint *priv_ep, u8 rearm) cdns3_rearm_transfer() argument 1666 cdns3_reprogram_tdl(struct cdns3_endpoint *priv_ep) cdns3_reprogram_tdl() argument 1687 cdns3_check_ep_interrupt_proceed(struct cdns3_endpoint *priv_ep) cdns3_check_ep_interrupt_proceed() argument 2052 cdns3_configure_dmult(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep) cdns3_configure_dmult() argument 2091 cdns3_ep_config(struct cdns3_endpoint *priv_ep, bool enable) cdns3_ep_config() argument 2210 cdns3_ep_dir_is_correct(struct usb_endpoint_descriptor *desc, struct cdns3_endpoint *priv_ep) cdns3_ep_dir_is_correct() argument 2222 struct cdns3_endpoint *priv_ep; cdns3_find_available_ep() local 2268 struct cdns3_endpoint *priv_ep; cdns3_gadget_match_ep() local 2307 struct cdns3_endpoint *priv_ep = ep_to_cdns3_ep(ep); cdns3_gadget_ep_alloc_request() local 2347 struct cdns3_endpoint *priv_ep; cdns3_gadget_ep_enable() local 2485 struct cdns3_endpoint *priv_ep; cdns3_gadget_ep_disable() local 2579 struct cdns3_endpoint *priv_ep = ep_to_cdns3_ep(ep); __cdns3_gadget_ep_queue() local 2632 struct cdns3_endpoint *priv_ep; cdns3_gadget_ep_queue() local 2677 struct cdns3_endpoint *priv_ep = ep_to_cdns3_ep(ep); cdns3_gadget_ep_dequeue() local 2741 __cdns3_gadget_ep_set_halt(struct cdns3_endpoint *priv_ep) __cdns3_gadget_ep_set_halt() argument 2762 __cdns3_gadget_ep_clear_halt(struct cdns3_endpoint *priv_ep) __cdns3_gadget_ep_clear_halt() argument 2814 struct cdns3_endpoint *priv_ep = ep_to_cdns3_ep(ep); cdns3_gadget_ep_set_halt() local 3015 struct cdns3_endpoint *priv_ep; cdns3_gadget_udc_stop() local 3058 struct cdns3_endpoint *priv_ep; cdns3_gadget_check_config() local 3133 struct cdns3_endpoint *priv_ep; cdns3_init_eps() local [all...] |
H A D | ep0.c | 39 struct cdns3_endpoint *priv_ep = priv_dev->eps[0]; in cdns3_ep0_run_transfer() local 41 priv_ep->trb_pool[0].buffer = cpu_to_le32(TRB_BUFFER(dma_addr)); in cdns3_ep0_run_transfer() 42 priv_ep->trb_pool[0].length = cpu_to_le32(TRB_LEN(length)); in cdns3_ep0_run_transfer() 45 priv_ep->trb_pool[0].control = cpu_to_le32(TRB_CYCLE | TRB_TYPE(TRB_NORMAL)); in cdns3_ep0_run_transfer() 46 priv_ep->trb_pool[1].buffer = cpu_to_le32(TRB_BUFFER(dma_addr)); in cdns3_ep0_run_transfer() 47 priv_ep->trb_pool[1].length = cpu_to_le32(TRB_LEN(0)); in cdns3_ep0_run_transfer() 48 priv_ep->trb_pool[1].control = cpu_to_le32(TRB_CYCLE | TRB_IOC | in cdns3_ep0_run_transfer() 51 priv_ep->trb_pool[0].control = cpu_to_le32(TRB_CYCLE | TRB_IOC | in cdns3_ep0_run_transfer() 53 priv_ep->trb_pool[1].control = 0; in cdns3_ep0_run_transfer() 56 trace_cdns3_prepare_trb(priv_ep, priv_e in cdns3_ep0_run_transfer() 107 struct cdns3_endpoint *priv_ep = priv_dev->eps[0]; cdns3_ep0_complete_setup() local 223 struct cdns3_endpoint *priv_ep; cdns3_req_ep0_get_status() local 360 struct cdns3_endpoint *priv_ep; cdns3_ep0_feature_handle_endpoint() local 534 struct cdns3_endpoint *priv_ep = priv_dev->eps[0]; cdns3_ep0_setup_phase() local 571 struct cdns3_endpoint *priv_ep = priv_dev->eps[0]; cdns3_transfer_completed() local 691 struct cdns3_endpoint *priv_ep = ep_to_cdns3_ep(ep); cdns3_gadget_ep0_queue() local 783 struct cdns3_endpoint *priv_ep = ep_to_cdns3_ep(ep); cdns3_gadget_ep_set_wedge() local 813 struct cdns3_endpoint *priv_ep; cdns3_ep0_config() local 875 cdns3_init_ep0(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep) cdns3_init_ep0() argument [all...] |
H A D | trace.h | 119 TP_PROTO(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep), 120 TP_ARGS(priv_dev, priv_ep), 122 __string(ep_name, priv_ep->name) 130 __assign_str(ep_name, priv_ep->name); 133 __entry->ep_last_sid = priv_ep->last_stream_id; 134 __entry->use_streams = priv_ep->use_streams; 146 TP_PROTO(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep), 147 TP_ARGS(priv_dev, priv_ep) 206 __string(name, req->priv_ep->name) 222 __assign_str(name, req->priv_ep [all...] |
H A D | debug.h | 110 static inline char *cdns3_dbg_ring(struct cdns3_endpoint *priv_ep, in cdns3_dbg_ring() argument 113 dma_addr_t addr = priv_ep->trb_pool_dma; in cdns3_dbg_ring() 119 trb_per_sector = GET_TRBS_PER_SEGMENT(priv_ep->type); in cdns3_dbg_ring() 121 trb = &priv_ep->trb_pool[priv_ep->dequeue]; in cdns3_dbg_ring() 122 ret += sprintf(str + ret, "\n\t\tRing contents for %s:", priv_ep->name); in cdns3_dbg_ring() 126 priv_ep->dequeue, trb, in cdns3_dbg_ring() 127 (unsigned long long)cdns3_trb_virt_to_dma(priv_ep, trb)); in cdns3_dbg_ring() 129 trb = &priv_ep->trb_pool[priv_ep in cdns3_dbg_ring() [all...] |
H A D | gadget.h | 1219 * @priv_ep: extended representation of usb_ep object 1232 struct cdns3_endpoint *priv_ep; member 1342 dma_addr_t cdns3_trb_virt_to_dma(struct cdns3_endpoint *priv_ep, 1351 void cdns3_rearm_transfer(struct cdns3_endpoint *priv_ep, u8 rearm); 1352 int cdns3_allocate_trb_pool(struct cdns3_endpoint *priv_ep); 1356 void __cdns3_gadget_ep_set_halt(struct cdns3_endpoint *priv_ep); 1357 int __cdns3_gadget_ep_clear_halt(struct cdns3_endpoint *priv_ep); 1363 void cdns3_gadget_giveback(struct cdns3_endpoint *priv_ep, 1368 struct cdns3_endpoint *priv_ep); 1370 int cdns3_ep_config(struct cdns3_endpoint *priv_ep, boo [all...] |
/kernel/linux/linux-6.6/drivers/usb/cdns3/ |
H A D | cdns3-gadget.c | 76 static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep, 79 static int cdns3_ep_run_stream_transfer(struct cdns3_endpoint *priv_ep, 116 struct cdns3_endpoint *priv_ep) in cdns3_get_dma_pos() 120 dma_index = readl(&priv_dev->regs->ep_traddr) - priv_ep->trb_pool_dma; in cdns3_get_dma_pos() 187 dma_addr_t cdns3_trb_virt_to_dma(struct cdns3_endpoint *priv_ep, in cdns3_trb_virt_to_dma() argument 190 u32 offset = (char *)trb - (char *)priv_ep->trb_pool; in cdns3_trb_virt_to_dma() 192 return priv_ep->trb_pool_dma + offset; in cdns3_trb_virt_to_dma() 195 static void cdns3_free_trb_pool(struct cdns3_endpoint *priv_ep) in cdns3_free_trb_pool() argument 197 struct cdns3_device *priv_dev = priv_ep->cdns3_dev; in cdns3_free_trb_pool() 199 if (priv_ep in cdns3_free_trb_pool() 115 cdns3_get_dma_pos(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep) cdns3_get_dma_pos() argument 212 cdns3_allocate_trb_pool(struct cdns3_endpoint *priv_ep) cdns3_allocate_trb_pool() argument 262 cdns3_ep_stall_flush(struct cdns3_endpoint *priv_ep) cdns3_ep_stall_flush() argument 325 cdns3_ep_inc_enq(struct cdns3_endpoint *priv_ep) cdns3_ep_inc_enq() argument 335 cdns3_ep_inc_deq(struct cdns3_endpoint *priv_ep) cdns3_ep_inc_deq() argument 384 cdns3_start_all_request(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep) cdns3_start_all_request() argument 478 cdns3_wa2_descmiss_copy_data(struct cdns3_endpoint *priv_ep, struct usb_request *request) cdns3_wa2_descmiss_copy_data() argument 508 cdns3_wa2_gadget_giveback(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep, struct cdns3_request *priv_req) cdns3_wa2_gadget_giveback() argument 548 cdns3_wa2_gadget_ep_queue(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep, struct cdns3_request *priv_req) cdns3_wa2_gadget_ep_queue() argument 616 cdns3_wa2_remove_old_request(struct cdns3_endpoint *priv_ep) cdns3_wa2_remove_old_request() argument 646 cdns3_wa2_descmissing_packet(struct cdns3_endpoint *priv_ep) cdns3_wa2_descmissing_packet() argument 792 cdns3_gadget_giveback(struct cdns3_endpoint *priv_ep, struct cdns3_request *priv_req, int status) cdns3_gadget_giveback() argument 846 cdns3_wa1_restore_cycle_bit(struct cdns3_endpoint *priv_ep) cdns3_wa1_restore_cycle_bit() argument 895 struct cdns3_endpoint *priv_ep = priv_req->priv_ep; cdns3_prepare_aligned_request_buf() local 956 cdns3_wa1_update_guard(struct cdns3_endpoint *priv_ep, struct cdns3_trb *trb) cdns3_wa1_update_guard() argument 978 cdns3_wa1_tray_restore_cycle_bit(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep) cdns3_wa1_tray_restore_cycle_bit() argument 991 cdns3_ep_run_stream_transfer(struct cdns3_endpoint *priv_ep, struct usb_request *request) cdns3_ep_run_stream_transfer() argument 1096 cdns3_rearm_drdy_if_needed(struct cdns3_endpoint *priv_ep) cdns3_rearm_drdy_if_needed() argument 1116 cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep, struct usb_request *request) cdns3_ep_run_transfer() argument 1422 struct cdns3_endpoint *priv_ep; cdns3_set_hw_configuration() local 1484 cdns3_trb_handled(struct cdns3_endpoint *priv_ep, struct cdns3_request *priv_req) cdns3_trb_handled() argument 1547 cdns3_transfer_completed(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep) cdns3_transfer_completed() argument 1651 cdns3_rearm_transfer(struct cdns3_endpoint *priv_ep, u8 rearm) cdns3_rearm_transfer() argument 1671 cdns3_reprogram_tdl(struct cdns3_endpoint *priv_ep) cdns3_reprogram_tdl() argument 1692 cdns3_check_ep_interrupt_proceed(struct cdns3_endpoint *priv_ep) cdns3_check_ep_interrupt_proceed() argument 2057 cdns3_configure_dmult(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep) cdns3_configure_dmult() argument 2096 cdns3_ep_config(struct cdns3_endpoint *priv_ep, bool enable) cdns3_ep_config() argument 2215 cdns3_ep_dir_is_correct(struct usb_endpoint_descriptor *desc, struct cdns3_endpoint *priv_ep) cdns3_ep_dir_is_correct() argument 2227 struct cdns3_endpoint *priv_ep; cdns3_find_available_ep() local 2273 struct cdns3_endpoint *priv_ep; cdns3_gadget_match_ep() local 2312 struct cdns3_endpoint *priv_ep = ep_to_cdns3_ep(ep); cdns3_gadget_ep_alloc_request() local 2352 struct cdns3_endpoint *priv_ep; cdns3_gadget_ep_enable() local 2490 struct cdns3_endpoint *priv_ep; cdns3_gadget_ep_disable() local 2584 struct cdns3_endpoint *priv_ep = ep_to_cdns3_ep(ep); __cdns3_gadget_ep_queue() local 2639 struct cdns3_endpoint *priv_ep; cdns3_gadget_ep_queue() local 2684 struct cdns3_endpoint *priv_ep = ep_to_cdns3_ep(ep); cdns3_gadget_ep_dequeue() local 2760 __cdns3_gadget_ep_set_halt(struct cdns3_endpoint *priv_ep) __cdns3_gadget_ep_set_halt() argument 2781 __cdns3_gadget_ep_clear_halt(struct cdns3_endpoint *priv_ep) __cdns3_gadget_ep_clear_halt() argument 2833 struct cdns3_endpoint *priv_ep = ep_to_cdns3_ep(ep); cdns3_gadget_ep_set_halt() local 3034 struct cdns3_endpoint *priv_ep; cdns3_gadget_udc_stop() local 3077 struct cdns3_endpoint *priv_ep; cdns3_gadget_check_config() local 3152 struct cdns3_endpoint *priv_ep; cdns3_init_eps() local [all...] |
H A D | cdns3-ep0.c | 39 struct cdns3_endpoint *priv_ep = priv_dev->eps[0]; in cdns3_ep0_run_transfer() local 41 priv_ep->trb_pool[0].buffer = cpu_to_le32(TRB_BUFFER(dma_addr)); in cdns3_ep0_run_transfer() 42 priv_ep->trb_pool[0].length = cpu_to_le32(TRB_LEN(length)); in cdns3_ep0_run_transfer() 45 priv_ep->trb_pool[0].control = cpu_to_le32(TRB_CYCLE | TRB_TYPE(TRB_NORMAL)); in cdns3_ep0_run_transfer() 46 priv_ep->trb_pool[1].buffer = cpu_to_le32(TRB_BUFFER(dma_addr)); in cdns3_ep0_run_transfer() 47 priv_ep->trb_pool[1].length = cpu_to_le32(TRB_LEN(0)); in cdns3_ep0_run_transfer() 48 priv_ep->trb_pool[1].control = cpu_to_le32(TRB_CYCLE | TRB_IOC | in cdns3_ep0_run_transfer() 51 priv_ep->trb_pool[0].control = cpu_to_le32(TRB_CYCLE | TRB_IOC | in cdns3_ep0_run_transfer() 53 priv_ep->trb_pool[1].control = 0; in cdns3_ep0_run_transfer() 56 trace_cdns3_prepare_trb(priv_ep, priv_e in cdns3_ep0_run_transfer() 107 struct cdns3_endpoint *priv_ep = priv_dev->eps[0]; cdns3_ep0_complete_setup() local 223 struct cdns3_endpoint *priv_ep; cdns3_req_ep0_get_status() local 360 struct cdns3_endpoint *priv_ep; cdns3_ep0_feature_handle_endpoint() local 534 struct cdns3_endpoint *priv_ep = priv_dev->eps[0]; cdns3_ep0_setup_phase() local 571 struct cdns3_endpoint *priv_ep = priv_dev->eps[0]; cdns3_transfer_completed() local 691 struct cdns3_endpoint *priv_ep = ep_to_cdns3_ep(ep); cdns3_gadget_ep0_queue() local 783 struct cdns3_endpoint *priv_ep = ep_to_cdns3_ep(ep); cdns3_gadget_ep_set_wedge() local 813 struct cdns3_endpoint *priv_ep; cdns3_ep0_config() local 875 cdns3_init_ep0(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep) cdns3_init_ep0() argument [all...] |
H A D | cdns3-trace.h | 118 TP_PROTO(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep), 119 TP_ARGS(priv_dev, priv_ep), 121 __string(ep_name, priv_ep->name) 128 __assign_str(ep_name, priv_ep->name); 131 __entry->ep_last_sid = priv_ep->last_stream_id; 132 __entry->use_streams = priv_ep->use_streams; 144 TP_PROTO(struct cdns3_device *priv_dev, struct cdns3_endpoint *priv_ep), 145 TP_ARGS(priv_dev, priv_ep) 202 __string(name, req->priv_ep->name) 217 __assign_str(name, req->priv_ep [all...] |
H A D | cdns3-debug.h | 110 static inline char *cdns3_dbg_ring(struct cdns3_endpoint *priv_ep, char *str) in cdns3_dbg_ring() argument 112 dma_addr_t addr = priv_ep->trb_pool_dma; in cdns3_dbg_ring() 118 trb_per_sector = GET_TRBS_PER_SEGMENT(priv_ep->type); in cdns3_dbg_ring() 120 trb = &priv_ep->trb_pool[priv_ep->dequeue]; in cdns3_dbg_ring() 121 ret += sprintf(str + ret, "\n\t\tRing contents for %s:", priv_ep->name); in cdns3_dbg_ring() 125 priv_ep->dequeue, trb, in cdns3_dbg_ring() 126 (unsigned long long)cdns3_trb_virt_to_dma(priv_ep, trb)); in cdns3_dbg_ring() 128 trb = &priv_ep->trb_pool[priv_ep in cdns3_dbg_ring() [all...] |
H A D | cdns3-gadget.h | 1221 * @priv_ep: extended representation of usb_ep object 1234 struct cdns3_endpoint *priv_ep; member 1345 dma_addr_t cdns3_trb_virt_to_dma(struct cdns3_endpoint *priv_ep, 1354 void cdns3_rearm_transfer(struct cdns3_endpoint *priv_ep, u8 rearm); 1355 int cdns3_allocate_trb_pool(struct cdns3_endpoint *priv_ep); 1359 void __cdns3_gadget_ep_set_halt(struct cdns3_endpoint *priv_ep); 1360 int __cdns3_gadget_ep_clear_halt(struct cdns3_endpoint *priv_ep); 1366 void cdns3_gadget_giveback(struct cdns3_endpoint *priv_ep, 1371 struct cdns3_endpoint *priv_ep); 1373 int cdns3_ep_config(struct cdns3_endpoint *priv_ep, boo [all...] |