From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 26 Feb 2016 19:44:23 +0100 Subject: [U-Boot] [PATCH 3/5] usb: ehci: Implement V2P mapping In-Reply-To: <56D09677.5090408@wwwdotorg.org> References: <1453860843-5835-1-git-send-email-marex@denx.de> <1453860843-5835-3-git-send-email-marex@denx.de> <56D081E8.1010600@wwwdotorg.org> <56D08370.60808@denx.de> <56D09677.5090408@wwwdotorg.org> Message-ID: <56D09D07.7090306@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 02/26/2016 07:16 PM, Stephen Warren wrote: Hi! [...] >> Tom reported this to me too, sorry :-( >> >> Do you have an idea how to fix this too? I am now installing arm64 >> toolchain. > > I haven't looked at it yet. I've seen similar problems in the bast > handled by casting between integer types before casting to pointers > e.g. something like the following guess: > > uint32_t pa; void *p = (void *)(uintptr_t)pa; I just tried this, it should do the trick. Can you give it a spin ? diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 8f259be..0113c6c 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -237,7 +237,7 @@ static int ehci_shutdown(struct ehci_ctrl *ctrl) static int ehci_td_buffer(struct qTD *td, void *buf, size_t sz) { uint32_t delta, next; - uint32_t addr = (unsigned long)buf; + unsigned long addr = (unsigned long)buf; int idx; if (addr != ALIGN(addr, ARCH_DMA_MINALIGN)) I am a bit worried about the u32 values all around the place. If the buffer would be above 4GiB, we might have a problem. >> Do you know about some nice arm64 board with USB for testing? > > There's always the Jetson TX1; it is the p2371-2180 that I was > building above: > > http://www.nvidia.com/object/jetson-tx1-dev-kit.html If you have one you don't need ... ;-) -- Best regards, Marek Vasut