Commit d9a80746 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'usb-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB changes from Greg Kroah-Hartman:
 "Here is the big USB pull request for 3.7-rc1

  There are lots of gadget driver changes (including copying a bunch of
  files into the drivers/staging/ccg/ directory so that the other gadget
  drivers can be fixed up properly without breaking that driver), and we
  remove the old obsolete ub.c driver from the tree.

  There are also the usual XHCI set of updates, and other various driver
  changes and updates.  We also are trying hard to remove the old dbg()
  macro, but the final bits of that removal will be coming in through
  the networking tree before we can delete it for good.

  All of these patches have been in the linux-next tree.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

Fix up several annoying - but fairly mindless - conflicts due to the
termios structure having moved into the tty device, and often clashing
with dbg -> dev_dbg conversion.

* tag 'usb-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (339 commits)
  USB: ezusb: move ezusb.c from drivers/usb/serial to drivers/usb/misc
  USB: uas: fix gcc warning
  USB: uas: fix locking
  USB: Fix race condition when removing host controllers
  USB: uas: add locking
  USB: uas: fix abort
  USB: uas: remove aborted field, replace with status bit.
  USB: uas: fix task management
  USB: uas: keep track of command urbs
  xhci: Intel Panther Point BEI quirk.
  powerpc/usb: remove checking PHY_CLK_VALID for UTMI PHY
  USB: ftdi_sio: add TIAO USB Multi-Protocol Adapter (TUMPA) support
  Revert "usb : Add sysfs files to control port power."
  USB: serial: remove vizzini driver
  usb: host: xhci: Fix Null pointer dereferencing with 71c731a2 for non-x86 systems
  Increase XHCI suspend timeout to 16ms
  USB: ohci-at91: fix null pointer in ohci_hcd_at91_overcurrent_irq
  USB: sierra_ms: don't keep unused variable
  fsl/usb: Add support for USB controller version 2.4
  USB: qcaux: add Pantech vendor class match
  ...
