summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-02-05 09:51:50 -0500
committerTom Rini <trini@konsulko.com>2018-02-05 12:09:43 -0500
commita4d403290e32f95cfd254f2778e08f655ddd5a49 (patch)
tree0e5c4f60f0f88320d41bc86460050be71295e99a
parent7e13f1d08fa85af97d11d9d13d506efdabd3db4d (diff)
usb: dwc2: make casts of ep->dma_buf consistent
In most places in the code we cast this to an unsigned long, but in one place we cast to an unsigned int. For consistency and to fix a warning on 64bit targets, always cast this to unsigned long. For the long term we should however change the declaration of dma_buf. Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Lukasz Majewski <lukma@denx.de> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r--drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
index b6164afa92..57dbbd5ebf 100644
--- a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
+++ b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
@@ -114,7 +114,7 @@ static int setdma_rx(struct dwc2_ep *ep, struct dwc2_request *req)
(unsigned long) ep->dma_buf +
ROUND(ep->len, CONFIG_SYS_CACHELINE_SIZE));
- writel((unsigned int) ep->dma_buf, &reg->out_endp[ep_num].doepdma);
+ writel((unsigned long) ep->dma_buf, &reg->out_endp[ep_num].doepdma);
writel(DOEPT_SIZ_PKT_CNT(pktcnt) | DOEPT_SIZ_XFER_SIZE(length),
&reg->out_endp[ep_num].doeptsiz);
writel(DEPCTL_EPENA|DEPCTL_CNAK|ctrl, &reg->out_endp[ep_num].doepctl);