[U-Boot,v1,2/5] usb, ohci: fix ohci swap register access
diff mbox series

Message ID 20190716084907.1568340-3-hs@denx.de
State Accepted
Commit a5a7486e62b0aa4afa1fe1a3b30f7dd682eb1ff8
Delegated to: Marek Vasut
Headers show
Series
  • usb, ohci-hcd: add usb ohci pci DM driver
Related show

Commit Message

Heiko Schocher July 16, 2019, 8:49 a.m. UTC
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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index f9f02cb09c..9b264bd92a 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)