summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-06-19 08:08:57 -0400
committerTom Rini <trini@konsulko.com>2017-06-19 08:08:57 -0400
commiteab76dfd5b6a1930351845bfdbb03cc742f69e98 (patch)
treee24d70b590e62d2cff7cf117ecf53df1c8b92624 /drivers/usb/host/ehci.h
parentebba9d1daf7745483c8078bdae18875a84df5bc1 (diff)
parentb9203429a04402bd03c48fa87670686ef7e7891d (diff)
Merge git://git.denx.de/u-boot-usb
Diffstat (limited to 'drivers/usb/host/ehci.h')
-rw-r--r--drivers/usb/host/ehci.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 734d7f03627..2ab830df515 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -102,13 +102,11 @@ struct usb_linux_config_descriptor {
} __attribute__ ((packed));
#if defined CONFIG_EHCI_DESC_BIG_ENDIAN
-#define ehci_readl(x) cpu_to_be32((*((volatile u32 *)(x))))
-#define ehci_writel(a, b) (*((volatile u32 *)(a)) = \
- cpu_to_be32(((volatile u32)b)))
+#define ehci_readl(x) cpu_to_be32(readl(x))
+#define ehci_writel(a, b) writel(cpu_to_be32(b), a)
#else
-#define ehci_readl(x) cpu_to_le32((*((volatile u32 *)(x))))
-#define ehci_writel(a, b) (*((volatile u32 *)(a)) = \
- cpu_to_le32(((volatile u32)b)))
+#define ehci_readl(x) cpu_to_le32(readl(x))
+#define ehci_writel(a, b) writel(cpu_to_le32(b), a)
#endif
#if defined CONFIG_EHCI_MMIO_BIG_ENDIAN