[PATCH] support for au1xxx on-chip usb in BE mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's not pretty... but here it is anyway... :-)


Index: drivers/usb/host/Kconfig
===================================================================
RCS file: /home/cvs/linux/drivers/usb/host/Kconfig,v
retrieving revision 1.8
diff -u -u -r1.8 Kconfig
--- drivers/usb/host/Kconfig	15 Nov 2004 11:49:33 -0000	1.8
+++ drivers/usb/host/Kconfig	22 Nov 2004 20:49:20 -0000
@@ -16,6 +16,10 @@
 	default y if PXA27x
 	default PCI
 
+config USB_OHCI_BIG_ENDIAN
+	boolean
+	default y if SOC_AU1X00 && !CPU_LITTLE_ENDIAN
+
 #
 # USB Host Controller Drivers
 #
Index: drivers/usb/host/ohci-hcd.c
===================================================================
RCS file: /home/cvs/linux/drivers/usb/host/ohci-hcd.c,v
retrieving revision 1.40
diff -u -u -r1.40 ohci-hcd.c
--- drivers/usb/host/ohci-hcd.c	15 Nov 2004 11:49:33 -0000	1.40
+++ drivers/usb/host/ohci-hcd.c	22 Nov 2004 20:49:21 -0000
@@ -881,7 +881,7 @@
 MODULE_LICENSE ("GPL");
 
 #ifdef CONFIG_PCI
-#include "ohci-pci.c"
+//#include "ohci-pci.c"
 #endif
 
 #ifdef CONFIG_SA1111
Index: drivers/usb/host/ohci.h
===================================================================
RCS file: /home/cvs/linux/drivers/usb/host/ohci.h,v
retrieving revision 1.21
diff -u -u -r1.21 ohci.h
--- drivers/usb/host/ohci.h	15 Nov 2004 11:49:33 -0000	1.21
+++ drivers/usb/host/ohci.h	22 Nov 2004 20:49:21 -0000
@@ -458,6 +458,11 @@
 #define writel_be(val, addr)	out_be32((__force unsigned *)addr, val)
 #endif
 
+#if defined(CONFIG_SOC_AU1X00)
+#define readl_be(addr)          __raw_readl((__force u32 *)(addr))
+#define writel_be(val, addr)    __raw_writel(val, (__force u32 *)(addr))
+#endif
+
 static inline unsigned int ohci_readl (const struct ohci_hcd *ohci,
 							__hc32 __iomem * regs)
 {
@@ -467,8 +472,11 @@
 static inline void ohci_writel (const struct ohci_hcd *ohci,
 				const unsigned int val, __hc32 __iomem *regs)
 {
-	big_endian(ohci) ? writel_be (val, regs) :
-			   writel (val, (__force u32 *)regs);
+	if (big_endian(ohci)) {
+		writel_be (val, regs);
+	} else {
+		writel (val, (__force u32 *)regs);
+	}
 }
 
 #else	/* !CONFIG_USB_OHCI_BIG_ENDIAN */


-- 
Herbert Valerio Riedel <hvr@xxxxxxxxxxxxxxxxx>
Research Group for Industrial Software @ Vienna University of Technology



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux