USB: ci13xxx_udc: Set QMULT for ISO endpoints

Currently not setting QMULT for ISO endpoints. Set this
value appropriately  to indicate to the USB controller the
number of transactions to be done in microframe.

Change-Id: If80c003464024f8dfebcda13fefb33744618d043
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>

b/6968587
This commit is contained in:
Ajay Dudani
2012-09-13 20:05:25 +05:30
committed by Iliyan Malchev
parent 64e994d018
commit d4e24fdbb1
2 changed files with 9 additions and 4 deletions

View File

@@ -2561,6 +2561,7 @@ static int ep_enable(struct usb_ep *ep,
struct ci13xxx_ep *mEp = container_of(ep, struct ci13xxx_ep, ep);
int retval = 0;
unsigned long flags;
unsigned mult = 0;
trace("%p, %p", ep, desc);
@@ -2586,12 +2587,15 @@ static int ep_enable(struct usb_ep *ep,
mEp->qh.ptr->cap = 0;
if (mEp->type == USB_ENDPOINT_XFER_CONTROL)
if (mEp->type == USB_ENDPOINT_XFER_CONTROL) {
mEp->qh.ptr->cap |= QH_IOS;
else if (mEp->type == USB_ENDPOINT_XFER_ISOC)
} else if (mEp->type == USB_ENDPOINT_XFER_ISOC) {
mEp->qh.ptr->cap &= ~QH_MULT;
else
mEp->qh.ptr->cap &= ~QH_ZLT;
mult = ((mEp->ep.maxpacket >> QH_MULT_SHIFT) + 1) & 0x03;
mEp->qh.ptr->cap |= (mult << ffs_nr(QH_MULT));
} else {
mEp->qh.ptr->cap |= QH_ZLT;
}
mEp->qh.ptr->cap |=
(mEp->ep.maxpacket << ffs_nr(QH_MAX_PKT)) & QH_MAX_PKT;

View File

@@ -67,6 +67,7 @@ struct ci13xxx_qh {
#define QH_MAX_PKT (0x07FFUL << 16)
#define QH_ZLT BIT(29)
#define QH_MULT (0x0003UL << 30)
#define QH_MULT_SHIFT 11
/* 1 */
u32 curr;
/* 2 - 8 */