diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 18:04:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 18:04:26 -0400 |
commit | 971f115a50afbe409825c9f3399d5a3b9aca4381 (patch) | |
tree | cb42dc07a032e325f22b64d961587c081225c6d6 /include | |
parent | 2e270d84223262a38d4755c61d55f5c73ea89e56 (diff) | |
parent | 500132a0f26ad7d9916102193cbc6c1b1becb373 (diff) |
Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (172 commits)
USB: Add support for SuperSpeed isoc endpoints
xhci: Clean up cycle bit math used during stalls.
xhci: Fix cycle bit calculation during stall handling.
xhci: Update internal dequeue pointers after stalls.
USB: Disable auto-suspend for USB 3.0 hubs.
USB: Remove bogus USB_PORT_STAT_SUPER_SPEED symbol.
xhci: Return canceled URBs immediately when host is halted.
xhci: Fixes for suspend/resume of shared HCDs.
xhci: Fix re-init on power loss after resume.
xhci: Make roothub functions deal with device removal.
xhci: Limit roothub ports to 15 USB3 & 31 USB2 ports.
xhci: Return a USB 3.0 hub descriptor for USB3 roothub.
xhci: Register second xHCI roothub.
xhci: Change xhci_find_slot_id_by_port() API.
xhci: Refactor bus suspend state into a struct.
xhci: Index with a port array instead of PORTSC addresses.
USB: Set usb_hcd->state and flags for shared roothubs.
usb: Make core allocate resources per PCI-device.
usb: Store bus type in usb_hcd, not in driver flags.
usb: Change usb_hcd->bandwidth_mutex to a pointer.
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/i2c/twl.h | 2 | ||||
-rw-r--r-- | include/linux/platform_data/tegra_usb.h | 31 | ||||
-rw-r--r-- | include/linux/usb.h | 1 | ||||
-rw-r--r-- | include/linux/usb/Kbuild | 1 | ||||
-rw-r--r-- | include/linux/usb/ch11.h | 46 | ||||
-rw-r--r-- | include/linux/usb/ch9.h | 4 | ||||
-rw-r--r-- | include/linux/usb/ehci_def.h | 4 | ||||
-rw-r--r-- | include/linux/usb/hcd.h | 43 | ||||
-rw-r--r-- | include/linux/usb/msm_hsusb.h | 2 | ||||
-rw-r--r-- | include/linux/usb/otg.h | 7 | ||||
-rw-r--r-- | include/linux/usb/serial.h | 3 | ||||
-rw-r--r-- | include/linux/usb/ulpi.h | 5 |
12 files changed, 125 insertions, 24 deletions
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 61b9609e55f..a4bd05b7bd2 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
@@ -600,6 +600,8 @@ struct twl4030_usb_data { | |||
600 | int (*phy_power)(struct device *dev, int iD, int on); | 600 | int (*phy_power)(struct device *dev, int iD, int on); |
601 | /* enable/disable phy clocks */ | 601 | /* enable/disable phy clocks */ |
602 | int (*phy_set_clock)(struct device *dev, int on); | 602 | int (*phy_set_clock)(struct device *dev, int on); |
603 | /* suspend/resume of phy */ | ||
604 | int (*phy_suspend)(struct device *dev, int suspend); | ||
603 | }; | 605 | }; |
604 | 606 | ||
605 | struct twl4030_ins { | 607 | struct twl4030_ins { |
diff --git a/include/linux/platform_data/tegra_usb.h b/include/linux/platform_data/tegra_usb.h new file mode 100644 index 00000000000..6bca5b569ac --- /dev/null +++ b/include/linux/platform_data/tegra_usb.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Google, Inc. | ||
3 | * | ||
4 | * This software is licensed under the terms of the GNU General Public | ||
5 | * License version 2, as published by the Free Software Foundation, and | ||
6 | * may be copied, distributed, and modified under those terms. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #ifndef _TEGRA_USB_H_ | ||
16 | #define _TEGRA_USB_H_ | ||
17 | |||
18 | enum tegra_usb_operating_modes { | ||
19 | TEGRA_USB_DEVICE, | ||
20 | TEGRA_USB_HOST, | ||
21 | TEGRA_USB_OTG, | ||
22 | }; | ||
23 | |||
24 | struct tegra_ehci_platform_data { | ||
25 | enum tegra_usb_operating_modes operating_mode; | ||
26 | /* power down the phy on bus suspend */ | ||
27 | int power_down_on_bus_suspend; | ||
28 | void *phy_config; | ||
29 | }; | ||
30 | |||
31 | #endif /* _TEGRA_USB_H_ */ | ||
diff --git a/include/linux/usb.h b/include/linux/usb.h index bd69b65f335..e63efeb378e 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -976,6 +976,7 @@ extern int usb_disabled(void); | |||
976 | #define URB_SETUP_MAP_SINGLE 0x00100000 /* Setup packet DMA mapped */ | 976 | #define URB_SETUP_MAP_SINGLE 0x00100000 /* Setup packet DMA mapped */ |
977 | #define URB_SETUP_MAP_LOCAL 0x00200000 /* HCD-local setup packet */ | 977 | #define URB_SETUP_MAP_LOCAL 0x00200000 /* HCD-local setup packet */ |
978 | #define URB_DMA_SG_COMBINED 0x00400000 /* S-G entries were combined */ | 978 | #define URB_DMA_SG_COMBINED 0x00400000 /* S-G entries were combined */ |
979 | #define URB_ALIGNED_TEMP_BUFFER 0x00800000 /* Temp buffer was alloc'd */ | ||
979 | 980 | ||
980 | struct usb_iso_packet_descriptor { | 981 | struct usb_iso_packet_descriptor { |
981 | unsigned int offset; | 982 | unsigned int offset; |
diff --git a/include/linux/usb/Kbuild b/include/linux/usb/Kbuild index 51410e0200c..ed91fb62674 100644 --- a/include/linux/usb/Kbuild +++ b/include/linux/usb/Kbuild | |||
@@ -2,6 +2,7 @@ header-y += audio.h | |||
2 | header-y += cdc.h | 2 | header-y += cdc.h |
3 | header-y += ch9.h | 3 | header-y += ch9.h |
4 | header-y += ch11.h | 4 | header-y += ch11.h |
5 | header-y += functionfs.h | ||
5 | header-y += gadgetfs.h | 6 | header-y += gadgetfs.h |
6 | header-y += midi.h | 7 | header-y += midi.h |
7 | header-y += g_printer.h | 8 | header-y += g_printer.h |
diff --git a/include/linux/usb/ch11.h b/include/linux/usb/ch11.h index 10ec0699bea..4ebaf082417 100644 --- a/include/linux/usb/ch11.h +++ b/include/linux/usb/ch11.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #define HUB_RESET_TT 9 | 26 | #define HUB_RESET_TT 9 |
27 | #define HUB_GET_TT_STATE 10 | 27 | #define HUB_GET_TT_STATE 10 |
28 | #define HUB_STOP_TT 11 | 28 | #define HUB_STOP_TT 11 |
29 | #define HUB_SET_DEPTH 12 | ||
29 | 30 | ||
30 | /* | 31 | /* |
31 | * Hub class additional requests defined by USB 3.0 spec | 32 | * Hub class additional requests defined by USB 3.0 spec |
@@ -61,6 +62,12 @@ | |||
61 | #define USB_PORT_FEAT_TEST 21 | 62 | #define USB_PORT_FEAT_TEST 21 |
62 | #define USB_PORT_FEAT_INDICATOR 22 | 63 | #define USB_PORT_FEAT_INDICATOR 22 |
63 | #define USB_PORT_FEAT_C_PORT_L1 23 | 64 | #define USB_PORT_FEAT_C_PORT_L1 23 |
65 | #define USB_PORT_FEAT_C_PORT_LINK_STATE 25 | ||
66 | #define USB_PORT_FEAT_C_PORT_CONFIG_ERROR 26 | ||
67 | #define USB_PORT_FEAT_PORT_REMOTE_WAKE_MASK 27 | ||
68 | #define USB_PORT_FEAT_BH_PORT_RESET 28 | ||
69 | #define USB_PORT_FEAT_C_BH_PORT_RESET 29 | ||
70 | #define USB_PORT_FEAT_FORCE_LINKPM_ACCEPT 30 | ||
64 | 71 | ||
65 | /* | 72 | /* |
66 | * Port feature selectors added by USB 3.0 spec. | 73 | * Port feature selectors added by USB 3.0 spec. |
@@ -102,7 +109,6 @@ struct usb_port_status { | |||
102 | #define USB_PORT_STAT_TEST 0x0800 | 109 | #define USB_PORT_STAT_TEST 0x0800 |
103 | #define USB_PORT_STAT_INDICATOR 0x1000 | 110 | #define USB_PORT_STAT_INDICATOR 0x1000 |
104 | /* bits 13 to 15 are reserved */ | 111 | /* bits 13 to 15 are reserved */ |
105 | #define USB_PORT_STAT_SUPER_SPEED 0x8000 /* Linux-internal */ | ||
106 | 112 | ||
107 | /* | 113 | /* |
108 | * Additions to wPortStatus bit field from USB 3.0 | 114 | * Additions to wPortStatus bit field from USB 3.0 |
@@ -110,8 +116,14 @@ struct usb_port_status { | |||
110 | */ | 116 | */ |
111 | #define USB_PORT_STAT_LINK_STATE 0x01e0 | 117 | #define USB_PORT_STAT_LINK_STATE 0x01e0 |
112 | #define USB_SS_PORT_STAT_POWER 0x0200 | 118 | #define USB_SS_PORT_STAT_POWER 0x0200 |
119 | #define USB_SS_PORT_STAT_SPEED 0x1c00 | ||
113 | #define USB_PORT_STAT_SPEED_5GBPS 0x0000 | 120 | #define USB_PORT_STAT_SPEED_5GBPS 0x0000 |
114 | /* Valid only if port is enabled */ | 121 | /* Valid only if port is enabled */ |
122 | /* Bits that are the same from USB 2.0 */ | ||
123 | #define USB_SS_PORT_STAT_MASK (USB_PORT_STAT_CONNECTION | \ | ||
124 | USB_PORT_STAT_ENABLE | \ | ||
125 | USB_PORT_STAT_OVERCURRENT | \ | ||
126 | USB_PORT_STAT_RESET) | ||
115 | 127 | ||
116 | /* | 128 | /* |
117 | * Definitions for PORT_LINK_STATE values | 129 | * Definitions for PORT_LINK_STATE values |
@@ -132,8 +144,8 @@ struct usb_port_status { | |||
132 | 144 | ||
133 | /* | 145 | /* |
134 | * wPortChange bit field | 146 | * wPortChange bit field |
135 | * See USB 2.0 spec Table 11-22 | 147 | * See USB 2.0 spec Table 11-22 and USB 2.0 LPM ECN Table-4.10 |
136 | * Bits 0 to 4 shown, bits 5 to 15 are reserved | 148 | * Bits 0 to 5 shown, bits 6 to 15 are reserved |
137 | */ | 149 | */ |
138 | #define USB_PORT_STAT_C_CONNECTION 0x0001 | 150 | #define USB_PORT_STAT_C_CONNECTION 0x0001 |
139 | #define USB_PORT_STAT_C_ENABLE 0x0002 | 151 | #define USB_PORT_STAT_C_ENABLE 0x0002 |
@@ -141,6 +153,13 @@ struct usb_port_status { | |||
141 | #define USB_PORT_STAT_C_OVERCURRENT 0x0008 | 153 | #define USB_PORT_STAT_C_OVERCURRENT 0x0008 |
142 | #define USB_PORT_STAT_C_RESET 0x0010 | 154 | #define USB_PORT_STAT_C_RESET 0x0010 |
143 | #define USB_PORT_STAT_C_L1 0x0020 | 155 | #define USB_PORT_STAT_C_L1 0x0020 |
156 | /* | ||
157 | * USB 3.0 wPortChange bit fields | ||
158 | * See USB 3.0 spec Table 10-11 | ||
159 | */ | ||
160 | #define USB_PORT_STAT_C_BH_RESET 0x0020 | ||
161 | #define USB_PORT_STAT_C_LINK_STATE 0x0040 | ||
162 | #define USB_PORT_STAT_C_CONFIG_ERROR 0x0080 | ||
144 | 163 | ||
145 | /* | 164 | /* |
146 | * wHubCharacteristics (masks) | 165 | * wHubCharacteristics (masks) |
@@ -175,7 +194,9 @@ struct usb_hub_status { | |||
175 | */ | 194 | */ |
176 | 195 | ||
177 | #define USB_DT_HUB (USB_TYPE_CLASS | 0x09) | 196 | #define USB_DT_HUB (USB_TYPE_CLASS | 0x09) |
197 | #define USB_DT_SS_HUB (USB_TYPE_CLASS | 0x0a) | ||
178 | #define USB_DT_HUB_NONVAR_SIZE 7 | 198 | #define USB_DT_HUB_NONVAR_SIZE 7 |
199 | #define USB_DT_SS_HUB_SIZE 12 | ||
179 | 200 | ||
180 | struct usb_hub_descriptor { | 201 | struct usb_hub_descriptor { |
181 | __u8 bDescLength; | 202 | __u8 bDescLength; |
@@ -184,11 +205,22 @@ struct usb_hub_descriptor { | |||
184 | __le16 wHubCharacteristics; | 205 | __le16 wHubCharacteristics; |
185 | __u8 bPwrOn2PwrGood; | 206 | __u8 bPwrOn2PwrGood; |
186 | __u8 bHubContrCurrent; | 207 | __u8 bHubContrCurrent; |
187 | /* add 1 bit for hub status change; round to bytes */ | ||
188 | __u8 DeviceRemovable[(USB_MAXCHILDREN + 1 + 7) / 8]; | ||
189 | __u8 PortPwrCtrlMask[(USB_MAXCHILDREN + 1 + 7) / 8]; | ||
190 | } __attribute__ ((packed)); | ||
191 | 208 | ||
209 | /* 2.0 and 3.0 hubs differ here */ | ||
210 | union { | ||
211 | struct { | ||
212 | /* add 1 bit for hub status change; round to bytes */ | ||
213 | __u8 DeviceRemovable[(USB_MAXCHILDREN + 1 + 7) / 8]; | ||
214 | __u8 PortPwrCtrlMask[(USB_MAXCHILDREN + 1 + 7) / 8]; | ||
215 | } __attribute__ ((packed)) hs; | ||
216 | |||
217 | struct { | ||
218 | __u8 bHubHdrDecLat; | ||
219 | __u16 wHubDelay; | ||
220 | __u16 DeviceRemovable; | ||
221 | } __attribute__ ((packed)) ss; | ||
222 | } u; | ||
223 | } __attribute__ ((packed)); | ||
192 | 224 | ||
193 | /* port indicator status selectors, tables 11-7 and 11-25 */ | 225 | /* port indicator status selectors, tables 11-7 and 11-25 */ |
194 | #define HUB_LED_AUTO 0 | 226 | #define HUB_LED_AUTO 0 |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index ab461948b57..b72f305ce6b 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -584,7 +584,9 @@ struct usb_ss_ep_comp_descriptor { | |||
584 | 584 | ||
585 | #define USB_DT_SS_EP_COMP_SIZE 6 | 585 | #define USB_DT_SS_EP_COMP_SIZE 6 |
586 | /* Bits 4:0 of bmAttributes if this is a bulk endpoint */ | 586 | /* Bits 4:0 of bmAttributes if this is a bulk endpoint */ |
587 | #define USB_SS_MAX_STREAMS(p) (1 << (p & 0x1f)) | 587 | #define USB_SS_MAX_STREAMS(p) (1 << ((p) & 0x1f)) |
588 | /* Bits 1:0 of bmAttributes if this is an isoc endpoint */ | ||
589 | #define USB_SS_MULT(p) (1 + ((p) & 0x3)) | ||
588 | 590 | ||
589 | /*-------------------------------------------------------------------------*/ | 591 | /*-------------------------------------------------------------------------*/ |
590 | 592 | ||
diff --git a/include/linux/usb/ehci_def.h b/include/linux/usb/ehci_def.h index 2e262cb1542..65638024519 100644 --- a/include/linux/usb/ehci_def.h +++ b/include/linux/usb/ehci_def.h | |||
@@ -127,7 +127,9 @@ struct ehci_regs { | |||
127 | #define PORT_WKDISC_E (1<<21) /* wake on disconnect (enable) */ | 127 | #define PORT_WKDISC_E (1<<21) /* wake on disconnect (enable) */ |
128 | #define PORT_WKCONN_E (1<<20) /* wake on connect (enable) */ | 128 | #define PORT_WKCONN_E (1<<20) /* wake on connect (enable) */ |
129 | /* 19:16 for port testing */ | 129 | /* 19:16 for port testing */ |
130 | #define PORT_TEST_PKT (0x4<<16) /* Port Test Control - packet test */ | 130 | #define PORT_TEST(x) (((x)&0xf)<<16) /* Port Test Control */ |
131 | #define PORT_TEST_PKT PORT_TEST(0x4) /* Port Test Control - packet test */ | ||
132 | #define PORT_TEST_FORCE PORT_TEST(0x5) /* Port Test Control - force enable */ | ||
131 | #define PORT_LED_OFF (0<<14) | 133 | #define PORT_LED_OFF (0<<14) |
132 | #define PORT_LED_AMBER (1<<14) | 134 | #define PORT_LED_AMBER (1<<14) |
133 | #define PORT_LED_GREEN (2<<14) | 135 | #define PORT_LED_GREEN (2<<14) |
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index a854fe89484..0097136ba45 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
@@ -76,6 +76,10 @@ struct usb_hcd { | |||
76 | struct kref kref; /* reference counter */ | 76 | struct kref kref; /* reference counter */ |
77 | 77 | ||
78 | const char *product_desc; /* product/vendor string */ | 78 | const char *product_desc; /* product/vendor string */ |
79 | int speed; /* Speed for this roothub. | ||
80 | * May be different from | ||
81 | * hcd->driver->flags & HCD_MASK | ||
82 | */ | ||
79 | char irq_descr[24]; /* driver + bus # */ | 83 | char irq_descr[24]; /* driver + bus # */ |
80 | 84 | ||
81 | struct timer_list rh_timer; /* drives root-hub polling */ | 85 | struct timer_list rh_timer; /* drives root-hub polling */ |
@@ -99,6 +103,8 @@ struct usb_hcd { | |||
99 | #define HCD_FLAG_POLL_RH 2 /* poll for rh status? */ | 103 | #define HCD_FLAG_POLL_RH 2 /* poll for rh status? */ |
100 | #define HCD_FLAG_POLL_PENDING 3 /* status has changed? */ | 104 | #define HCD_FLAG_POLL_PENDING 3 /* status has changed? */ |
101 | #define HCD_FLAG_WAKEUP_PENDING 4 /* root hub is resuming? */ | 105 | #define HCD_FLAG_WAKEUP_PENDING 4 /* root hub is resuming? */ |
106 | #define HCD_FLAG_RH_RUNNING 5 /* root hub is running? */ | ||
107 | #define HCD_FLAG_DEAD 6 /* controller has died? */ | ||
102 | 108 | ||
103 | /* The flags can be tested using these macros; they are likely to | 109 | /* The flags can be tested using these macros; they are likely to |
104 | * be slightly faster than test_bit(). | 110 | * be slightly faster than test_bit(). |
@@ -108,6 +114,8 @@ struct usb_hcd { | |||
108 | #define HCD_POLL_RH(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_RH)) | 114 | #define HCD_POLL_RH(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_RH)) |
109 | #define HCD_POLL_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_PENDING)) | 115 | #define HCD_POLL_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_PENDING)) |
110 | #define HCD_WAKEUP_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_WAKEUP_PENDING)) | 116 | #define HCD_WAKEUP_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_WAKEUP_PENDING)) |
117 | #define HCD_RH_RUNNING(hcd) ((hcd)->flags & (1U << HCD_FLAG_RH_RUNNING)) | ||
118 | #define HCD_DEAD(hcd) ((hcd)->flags & (1U << HCD_FLAG_DEAD)) | ||
111 | 119 | ||
112 | /* Flags that get set only during HCD registration or removal. */ | 120 | /* Flags that get set only during HCD registration or removal. */ |
113 | unsigned rh_registered:1;/* is root hub registered? */ | 121 | unsigned rh_registered:1;/* is root hub registered? */ |
@@ -138,7 +146,9 @@ struct usb_hcd { | |||
138 | * bandwidth_mutex should be dropped after a successful control message | 146 | * bandwidth_mutex should be dropped after a successful control message |
139 | * to the device, or resetting the bandwidth after a failed attempt. | 147 | * to the device, or resetting the bandwidth after a failed attempt. |
140 | */ | 148 | */ |
141 | struct mutex bandwidth_mutex; | 149 | struct mutex *bandwidth_mutex; |
150 | struct usb_hcd *shared_hcd; | ||
151 | struct usb_hcd *primary_hcd; | ||
142 | 152 | ||
143 | 153 | ||
144 | #define HCD_BUFFER_POOLS 4 | 154 | #define HCD_BUFFER_POOLS 4 |
@@ -201,6 +211,7 @@ struct hc_driver { | |||
201 | int flags; | 211 | int flags; |
202 | #define HCD_MEMORY 0x0001 /* HC regs use memory (else I/O) */ | 212 | #define HCD_MEMORY 0x0001 /* HC regs use memory (else I/O) */ |
203 | #define HCD_LOCAL_MEM 0x0002 /* HC needs local memory */ | 213 | #define HCD_LOCAL_MEM 0x0002 /* HC needs local memory */ |
214 | #define HCD_SHARED 0x0004 /* Two (or more) usb_hcds share HW */ | ||
204 | #define HCD_USB11 0x0010 /* USB 1.1 */ | 215 | #define HCD_USB11 0x0010 /* USB 1.1 */ |
205 | #define HCD_USB2 0x0020 /* USB 2.0 */ | 216 | #define HCD_USB2 0x0020 /* USB 2.0 */ |
206 | #define HCD_USB3 0x0040 /* USB 3.0 */ | 217 | #define HCD_USB3 0x0040 /* USB 3.0 */ |
@@ -234,6 +245,19 @@ struct hc_driver { | |||
234 | int (*urb_dequeue)(struct usb_hcd *hcd, | 245 | int (*urb_dequeue)(struct usb_hcd *hcd, |
235 | struct urb *urb, int status); | 246 | struct urb *urb, int status); |
236 | 247 | ||
248 | /* | ||
249 | * (optional) these hooks allow an HCD to override the default DMA | ||
250 | * mapping and unmapping routines. In general, they shouldn't be | ||
251 | * necessary unless the host controller has special DMA requirements, | ||
252 | * such as alignment contraints. If these are not specified, the | ||
253 | * general usb_hcd_(un)?map_urb_for_dma functions will be used instead | ||
254 | * (and it may be a good idea to call these functions in your HCD | ||
255 | * implementation) | ||
256 | */ | ||
257 | int (*map_urb_for_dma)(struct usb_hcd *hcd, struct urb *urb, | ||
258 | gfp_t mem_flags); | ||
259 | void (*unmap_urb_for_dma)(struct usb_hcd *hcd, struct urb *urb); | ||
260 | |||
237 | /* hw synch, freeing endpoint resources that urb_dequeue can't */ | 261 | /* hw synch, freeing endpoint resources that urb_dequeue can't */ |
238 | void (*endpoint_disable)(struct usb_hcd *hcd, | 262 | void (*endpoint_disable)(struct usb_hcd *hcd, |
239 | struct usb_host_endpoint *ep); | 263 | struct usb_host_endpoint *ep); |
@@ -330,8 +354,10 @@ extern int usb_hcd_submit_urb(struct urb *urb, gfp_t mem_flags); | |||
330 | extern int usb_hcd_unlink_urb(struct urb *urb, int status); | 354 | extern int usb_hcd_unlink_urb(struct urb *urb, int status); |
331 | extern void usb_hcd_giveback_urb(struct usb_hcd *hcd, struct urb *urb, | 355 | extern void usb_hcd_giveback_urb(struct usb_hcd *hcd, struct urb *urb, |
332 | int status); | 356 | int status); |
333 | extern void unmap_urb_setup_for_dma(struct usb_hcd *, struct urb *); | 357 | extern int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, |
334 | extern void unmap_urb_for_dma(struct usb_hcd *, struct urb *); | 358 | gfp_t mem_flags); |
359 | extern void usb_hcd_unmap_urb_setup_for_dma(struct usb_hcd *, struct urb *); | ||
360 | extern void usb_hcd_unmap_urb_for_dma(struct usb_hcd *, struct urb *); | ||
335 | extern void usb_hcd_flush_endpoint(struct usb_device *udev, | 361 | extern void usb_hcd_flush_endpoint(struct usb_device *udev, |
336 | struct usb_host_endpoint *ep); | 362 | struct usb_host_endpoint *ep); |
337 | extern void usb_hcd_disable_endpoint(struct usb_device *udev, | 363 | extern void usb_hcd_disable_endpoint(struct usb_device *udev, |
@@ -347,8 +373,12 @@ extern int usb_hcd_get_frame_number(struct usb_device *udev); | |||
347 | 373 | ||
348 | extern struct usb_hcd *usb_create_hcd(const struct hc_driver *driver, | 374 | extern struct usb_hcd *usb_create_hcd(const struct hc_driver *driver, |
349 | struct device *dev, const char *bus_name); | 375 | struct device *dev, const char *bus_name); |
376 | extern struct usb_hcd *usb_create_shared_hcd(const struct hc_driver *driver, | ||
377 | struct device *dev, const char *bus_name, | ||
378 | struct usb_hcd *shared_hcd); | ||
350 | extern struct usb_hcd *usb_get_hcd(struct usb_hcd *hcd); | 379 | extern struct usb_hcd *usb_get_hcd(struct usb_hcd *hcd); |
351 | extern void usb_put_hcd(struct usb_hcd *hcd); | 380 | extern void usb_put_hcd(struct usb_hcd *hcd); |
381 | extern int usb_hcd_is_primary_hcd(struct usb_hcd *hcd); | ||
352 | extern int usb_add_hcd(struct usb_hcd *hcd, | 382 | extern int usb_add_hcd(struct usb_hcd *hcd, |
353 | unsigned int irqnum, unsigned long irqflags); | 383 | unsigned int irqnum, unsigned long irqflags); |
354 | extern void usb_remove_hcd(struct usb_hcd *hcd); | 384 | extern void usb_remove_hcd(struct usb_hcd *hcd); |
@@ -622,13 +652,6 @@ static inline void usbmon_urb_complete(struct usb_bus *bus, struct urb *urb, | |||
622 | 652 | ||
623 | /*-------------------------------------------------------------------------*/ | 653 | /*-------------------------------------------------------------------------*/ |
624 | 654 | ||
625 | /* hub.h ... DeviceRemovable in 2.4.2-ac11, gone in 2.4.10 */ | ||
626 | /* bleech -- resurfaced in 2.4.11 or 2.4.12 */ | ||
627 | #define bitmap DeviceRemovable | ||
628 | |||
629 | |||
630 | /*-------------------------------------------------------------------------*/ | ||
631 | |||
632 | /* random stuff */ | 655 | /* random stuff */ |
633 | 656 | ||
634 | #define RUN_CONTEXT (in_irq() ? "in_irq" \ | 657 | #define RUN_CONTEXT (in_irq() ? "in_irq" \ |
diff --git a/include/linux/usb/msm_hsusb.h b/include/linux/usb/msm_hsusb.h index 3675e03b153..3657403eac1 100644 --- a/include/linux/usb/msm_hsusb.h +++ b/include/linux/usb/msm_hsusb.h | |||
@@ -55,7 +55,7 @@ enum otg_control_type { | |||
55 | 55 | ||
56 | /** | 56 | /** |
57 | * struct msm_otg_platform_data - platform device data | 57 | * struct msm_otg_platform_data - platform device data |
58 | * for msm72k_otg driver. | 58 | * for msm_otg driver. |
59 | * @phy_init_seq: PHY configuration sequence. val, reg pairs | 59 | * @phy_init_seq: PHY configuration sequence. val, reg pairs |
60 | * terminated by -1. | 60 | * terminated by -1. |
61 | * @vbus_power: VBUS power on/off routine. | 61 | * @vbus_power: VBUS power on/off routine. |
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index a1a1e7a73ec..6e40718f5ab 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
@@ -66,6 +66,7 @@ struct otg_transceiver { | |||
66 | 66 | ||
67 | u8 default_a; | 67 | u8 default_a; |
68 | enum usb_otg_state state; | 68 | enum usb_otg_state state; |
69 | enum usb_xceiv_events last_event; | ||
69 | 70 | ||
70 | struct usb_bus *host; | 71 | struct usb_bus *host; |
71 | struct usb_gadget *gadget; | 72 | struct usb_gadget *gadget; |
@@ -74,7 +75,7 @@ struct otg_transceiver { | |||
74 | void __iomem *io_priv; | 75 | void __iomem *io_priv; |
75 | 76 | ||
76 | /* for notification of usb_xceiv_events */ | 77 | /* for notification of usb_xceiv_events */ |
77 | struct blocking_notifier_head notifier; | 78 | struct atomic_notifier_head notifier; |
78 | 79 | ||
79 | /* to pass extra port status to the root hub */ | 80 | /* to pass extra port status to the root hub */ |
80 | u16 port_status; | 81 | u16 port_status; |
@@ -234,13 +235,13 @@ otg_start_srp(struct otg_transceiver *otg) | |||
234 | static inline int | 235 | static inline int |
235 | otg_register_notifier(struct otg_transceiver *otg, struct notifier_block *nb) | 236 | otg_register_notifier(struct otg_transceiver *otg, struct notifier_block *nb) |
236 | { | 237 | { |
237 | return blocking_notifier_chain_register(&otg->notifier, nb); | 238 | return atomic_notifier_chain_register(&otg->notifier, nb); |
238 | } | 239 | } |
239 | 240 | ||
240 | static inline void | 241 | static inline void |
241 | otg_unregister_notifier(struct otg_transceiver *otg, struct notifier_block *nb) | 242 | otg_unregister_notifier(struct otg_transceiver *otg, struct notifier_block *nb) |
242 | { | 243 | { |
243 | blocking_notifier_chain_unregister(&otg->notifier, nb); | 244 | atomic_notifier_chain_unregister(&otg->notifier, nb); |
244 | } | 245 | } |
245 | 246 | ||
246 | /* for OTG controller drivers (and maybe other stuff) */ | 247 | /* for OTG controller drivers (and maybe other stuff) */ |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index c9049139a7a..45f3b9db425 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -191,7 +191,8 @@ static inline void usb_set_serial_data(struct usb_serial *serial, void *data) | |||
191 | * @id_table: pointer to a list of usb_device_id structures that define all | 191 | * @id_table: pointer to a list of usb_device_id structures that define all |
192 | * of the devices this structure can support. | 192 | * of the devices this structure can support. |
193 | * @num_ports: the number of different ports this device will have. | 193 | * @num_ports: the number of different ports this device will have. |
194 | * @bulk_in_size: bytes to allocate for bulk-in buffer (0 = end-point size) | 194 | * @bulk_in_size: minimum number of bytes to allocate for bulk-in buffer |
195 | * (0 = end-point size) | ||
195 | * @bulk_out_size: bytes to allocate for bulk-out buffer (0 = end-point size) | 196 | * @bulk_out_size: bytes to allocate for bulk-out buffer (0 = end-point size) |
196 | * @calc_num_ports: pointer to a function to determine how many ports this | 197 | * @calc_num_ports: pointer to a function to determine how many ports this |
197 | * device has dynamically. It will be called after the probe() | 198 | * device has dynamically. It will be called after the probe() |
diff --git a/include/linux/usb/ulpi.h b/include/linux/usb/ulpi.h index 82b1507f473..9595796d62e 100644 --- a/include/linux/usb/ulpi.h +++ b/include/linux/usb/ulpi.h | |||
@@ -184,4 +184,9 @@ | |||
184 | struct otg_transceiver *otg_ulpi_create(struct otg_io_access_ops *ops, | 184 | struct otg_transceiver *otg_ulpi_create(struct otg_io_access_ops *ops, |
185 | unsigned int flags); | 185 | unsigned int flags); |
186 | 186 | ||
187 | #ifdef CONFIG_USB_ULPI_VIEWPORT | ||
188 | /* access ops for controllers with a viewport register */ | ||
189 | extern struct otg_io_access_ops ulpi_viewport_access_ops; | ||
190 | #endif | ||
191 | |||
187 | #endif /* __LINUX_USB_ULPI_H */ | 192 | #endif /* __LINUX_USB_ULPI_H */ |