]> git.ipfire.org Git - people/ms/u-boot.git/commit
drivers: USB: OHCI: allow compilation for 64-bit targets
authorAndre Przywara <andre.przywara@arm.com>
Fri, 21 Oct 2016 01:24:29 +0000 (02:24 +0100)
committerMarek Vasut <marex@denx.de>
Sat, 29 Oct 2016 17:45:40 +0000 (19:45 +0200)
commit57faca19a82fc9b43a227824c30aeb76a43d1957
treed8db13a5988005dd9922cbf6e6c85b7b594d3419
parent9eea45f532301376af4498a131246ff1e130a63a
drivers: USB: OHCI: allow compilation for 64-bit targets

OHCI has a known limitation of allowing only 32-bit DMA buffer
addresses, so we have a lot of u32 variables around, which are assigned
to pointers and vice versa. This obviously creates issues with 64-bit
systems, so the compiler complains here and there.
To allow compilation for 64-bit boards which use only memory below 4GB
anyway (and to avoid more invasive fixes), adjust some casts and types
and assume that the EDs and TDs are all located in the lower 4GB.
This fixes compilation of the OHCI driver for the Pine64.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-sunxi.c
drivers/usb/host/ohci.h