]> git.sur5r.net Git - u-boot/commitdiff
usb: dwc2: make casts of ep->dma_buf consistent
authorTom Rini <trini@konsulko.com>
Mon, 5 Feb 2018 14:51:50 +0000 (09:51 -0500)
committerTom Rini <trini@konsulko.com>
Mon, 5 Feb 2018 17:09:43 +0000 (12:09 -0500)
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>
drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c

index b6164afa9245a6c78775c65a7b90e4a76bf5000d..57dbbd5ebfa18343082fa37c79e832cdd0de1bcd 100644 (file)
@@ -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);