Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f194d742 authored by Pratham Pratap's avatar Pratham Pratap
Browse files

usb: dwc3-msm: Rectify 64 bit dma address programming for GSI



This patch rectifies 64 bit dma address programming for GSI.

Change-Id: Ib90241dab53e0888a9db7bff7ae2ac123009151b
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent 6dd62948
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1236,7 +1236,7 @@ static int gsi_startxfer_for_ep(struct usb_ep *ep, struct usb_gsi_request *req)
	memset(&params, 0, sizeof(params));
	params.param0 = GSI_TRB_ADDR_BIT_53_MASK | GSI_TRB_ADDR_BIT_55_MASK;
	params.param0 |= upper_32_bits(dwc3_trb_dma_offset(dep,
						&dep->trb_pool[0]) & 0xffff);
						&dep->trb_pool[0])) & 0xffff;
	params.param0 |= (req->ep_intr_num << 16);
	params.param1 = lower_32_bits(dwc3_trb_dma_offset(dep,
						&dep->trb_pool[0]));
@@ -1484,7 +1484,7 @@ static int gsi_prepare_trbs(struct usb_ep *ep, struct usb_gsi_request *req)

		/* Set up the Link TRB at the end */
		trb->bpl = lower_32_bits(trb0_dma);
		trb->bph = upper_32_bits(trb0_dma & 0xffff);
		trb->bph = upper_32_bits(trb0_dma) & 0xffff;
		trb->bph |= (1 << 23) | (1 << 21) | (req->ep_intr_num << 16);
		trb->ctrl = DWC3_TRBCTL_LINK_TRB | DWC3_TRB_CTRL_HWO;
	} else { /* OUT direction */
@@ -1506,7 +1506,7 @@ static int gsi_prepare_trbs(struct usb_ep *ep, struct usb_gsi_request *req)

		/* Set up the Link TRB at the end */
		trb->bpl = lower_32_bits(trb0_dma);
		trb->bph = upper_32_bits(trb0_dma & 0xffff);
		trb->bph = upper_32_bits(trb0_dma) & 0xffff;
		trb->bph |= (1 << 23) | (1 << 21) | (req->ep_intr_num << 16);
		trb->ctrl = DWC3_TRBCTL_LINK_TRB | DWC3_TRB_CTRL_HWO;
	}