From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Fri, 26 Feb 2016 09:48:40 -0700 Subject: [U-Boot] [PATCH 3/5] usb: ehci: Implement V2P mapping In-Reply-To: <1453860843-5835-3-git-send-email-marex@denx.de> References: <1453860843-5835-1-git-send-email-marex@denx.de> <1453860843-5835-3-git-send-email-marex@denx.de> Message-ID: <56D081E8.1010600@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 01/26/2016 07:14 PM, Marek Vasut wrote: > Certain processor architectures, like MIPS, require that the USB > structures and transfer buffers are passed with their PA to the > USB controller. If VA is passed, the USB will not work. Add the > necessary virt_to_phys() calls into the USB EHCI code to make it > work. FYI, this causes some cast size warnings, e.g.: > +make O=/home/swarren/shared/git_wa/tegra-uboot-flasher/u-boot/build-p2371-2180 -s p2371-2180_defconfig > +make O=/home/swarren/shared/git_wa/tegra-uboot-flasher/u-boot/build-p2371-2180 -s -j8 > In file included from ../arch/arm/include/asm/byteorder.h:29:0, > from ../include/compiler.h:125, > from ../include/image.h:19, > from ../include/common.h:88, > from ../drivers/usb/host/ehci-hcd.c:10: > ../drivers/usb/host/ehci-hcd.c: In function ?ehci_td_buffer?: > ../drivers/usb/host/ehci-hcd.c:248:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] > td->qt_buffer[idx] = cpu_to_hc32(virt_to_phys((void *)addr)); > ^ > ../include/linux/byteorder/little_endian.h:34:51: note: in definition of macro ?__cpu_to_le32? > #define __cpu_to_le32(x) ((__force __le32)(__u32)(x)) > ^ > ../drivers/usb/host/ehci-hcd.c:248:24: note: in expansion of macro ?cpu_to_hc32? > td->qt_buffer[idx] = cpu_to_hc32(virt_to_phys((void *)addr)); > ^ (This is a 64-bit ARM platform, so I had CROSS_COMPILE=aarch64-linux-gnu-)