aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/host/ohci.h
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2019-07-16 10:49:04 +0200
committerMarek Vasut <marex@denx.de>2019-08-08 11:35:02 +0200
commita5a7486e62b0aa4afa1fe1a3b30f7dd682eb1ff8 (patch)
tree1a4716902c6d9d9f6c4a209a439864ece7d848f6 /drivers/usb/host/ohci.h
parentb005d7d5f96539450e50450f12491913e135c2a9 (diff)
downloadu-boot-a5a7486e62b0aa4afa1fe1a3b30f7dd682eb1ff8.zip
u-boot-a5a7486e62b0aa4afa1fe1a3b30f7dd682eb1ff8.tar.gz
u-boot-a5a7486e62b0aa4afa1fe1a3b30f7dd682eb1ff8.tar.bz2
usb, ohci: fix ohci swap register access
commit 57faca19a82f ("drivers: USB: OHCI: allow compilation for 64-bit targets") broke ohci support for the mpc85xx based socrates board, as it removed volatile keyword from ohci_readl/writel. Fix this so usb works again on socrates board. Signed-off-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers/usb/host/ohci.h')
-rw-r--r--drivers/usb/host/ohci.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index f9f02cb..9b264bd 100644
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -14,8 +14,8 @@
#include <asm/io.h>
#ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS
-# define ohci_readl(a) __swap_32(readl(a))
-# define ohci_writel(v, a) writel(__swap_32(v), a)
+# define ohci_readl(a) __swap_32(in_be32((u32 *)a))
+# define ohci_writel(a, b) out_be32((u32 *)b, __swap_32(a))
#else
# define ohci_readl(a) readl(a)
# define ohci_writel(v, a) writel(v, a)