parents 3498d13b 70c048a2
...@@ -220,3 +220,10 @@ Description: ...@@ -220,3 +220,10 @@ Description:
If the device doesn't support LTM, the file will read "no". If the device doesn't support LTM, the file will read "no".
The file will be present for all speeds of USB devices, and will The file will be present for all speeds of USB devices, and will
always read "no" for USB 1.1 and USB 2.0 devices. always read "no" for USB 1.1 and USB 2.0 devices.
What: /sys/bus/usb/devices/.../(hub interface)/portX
Date: August 2012
Contact: Lan Tianyu <tianyu.lan@intel.com>
Description:
The /sys/bus/usb/devices/.../(hub interface)/portX
is usb port device's sysfs directory.
AM33XX MUSB GLUE
- compatible : Should be "ti,musb-am33xx"
- ti,hwmods : must be "usb_otg_hs"
- multipoint : Should be "1" indicating the musb controller supports
multipoint. This is a MUSB configuration-specific setting.
- num_eps : Specifies the number of endpoints. This is also a
MUSB configuration-specific setting. Should be set to "16"
- ram_bits : Specifies the ram address size. Should be set to "12"
- port0_mode : Should be "3" to represent OTG. "1" signifies HOST and "2"
represents PERIPHERAL.
- port1_mode : Should be "1" to represent HOST. "3" signifies OTG and "2"
represents PERIPHERAL.
- power : Should be "250". This signifies the controller can supply upto
500mA when operating in host mode.
...@@ -7,7 +7,10 @@ Required properties: ...@@ -7,7 +7,10 @@ Required properties:
Optional properties: Optional properties:
- fsl,usbphy: phandler of usb phy that connects to the only one port - fsl,usbphy: phandler of usb phy that connects to the only one port
- fsl,usbmisc: phandler of non-core register device, with one argument
that indicate usb controller index
- vbus-supply: regulator for vbus - vbus-supply: regulator for vbus
- disable-over-current: disable over current detect
Examples: Examples:
usb@02184000 { /* USB OTG */ usb@02184000 { /* USB OTG */
...@@ -15,4 +18,6 @@ usb@02184000 { /* USB OTG */ ...@@ -15,4 +18,6 @@ usb@02184000 { /* USB OTG */
reg = <0x02184000 0x200>; reg = <0x02184000 0x200>;
interrupts = <0 43 0x04>; interrupts = <0 43 0x04>;
fsl,usbphy = <&usbphy1>; fsl,usbphy = <&usbphy1>;
fsl,usbmisc = <&usbmisc 0>;
disable-over-current;
}; };
OMAP GLUE
OMAP MUSB GLUE
- compatible : Should be "ti,omap4-musb" or "ti,omap3-musb"
- ti,hwmods : must be "usb_otg_hs"
- multipoint : Should be "1" indicating the musb controller supports
multipoint. This is a MUSB configuration-specific setting.
- num_eps : Specifies the number of endpoints. This is also a
MUSB configuration-specific setting. Should be set to "16"
- ram_bits : Specifies the ram address size. Should be set to "12"
- interface_type : This is a board specific setting to describe the type of
interface between the controller and the phy. It should be "0" or "1"
specifying ULPI and UTMI respectively.
- mode : Should be "3" to represent OTG. "1" signifies HOST and "2"
represents PERIPHERAL.
- power : Should be "50". This signifies the controller can supply upto
100mA when operating in host mode.
SOC specific device node entry
usb_otg_hs: usb_otg_hs@4a0ab000 {
compatible = "ti,omap4-musb";
ti,hwmods = "usb_otg_hs";
multipoint = <1>;
num_eps = <16>;
ram_bits = <12>;
};
Board specific device node entry
&usb_otg_hs {
interface_type = <1>;
mode = <3>;
power = <50>;
};
Generic Platform UHCI controllers.
Required properties:
- compatible: Should be "platform-uhci".
- reg: Address range of the uhci registers
- interrupts: Should contain the uhci interrupt.
usb: uhci@D8007301 {
compatible = "platform-uhci", "usb-uhci";
reg = <0xD8007301 0x200>;
interrupts = <0>;
};
PXA USB controllers
OHCI
Required properties:
- compatible: Should be "marvell,pxa-ohci" for USB controllers
used in host mode.
Optional properties:
- "marvell,enable-port1", "marvell,enable-port2", "marvell,enable-port3"
If present, enables the appropriate USB port of the controller.
- "marvell,port-mode" selects the mode of the ports:
1 = PMM_NPS_MODE
2 = PMM_GLOBAL_MODE
3 = PMM_PERPORT_MODE
- "marvell,power-sense-low" - power sense pin is low-active.
- "marvell,power-control-low" - power control pin is low-active.
- "marvell,no-oc-protection" - disable over-current protection.
- "marvell,oc-mode-perport" - enable per-port over-current protection.
- "marvell,power_on_delay" Power On to Power Good time - in ms.
Example:
usb0: ohci@4c000000 {
compatible = "marvell,pxa-ohci", "usb-ohci";
reg = <0x4c000000 0x100000>;
interrupts = <18>;
marvell,enable-port1;
marvell,port-mode = <2>; /* PMM_GLOBAL_MODE */
};
USB COMPARATOR OF TWL CHIPS
TWL6030 USB COMPARATOR
- compatible : Should be "ti,twl6030-usb"
- interrupts : Two interrupt numbers to the cpu should be specified. First
interrupt number is the otg interrupt number that raises ID interrupts when
the controller has to act as host and the second interrupt number is the
usb interrupt number that raises VBUS interrupts when the controller has to
act as device
- usb-supply : phandle to the regulator device tree node. It should be vusb
if it is twl6030 or ldousb if it is twl6025 subclass.
twl6030-usb {
compatible = "ti,twl6030-usb";
interrupts = < 4 10 >;
};
Board specific device node entry
&twl6030-usb {
usb-supply = <&vusb>;
};
TWL4030 USB PHY AND COMPARATOR
- compatible : Should be "ti,twl4030-usb"
- interrupts : The interrupt numbers to the cpu should be specified. First
interrupt number is the otg interrupt number that raises ID interrupts
and VBUS interrupts. The second interrupt number is optional.
- <supply-name>-supply : phandle to the regulator device tree node.
<supply-name> should be vusb1v5, vusb1v8 and vusb3v1
- usb_mode : The mode used by the phy to connect to the controller. "1"
specifies "ULPI" mode and "2" specifies "CEA2011_3PIN" mode.
twl4030-usb {
compatible = "ti,twl4030-usb";
interrupts = < 10 4 >;
usb1v5-supply = <&vusb1v5>;
usb1v8-supply = <&vusb1v8>;
usb3v1-supply = <&vusb3v1>;
usb_mode = <1>;
};
USB PHY
OMAP USB2 PHY
Required properties:
- compatible: Should be "ti,omap-usb2"
- reg : Address and length of the register set for the device. Also
add the address of control module dev conf register until a driver for
control module is added
This is usually a subnode of ocp2scp to which it is connected.
usb2phy@4a0ad080 {
compatible = "ti,omap-usb2";
reg = <0x4a0ad080 0x58>,
<0x4a002300 0x4>;
};
* Freescale i.MX non-core registers
Required properties:
- #index-cells: Cells used to descibe usb controller index. Should be <1>
- compatible: Should be one of below:
"fsl,imx6q-usbmisc" for imx6q
- reg: Should contain registers location and length
Examples:
usbmisc@02184800 {
#index-cells = <1>;
compatible = "fsl,imx6q-usbmisc";
reg = <0x02184800 0x200>;
};
VIA VT8500 and Wondermedia WM8xxx SoC USB controllers.
Required properties:
- compatible: Should be "via,vt8500-ehci" or "wm,prizm-ehci".
- reg: Address range of the ehci registers. size should be 0x200
- interrupts: Should contain the ehci interrupt.
usb: ehci@D8007100 {
compatible = "wm,prizm-ehci", "usb-ehci";
reg = <0xD8007100 0x200>;
interrupts = <1>;
};
...@@ -463,17 +463,6 @@ Who: Bjorn Helgaas <bhelgaas@google.com> ...@@ -463,17 +463,6 @@ Who: Bjorn Helgaas <bhelgaas@google.com>
---------------------------- ----------------------------
What: Low Performance USB Block driver ("CONFIG_BLK_DEV_UB")
When: 3.6
Why: This driver provides support for USB storage devices like "USB
sticks". As of now, it is deactivated in Debian, Fedora and
Ubuntu. All current users can switch over to usb-storage
(CONFIG_USB_STORAGE) which only drawback is the additional SCSI
stack.
Who: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
----------------------------
What: get_robust_list syscall What: get_robust_list syscall
When: 2013 When: 2013
Why: There appear to be no production users of the get_robust_list syscall, Why: There appear to be no production users of the get_robust_list syscall,
......
...@@ -155,6 +155,9 @@ If the kernel gets fooled in this way, it's almost certain to cause ...@@ -155,6 +155,9 @@ If the kernel gets fooled in this way, it's almost certain to cause
data corruption and to crash your system. You'll have no one to blame data corruption and to crash your system. You'll have no one to blame
but yourself. but yourself.
For those devices with avoid_reset_quirk attribute being set, persist
maybe fail because they may morph after reset.
YOU HAVE BEEN WARNED! USE AT YOUR OWN RISK! YOU HAVE BEEN WARNED! USE AT YOUR OWN RISK!
That having been said, most of the time there shouldn't be any trouble That having been said, most of the time there shouldn't be any trouble
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <linux/spi/ads7846.h> #include <linux/spi/ads7846.h>
#include <linux/i2c/twl.h> #include <linux/i2c/twl.h>
#include <linux/usb/otg.h> #include <linux/usb/otg.h>
#include <linux/usb/nop-usb-xceiv.h>
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
#include <linux/wl12xx.h> #include <linux/wl12xx.h>
......
...@@ -5890,6 +5890,12 @@ static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = { ...@@ -5890,6 +5890,12 @@ static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
.pa_end = 0x4a0ab003, .pa_end = 0x4a0ab003,
.flags = ADDR_TYPE_RT .flags = ADDR_TYPE_RT
}, },
{
/* XXX: Remove this once control module driver is in place */
.pa_start = 0x4a00233c,
.pa_end = 0x4a00233f,
.flags = ADDR_TYPE_RT
},
{ } { }
}; };
......
...@@ -31,144 +31,6 @@ ...@@ -31,144 +31,6 @@
#include <plat/usb.h> #include <plat/usb.h>
#include "control.h" #include "control.h"
/* OMAP control module register for UTMI PHY */
#define CONTROL_DEV_CONF 0x300
#define PHY_PD 0x1
#define USBOTGHS_CONTROL 0x33c
#define AVALID BIT(0)
#define BVALID BIT(1)
#define VBUSVALID BIT(2)
#define SESSEND BIT(3)
#define IDDIG BIT(4)
static struct clk *phyclk, *clk48m, *clk32k;
static void __iomem *ctrl_base;
static int usbotghs_control;
int omap4430_phy_init(struct device *dev)
{
ctrl_base = ioremap(OMAP443X_SCM_BASE, SZ_1K);
if (!ctrl_base) {
pr_err("control module ioremap failed\n");
return -ENOMEM;
}
/* Power down the phy */
__raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF);
if (!dev) {
iounmap(ctrl_base);
return 0;
}
phyclk = clk_get(dev, "ocp2scp_usb_phy_ick");
if (IS_ERR(phyclk)) {
dev_err(dev, "cannot clk_get ocp2scp_usb_phy_ick\n");
iounmap(ctrl_base);
return PTR_ERR(phyclk);
}
clk48m = clk_get(dev, "ocp2scp_usb_phy_phy_48m");
if (IS_ERR(clk48m)) {
dev_err(dev, "cannot clk_get ocp2scp_usb_phy_phy_48m\n");
clk_put(phyclk);
iounmap(ctrl_base);
return PTR_ERR(clk48m);
}
clk32k = clk_get(dev, "usb_phy_cm_clk32k");
if (IS_ERR(clk32k)) {
dev_err(dev, "cannot clk_get usb_phy_cm_clk32k\n");
clk_put(phyclk);
clk_put(clk48m);
iounmap(ctrl_base);
return PTR_ERR(clk32k);
}
return 0;
}
int omap4430_phy_set_clk(struct device *dev, int on)
{
static int state;
if (on && !state) {
/* Enable the phy clocks */
clk_enable(phyclk);
clk_enable(clk48m);
clk_enable(clk32k);
state = 1;
} else if (state) {
/* Disable the phy clocks */
clk_disable(phyclk);
clk_disable(clk48m);
clk_disable(clk32k);
state = 0;
}
return 0;
}
int omap4430_phy_power(struct device *dev, int ID, int on)
{
if (on) {
if (ID)
/* enable VBUS valid, IDDIG groung */
__raw_writel(AVALID | VBUSVALID, ctrl_base +
USBOTGHS_CONTROL);
else
/*
* Enable VBUS Valid, AValid and IDDIG
* high impedance
*/
__raw_writel(IDDIG | AVALID | VBUSVALID,
ctrl_base + USBOTGHS_CONTROL);
} else {
/* Enable session END and IDIG to high impedance. */
__raw_writel(SESSEND | IDDIG, ctrl_base +
USBOTGHS_CONTROL);
}
return 0;
}
int omap4430_phy_suspend(struct device *dev, int suspend)
{
if (suspend) {
/* Disable the clocks */
omap4430_phy_set_clk(dev, 0);
/* Power down the phy */
__raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF);
/* save the context */
usbotghs_control = __raw_readl(ctrl_base + USBOTGHS_CONTROL);
} else {
/* Enable the internel phy clcoks */
omap4430_phy_set_clk(dev, 1);
/* power on the phy */
if (__raw_readl(ctrl_base + CONTROL_DEV_CONF) & PHY_PD) {
__raw_writel(~PHY_PD, ctrl_base + CONTROL_DEV_CONF);
mdelay(200);
}
/* restore the context */
__raw_writel(usbotghs_control, ctrl_base + USBOTGHS_CONTROL);
}
return 0;
}
int omap4430_phy_exit(struct device *dev)
{
if (ctrl_base)
iounmap(ctrl_base);
if (phyclk)
clk_put(phyclk);
if (clk48m)
clk_put(clk48m);
if (clk32k)
clk_put(clk32k);
return 0;
}
void am35x_musb_reset(void) void am35x_musb_reset(void)
{ {
u32 regval; u32 regval;
......
...@@ -251,11 +251,6 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data, ...@@ -251,11 +251,6 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
#if defined(CONFIG_ARCH_OMAP4) #if defined(CONFIG_ARCH_OMAP4)
static struct twl4030_usb_data omap4_usb_pdata = { static struct twl4030_usb_data omap4_usb_pdata = {
.phy_init = omap4430_phy_init,
.phy_exit = omap4430_phy_exit,
.phy_power = omap4430_phy_power,
.phy_set_clock = omap4430_phy_set_clk,
.phy_suspend = omap4430_phy_suspend,
}; };
static struct regulator_init_data omap4_vdac_idata = { static struct regulator_init_data omap4_vdac_idata = {
......
...@@ -117,7 +117,4 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data) ...@@ -117,7 +117,4 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data)
dev->dma_mask = &musb_dmamask; dev->dma_mask = &musb_dmamask;
dev->coherent_dma_mask = musb_dmamask; dev->coherent_dma_mask = musb_dmamask;
put_device(dev); put_device(dev);
if (cpu_is_omap44xx())
omap4430_phy_init(dev);
} }
...@@ -21,7 +21,6 @@ obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o ...@@ -21,7 +21,6 @@ obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
obj-$(CONFIG_TEGRA_SYSTEM_DMA) += dma.o obj-$(CONFIG_TEGRA_SYSTEM_DMA) += dma.o
obj-$(CONFIG_CPU_FREQ) += cpu-tegra.o obj-$(CONFIG_CPU_FREQ) += cpu-tegra.o
obj-$(CONFIG_TEGRA_PCI) += pcie.o obj-$(CONFIG_TEGRA_PCI) += pcie.o
obj-$(CONFIG_USB_SUPPORT) += usb_phy.o
obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += board-dt-tegra20.o obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += board-dt-tegra20.o
obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += board-dt-tegra30.o obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += board-dt-tegra30.o
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <mach/irqs.h> #include <mach/irqs.h>
#include <mach/iomap.h> #include <mach/iomap.h>
#include <mach/dma.h> #include <mach/dma.h>
#include <mach/usb_phy.h> #include <linux/usb/tegra_usb_phy.h>
#include "gpio-names.h" #include "gpio-names.h"
#include "devices.h" #include "devices.h"
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/platform_data/tegra_usb.h> #include <linux/platform_data/tegra_usb.h>
#include <mach/usb_phy.h> #include <linux/usb/tegra_usb_phy.h>
extern struct tegra_ulpi_config tegra_ehci2_ulpi_phy_config; extern struct tegra_ulpi_config tegra_ehci2_ulpi_phy_config;
......
...@@ -33,6 +33,7 @@ static struct platform_device *devices[] __initdata = { ...@@ -33,6 +33,7 @@ static struct platform_device *devices[] __initdata = {
&vt8500_device_uart0, &vt8500_device_uart0,
&vt8500_device_lcdc, &vt8500_device_lcdc,
&vt8500_device_ehci, &vt8500_device_ehci,
&vt8500_device_uhci,
&vt8500_device_ge_rops, &vt8500_device_ge_rops,
&vt8500_device_pwm, &vt8500_device_pwm,
&vt8500_device_pwmbl, &vt8500_device_pwmbl,
......
...@@ -48,6 +48,11 @@ void __init vt8500_set_resources(void) ...@@ -48,6 +48,11 @@ void __init vt8500_set_resources(void)
tmp[1] = wmt_irq_res(IRQ_EHCI); tmp[1] = wmt_irq_res(IRQ_EHCI);
wmt_res_add(&vt8500_device_ehci, tmp, 2); wmt_res_add(&vt8500_device_ehci, tmp, 2);
/* vt8500 uses a single IRQ for both EHCI and UHCI controllers */
tmp[0] = wmt_mmio_res(VT8500_UHCI_BASE, SZ_512);
tmp[1] = wmt_irq_res(IRQ_EHCI);
wmt_res_add(&vt8500_device_uhci, tmp, 2);
tmp[0] = wmt_mmio_res(VT8500_GEGEA_BASE, SZ_256); tmp[0] = wmt_mmio_res(VT8500_GEGEA_BASE, SZ_256);
wmt_res_add(&vt8500_device_ge_rops, tmp, 1); wmt_res_add(&vt8500_device_ge_rops, tmp, 1);
......
...@@ -55,6 +55,10 @@ void __init wm8505_set_resources(void) ...@@ -55,6 +55,10 @@ void __init wm8505_set_resources(void)
tmp[1] = wmt_irq_res(IRQ_EHCI); tmp[1] = wmt_irq_res(IRQ_EHCI);
wmt_res_add(&vt8500_device_ehci, tmp, 2); wmt_res_add(&vt8500_device_ehci, tmp, 2);
tmp[0] = wmt_mmio_res(WM8505_UHCI_BASE, SZ_512);
tmp[1] = wmt_irq_res(IRQ_UHCI);
wmt_res_add(&vt8500_device_uhci, tmp, 2);
tmp[0] = wmt_mmio_res(WM8505_GEGEA_BASE, SZ_256); tmp[0] = wmt_mmio_res(WM8505_GEGEA_BASE, SZ_256);
wmt_res_add(&vt8500_device_ge_rops, tmp, 1); wmt_res_add(&vt8500_device_ge_rops, tmp, 1);
......
...@@ -204,6 +204,17 @@ struct platform_device vt8500_device_ehci = { ...@@ -204,6 +204,17 @@ struct platform_device vt8500_device_ehci = {
}, },
}; };
static u64 uhci_dma_mask = DMA_BIT_MASK(32);
struct platform_device vt8500_device_uhci = {
.name = "platform-uhci",
.id = 0,
.dev = {
.dma_mask = &uhci_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
};
struct platform_device vt8500_device_ge_rops = { struct platform_device vt8500_device_ge_rops = {
.name = "wmt_ge_rops", .name = "wmt_ge_rops",
.id = -1, .id = -1,
......
...@@ -81,6 +81,7 @@ extern struct platform_device vt8500_device_uart5; ...@@ -81,6 +81,7 @@ extern struct platform_device vt8500_device_uart5;
extern struct platform_device vt8500_device_lcdc; extern struct platform_device vt8500_device_lcdc;
extern struct platform_device vt8500_device_wm8505_fb; extern struct platform_device vt8500_device_wm8505_fb;
extern struct platform_device vt8500_device_ehci; extern struct platform_device vt8500_device_ehci;
extern struct platform_device vt8500_device_uhci;
extern struct platform_device vt8500_device_ge_rops; extern struct platform_device vt8500_device_ge_rops;
extern struct platform_device vt8500_device_pwm; extern struct platform_device vt8500_device_pwm;
extern struct platform_device vt8500_device_pwmbl; extern struct platform_device vt8500_device_pwmbl;
......
...@@ -32,6 +32,7 @@ static void __iomem *pmc_hiber; ...@@ -32,6 +32,7 @@ static void __iomem *pmc_hiber;
static struct platform_device *devices[] __initdata = { static struct platform_device *devices[] __initdata = {
&vt8500_device_uart0, &vt8500_device_uart0,
&vt8500_device_ehci, &vt8500_device_ehci,
&vt8500_device_uhci,
&vt8500_device_wm8505_fb, &vt8500_device_wm8505_fb,
&vt8500_device_ge_rops, &vt8500_device_ge_rops,
&vt8500_device_pwm, &vt8500_device_pwm,
......
...@@ -353,18 +353,6 @@ config BLK_DEV_SX8 ...@@ -353,18 +353,6 @@ config BLK_DEV_SX8
Use devices /dev/sx8/$N and /dev/sx8/$Np$M. Use devices /dev/sx8/$N and /dev/sx8/$Np$M.
config BLK_DEV_UB
tristate "Low Performance USB Block driver (deprecated)"
depends on USB
help
This driver supports certain USB attached storage devices
such as flash keys.
If you enable this driver, it is recommended to avoid conflicts
with usb-storage by enabling USB_LIBUSUAL.
If unsure, say N.
config BLK_DEV_RAM config BLK_DEV_RAM
tristate "RAM block device support" tristate "RAM block device support"
---help--- ---help---
......
...@@ -33,7 +33,6 @@ obj-$(CONFIG_VIRTIO_BLK) += virtio_blk.o ...@@ -33,7 +33,6 @@ obj-$(CONFIG_VIRTIO_BLK) += virtio_blk.o
obj-$(CONFIG_VIODASD) += viodasd.o obj-$(CONFIG_VIODASD) += viodasd.o
obj-$(CONFIG_BLK_DEV_SX8) += sx8.o obj-$(CONFIG_BLK_DEV_SX8) += sx8.o
obj-$(CONFIG_BLK_DEV_UB) += ub.o
obj-$(CONFIG_BLK_DEV_HD) += hd.o obj-$(CONFIG_BLK_DEV_HD) += hd.o
obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += xen-blkfront.o obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += xen-blkfront.o
......
This diff is collapsed.
...@@ -17,4 +17,9 @@ config USB_G_CCG ...@@ -17,4 +17,9 @@ config USB_G_CCG
Configurable Composite Gadget can be compiled "M" only Configurable Composite Gadget can be compiled "M" only
or not at all. or not at all.
BIG FAT NOTE: DON'T RELY ON THIS USERINTERFACE HERE! AS PART
OF THE REWORK DONE HERE WILL BE A NEW USER INTERFACE WITHOUT ANY
COMPATIBILITY TO THIS SYSFS INTERFACE HERE. BE AWARE OF THIS
BEFORE SELECTING THIS.
endif # USB_GADGET endif # USB_GADGET
g_ccg-y := ccg.o g_ccg-y := ccg.o
ccflags-y += -Idrivers/usb/gadget
obj-$(CONFIG_USB_G_CCG) += g_ccg.o obj-$(CONFIG_USB_G_CCG) += g_ccg.o
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/usb/ch9.h> #include <linux/usb/ch9.h>
#include <linux/usb/composite.h> #include "composite.h"
#include <linux/usb/gadget.h> #include <linux/usb/gadget.h>
#include "gadget_chips.h" #include "gadget_chips.h"
...@@ -44,19 +44,19 @@ ...@@ -44,19 +44,19 @@
* the runtime footprint, and giving us at least some parts of what * the runtime footprint, and giving us at least some parts of what
* a "gcc --combine ... part1.c part2.c part3.c ... " build would. * a "gcc --combine ... part1.c part2.c part3.c ... " build would.
*/ */
#include "../../usb/gadget/usbstring.c" #include "usbstring.c"
#include "../../usb/gadget/config.c" #include "config.c"
#include "../../usb/gadget/epautoconf.c" #include "epautoconf.c"
#include "../../usb/gadget/composite.c" #include "composite.c"
#include "../../usb/gadget/f_mass_storage.c" #include "f_mass_storage.c"
#include "../../usb/gadget/u_serial.c" #include "u_serial.c"
#include "../../usb/gadget/f_acm.c" #include "f_acm.c"
#define USB_ETH_RNDIS y #define USB_ETH_RNDIS y
#include "../../usb/gadget/f_rndis.c" #include "f_rndis.c"
#include "../../usb/gadget/rndis.c" #include "rndis.c"
#include "../../usb/gadget/u_ether.c" #include "u_ether.c"
#include "../../usb/gadget/f_fs.c" #include "f_fs.c"
MODULE_AUTHOR("Mike Lockwood, Andrzej Pietrasiewicz"); MODULE_AUTHOR("Mike Lockwood, Andrzej Pietrasiewicz");
MODULE_DESCRIPTION("Configurable Composite USB Gadget"); MODULE_DESCRIPTION("Configurable Composite USB Gadget");
...@@ -1156,6 +1156,7 @@ static int ccg_usb_unbind(struct usb_composite_dev *cdev) ...@@ -1156,6 +1156,7 @@ static int ccg_usb_unbind(struct usb_composite_dev *cdev)
static struct usb_composite_driver ccg_usb_driver = { static struct usb_composite_driver ccg_usb_driver = {
.name = "configurable_usb", .name = "configurable_usb",
.dev = &device_desc, .dev = &device_desc,
.bind = ccg_bind,
.unbind = ccg_usb_unbind, .unbind = ccg_usb_unbind,
.needs_serial = true, .needs_serial = true,
.iManufacturer = "Linux Foundation", .iManufacturer = "Linux Foundation",
...@@ -1271,7 +1272,7 @@ static int __init init(void) ...@@ -1271,7 +1272,7 @@ static int __init init(void)
composite_driver.setup = ccg_setup; composite_driver.setup = ccg_setup;
composite_driver.disconnect = ccg_disconnect; composite_driver.disconnect = ccg_disconnect;
err = usb_composite_probe(&ccg_usb_driver, ccg_bind); err = usb_composite_probe(&ccg_usb_driver);
if (err) { if (err) {
class_destroy(ccg_class); class_destroy(ccg_class);
kfree(dev); kfree(dev);
......
This diff is collapsed.
This diff is collapsed.
/*
* usb/gadget/config.c -- simplify building config descriptors
*
* Copyright (C) 2003 David Brownell
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/string.h>
#include <linux/device.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
/**
* usb_descriptor_fillbuf - fill buffer with descriptors
* @buf: Buffer to be filled
* @buflen: Size of buf
* @src: Array of descriptor pointers, terminated by null pointer.
*
* Copies descriptors into the buffer, returning the length or a
* negative error code if they can't all be copied. Useful when
* assembling descriptors for an associated set of interfaces used
* as part of configuring a composite device; or in other cases where
* sets of descriptors need to be marshaled.
*/
int
usb_descriptor_fillbuf(void *buf, unsigned buflen,
const struct usb_descriptor_header **src)
{
u8 *dest = buf;
if (!src)
return -EINVAL;
/* fill buffer from src[] until null descriptor ptr */
for (; NULL != *src; src++) {
unsigned len = (*src)->bLength;
if (len > buflen)
return -EINVAL;
memcpy(dest, *src, len);
buflen -= len;
dest += len;
}
return dest - (u8 *)buf;
}
/**
* usb_gadget_config_buf - builts a complete configuration descriptor
* @config: Header for the descriptor, including characteristics such
* as power requirements and number of interfaces.
* @desc: Null-terminated vector of pointers to the descriptors (interface,
* endpoint, etc) defining all functions in this device configuration.
* @buf: Buffer for the resulting configuration descriptor.
* @length: Length of buffer. If this is not big enough to hold the
* entire configuration descriptor, an error code will be returned.
*
* This copies descriptors into the response buffer, building a descriptor
* for that configuration. It returns the buffer length or a negative
* status code. The config.wTotalLength field is set to match the length
* of the result, but other descriptor fields (including power usage and
* interface count) must be set by the caller.
*
* Gadget drivers could use this when constructing a config descriptor
* in response to USB_REQ_GET_DESCRIPTOR. They will need to patch the
* resulting bDescriptorType value if USB_DT_OTHER_SPEED_CONFIG is needed.
*/
int usb_gadget_config_buf(
const struct usb_config_descriptor *config,
void *buf,
unsigned length,
const struct usb_descriptor_header **desc
)
{
struct usb_config_descriptor *cp = buf;
int len;
/* config descriptor first */
if (length < USB_DT_CONFIG_SIZE || !desc)
return -EINVAL;
*cp = *config;
/* then interface/endpoint/class/vendor/... */
len = usb_descriptor_fillbuf(USB_DT_CONFIG_SIZE + (u8*)buf,
length - USB_DT_CONFIG_SIZE, desc);
if (len < 0)
return len;
len += USB_DT_CONFIG_SIZE;
if (len > 0xffff)
return -EINVAL;
/* patch up the config descriptor */
cp->bLength = USB_DT_CONFIG_SIZE;
cp->bDescriptorType = USB_DT_CONFIG;
cp->wTotalLength = cpu_to_le16(len);
cp->bmAttributes |= USB_CONFIG_ATT_ONE;
return len;
}
/**
* usb_copy_descriptors - copy a vector of USB descriptors
* @src: null-terminated vector to copy
* Context: initialization code, which may sleep
*
* This makes a copy of a vector of USB descriptors. Its primary use
* is to support usb_function objects which can have multiple copies,
* each needing different descriptors. Functions may have static
* tables of descriptors, which are used as templates and customized
* with identifiers (for interfaces, strings, endpoints, and more)
* as needed by a given function instance.
*/
struct usb_descriptor_header **
usb_copy_descriptors(struct usb_descriptor_header **src)
{
struct usb_descriptor_header **tmp;
unsigned bytes;
unsigned n_desc;
void *mem;
struct usb_descriptor_header **ret;
/* count descriptors and their sizes; then add vector size */
for (bytes = 0, n_desc = 0, tmp = src; *tmp; tmp++, n_desc++)
bytes += (*tmp)->bLength;
bytes += (n_desc + 1) * sizeof(*tmp);
mem = kmalloc(bytes, GFP_KERNEL);
if (!mem)
return NULL;
/* fill in pointers starting at "tmp",
* to descriptors copied starting at "mem";
* and return "ret"
*/
tmp = mem;
ret = mem;
mem += (n_desc + 1) * sizeof(*tmp);
while (*src) {
memcpy(mem, *src, (*src)->bLength);
*tmp = mem;
tmp++;
mem += (*src)->bLength;
src++;
}
*tmp = NULL;
return ret;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* ndis.h
*
* ntddndis.h modified by Benedikt Spranger <b.spranger@pengutronix.de>
*
* Thanks to the cygwin development team,
* espacially to Casper S. Hornstrup <chorns@users.sourceforge.net>
*
* THIS SOFTWARE IS NOT COPYRIGHTED
*
* This source code is offered for use in the public domain. You may
* use, modify or distribute it freely.
*/
#ifndef _LINUX_NDIS_H
#define _LINUX_NDIS_H
enum NDIS_DEVICE_POWER_STATE {
NdisDeviceStateUnspecified = 0,
NdisDeviceStateD0,
NdisDeviceStateD1,
NdisDeviceStateD2,
NdisDeviceStateD3,
NdisDeviceStateMaximum
};
struct NDIS_PM_WAKE_UP_CAPABILITIES {
enum NDIS_DEVICE_POWER_STATE MinMagicPacketWakeUp;
enum NDIS_DEVICE_POWER_STATE MinPatternWakeUp;
enum NDIS_DEVICE_POWER_STATE MinLinkChangeWakeUp;
};
struct NDIS_PNP_CAPABILITIES {
__le32 Flags;
struct NDIS_PM_WAKE_UP_CAPABILITIES WakeUpCapabilities;
};
struct NDIS_PM_PACKET_PATTERN {
__le32 Priority;
__le32 Reserved;
__le32 MaskSize;
__le32 PatternOffset;
__le32 PatternSize;
__le32 PatternFlags;
};
#endif /* _LINUX_NDIS_H */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -320,7 +320,7 @@ static int get_device_info(struct us_data *us, const struct usb_device_id *id) ...@@ -320,7 +320,7 @@ static int get_device_info(struct us_data *us, const struct usb_device_id *id)
us->subclass = idesc->bInterfaceSubClass; us->subclass = idesc->bInterfaceSubClass;
us->protocol = idesc->bInterfaceProtocol; us->protocol = idesc->bInterfaceProtocol;
us->fflags = USB_US_ORIG_FLAGS(id->driver_info); us->fflags = id->driver_info;
us->Power_IsResum = false; us->Power_IsResum = false;
if (us->fflags & US_FL_IGNORE_DEVICE) if (us->fflags & US_FL_IGNORE_DEVICE)
......
This diff is collapsed.
...@@ -161,8 +161,7 @@ static void usbip_dump_usb_device(struct usb_device *udev) ...@@ -161,8 +161,7 @@ static void usbip_dump_usb_device(struct usb_device *udev)
dev_dbg(dev, "have_langid %d, string_langid %d\n", dev_dbg(dev, "have_langid %d, string_langid %d\n",
udev->have_langid, udev->string_langid); udev->have_langid, udev->string_langid);
dev_dbg(dev, "maxchild %d, children %p\n", dev_dbg(dev, "maxchild %d\n", udev->maxchild);
udev->maxchild, udev->children);
} }
static void usbip_dump_request_type(__u8 rt) static void usbip_dump_request_type(__u8 rt)
......
...@@ -48,6 +48,7 @@ config USB_ARCH_HAS_EHCI ...@@ -48,6 +48,7 @@ config USB_ARCH_HAS_EHCI
default y if SPARC_LEON default y if SPARC_LEON
default y if ARCH_MMP default y if ARCH_MMP
default y if MACH_LOONGSON1 default y if MACH_LOONGSON1
default y if PLAT_ORION
default PCI default PCI
# some non-PCI HCDs implement xHCI # some non-PCI HCDs implement xHCI
......
This diff is collapsed.
This diff is collapsed.
...@@ -13,7 +13,6 @@ if USB_CHIPIDEA ...@@ -13,7 +13,6 @@ if USB_CHIPIDEA
config USB_CHIPIDEA_UDC config USB_CHIPIDEA_UDC
bool "ChipIdea device controller" bool "ChipIdea device controller"
depends on USB_GADGET=y || USB_GADGET=USB_CHIPIDEA depends on USB_GADGET=y || USB_GADGET=USB_CHIPIDEA
select USB_GADGET_DUALSPEED
help help
Say Y here to enable device controller functionality of the Say Y here to enable device controller functionality of the
ChipIdea driver. ChipIdea driver.
......
ccflags-$(CONFIG_USB_CHIPIDEA_DEBUG) := -DDEBUG
obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc.o obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc.o
ci_hdrc-y := core.o ci_hdrc-y := core.o
...@@ -15,5 +17,5 @@ ifneq ($(CONFIG_PCI),) ...@@ -15,5 +17,5 @@ ifneq ($(CONFIG_PCI),)
endif endif
ifneq ($(CONFIG_OF_DEVICE),) ifneq ($(CONFIG_OF_DEVICE),)
obj-$(CONFIG_USB_CHIPIDEA) += ci13xxx_imx.o obj-$(CONFIG_USB_CHIPIDEA) += ci13xxx_imx.o usbmisc_imx6q.o
endif endif
...@@ -139,6 +139,7 @@ struct ci13xxx { ...@@ -139,6 +139,7 @@ struct ci13xxx {
enum ci_role role; enum ci_role role;
bool is_otg; bool is_otg;
struct work_struct work; struct work_struct work;
struct work_struct vbus_work;
struct workqueue_struct *wq; struct workqueue_struct *wq;
struct dma_pool *qh_pool; struct dma_pool *qh_pool;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment