From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/5] usb: ehci: Implement V2P mapping
Date: Fri, 26 Feb 2016 19:44:23 +0100 [thread overview]
Message-ID: <56D09D07.7090306@denx.de> (raw)
In-Reply-To: <56D09677.5090408@wwwdotorg.org>
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
next prev parent reply other threads:[~2016-02-26 18:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-27 2:13 [U-Boot] [PATCH 1/5] mips: cache: Bulletproof the code against cornercases Marek Vasut
2016-01-27 2:14 ` [U-Boot] [PATCH 2/5] usb: ehci: Use map_physmem in ehci-generic Marek Vasut
2016-01-27 14:21 ` Alexey Brodkin
2016-01-27 16:14 ` Marek Vasut
2016-01-27 2:14 ` [U-Boot] [PATCH 3/5] usb: ehci: Implement V2P mapping Marek Vasut
2016-02-26 16:48 ` Stephen Warren
2016-02-26 16:55 ` Marek Vasut
2016-02-26 18:16 ` Stephen Warren
2016-02-26 18:44 ` Marek Vasut [this message]
2016-02-26 19:12 ` Stephen Warren
2016-02-26 19:16 ` Marek Vasut
2016-01-27 2:14 ` [U-Boot] [PATCH 4/5] usb: ehci: Clear USBMODE_BE on LE MMIO Marek Vasut
2016-01-27 2:14 ` [U-Boot] [PATCH 5/5] usb: ehci: Be explicit about the BE IO accessors Marek Vasut
2016-01-27 14:56 ` [U-Boot] [PATCH 1/5] mips: cache: Bulletproof the code against cornercases Daniel Schwierzeck
2016-01-27 16:15 ` Marek Vasut
2016-02-01 21:29 ` Daniel Schwierzeck
2016-02-01 21:31 ` Marek Vasut
2016-02-01 21:40 ` Daniel Schwierzeck
2016-02-01 21:45 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56D09D07.7090306@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox