Date:2009-12-01 07:55:07 (10 years 6 months ago)
Author:xiangfu
Commit:9fe56726a15439c83ca999fde1ebffe1ffe3bf21
Message:104-usb.patch

Files: drivers/usb/Kconfig (1 diff)
drivers/usb/core/hub.c (2 diffs)
drivers/usb/gadget/Kconfig (3 diffs)
drivers/usb/gadget/Makefile (1 diff)
drivers/usb/gadget/gadget_chips.h (2 diffs)

Change Details

drivers/usb/Kconfig
4444    default y if PPC_MPC52xx
4545    # MIPS:
4646    default y if SOC_AU1X00
47    default y if JZSOC
4748    # SH:
4849    default y if CPU_SUBTYPE_SH7720
4950    default y if CPU_SUBTYPE_SH7721
drivers/usb/core/hub.c
18571857{
18581858    int i, status;
18591859
1860#ifdef CONFIG_SOC_JZ4730
1861    /*
1862     * On Jz4730, we assume that the first USB port was used as device.
1863     * If not, please comment next lines.
1864     */
1865    if (port1 == 1) {
1866        return 0;
1867    }
1868#endif
1869
1870#if defined(CONFIG_SOC_JZ4740) || defined(CONFIG_SOC_JZ4750) || defined(CONFIG_SOC_JZ4750D)
1871    /*
1872     * On Jz4740 and Jz4750, the second USB port was used as device.
1873     */
1874    if (port1 == 2) {
1875        return 0;
1876    }
1877#endif
1878
18601879    /* Block EHCI CF initialization during the port reset.
18611880     * Some companion controllers don't like it when they mix.
18621881     */
...... 
28182837            le16_to_cpu(hub->descriptor->wHubCharacteristics);
28192838    struct usb_device *udev;
28202839    int status, i;
2840#ifdef CONFIG_JZSOC
2841    static char jzhub = 1; /* the hub first to be initialized is jzsoc on-chip hub */
2842#endif
28212843
28222844    dev_dbg (hub_dev,
28232845        "port %d, status %04x, change %04x, %s\n",
28242846        port1, portstatus, portchange, portspeed (portstatus));
28252847
2848#ifdef CONFIG_SOC_JZ4730
2849    /*
2850     * On Jz4730, we assume that the first USB port was used as device.
2851     * If not, please comment next lines.
2852     */
2853    if ((port1 == 1) && (jzhub)) {
2854        jzhub = 0;
2855        return;
2856    }
2857#endif
2858
2859#if defined(CONFIG_SOC_JZ4740) || defined(CONFIG_SOC_JZ4750) || defined(CONFIG_SOC_JZ4750D)
2860    /*
2861     * On Jz4740 and Jz4750, the second USB port was used as device.
2862     */
2863    if ((port1 == 2) && (jzhub)) {
2864        jzhub = 0;
2865        return;
2866    }
2867#endif
2868
28262869    if (hub->has_indicators) {
28272870        set_port_led(hub, port1, HUB_LED_AUTO);
28282871        hub->indicator[port1-1] = INDICATOR_AUTO;
drivers/usb/gadget/Kconfig
121121#
122122# Integrated controllers
123123#
124config USB_GADGET_JZ4740
125    boolean "JZ4740 UDC"
126    depends on SOC_JZ4740
127    select USB_GADGET_SELECTED
128    select USB_GADGET_DUALSPEED
129    help
130           Select this to support the Ingenic JZ4740 processor
131           high speed USB device controller.
132
133config USB_JZ4740
134    tristate
135    depends on USB_GADGET_JZ4740
136    default USB_GADGET
124137
125138config USB_GADGET_AT91
126139    boolean "Atmel AT91 USB Device Port"
127140    depends on ARCH_AT91 && !ARCH_AT91SAM9RL && !ARCH_AT91CAP9
128141    select USB_GADGET_SELECTED
142
129143    help
130144       Many Atmel AT91 processors (such as the AT91RM2000) have a
131145       full speed USB Device Port with support for five configurable
...... 
534548
535549endchoice
536550
551config USB_JZ_UDC_HOTPLUG
552    boolean "Ingenic USB Device Controller Hotplug Support"
553    depends on USB_GADGET_JZ4750
554
537555config USB_GADGET_DUALSPEED
538556    bool
539557    depends on USB_GADGET
...... 
541559    help
542560      Means that gadget drivers should include extra descriptors
543561      and code to handle dual-speed controllers.
544
545562#
546563# USB Gadget Drivers
547564#
drivers/usb/gadget/Makefile
2727obj-$(CONFIG_USB_CI13XXX) += ci13xxx_udc.o
2828obj-$(CONFIG_USB_S3C_HSOTG) += s3c-hsotg.o
2929obj-$(CONFIG_USB_LANGWELL) += langwell_udc.o
30obj-$(CONFIG_USB_JZ4740) += jz4740_udc.o
31
32obj-$(CONFIG_USB_JZ_UDC_HOTPLUG)+= udc_hotplug_core.o
3033
3134#
3235# USB gadget drivers
drivers/usb/gadget/gadget_chips.h
1515#ifndef __GADGET_CHIPS_H
1616#define __GADGET_CHIPS_H
1717
18#ifdef CONFIG_USB_GADGET_JZ4740
19#define gadget_is_jz4740(g) !strcmp("ingenic_hsusb", (g)->name)
20#else
21#define gadget_is_jz4740(g) 0
22#endif
23
1824#ifdef CONFIG_USB_GADGET_NET2280
1925#define gadget_is_net2280(g) !strcmp("net2280", (g)->name)
2026#else
...... 
239245        return 0x23;
240246    else if (gadget_is_langwell(gadget))
241247        return 0x24;
248    else if (gadget_is_jz4740(gadget))
249        return 0x25;
250
242251    return -ENOENT;
243252}
244253

Archive Download the corresponding diff file



interactive