1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-25 22:36:46 +02:00
openwrt-xburst/target/linux/brcm63xx/patches-2.6.27/007-usb_ohci_support.patch
florian aedeeb1874 Flatten brcm63xx patches, should make our life easier to patch files now ;)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13368 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-11-26 18:41:01 +00:00

57 lines
2.2 KiB
Diff

From f7416412febd7efc1d33c7506c81265719368667 Mon Sep 17 00:00:00 2001
From: Maxime Bizon <mbizon@freebox.fr>
Date: Mon, 21 Jul 2008 14:58:19 +0200
Subject: [PATCH] [MIPS] BCM63XX: Add USB OHCI support.
Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
arch/mips/bcm63xx/Kconfig | 6 +
arch/mips/bcm63xx/Makefile | 1 +
arch/mips/bcm63xx/dev-usb-ohci.c | 50 ++++++
drivers/usb/host/ohci-bcm63xx.c | 159 ++++++++++++++++++++
drivers/usb/host/ohci-hcd.c | 5 +
drivers/usb/host/ohci.h | 7 +-
.../asm-mips/mach-bcm63xx/bcm63xx_dev_usb_ohci.h | 6 +
7 files changed, 233 insertions(+), 1 deletions(-)
create mode 100644 arch/mips/bcm63xx/dev-usb-ohci.c
create mode 100644 drivers/usb/host/ohci-bcm63xx.c
create mode 100644 include/asm-mips/mach-bcm63xx/bcm63xx_dev_usb_ohci.h
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1050,6 +1050,11 @@ MODULE_LICENSE ("GPL");
#define PLATFORM_DRIVER usb_hcd_pnx4008_driver
#endif
+#ifdef CONFIG_BCM63XX
+#include "ohci-bcm63xx.c"
+#define PLATFORM_DRIVER ohci_hcd_bcm63xx_driver
+#endif
+
#if defined(CONFIG_CPU_SUBTYPE_SH7720) || \
defined(CONFIG_CPU_SUBTYPE_SH7721) || \
defined(CONFIG_CPU_SUBTYPE_SH7763)
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -549,6 +549,11 @@ static inline struct usb_hcd *ohci_to_hc
#define writel_be(val, addr) out_be32((__force unsigned *)addr, val)
#endif
+#if defined(CONFIG_MIPS) && defined(CONFIG_BCM63XX)
+#define readl_be(addr) __raw_readl((__force unsigned *)addr)
+#define writel_be(val, addr) __raw_writel(val, (__force unsigned *)addr)
+#endif
+
static inline unsigned int _ohci_readl (const struct ohci_hcd *ohci,
__hc32 __iomem * regs)
{
@@ -654,7 +659,7 @@ static inline u32 hc32_to_cpup (const st
* some big-endian SOC implementations. Same thing happens with PSW access.
*/
-#ifdef CONFIG_PPC_MPC52xx
+#if defined(CONFIG_PPC_MPC52xx) || defined(CONFIG_BCM63XX)
#define big_endian_frame_no_quirk(ohci) (ohci->flags & OHCI_QUIRK_FRAME_NO)
#else
#define big_endian_frame_no_quirk(ohci) 0