1
0
Fork 0

MLK-23677-5 usb: chipidea: udc: use tracepoint

Use tracepoint for adding td and td completion.

Reviewed-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Peter Chen 2020-03-25 15:53:15 +08:00
parent d74f8108dc
commit 809e95fe71
No known key found for this signature in database
GPG Key ID: 4859298150D671BB
1 changed files with 8 additions and 2 deletions

View File

@ -26,6 +26,7 @@
#include "bits.h"
#include "otg.h"
#include "otg_fsm.h"
#include "trace.h"
/* control endpoint description */
static const struct usb_endpoint_descriptor
@ -554,14 +555,18 @@ static int _hardware_enqueue(struct ci_hw_ep *hwep, struct ci_hw_req *hwreq)
if (ret)
return ret;
firstnode = list_first_entry(&hwreq->tds, struct td_node, td);
lastnode = list_entry(hwreq->tds.prev,
struct td_node, td);
lastnode->ptr->next = cpu_to_le32(TD_TERMINATE);
if (!hwreq->req.no_interrupt)
lastnode->ptr->token |= cpu_to_le32(TD_IOC);
list_for_each_entry_safe(firstnode, lastnode, &hwreq->tds, td)
trace_ci_prepare_td(hwep, hwreq, firstnode);
firstnode = list_first_entry(&hwreq->tds, struct td_node, td);
wmb();
hwreq->req.actual = 0;
@ -656,6 +661,7 @@ static int _hardware_dequeue(struct ci_hw_ep *hwep, struct ci_hw_req *hwreq)
list_for_each_entry_safe(node, tmpnode, &hwreq->tds, td) {
tmptoken = le32_to_cpu(node->ptr->token);
trace_ci_complete_td(hwep, hwreq, node);
if ((TD_STATUS_ACTIVE & tmptoken) != 0) {
int n = hw_ep_bit(hwep->num, hwep->dir);