summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2016-01-23 21:04:46 +0100
committerMarek Vasut <marex@denx.de>2016-02-24 19:12:32 +0100
commite88a1b75d56b03de9db6cbf2acf8ecd20d135a11 (patch)
tree331bfa5b87ab219154565353c686fd7909972bdb /drivers/usb
parent7ab0d35543004b6f9dca990625fa3fa21b7bc9d6 (diff)
downloadtalos-obmc-uboot-e88a1b75d56b03de9db6cbf2acf8ecd20d135a11.tar.gz
talos-obmc-uboot-e88a1b75d56b03de9db6cbf2acf8ecd20d135a11.zip
usb: ehci: Be explicit about the BE IO accessors
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ehci.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index b41c04a8b3..826b3fe580 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -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)) = \
OpenPOWER on IntegriCloud