]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
usb: ehci: Be explicit about the BE IO accessors
authorMarek Vasut <marex@denx.de>
Sat, 23 Jan 2016 20:04:46 +0000 (21:04 +0100)
committerMarek Vasut <marex@denx.de>
Wed, 24 Feb 2016 18:12:32 +0000 (19:12 +0100)
Add explicit cpu_to_be32()/be32_to_cpu() conversion to BE EHCI I/O
accessors to align them with their LE counterpart. No functional
change.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
drivers/usb/host/ehci.h

index b41c04a8b30a182a2370c066aca32e4e2d3280a3..826b3fe580834ecc505cf74475e717cd90571004 100644 (file)
@@ -102,8 +102,9 @@ struct usb_linux_config_descriptor {
 } __attribute__ ((packed));
 
 #if defined CONFIG_EHCI_DESC_BIG_ENDIAN
-#define        ehci_readl(x)           (*((volatile u32 *)(x)))
-#define ehci_writel(a, b)      (*((volatile u32 *)(a)) = ((volatile u32)b))
+#define ehci_readl(x)          cpu_to_be32((*((volatile u32 *)(x))))
+#define ehci_writel(a, b)      (*((volatile u32 *)(a)) = \
+                                       cpu_to_be32(((volatile u32)b)))
 #else
 #define ehci_readl(x)          cpu_to_le32((*((volatile u32 *)(x))))
 #define ehci_writel(a, b)      (*((volatile u32 *)(a)) = \