summaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/patches-2.6.30/0002-rsdk-drivers-nonewfiles.patch
diff options
context:
space:
mode:
authorRoman Yeryomin <roman@advem.lv>2013-09-10 16:11:21 +0300
committerRoman Yeryomin <roman@advem.lv>2013-09-10 16:11:21 +0300
commit110b6198a291040b71f0047cf39919000b5c4f6e (patch)
tree73d0d735a689b507fec1fec998107a1300405474 /target/linux/realtek/patches-2.6.30/0002-rsdk-drivers-nonewfiles.patch
parent47d58877f8e393b942d54ab3acd8fd86e8923ad6 (diff)
Use usb driver from Realtek's backfire 1.1
Signed-off-by: Roman Yeryomin <roman@advem.lv>
Diffstat (limited to 'target/linux/realtek/patches-2.6.30/0002-rsdk-drivers-nonewfiles.patch')
-rw-r--r--target/linux/realtek/patches-2.6.30/0002-rsdk-drivers-nonewfiles.patch1336
1 files changed, 0 insertions, 1336 deletions
diff --git a/target/linux/realtek/patches-2.6.30/0002-rsdk-drivers-nonewfiles.patch b/target/linux/realtek/patches-2.6.30/0002-rsdk-drivers-nonewfiles.patch
index a04cbfc2f..3c0f44cf4 100644
--- a/target/linux/realtek/patches-2.6.30/0002-rsdk-drivers-nonewfiles.patch
+++ b/target/linux/realtek/patches-2.6.30/0002-rsdk-drivers-nonewfiles.patch
@@ -6156,1339 +6156,3 @@
obj-$(CONFIG_USB_RSPI) += rspiusb/
obj-$(CONFIG_INPUT_MIMIO) += mimio/
obj-$(CONFIG_TRANZPORT) += frontier/
---- linux-2.6.30.9/drivers/usb/c67x00/c67x00-hcd.h 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/c67x00/c67x00-hcd.h 2013-05-02 01:47:56.720226816 +0300
-@@ -28,7 +28,13 @@
- #include <linux/spinlock.h>
- #include <linux/list.h>
- #include <linux/usb.h>
-+
-+#if defined(CONFIG_USB_UWIFI_HOST)
-+#include "../core_uWiFi/hcd.h"
-+#else
- #include "../core/hcd.h"
-+#endif
-+
- #include "c67x00.h"
-
- /*
---- linux-2.6.30.9/drivers/usb/core/devio.c 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/core/devio.c 2013-05-02 01:47:56.726226815 +0300
-@@ -476,6 +476,9 @@ static int releaseintf(struct dev_state
- else if (test_and_clear_bit(ifnum, &ps->ifclaimed)) {
- usb_driver_release_interface(&usbfs_driver, intf);
- err = 0;
-+ #if defined(CONFIG_RTL_8198) || defined(CONFIG_RTL_819XD)
-+ mdelay(100);
-+ #endif
- }
- return err;
- }
---- linux-2.6.30.9/drivers/usb/core/hcd.c 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/core/hcd.c 2013-05-02 01:47:56.728226815 +0300
-@@ -82,7 +82,7 @@
- /*-------------------------------------------------------------------------*/
-
- /* Keep track of which host controller drivers are loaded */
--unsigned long usb_hcds_loaded;
-+unsigned long usb_hcds_loaded=0;
- EXPORT_SYMBOL_GPL(usb_hcds_loaded);
-
- /* host controllers we manage */
-@@ -878,7 +878,7 @@ static void usb_deregister_bus (struct u
- * to register the usb device. It also assigns the root hub's USB address
- * (always 1).
- */
--static int register_root_hub(struct usb_hcd *hcd)
-+int register_root_hub(struct usb_hcd *hcd)
- {
- struct device *parent_dev = hcd->self.controller;
- struct usb_device *usb_dev = hcd->self.root_hub;
-@@ -923,6 +923,8 @@ static int register_root_hub(struct usb_
- return retval;
- }
-
-+EXPORT_SYMBOL(register_root_hub);
-+
-
- /*-------------------------------------------------------------------------*/
-
---- linux-2.6.30.9/drivers/usb/core/hub.c 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/core/hub.c 2013-05-02 01:47:56.731226815 +0300
-@@ -30,6 +30,13 @@
- #include "hcd.h"
- #include "hub.h"
-
-+//#include "rtl865xc_asicregs.h"
-+
-+#define REG32(reg) (*(volatile unsigned int *)((unsigned int)reg))
-+#define PABCD_DIR 0xb8003508
-+#define PABCD_DAT 0xb800350C
-+#define USB_LED_OFFSET 19
-+
- /* if we are in debug mode, always announce new devices */
- #ifdef DEBUG
- #ifndef CONFIG_USB_ANNOUNCE_NEW_DEVICES
-@@ -1432,8 +1439,12 @@ void usb_disconnect(struct usb_device **
- * this quiesces everyting except pending urbs.
- */
- usb_set_device_state(udev, USB_STATE_NOTATTACHED);
-+ //RTL_W32(AUTOCFG_LED_DATABASE, (RTL_R32(AUTOCFG_LED_DATABASE) | (1 << EN_USB_LED)));
-+ REG32(PABCD_DIR) = REG32(PABCD_DIR) |(0x1<<USB_LED_OFFSET);
-+ REG32(PABCD_DAT) = REG32(PABCD_DAT) | (0x1<<USB_LED_OFFSET);
- dev_info (&udev->dev, "USB disconnect, address %d\n", udev->devnum);
-
-+
- usb_lock_device(udev);
-
- /* Free up all the children before we remove this device */
-@@ -1775,14 +1786,21 @@ static unsigned hub_is_wusb(struct usb_h
- return hcd->wireless;
- }
-
--
-+#ifdef CONFIG_RTL_USB_OTG
- #define PORT_RESET_TRIES 5
-+#else
-+#define PORT_RESET_TRIES 20
-+#endif
- #define SET_ADDRESS_TRIES 2
- #define GET_DESCRIPTOR_TRIES 2
- #define SET_CONFIG_TRIES (2 * (use_both_schemes + 1))
- #define USE_NEW_SCHEME(i) ((i) / 2 == old_scheme_first)
-
-+#ifdef CONFIG_RTL_USB_OTG
- #define HUB_ROOT_RESET_TIME 50 /* times are in msec */
-+#else
-+#define HUB_ROOT_RESET_TIME 500 /* times are in msec */
-+#endif
- #define HUB_SHORT_RESET_TIME 10
- #define HUB_LONG_RESET_TIME 200
- #define HUB_RESET_TIMEOUT 500
-@@ -1842,8 +1859,13 @@ static int hub_port_wait_reset(struct us
- static int hub_port_reset(struct usb_hub *hub, int port1,
- struct usb_device *udev, unsigned int delay)
- {
-+#ifdef CONFIG_RTL_OTGCTRL
-+ //slove the usb phy debonce. close the auto-det interrupt
-+ extern unsigned int TurnOn_OTGCtrl_Interrupt(unsigned int); //wei add
-+ int old=TurnOn_OTGCtrl_Interrupt(0); //wei add
-+#endif
- int i, status;
--
-+ unsigned char retry=3; //realtek patch, if failed, retry 3 times
- /* Block EHCI CF initialization during the port reset.
- * Some companion controllers don't like it when they mix.
- */
-@@ -1868,12 +1890,19 @@ static int hub_port_reset(struct usb_hub
- /* return on disconnect or reset */
- switch (status) {
- case 0:
-+ retry = 0; //realtek patch
- /* TRSTRCY = 10 ms; plus some extra */
- msleep(10 + 40);
- update_address(udev, 0);
- /* FALL THROUGH */
- case -ENOTCONN:
- case -ENODEV:
-+//realtek patch
-+ if(retry){
-+ retry--;
-+ continue;
-+ }
-+////
- clear_port_feature(hub->hdev,
- port1, USB_PORT_FEAT_C_RESET);
- /* FIXME need disconnect() for NOTATTACHED device */
-@@ -1895,6 +1924,10 @@ static int hub_port_reset(struct usb_hub
-
- done:
- up_read(&ehci_cf_port_reset_rwsem);
-+
-+#ifdef CONFIG_RTL_OTGCTRL
-+ TurnOn_OTGCtrl_Interrupt(old); //wei add
-+#endif
- return status;
- }
-
-@@ -2152,15 +2185,31 @@ static int finish_port_resume(struct usb
- *
- * Returns 0 on success, else negative errno.
- */
-+ #define RTL_R32(addr) (*(volatile unsigned long *)(addr))
-+#define RTL_W32(addr, l) ((*(volatile unsigned long*)(addr)) = (l))
-+extern Enable_OTG_Suspend(int sel, int en) ;
- int usb_port_resume(struct usb_device *udev, pm_message_t msg)
- {
- struct usb_hub *hub = hdev_to_hub(udev->parent);
- int port1 = udev->portnum;
- int status;
- u16 portchange, portstatus;
--
-+ unsigned int tmp32=0;
- /* Skip the initial Clear-Suspend step for a remote wakeup */
- status = hub_port_status(hub, port1, &portstatus, &portchange);
-+#if defined(CONFIG_RTL_8196E) && defined(CONFIG_DWC_OTG)
-+ //Notify OTG Host to resume
-+ msleep(10);
-+ Enable_OTG_Suspend(0,0);
-+ msleep(10);
-+ tmp32 = 0x41100000;
-+ RTL_W32(0xB8030440, tmp32);
-+ msleep(10);
-+ tmp32 = 0x01100000;
-+ RTL_W32(0xB8030440, tmp32);
-+ msleep(10);
-+ /////////////////////////
-+#endif
- if (status == 0 && !(portstatus & USB_PORT_STAT_SUSPEND))
- goto SuspendCleared;
-
-@@ -2451,6 +2500,13 @@ hub_port_init (struct usb_hub *hub, stru
- /* root hub ports have a slightly longer reset period
- * (from USB 2.0 spec, section 7.1.7.5)
- */
-+
-+ //RTL_W32(AUTOCFG_LED_DATABASE, (RTL_R32(AUTOCFG_LED_DATABASE) & 0xffffbfff));
-+
-+ REG32(PABCD_DIR) = REG32(PABCD_DIR) |(0x1<<USB_LED_OFFSET);
-+ REG32(PABCD_DAT) = REG32(PABCD_DAT) &(~ (0x1<<USB_LED_OFFSET));
-+
-+
- if (!hdev->parent) {
- delay = HUB_ROOT_RESET_TIME;
- if (port1 == hdev->bus->otg_port)
---- linux-2.6.30.9/drivers/usb/core/urb.c 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/core/urb.c 2013-05-02 01:47:56.735226815 +0300
-@@ -8,6 +8,12 @@
- #include <linux/wait.h>
- #include "hcd.h"
-
-+#include "bspchip.h"
-+
-+#ifndef __IRAM_USB
-+#define __IRAM_USB
-+#endif
-+
- #define to_urb(d) container_of(d, struct urb, kref)
-
-
-@@ -87,6 +93,7 @@ EXPORT_SYMBOL_GPL(usb_alloc_urb);
- * Note: The transfer buffer associated with the urb is not freed unless the
- * URB_FREE_BUFFER transfer flag is set.
- */
-+__IRAM_USB
- void usb_free_urb(struct urb *urb)
- {
- if (urb)
-@@ -104,6 +111,7 @@ EXPORT_SYMBOL_GPL(usb_free_urb);
- *
- * A pointer to the urb with the incremented reference counter is returned.
- */
-+__IRAM_USB
- struct urb *usb_get_urb(struct urb *urb)
- {
- if (urb)
-@@ -285,6 +293,7 @@ EXPORT_SYMBOL_GPL(usb_unanchor_urb);
- * GFP_NOIO, unless b) or c) apply
- *
- */
-+__IRAM_USB
- int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
- {
- int xfertype, max;
---- linux-2.6.30.9/drivers/usb/core/usb.c 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/core/usb.c 2013-05-02 01:47:56.736226814 +0300
-@@ -43,6 +43,10 @@
- #include "hcd.h"
- #include "usb.h"
-
-+#define REG32(reg) (*(volatile unsigned int *)((unsigned int)reg))
-+#define PIN_MUX_SEL_2 0xb8000044
-+#define PABCD_DIR 0xb8003508
-+#define PABCD_DAT 0xb800350C
-
- const char *usbcore_name = "usbcore";
-
-@@ -1001,6 +1005,16 @@ static struct notifier_block usb_bus_nb
- .notifier_call = usb_bus_notify,
- };
-
-+
-+static void usb_led_init(void)
-+{
-+ REG32(PIN_MUX_SEL_2) = REG32(PIN_MUX_SEL_2) |(0x7<<21);
-+ REG32(PABCD_DIR) = REG32(PABCD_DIR) |(0x1<<19);
-+ REG32(PABCD_DAT) = REG32(PABCD_DAT) |(0x1<<19);
-+}
-+
-+
-+
- /*
- * Init
- */
-@@ -1011,7 +1025,7 @@ static int __init usb_init(void)
- pr_info("%s: USB support disabled\n", usbcore_name);
- return 0;
- }
--
-+ usb_led_init();
- retval = ksuspend_usb_init();
- if (retval)
- goto out;
---- linux-2.6.30.9/drivers/usb/gadget/dummy_hcd.c 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/gadget/dummy_hcd.c 2013-05-02 01:47:56.782226811 +0300
-@@ -55,7 +55,11 @@
- #include <asm/unaligned.h>
-
-
-+#if defined(CONFIG_USB_UWIFI_HOST)
-+#include "../core_uWiFi/hcd.h"
-+#else
- #include "../core/hcd.h"
-+#endif
-
-
- #define DRIVER_DESC "USB Host+Gadget Emulator"
---- linux-2.6.30.9/drivers/usb/host/ehci.h 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/host/ehci.h 2013-05-02 01:47:56.828226807 +0300
-@@ -36,6 +36,11 @@ typedef __u16 __bitwise __hc16;
- #define __hc32 __le32
- #define __hc16 __le16
- #endif
-+#include "bspchip.h"
-+
-+#ifndef __IRAM_USB
-+#define __IRAM_USB
-+#endif
-
- /* statistics can be kept for for tuning/monitoring */
- struct ehci_stats {
-@@ -602,6 +607,9 @@ ehci_port_speed(struct ehci_hcd *ehci, u
- static inline unsigned int ehci_readl(const struct ehci_hcd *ehci,
- __u32 __iomem * regs)
- {
-+#if defined(CONFIG_RTL_819X)
-+ return (le32_to_cpu((*(volatile unsigned long *)(regs))));
-+#else
- #ifdef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO
- return ehci_big_endian_mmio(ehci) ?
- readl_be(regs) :
-@@ -609,11 +617,15 @@ static inline unsigned int ehci_readl(co
- #else
- return readl(regs);
- #endif
-+#endif
- }
-
- static inline void ehci_writel(const struct ehci_hcd *ehci,
- const unsigned int val, __u32 __iomem *regs)
- {
-+#if defined(CONFIG_RTL_819X)
-+ ((*(volatile unsigned long *)(regs))=cpu_to_le32(val));
-+#else
- #ifdef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO
- ehci_big_endian_mmio(ehci) ?
- writel_be(val, regs) :
-@@ -621,6 +633,7 @@ static inline void ehci_writel(const str
- #else
- writel(val, regs);
- #endif
-+#endif
- }
-
- /*
---- linux-2.6.30.9/drivers/usb/host/ehci-hcd.c 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/host/ehci-hcd.c 2013-05-02 01:47:56.825226807 +0300
-@@ -169,10 +169,10 @@ static int handshake (struct ehci_hcd *e
- u32 result;
-
- do {
-- result = ehci_readl(ehci, ptr);
-+ result = (ehci_readl(ehci, ptr))&0xffff;
- if (result == ~(u32)0) /* card removed */
- return -ENODEV;
-- result &= mask;
-+ result &= (mask)&0xffff;
- if (result == done)
- return 0;
- udelay (1);
-@@ -429,6 +429,7 @@ static void ehci_port_power (struct ehci
- * ehci_work is called from some interrupts, timers, and so on.
- * it calls driver completion functions, after dropping ehci->lock.
- */
-+__IRAM_USB
- static void ehci_work (struct ehci_hcd *ehci)
- {
- timer_action_done (ehci, TIMER_IO_WATCHDOG);
-@@ -677,7 +678,7 @@ static int ehci_run (struct usb_hcd *hcd
- }
-
- /*-------------------------------------------------------------------------*/
--
-+__IRAM_USB
- static irqreturn_t ehci_irq (struct usb_hcd *hcd)
- {
- struct ehci_hcd *ehci = hcd_to_ehci (hcd);
-@@ -786,7 +787,19 @@ dead:
- }
-
- if (bh)
-+ {
-+ #if 1
-+ __asm__ __volatile__( \
-+ ".set push\n\t" \
-+ ".set noreorder\n\t" \
-+ "nop\n\t" \
-+ "nop\n\t" \
-+ "nop\n\t" \
-+ ".set pop\n\t");
-+ #endif
-+
- ehci_work (ehci);
-+ }
- spin_unlock (&ehci->lock);
- if (pcd_status)
- usb_hcd_poll_rh_status(hcd);
-@@ -807,6 +820,7 @@ dead:
- * NOTE: control, bulk, and interrupt share the same code to append TDs
- * to a (possibly active) QH, and the same QH scanning code.
- */
-+__IRAM_USB
- static int ehci_urb_enqueue (
- struct usb_hcd *hcd,
- struct urb *urb,
-@@ -1040,48 +1054,35 @@ MODULE_DESCRIPTION(DRIVER_DESC);
- MODULE_AUTHOR (DRIVER_AUTHOR);
- MODULE_LICENSE ("GPL");
-
--#ifdef CONFIG_PCI
-+#ifdef CONFIG_USB_VIA_PCI
- #include "ehci-pci.c"
- #define PCI_DRIVER ehci_pci_driver
- #endif
-
--#ifdef CONFIG_USB_EHCI_FSL
--#include "ehci-fsl.c"
--#define PLATFORM_DRIVER ehci_fsl_driver
--#endif
--
--#ifdef CONFIG_SOC_AU1200
--#include "ehci-au1xxx.c"
--#define PLATFORM_DRIVER ehci_hcd_au1xxx_driver
--#endif
--
--#ifdef CONFIG_PPC_PS3
--#include "ehci-ps3.c"
--#define PS3_SYSTEM_BUS_DRIVER ps3_ehci_driver
--#endif
--
--#ifdef CONFIG_USB_EHCI_HCD_PPC_OF
--#include "ehci-ppc-of.c"
--#define OF_PLATFORM_DRIVER ehci_hcd_ppc_of_driver
--#endif
--
--#ifdef CONFIG_PLAT_ORION
--#include "ehci-orion.c"
--#define PLATFORM_DRIVER ehci_orion_driver
-+#if defined(CONFIG_RTL_819X)
-+#include "ehci-rtl8652.c"
-+#define PLATFORM_DRIVER ehci_rtl8652_driver
- #endif
-
--#ifdef CONFIG_ARCH_IXP4XX
--#include "ehci-ixp4xx.c"
--#define PLATFORM_DRIVER ixp4xx_ehci_driver
-+#ifdef CONFIG_USB_EHCI_DWC
-+#include "ehci-dwc.c"
-+#define PLATFORM_DRIVER ehci_dwc_driver
- #endif
-
--#if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \
-- !defined(PS3_SYSTEM_BUS_DRIVER) && !defined(OF_PLATFORM_DRIVER)
-+#if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER)
- #error "missing bus glue for ehci-hcd"
- #endif
-
-+#if defined(CONFIG_RTL_ULINKER)
-+int ehci_hcd_init(void)
-+#else
- static int __init ehci_hcd_init(void)
-+#endif
- {
-+ if (test_bit(USB_EHCI_LOADED, &usb_hcds_loaded))
-+ { printk("EHCI-HCD: already init \n");
-+ return -1;
-+ }
- int retval = 0;
-
- if (usb_disabled())
-@@ -1099,6 +1100,13 @@ static int __init ehci_hcd_init(void)
- sizeof(struct ehci_qh), sizeof(struct ehci_qtd),
- sizeof(struct ehci_itd), sizeof(struct ehci_sitd));
-
-+#if defined(CONFIG_RTL_819X)
-+ if(ehci_rtl8652_init() !=0)
-+ { retval = -1; //wei add
-+ goto err_out; //wei add
-+ }
-+#endif
-+
- #ifdef DEBUG
- ehci_debug_root = debugfs_create_dir("ehci", NULL);
- if (!ehci_debug_root) {
-@@ -1119,27 +1127,8 @@ static int __init ehci_hcd_init(void)
- goto clean1;
- #endif
-
--#ifdef PS3_SYSTEM_BUS_DRIVER
-- retval = ps3_ehci_driver_register(&PS3_SYSTEM_BUS_DRIVER);
-- if (retval < 0)
-- goto clean2;
--#endif
--
--#ifdef OF_PLATFORM_DRIVER
-- retval = of_register_platform_driver(&OF_PLATFORM_DRIVER);
-- if (retval < 0)
-- goto clean3;
--#endif
- return retval;
-
--#ifdef OF_PLATFORM_DRIVER
-- /* of_unregister_platform_driver(&OF_PLATFORM_DRIVER); */
--clean3:
--#endif
--#ifdef PS3_SYSTEM_BUS_DRIVER
-- ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
--clean2:
--#endif
- #ifdef PCI_DRIVER
- pci_unregister_driver(&PCI_DRIVER);
- clean1:
-@@ -1153,25 +1142,36 @@ clean0:
- ehci_debug_root = NULL;
- err_debug:
- #endif
-+err_out:
-+
-+#if defined(CONFIG_RTL_819X)
-+ ehci_rtl8652_cleanup(); //wei add
-+#endif
-+
- clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
- return retval;
- }
- module_init(ehci_hcd_init);
--
-+//-----------------------------------------------------------
-+#if defined(CONFIG_RTL_ULINKER)
-+void ehci_hcd_cleanup(void) //wei add
-+#else
- static void __exit ehci_hcd_cleanup(void)
--{
--#ifdef OF_PLATFORM_DRIVER
-- of_unregister_platform_driver(&OF_PLATFORM_DRIVER);
--#endif
--#ifdef PLATFORM_DRIVER
-- platform_driver_unregister(&PLATFORM_DRIVER);
- #endif
-+{
-+ if (!test_bit(USB_EHCI_LOADED, &usb_hcds_loaded))
-+ { printk("EHCI-HCD: not init, cannot cleanup \n");
-+ return;
-+ }
-+
- #ifdef PCI_DRIVER
- pci_unregister_driver(&PCI_DRIVER);
- #endif
--#ifdef PS3_SYSTEM_BUS_DRIVER
-- ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
-+
-+#ifdef PLATFORM_DRIVER
-+ platform_driver_unregister(&PLATFORM_DRIVER);
- #endif
-+
- #ifdef DEBUG
- debugfs_remove(ehci_debug_root);
- #endif
-@@ -1175,6 +1175,10 @@ static void __exit ehci_hcd_cleanup(void
- #ifdef DEBUG
- debugfs_remove(ehci_debug_root);
- #endif
-+
-+#if defined(CONFIG_RTL_819X)
-+ ehci_rtl8652_cleanup(); //wei add
-+#endif
- clear_bit(USB_EHCI_LOADED, &usb_hcds_loaded);
- }
- module_exit(ehci_hcd_cleanup);
---- linux-2.6.30.9/drivers/usb/host/ehci-hub.c 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/host/ehci-hub.c 2013-05-02 01:47:56.825226807 +0300
-@@ -412,6 +412,16 @@ static int check_reset_complete (
- u32 __iomem *status_reg,
- int port_status
- ) {
-+//realtek patch
-+#if 1 /* patch for synopsis USB 2.0 */
-+ int i;
-+ #ifdef CONFIG_DWC_OTG
-+ static unsigned char retry=1; //if failed, retry 1 times
-+ #else
-+ static unsigned char retry=3; //if failed, retry 3 times
-+ #endif
-+#endif
-+////
- if (!(port_status & PORT_CONNECT))
- return port_status;
-
-@@ -425,7 +435,12 @@ static int check_reset_complete (
- index+1);
- return port_status;
- }
--
-+ //realtek patch
-+ if(--retry) {
-+ return port_status;
-+ }
-+ retry = 3;
-+ /////
- ehci_dbg (ehci, "port %d full speed --> companion\n",
- index + 1);
-
-@@ -438,6 +453,9 @@ static int check_reset_complete (
- if (ehci->has_amcc_usb23)
- set_ohci_hcfs(ehci, 1);
- } else {
-+ //realtek patch
-+ retry = 3; //realtek patch
-+ ////
- ehci_dbg (ehci, "port %d high speed\n", index + 1);
- /* ensure 440EPx ohci controller state is suspended */
- if (ehci->has_amcc_usb23)
---- linux-2.6.30.9/drivers/usb/host/ehci-q.c 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/host/ehci-q.c 2013-05-02 01:47:56.827226807 +0300
-@@ -41,7 +41,7 @@
- /*-------------------------------------------------------------------------*/
-
- /* fill a qtd, returning how much of the buffer we were able to queue up */
--
-+__IRAM_USB
- static int
- qtd_fill(struct ehci_hcd *ehci, struct ehci_qtd *qtd, dma_addr_t buf,
- size_t len, int token, int maxpacket)
-@@ -83,7 +83,7 @@ qtd_fill(struct ehci_hcd *ehci, struct e
- }
-
- /*-------------------------------------------------------------------------*/
--
-+__IRAM_USB
- static inline void
- qh_update (struct ehci_hcd *ehci, struct ehci_qh *qh, struct ehci_qtd *qtd)
- {
-@@ -118,6 +118,7 @@ qh_update (struct ehci_hcd *ehci, struct
- * overlay, so qh->hw_token wrongly becomes inactive/halted), only fault
- * recovery (including urb dequeue) would need software changes to a QH...
- */
-+__IRAM_USB
- static void
- qh_refresh (struct ehci_hcd *ehci, struct ehci_qh *qh)
- {
-@@ -138,7 +139,7 @@ qh_refresh (struct ehci_hcd *ehci, struc
- }
-
- /*-------------------------------------------------------------------------*/
--
-+__IRAM_USB
- static void qh_link_async(struct ehci_hcd *ehci, struct ehci_qh *qh);
-
- static void ehci_clear_tt_buffer_complete(struct usb_hcd *hcd,
-@@ -187,7 +188,7 @@ static void ehci_clear_tt_buffer(struct
- }
- }
- }
--
-+__IRAM_USB
- static int qtd_copy_status (
- struct ehci_hcd *ehci,
- struct urb *urb,
-@@ -248,7 +249,7 @@ static int qtd_copy_status (
-
- return status;
- }
--
-+__IRAM_USB
- static void
- ehci_urb_done(struct ehci_hcd *ehci, struct urb *urb, int status)
- __releases(ehci->lock)
-@@ -570,6 +571,7 @@ static void qtd_list_free (
- /*
- * create a list of filled qtds for this URB; won't link into qh.
- */
-+__IRAM_USB
- static struct list_head *
- qh_urb_transaction (
- struct ehci_hcd *ehci,
-@@ -952,6 +954,7 @@ static void qh_link_async (struct ehci_h
- * Returns null if it can't allocate a QH it needs to.
- * If the QH has TDs (urbs) already, that's great.
- */
-+__IRAM_USB
- static struct ehci_qh *qh_append_tds (
- struct ehci_hcd *ehci,
- struct urb *urb,
-@@ -1033,6 +1036,7 @@ static struct ehci_qh *qh_append_tds (
-
- /*-------------------------------------------------------------------------*/
-
-+__IRAM_USB
- static int
- submit_async (
- struct ehci_hcd *ehci,
-@@ -1091,6 +1095,7 @@ submit_async (
-
- /* the async qh for the qtds being reclaimed are now unlinked from the HC */
-
-+__IRAM_USB
- static void end_unlink_async (struct ehci_hcd *ehci)
- {
- struct ehci_qh *qh = ehci->reclaim;
-@@ -1132,6 +1137,7 @@ static void end_unlink_async (struct ehc
- /* makes sure the async qh will become idle */
- /* caller must own ehci->lock */
-
-+__IRAM_USB
- static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
- {
- int cmd = ehci_readl(ehci, &ehci->regs->command);
-@@ -1189,6 +1195,7 @@ static void start_unlink_async (struct e
-
- /*-------------------------------------------------------------------------*/
-
-+__IRAM_USB
- static void scan_async (struct ehci_hcd *ehci)
- {
- struct ehci_qh *qh;
---- linux-2.6.30.9/drivers/usb/host/ehci-sched.c 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/host/ehci-sched.c 2013-05-02 01:47:56.828226807 +0300
-@@ -33,7 +33,7 @@
- * It keeps track of every ITD (or SITD) that's linked, and holds enough
- * pre-calculated schedule data to make appending to the queue be quick.
- */
--
-+// #define CONFIG_USB_3G_SUPPORT //for specifical dongle
- static int ehci_get_frame (struct usb_hcd *hcd);
-
- /*-------------------------------------------------------------------------*/
-@@ -323,7 +323,11 @@ static int tt_available (
- * already scheduled transactions
- */
- if (125 < usecs) {
-+#ifdef CONFIG_USB_3G_SUPPORT
-+ nt ufs = (usecs / 125) - 1;
-+#else
- int ufs = (usecs / 125);
-+#endif
- int i;
- for (i = uframe; i < (uframe + ufs) && i < 8; i++)
- if (0 < tt_usecs[i]) {
-@@ -436,15 +440,23 @@ static int enable_periodic (struct ehci_
- {
- u32 cmd;
- int status;
--
-+#ifndef CONFIG_USB_3G_SUPPORT
- if (ehci->periodic_sched++)
- return 0;
-+#else
-+ udelay(1024);
-+#endif
-
- /* did clearing PSE did take effect yet?
- * takes effect only at frame boundaries...
- */
- status = handshake_on_error_set_halt(ehci, &ehci->regs->status,
-- STS_PSS, 0, 9 * 125);
-+ STS_PSS, 0,
-+ #ifdef CONFIG_USB_3G_SUPPORT
-+ 120000 * 125);
-+ #else
-+ 9 * 125);
-+ #endif
- if (status)
- return status;
-
-@@ -471,7 +483,12 @@ static int disable_periodic (struct ehci
- * takes effect only at frame boundaries...
- */
- status = handshake_on_error_set_halt(ehci, &ehci->regs->status,
-- STS_PSS, STS_PSS, 9 * 125);
-+ STS_PSS, STS_PSS,
-+#ifdef CONFIG_USB_3G_SUPPORT
-+ 120000 * 125);
-+#else
-+ 9 * 125);
-+#endif
- if (status)
- return status;
-
-@@ -550,7 +567,14 @@ static int qh_link_periodic (struct ehci
- : (qh->usecs * 8);
-
- /* maybe enable periodic schedule processing */
-+#ifdef CONFIG_USB_3G_SUPPORT
-+ if (!ehci->periodic_sched++)
- return enable_periodic(ehci);
-+ return 0;
-+
-+#else
-+ return enable_periodic(ehci);
-+#endif
- }
-
- static int qh_unlink_periodic(struct ehci_hcd *ehci, struct ehci_qh *qh)
-@@ -589,7 +613,14 @@ static int qh_unlink_periodic(struct ehc
- qh_put (qh);
-
- /* maybe turn off periodic schedule */
-+ #ifdef CONFIG_USB_3G_SUPPORT
-+ ehci->periodic_sched--;
-+ if (!ehci->periodic_sched)
-+ (void) disable_periodic (ehci);
-+
-+ #else
- return disable_periodic(ehci);
-+ #endif
- }
-
- static void intr_deschedule (struct ehci_hcd *ehci, struct ehci_qh *qh)
-@@ -606,9 +637,18 @@ static void intr_deschedule (struct ehci
- if (list_empty (&qh->qtd_list)
- || (cpu_to_hc32(ehci, QH_CMASK)
- & qh->hw_info2) != 0)
-+#ifdef CONFIG_USB_3G_SUPPORT
-+ wait = 55;
-+#else
- wait = 2;
-+#endif
- else
-+#ifdef CONFIG_RTL_USB_OTG
- wait = 55; /* worst case: 3 * 1024 */
-+#else
-+ //wait = 55; /* worst case: 3 * 1024 */
-+ wait = 3 * 1024;
-+#endif
-
- udelay (wait);
- qh->qh_state = QH_STATE_IDLE;
-@@ -1564,7 +1604,13 @@ itd_link_urb (
- urb->hcpriv = NULL;
-
- timer_action (ehci, TIMER_IO_WATCHDOG);
-+#ifdef CONFIG_USB_3G_SUPPORT
-+ if (unlikely (!ehci->periodic_sched++))
-+ return enable_periodic(ehci);
-+ return 0;
-+#else
- return enable_periodic(ehci);
-+#endif
- }
-
- #define ISO_ERRS (EHCI_ISOC_BUF_ERR | EHCI_ISOC_BABBLE | EHCI_ISOC_XACTERR)
-@@ -1645,7 +1691,14 @@ itd_complete (
- ehci_urb_done(ehci, urb, 0);
- retval = true;
- urb = NULL;
-+#ifdef CONFIG_USB_3G_SUPPORT
-+ /* defer stopping schedule; completion can submit */
-+ ehci->periodic_sched--;
-+ if (unlikely (!ehci->periodic_sched))
-+
-+#else
- (void) disable_periodic(ehci);
-+#endif
- ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--;
-
- if (unlikely(list_is_singular(&stream->td_list))) {
-@@ -1967,7 +2020,13 @@ sitd_link_urb (
- urb->hcpriv = NULL;
-
- timer_action (ehci, TIMER_IO_WATCHDOG);
-+#ifdef CONFIG_USB_3G_SUPPORT
-+ if (!ehci->periodic_sched++)
- return enable_periodic(ehci);
-+ return 0;
-+#else
-+ return enable_periodic(ehci);
-+#endif
- }
-
- /*-------------------------------------------------------------------------*/
-@@ -2034,6 +2093,11 @@ sitd_complete (
- ehci_urb_done(ehci, urb, 0);
- retval = true;
- urb = NULL;
-+#ifdef CONFIG_USB_3G_SUPPORT
-+ /* defer stopping schedule; completion can submit */
-+ ehci->periodic_sched--;
-+ if (!ehci->periodic_sched)
-+#endif
- (void) disable_periodic(ehci);
- ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--;
-
---- linux-2.6.30.9/drivers/usb/host/Kconfig 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/host/Kconfig 2013-05-02 01:47:56.823226807 +0300
-@@ -78,6 +78,12 @@ config USB_EHCI_BIG_ENDIAN_DESC
- depends on USB_EHCI_HCD && (440EPX || ARCH_IXP4XX)
- default y
-
-+#config USB_EHCI_DWC
-+# bool "Support for Synopsys DWC EHCI USB controller"
-+# depends on USB_EHCI_HCD
-+# select USB_EHCI_ROOT_HUB_TT
-+# default y
-+
- config USB_EHCI_FSL
- bool "Support for Freescale on-chip EHCI USB controller"
- depends on USB_EHCI_HCD && FSL_SOC
-@@ -88,7 +94,6 @@ config USB_EHCI_FSL
- config USB_EHCI_HCD_PPC_OF
- bool "EHCI support for PPC USB controller on OF platform bus"
- depends on USB_EHCI_HCD && PPC_OF
-- default y
- ---help---
- Enables support for the USB controller present on the PowerPC
- OpenFirmware platform bus.
---- linux-2.6.30.9/drivers/usb/host/Makefile 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/host/Makefile 2013-05-02 01:47:56.823226807 +0300
-@@ -6,6 +6,9 @@ ifeq ($(CONFIG_USB_DEBUG),y)
- EXTRA_CFLAGS += -DDEBUG
- endif
-
-+ifeq ($(CONFIG_RTL_819X),y)
-+ EXTRA_CFLAGS += -I$(DIR_BOARD)
-+endif
- isp1760-objs := isp1760-hcd.o isp1760-if.o
- fhci-objs := fhci-hcd.o fhci-hub.o fhci-q.o fhci-mem.o \
- fhci-tds.o fhci-sched.o
---- linux-2.6.30.9/drivers/usb/host/ohci.h 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/host/ohci.h 2013-05-02 01:47:56.839226806 +0300
-@@ -544,6 +544,9 @@ static inline struct usb_hcd *ohci_to_hc
- static inline unsigned int _ohci_readl (const struct ohci_hcd *ohci,
- __hc32 __iomem * regs)
- {
-+#if defined(CONFIG_RTL_819X)
-+ return (le32_to_cpu((*(volatile unsigned long *)(regs))));
-+#else
- #ifdef CONFIG_USB_OHCI_BIG_ENDIAN_MMIO
- return big_endian_mmio(ohci) ?
- readl_be (regs) :
-@@ -551,11 +554,15 @@ static inline unsigned int _ohci_readl (
- #else
- return readl (regs);
- #endif
-+#endif
- }
-
- static inline void _ohci_writel (const struct ohci_hcd *ohci,
- const unsigned int val, __hc32 __iomem *regs)
- {
-+#if defined(CONFIG_RTL_819X)
-+ ((*(volatile unsigned long *)(regs))=cpu_to_le32(val));
-+#else
- #ifdef CONFIG_USB_OHCI_BIG_ENDIAN_MMIO
- big_endian_mmio(ohci) ?
- writel_be (val, regs) :
-@@ -563,6 +570,7 @@ static inline void _ohci_writel (const s
- #else
- writel (val, regs);
- #endif
-+#endif
- }
-
- #ifdef CONFIG_ARCH_LH7A404
---- linux-2.6.30.9/drivers/usb/host/ohci-hcd.c 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/host/ohci-hcd.c 2013-05-02 01:47:56.835226806 +0300
-@@ -1047,6 +1047,11 @@ MODULE_LICENSE ("GPL");
- #define PLATFORM_DRIVER usb_hcd_pnx4008_driver
- #endif
-
-+#if defined(CONFIG_RTL_819X)
-+#include "ohci-rtl8652.c"
-+#define PLATFORM_DRIVER ohci_hcd_rtl8652_driver
-+#endif
-+
- #if defined(CONFIG_CPU_SUBTYPE_SH7720) || \
- defined(CONFIG_CPU_SUBTYPE_SH7721) || \
- defined(CONFIG_CPU_SUBTYPE_SH7763) || \
-@@ -1092,8 +1097,17 @@ MODULE_LICENSE ("GPL");
- #error "missing bus glue for ohci-hcd"
- #endif
-
-+#if defined(CONFIG_RTL_ULINKER)
-+int ohci_hcd_mod_init(void) //wei add
-+#else
- static int __init ohci_hcd_mod_init(void)
-+#endif
- {
-+ if ( test_bit(USB_OHCI_LOADED, &usb_hcds_loaded))
-+ { printk("OHCI-HCD: already init \n");
-+ return -1;
-+ }
-+
- int retval = 0;
-
- if (usb_disabled())
-@@ -1104,6 +1118,13 @@ static int __init ohci_hcd_mod_init(void
- sizeof (struct ed), sizeof (struct td));
- set_bit(USB_OHCI_LOADED, &usb_hcds_loaded);
-
-+#if defined(CONFIG_RTL_819X)
-+ if(ohci_rtl8652_init() !=0)
-+ { retval = -1; //wei add
-+ goto err_out; //wei add
-+ }
-+#endif
-+
- #ifdef DEBUG
- ohci_debug_root = debugfs_create_dir("ohci", NULL);
- if (!ohci_debug_root) {
-@@ -1200,14 +1221,26 @@ static int __init ohci_hcd_mod_init(void
- ohci_debug_root = NULL;
- error_debug:
- #endif
--
-+err_out:
-+#if defined(CONFIG_RTL_819X)
-+ ohci_rtl8652_cleanup(); //wei add
-+#endif
- clear_bit(USB_OHCI_LOADED, &usb_hcds_loaded);
- return retval;
- }
- module_init(ohci_hcd_mod_init);
--
-+//-----------------------------------------------------------
-+#if defined(CONFIG_RTL_ULINKER)
-+void ohci_hcd_mod_exit(void) //wei add
-+#else
- static void __exit ohci_hcd_mod_exit(void)
-+#endif
- {
-+ if (!test_bit(USB_OHCI_LOADED, &usb_hcds_loaded))
-+ { printk("OHCI-HCD: not init, cannot cleanup \n");
-+ return;
-+ }
-+
- #ifdef TMIO_OHCI_DRIVER
- platform_driver_unregister(&TMIO_OHCI_DRIVER);
- #endif
-@@ -1235,6 +1268,10 @@ static void __exit ohci_hcd_mod_exit(voi
- #ifdef DEBUG
- debugfs_remove(ohci_debug_root);
- #endif
-+
-+#if defined(CONFIG_RTL_819X) //wei add
-+ ohci_rtl8652_cleanup();
-+#endif
- clear_bit(USB_OHCI_LOADED, &usb_hcds_loaded);
- }
- module_exit(ohci_hcd_mod_exit);
---- linux-2.6.30.9/drivers/usb/Kconfig 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/Kconfig 2013-05-09 15:45:47.582603984 +0300
-@@ -19,45 +19,18 @@ config USB_ARCH_HAS_HCD
- boolean
- default y if USB_ARCH_HAS_OHCI
- default y if USB_ARCH_HAS_EHCI
-- default y if PCMCIA && !M32R # sl811_cs
-- default y if ARM # SL-811
-- default y if SUPERH # r8a66597-hcd
-- default PCI
-+ default y if RTL_819X
-+ default y if SOC_HAS_USB
-
- # many non-PCI SOC chips embed OHCI
- config USB_ARCH_HAS_OHCI
- boolean
-- # ARM:
-- default y if SA1111
-- default y if ARCH_OMAP
-- default y if ARCH_LH7A404
-- default y if ARCH_S3C2410
-- default y if PXA27x
-- default y if PXA3xx
-- default y if ARCH_EP93XX
-- default y if ARCH_AT91
-- default y if ARCH_PNX4008 && I2C
-- default y if MFD_TC6393XB
-- # PPC:
-- default y if STB03xxx
-- default y if PPC_MPC52xx
-- # MIPS:
-- default y if SOC_AU1X00
-- # SH:
-- default y if CPU_SUBTYPE_SH7720
-- default y if CPU_SUBTYPE_SH7721
-- default y if CPU_SUBTYPE_SH7763
-- default y if CPU_SUBTYPE_SH7786
-- # more:
-- default PCI
-+ default y if RTL_819X
-
- # some non-PCI hcds implement EHCI
- config USB_ARCH_HAS_EHCI
- boolean
-- default y if PPC_83xx
-- default y if SOC_AU1200
-- default y if ARCH_IXP4XX
-- default PCI
-+ default y if RTL_819X
-
- # ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface.
- config USB
-@@ -149,8 +122,11 @@ source "drivers/usb/misc/Kconfig"
-
- source "drivers/usb/atm/Kconfig"
-
--source "drivers/usb/gadget/Kconfig"
-+source "drivers/usb/gadget_cathy/Kconfig"
-+#source "drivers/usb/gadget/Kconfig"
-
- source "drivers/usb/otg/Kconfig"
-
-+source "drivers/usb/dwc_otg/Kconfig"
-+
- endif # USB_SUPPORT
---- linux-2.6.30.9/drivers/usb/Makefile 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/Makefile 2013-05-02 01:47:56.716226816 +0300
-@@ -4,10 +4,27 @@
-
- # Object files in subdirectories
-
-+ifeq ($(CONFIG_USB_UWIFI_HOST),y)
-+obj-$(CONFIG_USB) += core_uWiFi/
-+else
- obj-$(CONFIG_USB) += core/
-+endif
-
- obj-$(CONFIG_USB_MON) += mon/
-
-+ifeq ($(CONFIG_USB_UWIFI_HOST),y)
-+obj-$(CONFIG_PCI) += host_uWiFi/
-+obj-$(CONFIG_USB_EHCI_HCD) += host_uWiFi/
-+obj-$(CONFIG_USB_ISP116X_HCD) += host_uWiFi/
-+obj-$(CONFIG_USB_OHCI_HCD) += host_uWiFi/
-+obj-$(CONFIG_USB_UHCI_HCD) += host_uWiFi/
-+obj-$(CONFIG_USB_FHCI_HCD) += host_uWiFi/
-+obj-$(CONFIG_USB_SL811_HCD) += host_uWiFi/
-+obj-$(CONFIG_USB_U132_HCD) += host_uWiFi/
-+obj-$(CONFIG_USB_R8A66597_HCD) += host_uWiFi/
-+obj-$(CONFIG_USB_HWA_HCD) += host_uWiFi/
-+obj-$(CONFIG_USB_ISP1760_HCD) += host_uWiFi/
-+else
- obj-$(CONFIG_PCI) += host/
- obj-$(CONFIG_USB_EHCI_HCD) += host/
- obj-$(CONFIG_USB_ISP116X_HCD) += host/
-@@ -19,6 +36,7 @@ obj-$(CONFIG_USB_U132_HCD) += host/
- obj-$(CONFIG_USB_R8A66597_HCD) += host/
- obj-$(CONFIG_USB_HWA_HCD) += host/
- obj-$(CONFIG_USB_ISP1760_HCD) += host/
-+endif
-
- obj-$(CONFIG_USB_C67X00_HCD) += c67x00/
-
-@@ -29,9 +47,13 @@ obj-$(CONFIG_USB_PRINTER) += class/
- obj-$(CONFIG_USB_WDM) += class/
- obj-$(CONFIG_USB_TMC) += class/
-
-+ifeq ($(CONFIG_USB_UWIFI_HOST),y)
-+obj-$(CONFIG_USB_STORAGE) += storage_uWiFi/
-+obj-$(CONFIG_USB) += storage_uWiFi/
-+else
- obj-$(CONFIG_USB_STORAGE) += storage/
- obj-$(CONFIG_USB) += storage/
--
-+endif
- obj-$(CONFIG_USB_MDC800) += image/
- obj-$(CONFIG_USB_MICROTEK) += image/
-
-@@ -41,3 +63,12 @@ obj-$(CONFIG_USB) += misc/
-
- obj-$(CONFIG_USB_ATM) += atm/
- obj-$(CONFIG_USB_SPEEDTOUCH) += atm/
-+
-+obj-$(CONFIG_DWC_OTG) += dwc_otg/
-+
-+#wei add for otg device mode
-+ifeq ($(CONFIG_RTL_USB_OTG),y)
-+obj-$(CONFIG_USB_GADGET) += gadget_cathy/
-+else
-+obj-$(CONFIG_USB_GADGET) += gadget/
-+endif
---- linux-2.6.30.9/drivers/usb/misc/ftdi-elan.c 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/misc/ftdi-elan.c 2013-05-02 01:47:56.875226803 +0300
-@@ -73,7 +73,12 @@ static struct list_head ftdi_static_list
- */
- #include "usb_u132.h"
- #include <asm/io.h>
-+
-+#if defined(CONFIG_USB_UWIFI_HOST)
-+#include "../core_uWiFi/hcd.h"
-+#else
- #include "../core/hcd.h"
-+#endif
-
- /* FIXME ohci.h is ONLY for internal use by the OHCI driver.
- * If you're going to try stuff like this, you need to split
---- linux-2.6.30.9/drivers/usb/misc/Kconfig 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/misc/Kconfig 2013-05-02 01:47:56.873226803 +0300
-@@ -255,4 +255,4 @@ config USB_VST
- To compile this driver as a module, choose M here: the
- module will be called vstusb.
-
--
-+#source "drivers/usb/misc/rts51xx/Kconfig"
---- linux-2.6.30.9/drivers/usb/misc/Makefile 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/misc/Makefile 2013-05-02 01:47:56.873226803 +0300
-@@ -26,6 +26,7 @@ obj-$(CONFIG_USB_SEVSEG) += usbsevseg.o
- obj-$(CONFIG_USB_VST) += vstusb.o
-
- obj-$(CONFIG_USB_SISUSBVGA) += sisusbvga/
-+#obj-$(CONFIG_RTS5139) += rts51xx/
-
- ifeq ($(CONFIG_USB_DEBUG),y)
- EXTRA_CFLAGS += -DDEBUG
---- linux-2.6.30.9/drivers/usb/mon/mon_main.c 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/mon/mon_main.c 2013-05-02 01:47:56.892226802 +0300
-@@ -13,7 +13,12 @@
- #include <linux/mutex.h>
-
- #include "usb_mon.h"
-+
-+#if defined(CONFIG_USB_UWIFI_HOST)
-+#include "../core_uWiFi/hcd.h"
-+#else
- #include "../core/hcd.h"
-+#endif
-
- static void mon_stop(struct mon_bus *mbus);
- static void mon_dissolve(struct mon_bus *mbus, struct usb_bus *ubus);
---- linux-2.6.30.9/drivers/usb/musb/musb_core.h 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/musb/musb_core.h 2013-05-02 01:47:56.895226802 +0300
-@@ -60,7 +60,12 @@ struct musb_ep;
- #include "musb_regs.h"
-
- #include "musb_gadget.h"
-+
-+#if defined(CONFIG_USB_UWIFI_HOST)
-+#include "../core_uWiFi/hcd.h"
-+#else
- #include "../core/hcd.h"
-+#endif
- #include "musb_host.h"
-
-
---- linux-2.6.30.9/drivers/usb/serial/option.c 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/serial/option.c 2013-05-02 01:47:56.919226800 +0300
-@@ -161,6 +161,7 @@ static int option_resume(struct usb_ser
- #define HUAWEI_PRODUCT_E143D 0x143D
- #define HUAWEI_PRODUCT_E143E 0x143E
- #define HUAWEI_PRODUCT_E143F 0x143F
-+#define HUAWEI_PRODUCT_K4505 0x1464
-
- #define QUANTA_VENDOR_ID 0x0408
- #define QUANTA_PRODUCT_Q101 0xEA02
-@@ -297,6 +298,8 @@ static int option_resume(struct usb_ser
- #define ZTE_PRODUCT_MF628 0x0015
- #define ZTE_PRODUCT_MF626 0x0031
- #define ZTE_PRODUCT_CDMA_TECH 0xfffe
-+#define ZTE_PRODUCT_AC8710 0xfff1
-+#define ZTE_PRODUCT_AC2726 0xfff5
-
- #define BENQ_VENDOR_ID 0x04a5
- #define BENQ_PRODUCT_H10 0x4068
-@@ -304,6 +307,19 @@ static int option_resume(struct usb_ser
- #define DLINK_VENDOR_ID 0x1186
- #define DLINK_PRODUCT_DWM_652 0x3e04
-
-+#define QISDA_VENDOR_ID 0x1da5
-+#define QISDA_PRODUCT_H21_4512 0x4512
-+#define QISDA_PRODUCT_H21_4523 0x4523
-+#define QISDA_PRODUCT_H20_4515 0x4515
-+#define QISDA_PRODUCT_H20_4519 0x4519
-+
-+/* SMPS PRODUCTS */
-+#define SMPS_VENDOR_ID 0xfeed
-+#define SMPS_PRODUCT_TITAN20 0x1234
-+
-+/* VIBO */
-+#define VIBO_VENDOR_ID 0x1c9e
-+#define VIBO_PRODUCT_D200 0x9605
-
- static struct usb_device_id option_ids[] = {
- { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
-@@ -522,7 +538,25 @@ static struct usb_device_id option_ids[]
- { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH) },
- { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) },
- { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) },
-- { USB_DEVICE(0x1da5, 0x4515) }, /* BenQ H20 */
-+
-+ /* bruce: for qisda */
-+ { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4512) },
-+ { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4523) },
-+ { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4515) },
-+ { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4519) },
-+
-+ /* bruce: for ZTE */
-+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) },
-+
-+ /* mobilepeak */
-+ { USB_DEVICE_AND_INTERFACE_INFO(SMPS_VENDOR_ID, SMPS_PRODUCT_TITAN20, 0xff, 0xff, 0xff) },
-+
-+ /* Huawei*/
-+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff) },
-+
-+ /* vibo */
-+ { USB_DEVICE(VIBO_VENDOR_ID, VIBO_PRODUCT_D200) },
-+
- { } /* Terminating entry */
- };
- MODULE_DEVICE_TABLE(usb, option_ids);
-@@ -833,8 +867,9 @@ static void option_instat_callback(struc
- dbg("%s: type %x req %x", __func__,
- req_pkt->bRequestType, req_pkt->bRequest);
- }
-- } else
-+ } else {/////TODO
- err("%s: error %d", __func__, status);
-+ }
-
- /* Resubmit urb so we continue receiving IRQ data */
- if (status != -ESHUTDOWN && status != -ENOENT) {
---- linux-2.6.30.9/drivers/usb/serial/usb-serial.c 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/serial/usb-serial.c 2013-05-02 01:47:56.923226799 +0300
-@@ -35,6 +35,10 @@
- #include <linux/usb/serial.h>
- #include "pl2303.h"
-
-+#if CONFIG_USB_SERIAL_OPTION
-+#include <linux/smp_lock.h> /* brucehou, 2010/05/21, for lock_kernel & unlock_kernel */
-+#endif
-+
- /*
- * Version Information
- */
---- linux-2.6.30.9/drivers/usb/storage/unusual_devs.h 2009-10-05 18:38:08.000000000 +0300
-+++ linux-2.6.30.9-rsdk/drivers/usb/storage/unusual_devs.h 2013-05-02 01:47:56.933226799 +0300
-@@ -1865,6 +1865,13 @@ UNUSUAL_DEV( 0xed10, 0x7636, 0x0001, 0x0
- "Digital MP3 Audio Player",
- US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ),
-
-+/* brucehou@RTK for AMOI H01 */
-+UNUSUAL_DEV( 0x1614, 0x0800, 0x0000, 0x0000,
-+ "Amoi",
-+ "Mass Storage",
-+ US_SC_DEVICE, US_PR_DEVICE, option_ms_init,
-+ 0),
-+
- /* Control/Bulk transport for all SubClass values */
- USUAL_DEV(US_SC_RBC, US_PR_CB, USB_US_TYPE_STOR),
- USUAL_DEV(US_SC_8020, US_PR_CB, USB_US_TYPE_STOR),