Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ed962a2 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge 3.1-rc4 into usb-next



This was done to resolve a conflict in this file:
	drivers/usb/host/xhci-ring.c

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parents c6a389f1 55a46269
Loading
Loading
Loading
Loading
+53 −0
Original line number Diff line number Diff line

 TODO
~~~~~~
Please pick something while reading :)

- Implement streaming support for BULK endpoints
  Tatyana's patch "usb: Add streams support to the gadget framework"
  introduces streaming support for the gadget driver.
  Every usb_request has new field called stream_id which holds its id.
  Every usb_ep has a field num_supported_strms which describes the max
  number of streams supported (for this ep).
  UAS is AFAIK the only gadget with streaming support.

- Convert interrupt handler to per-ep-thread-irq

  As it turns out some DWC3-commands ~1ms to complete. Currently we spin
  until the command completes which is bad.

  Implementation idea:
  - dwc core implements a demultiplexing irq chip for interrupts per
    endpoint. The interrupt numbers are allocated during probe and belong
    to the device. If MSI provides per-endpoint interrupt this dummy
    interrupt chip can be replaced with "real" interrupts.
  - interrupts are requested / allocated on usb_ep_enable() and removed on
    usb_ep_disable(). Worst case are 32 interrupts, the lower limit is two
    for ep0/1.
  - dwc3_send_gadget_ep_cmd() will sleep in wait_for_completion_timeout()
    until the command completes.
  - the interrupt handler is split into the following pieces:
    - primary handler of the device
      goes through every event and calls generic_handle_irq() for event
      it. On return from generic_handle_irq() in acknowledges the event
      counter so interrupt goes away (eventually).

    - threaded handler of the device
      none

    - primary handler of the EP-interrupt
      reads the event and tries to process it. Everything that requries
      sleeping is handed over to the Thread. The event is saved in an
      per-endpoint data-structure.
      We probably have to pay attention not to process events once we
      handed something to thread so we don't process event X prio Y
      where X > Y.

    - threaded handler of the EP-interrupt
      handles the remaining EP work which might sleep such as waiting
      for command completion.

  Latency:
   There should be no increase in latency since the interrupt-thread has a
   high priority and will be run before an average task in user land
   (except the user changed priorities).
+8 −0
Original line number Diff line number Diff line
@@ -2139,6 +2139,14 @@ M: Matthew Garrett <mjg59@srcf.ucam.org>
S:	Maintained
F:	drivers/platform/x86/dell-wmi.c

DESIGNWARE USB3 DRD IP DRIVER
M:	Felipe Balbi <balbi@ti.com>
L:	linux-usb@vger.kernel.org
L:	linux-omap@vger.kernel.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
S:	Maintained
F:	drivers/usb/dwc3/

DEVICE NUMBER REGISTRY
M:	Torben Mathiasen <device@lanana.org>
W:	http://lanana.org/docs/device-list/index.html
+7 −0
Original line number Diff line number Diff line
@@ -35,6 +35,13 @@ extern struct pxa_device_desc pxa168_device_fb;
extern struct pxa_device_desc pxa168_device_keypad;
extern struct pxa_device_desc pxa168_device_eth;

struct pxa168_usb_pdata {
	/* If NULL, default phy init routine for PXA168 would be called */
	int (*phy_init)(void __iomem *usb_phy_reg_base);
};
/* pdata can be NULL */
int __init pxa168_add_usb_host(struct pxa168_usb_pdata *pdata);

static inline int pxa168_add_uart(int id)
{
	struct pxa_device_desc *d = NULL;
+46 −0
Original line number Diff line number Diff line
@@ -25,6 +25,9 @@
#include <mach/dma.h>
#include <mach/devices.h>
#include <mach/mfp.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <mach/pxa168.h>

#include "common.h"
#include "clock.h"
@@ -83,6 +86,7 @@ static APBC_CLK(keypad, PXA168_KPC, 0, 32000);
static APMU_CLK(nand, NAND, 0x19b, 156000000);
static APMU_CLK(lcd, LCD, 0x7f, 312000000);
static APMU_CLK(eth, ETH, 0x09, 0);
static APMU_CLK(usb, USB, 0x12, 0);

/* device and clock bindings */
static struct clk_lookup pxa168_clkregs[] = {
@@ -104,6 +108,7 @@ static struct clk_lookup pxa168_clkregs[] = {
	INIT_CLKREG(&clk_lcd, "pxa168-fb", NULL),
	INIT_CLKREG(&clk_keypad, "pxa27x-keypad", NULL),
	INIT_CLKREG(&clk_eth, "pxa168-eth", "MFUCLK"),
	INIT_CLKREG(&clk_usb, "pxa168-ehci", "PXA168-USBCLK"),
};

static int __init pxa168_init(void)
@@ -169,3 +174,44 @@ PXA168_DEVICE(ssp5, "pxa168-ssp", 4, SSP5, 0xd4021000, 0x40, 60, 61);
PXA168_DEVICE(fb, "pxa168-fb", -1, LCD, 0xd420b000, 0x1c8);
PXA168_DEVICE(keypad, "pxa27x-keypad", -1, KEYPAD, 0xd4012000, 0x4c);
PXA168_DEVICE(eth, "pxa168-eth", -1, MFU, 0xc0800000, 0x0fff);

struct resource pxa168_usb_host_resources[] = {
	/* USB Host conroller register base */
	[0] = {
		.start	= 0xd4209000,
		.end	= 0xd4209000 + 0x200,
		.flags	= IORESOURCE_MEM,
		.name	= "pxa168-usb-host",
	},
	/* USB PHY register base */
	[1] = {
		.start	= 0xd4206000,
		.end	= 0xd4206000 + 0xff,
		.flags	= IORESOURCE_MEM,
		.name	= "pxa168-usb-phy",
	},
	[2] = {
		.start	= IRQ_PXA168_USB2,
		.end	= IRQ_PXA168_USB2,
		.flags	= IORESOURCE_IRQ,
	},
};

static u64 pxa168_usb_host_dmamask = DMA_BIT_MASK(32);
struct platform_device pxa168_device_usb_host = {
	.name = "pxa168-ehci",
	.id   = -1,
	.dev  = {
		.dma_mask = &pxa168_usb_host_dmamask,
		.coherent_dma_mask = DMA_BIT_MASK(32),
	},

	.num_resources = ARRAY_SIZE(pxa168_usb_host_resources),
	.resource      = pxa168_usb_host_resources,
};

int __init pxa168_add_usb_host(struct pxa168_usb_pdata *pdata)
{
	pxa168_device_usb_host.dev.platform_data = pdata;
	return platform_device_register(&pxa168_device_usb_host);
}
+3 −0
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ config USB_ARCH_HAS_EHCI
	default y if ARCH_MSM
	default y if MICROBLAZE
	default y if SPARC_LEON
	default y if ARCH_MMP
	default PCI

# ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface.
@@ -110,6 +111,8 @@ config USB

source "drivers/usb/core/Kconfig"

source "drivers/usb/dwc3/Kconfig"

source "drivers/usb/mon/Kconfig"

source "drivers/usb/wusbcore/Kconfig"
Loading