]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb, ohci: fix ohci swap register access
authorHeiko Schocher <hs@denx.de>
Tue, 16 Jul 2019 08:49:04 +0000 (10:49 +0200)
committerMarek Vasut <marex@denx.de>
Thu, 8 Aug 2019 09:35:02 +0000 (11:35 +0200)
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>
drivers/usb/host/ohci.h

index f9f02cb09c5f379cfdf33d311e52d58f17ea27b5..9b264bd92ab9e11c8be04700153bdfdb7cd23cc0 100644 (file)
@@ -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)