summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci.h
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2014-04-08 01:00:49 (GMT)
committerScott Wood <scottwood@freescale.com>2014-04-08 19:58:35 (GMT)
commit47d2261a3fa71cde24263559a4219a25e50d8c89 (patch)
tree28774d5b330ccf1b777a3af222d8356918328013 /drivers/usb/host/ehci.h
parentfb7f27080adc65cd5f341bdf56a1d0c14f316c1b (diff)
parent5fb9d37f27351e42f002e372074249f92cbdf815 (diff)
downloadlinux-fsl-qoriq-47d2261a3fa71cde24263559a4219a25e50d8c89.tar.xz
Merge branch 'merge' into sdk-v1.6.x
This reverts v3.13-rc3+ (78fd82238d0e5716) to v3.12, except for commits which I noticed which appear relevant to the SDK. Signed-off-by: Scott Wood <scottwood@freescale.com> Conflicts: arch/powerpc/include/asm/kvm_host.h arch/powerpc/kvm/book3s_hv_rmhandlers.S arch/powerpc/kvm/book3s_interrupts.S arch/powerpc/kvm/e500.c arch/powerpc/kvm/e500mc.c arch/powerpc/sysdev/fsl_soc.h drivers/Kconfig drivers/cpufreq/ppc-corenet-cpufreq.c drivers/dma/fsldma.c drivers/dma/s3c24xx-dma.c drivers/misc/Makefile drivers/mmc/host/sdhci-of-esdhc.c drivers/mtd/devices/m25p80.c drivers/net/ethernet/freescale/gianfar.h drivers/platform/Kconfig drivers/platform/Makefile drivers/spi/spi-fsl-espi.c include/crypto/algapi.h include/linux/netdev_features.h include/linux/skbuff.h include/net/ip.h net/core/ethtool.c
Diffstat (limited to 'drivers/usb/host/ehci.h')
-rw-r--r--drivers/usb/host/ehci.h81
1 files changed, 16 insertions, 65 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index d9f679e..17a139e 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -54,28 +54,6 @@ struct ehci_stats {
unsigned long unlink;
};
-/*
- * Scheduling and budgeting information for periodic transfers, for both
- * high-speed devices and full/low-speed devices lying behind a TT.
- */
-struct ehci_per_sched {
- struct usb_device *udev; /* access to the TT */
- struct usb_host_endpoint *ep;
- struct list_head ps_list; /* node on ehci_tt's ps_list */
- u16 tt_usecs; /* time on the FS/LS bus */
- u16 cs_mask; /* C-mask and S-mask bytes */
- u16 period; /* actual period in frames */
- u16 phase; /* actual phase, frame part */
- u8 bw_phase; /* same, for bandwidth
- reservation */
- u8 phase_uf; /* uframe part of the phase */
- u8 usecs, c_usecs; /* times on the HS bus */
- u8 bw_uperiod; /* period in microframes, for
- bandwidth reservation */
- u8 bw_period; /* same, in frames */
-};
-#define NO_FRAME 29999 /* frame not assigned yet */
-
/* ehci_hcd->lock guards shared data against other CPUs:
* ehci_hcd: async, unlink, periodic (and shadow), ...
* usb_host_endpoint: hcpriv
@@ -257,15 +235,6 @@ struct ehci_hcd { /* one per controller */
struct dentry *debug_dir;
#endif
- /* bandwidth usage */
-#define EHCI_BANDWIDTH_SIZE 64
-#define EHCI_BANDWIDTH_FRAMES (EHCI_BANDWIDTH_SIZE >> 3)
- u8 bandwidth[EHCI_BANDWIDTH_SIZE];
- /* us allocated per uframe */
- u8 tt_budget[EHCI_BANDWIDTH_SIZE];
- /* us budgeted per uframe */
- struct list_head tt_list;
-
/* platform-specific data -- must come last */
unsigned long priv[0] __aligned(sizeof(s64));
};
@@ -421,7 +390,6 @@ struct ehci_qh {
struct list_head intr_node; /* list of intr QHs */
struct ehci_qtd *dummy;
struct list_head unlink_node;
- struct ehci_per_sched ps; /* scheduling info */
unsigned unlink_cycle;
@@ -435,8 +403,16 @@ struct ehci_qh {
u8 xacterrs; /* XactErr retry counter */
#define QH_XACTERR_MAX 32 /* XactErr retry limit */
+ /* periodic schedule info */
+ u8 usecs; /* intr bandwidth */
u8 gap_uf; /* uframes split/csplit gap */
+ u8 c_usecs; /* ... split completion bw */
+ u16 tt_usecs; /* tt downstream bandwidth */
+ unsigned short period; /* polling interval */
+ unsigned short start; /* where polling starts */
+#define NO_FRAME ((unsigned short)~0) /* pick new start */
+ struct usb_device *dev; /* access to TT */
unsigned is_out:1; /* bulk or intr OUT */
unsigned clearing_tt:1; /* Clear-TT-Buf in progress */
unsigned dequeue_during_giveback:1;
@@ -463,7 +439,6 @@ struct ehci_iso_packet {
struct ehci_iso_sched {
struct list_head td_list;
unsigned span;
- unsigned first_packet;
struct ehci_iso_packet packet [0];
};
@@ -479,17 +454,22 @@ struct ehci_iso_stream {
u8 highspeed;
struct list_head td_list; /* queued itds/sitds */
struct list_head free_list; /* list of unused itds/sitds */
+ struct usb_device *udev;
+ struct usb_host_endpoint *ep;
/* output of (re)scheduling */
- struct ehci_per_sched ps; /* scheduling info */
- unsigned next_uframe;
+ int next_uframe;
__hc32 splits;
/* the rest is derived from the endpoint descriptor,
+ * trusting urb->interval == f(epdesc->bInterval) and
* including the extra info for hw_bufp[0..2]
*/
- u16 uperiod; /* period in uframes */
+ u8 usecs, c_usecs;
+ u16 interval;
+ u16 tt_usecs;
u16 maxp;
+ u16 raw_mask;
unsigned bandwidth;
/* This is used to initialize iTD's hw_bufp fields */
@@ -604,35 +584,6 @@ struct ehci_fstn {
/*-------------------------------------------------------------------------*/
-/*
- * USB-2.0 Specification Sections 11.14 and 11.18
- * Scheduling and budgeting split transactions using TTs
- *
- * A hub can have a single TT for all its ports, or multiple TTs (one for each
- * port). The bandwidth and budgeting information for the full/low-speed bus
- * below each TT is self-contained and independent of the other TTs or the
- * high-speed bus.
- *
- * "Bandwidth" refers to the number of microseconds on the FS/LS bus allocated
- * to an interrupt or isochronous endpoint for each frame. "Budget" refers to
- * the best-case estimate of the number of full-speed bytes allocated to an
- * endpoint for each microframe within an allocated frame.
- *
- * Removal of an endpoint invalidates a TT's budget. Instead of trying to
- * keep an up-to-date record, we recompute the budget when it is needed.
- */
-
-struct ehci_tt {
- u16 bandwidth[EHCI_BANDWIDTH_FRAMES];
-
- struct list_head tt_list; /* List of all ehci_tt's */
- struct list_head ps_list; /* Items using this TT */
- struct usb_tt *usb_tt;
- int tt_port; /* TT port number */
-};
-
-/*-------------------------------------------------------------------------*/
-
/* Prepare the PORTSC wakeup flags during controller suspend/resume */
#define ehci_prepare_ports_for_controller_suspend(ehci, do_wakeup) \