History

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

Pull USB patches from Greg Kroah-Hartman: "Here's the big USB patch set for the 3.6-rc1 merge window. Lots of little changes in here, primarily for gadget controllers and drivers. There's some scsi changes that I think also went in through the scsi tree, but they merge just fine. All of these patches have been in the linux-next tree for a while now. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" Fix up trivial conflicts in include/scsi/scsi_device.h (same libata conflict that Jeff had already encountered) * tag 'usb-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (207 commits) usb: Add USB_QUIRK_RESET_RESUME for all Logitech UVC webcams usb: Add quirk detection based on interface information usb: s3c-hsotg: Add header file protection macros in s3c-hsotg.h USB: ehci-s5p: Add vbus setup function to the s5p ehci glue layer USB: add USB_VENDOR_AND_INTERFACE_INFO() macro USB: notify phy when root hub port connect change USB: remove 8 bytes of padding from usb_host_interface on 64 bit builds USB: option: add ZTE MF821D USB: sierra: QMI mode MC7710 moved to qcserial USB: qcserial: adding Sierra Wireless devices USB: qcserial: support generic Qualcomm serial ports USB: qcserial: make probe more flexible USB: qcserial: centralize probe exit path USB: qcserial: consolidate usb_set_interface calls USB: ehci-s5p: Add support for device tree USB: ohci-exynos: Add support for device tree USB: ehci-omap: fix compile failure(v1) usb: host: tegra: pass correct pointer in ehci_setup() USB: ehci-fsl: Update ifdef check to work on 64-bit ppc USB: serial: keyspan: Removed unrequired parentheses. ...

Linus Torvalds committed 14 years ago

Commit 9fc37772 parents 5e23ae4 e387ef5159 files · +8026 −4109Browse files

Showing the changes to include/linux/usb (7 of 159 files). Show all

Unified · Split

7 files
  1. include/linux/usb/chipidea.h +12 −2
  2. include/linux/usb/ehci_def.h +21 −7
  3. include/linux/usb/hcd.h +6 −0
  4. include/linux/usb/musb-omap.h +30 −0
  5. include/linux/usb/otg.h +62 −5
  6. include/linux/usb/renesas_usbhs.h +8 −0
  7. include/linux/usb/uas.h +40 −0
include/linux/usb/chipidea.h+12−2
@@ -5,12 +5,15 @@ · 4 unmodified lines
55 #ifndef __LINUX_USB_CHIPIDEA_H
66 #define __LINUX_USB_CHIPIDEA_H
77
8+#include <linux/usb/otg.h>
9+
810 struct ci13xxx;
9−struct ci13xxx_udc_driver {
11+struct ci13xxx_platform_data {
1012 const char *name;
1113 /* offset of the capability registers */
1214 uintptr_t capoffset;
1315 unsigned power_budget;
16+ struct usb_phy *phy;
1417 unsigned long flags;
1518 #define CI13XXX_REGS_SHARED BIT(0)
1619 #define CI13XXX_REQUIRE_TRANSCEIVER BIT(1)
@@ -19,10 +22,17 @@ struct ci13xxx_udc_driver { · 2 unmodified lines
1922
2023 #define CI13XXX_CONTROLLER_RESET_EVENT 0
2124 #define CI13XXX_CONTROLLER_STOPPED_EVENT 1
22− void (*notify_event) (struct ci13xxx *udc, unsigned event);
25+ void (*notify_event) (struct ci13xxx *ci, unsigned event);
2326 };
2427
2528 /* Default offset of capability registers */
2629 #define DEF_CAPOFFSET 0x100
2730
31+/* Add ci13xxx device */
32+struct platform_device *ci13xxx_add_device(struct device *dev,
33+ struct resource *res, int nres,
34+ struct ci13xxx_platform_data *platdata);
35+/* Remove ci13xxx device */
36+void ci13xxx_remove_device(struct platform_device *pdev);
37+
2838 #endif
include/linux/usb/ehci_def.h+21−7
@@ -111,7 +111,13 @@ struct ehci_regs { · 110 unmodified lines
111111 /* ASYNCLISTADDR: offset 0x18 */
112112 u32 async_next; /* address of next async queue head */
113113
114− u32 reserved[9];
114+ u32 reserved1[2];
115+
116+ /* TXFILLTUNING: offset 0x24 */
117+ u32 txfill_tuning; /* TX FIFO Tuning register */
118+#define TXFIFO_DEFAULT (8<<16) /* FIFO burst threshold 8 */
119+
120+ u32 reserved2[6];
115121
116122 /* CONFIGFLAG: offset 0x40 */
117123 u32 configured_flag;
@@ -155,26 +161,34 @@ struct ehci_regs { · 37 unmodified lines
155161 #define PORT_CSC (1<<1) /* connect status change */
156162 #define PORT_CONNECT (1<<0) /* device connected */
157163 #define PORT_RWC_BITS (PORT_CSC | PORT_PEC | PORT_OCC)
158−};
159164
160−#define USBMODE 0x68 /* USB Device mode */
165+ u32 reserved3[9];
166+
167+ /* USBMODE: offset 0x68 */
168+ u32 usbmode; /* USB Device mode */
161169 #define USBMODE_SDIS (1<<3) /* Stream disable */
162170 #define USBMODE_BE (1<<2) /* BE/LE endianness select */
163171 #define USBMODE_CM_HC (3<<0) /* host controller mode */
164172 #define USBMODE_CM_IDLE (0<<0) /* idle state */
165173
174+ u32 reserved4[7];
175+
166176 /* Moorestown has some non-standard registers, partially due to the fact that
167177 * its EHCI controller has both TT and LPM support. HOSTPCx are extensions to
168178 * PORTSCx
169179 */
170−#define HOSTPC0 0x84 /* HOSTPC extension */
180+ /* HOSTPC: offset 0x84 */
181+ u32 hostpc[0]; /* HOSTPC extension */
171182 #define HOSTPC_PHCD (1<<22) /* Phy clock disable */
172183 #define HOSTPC_PSPD (3<<25) /* Port speed detection */
173−#define USBMODE_EX 0xc8 /* USB Device mode extension */
184+
185+ u32 reserved5[17];
186+
187+ /* USBMODE_EX: offset 0xc8 */
188+ u32 usbmode_ex; /* USB Device mode extension */
174189 #define USBMODE_EX_VBPS (1<<5) /* VBus Power Select On */
175190 #define USBMODE_EX_HC (3<<0) /* host controller mode */
176−#define TXFILLTUNING 0x24 /* TX FIFO Tuning register */
177−#define TXFIFO_DEFAULT (8<<16) /* FIFO burst threshold 8 */
191+};
178192
179193 /* Appendix C, Debug port ... intended for use with special "debug devices"
180194 * that can help if there's no serial console. (nonstandard enumeration.)
include/linux/usb/hcd.h+6−0
@@ -93,6 +93,12 @@ struct usb_hcd { · 92 unmodified lines
9393 */
9494 const struct hc_driver *driver; /* hw-specific hooks */
9595
96+ /*
97+ * OTG and some Host controllers need software interaction with phys;
98+ * other external phys should be software-transparent
99+ */
100+ struct usb_phy *phy;
101+
96102 /* Flags that need to be manipulated atomically because they can
97103 * change while the host controller is running. Always use
98104 * set_bit() or clear_bit() to change their values.
include/linux/usb/musb-omap.h+30−0
@@ -0,0 +1,30 @@
1+/*
2+ * Copyright (C) 2011-2012 by Texas Instruments
3+ *
4+ * The Inventra Controller Driver for Linux is free software; you
5+ * can redistribute it and/or modify it under the terms of the GNU
6+ * General Public License version 2 as published by the Free Software
7+ * Foundation.
8+ */
9+
10+#ifndef __MUSB_OMAP_H__
11+#define __MUSB_OMAP_H__
12+
13+enum omap_musb_vbus_id_status {
14+ OMAP_MUSB_UNKNOWN = 0,
15+ OMAP_MUSB_ID_GROUND,
16+ OMAP_MUSB_ID_FLOAT,
17+ OMAP_MUSB_VBUS_VALID,
18+ OMAP_MUSB_VBUS_OFF,
19+};
20+
21+#if (defined(CONFIG_USB_MUSB_OMAP2PLUS) || \
22+ defined(CONFIG_USB_MUSB_OMAP2PLUS_MODULE))
23+void omap_musb_mailbox(enum omap_musb_vbus_id_status status);
24+#else
25+static inline void omap_musb_mailbox(enum omap_musb_vbus_id_status status)
26+{
27+}
28+#endif
29+
30+#endif /* __MUSB_OMAP_H__ */
include/linux/usb/otg.h+62−5
@@ -43,6 +43,13 @@ enum usb_phy_events { · 42 unmodified lines
4343 USB_EVENT_ENUMERATED, /* gadget driver enumerated */
4444 };
4545
46+/* associate a type with PHY */
47+enum usb_phy_type {
48+ USB_PHY_TYPE_UNDEFINED,
49+ USB_PHY_TYPE_USB2,
50+ USB_PHY_TYPE_USB3,
51+};
52+
4653 struct usb_phy;
4754
4855 /* for transceivers connected thru an ULPI interface, the user must
@@ -89,6 +96,7 @@ struct usb_phy { · 40 unmodified lines
8996 const char *label;
9097 unsigned int flags;
9198
99+ enum usb_phy_type type;
92100 enum usb_otg_state state;
93101 enum usb_phy_events last_event;
94102
@@ -105,6 +113,9 @@ struct usb_phy { · 10 unmodified lines
105113 u16 port_status;
106114 u16 port_change;
107115
116+ /* to support controllers that have multiple transceivers */
117+ struct list_head head;
118+
108119 /* initialize/shutdown the OTG controller */
109120 int (*init)(struct usb_phy *x);
110121 void (*shutdown)(struct usb_phy *x);
@@ -117,11 +128,15 @@ struct usb_phy { · 6 unmodified lines
117128 int (*set_suspend)(struct usb_phy *x,
118129 int suspend);
119130
131+ /* notify phy connect status change */
132+ int (*notify_connect)(struct usb_phy *x, int port);
133+ int (*notify_disconnect)(struct usb_phy *x, int port);
120134 };
121135
122136
123137 /* for board-specific init logic */
124−extern int usb_set_transceiver(struct usb_phy *);
138+extern int usb_add_phy(struct usb_phy *, enum usb_phy_type type);
139+extern void usb_remove_phy(struct usb_phy *);
125140
126141 #if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE))
127142 /* sometimes transceivers are accessed only through e.g. ULPI */
@@ -172,16 +187,29 @@ usb_phy_shutdown(struct usb_phy *x) · 44 unmodified lines
172187
173188 /* for usb host and peripheral controller drivers */
174189 #ifdef CONFIG_USB_OTG_UTILS
175−extern struct usb_phy *usb_get_transceiver(void);
176−extern void usb_put_transceiver(struct usb_phy *);
190+extern struct usb_phy *usb_get_phy(enum usb_phy_type type);
191+extern struct usb_phy *devm_usb_get_phy(struct device *dev,
192+ enum usb_phy_type type);
193+extern void usb_put_phy(struct usb_phy *);
194+extern void devm_usb_put_phy(struct device *dev, struct usb_phy *x);
177195 extern const char *otg_state_string(enum usb_otg_state state);
178196 #else
179−static inline struct usb_phy *usb_get_transceiver(void)
197+static inline struct usb_phy *usb_get_phy(enum usb_phy_type type)
198+{
199+ return NULL;
200+}
201+
202+static inline struct usb_phy *devm_usb_get_phy(struct device *dev,
203+ enum usb_phy_type type)
180204 {
181205 return NULL;
182206 }
183207
184−static inline void usb_put_transceiver(struct usb_phy *x)
208+static inline void usb_put_phy(struct usb_phy *x)
209+{
210+}
211+
212+static inline void devm_usb_put_phy(struct device *dev, struct usb_phy *x)
185213 {
186214 }
187215
@@ -251,6 +279,24 @@ usb_phy_set_suspend(struct usb_phy *x, int suspend) · 63 unmodified lines
251279 return 0;
252280 }
253281
282+static inline int
283+usb_phy_notify_connect(struct usb_phy *x, int port)
284+{
285+ if (x->notify_connect)
286+ return x->notify_connect(x, port);
287+ else
288+ return 0;
289+}
290+
291+static inline int
292+usb_phy_notify_disconnect(struct usb_phy *x, int port)
293+{
294+ if (x->notify_disconnect)
295+ return x->notify_disconnect(x, port);
296+ else
297+ return 0;
298+}
299+
254300 static inline int
255301 otg_start_srp(struct usb_otg *otg)
256302 {
@@ -276,4 +322,15 @@ usb_unregister_notifier(struct usb_phy *x, struct notifier_block *nb) · 19 unmodified lines
276322 /* for OTG controller drivers (and maybe other stuff) */
277323 extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num);
278324
325+static inline const char *usb_phy_type_string(enum usb_phy_type type)
326+{
327+ switch (type) {
328+ case USB_PHY_TYPE_USB2:
329+ return "USB2 PHY";
330+ case USB_PHY_TYPE_USB3:
331+ return "USB3 PHY";
332+ default:
333+ return "UNKNOWN PHY TYPE";
334+ }
335+}
279336 #endif /* __LINUX_USB_OTG_H */
include/linux/usb/renesas_usbhs.h+8−0
@@ -132,6 +132,14 @@ struct renesas_usbhs_driver_param { · 131 unmodified lines
132132 * option:
133133 *
134134 * dma id for dmaengine
135+ * The data transfer direction on D0FIFO/D1FIFO should be
136+ * fixed for keeping consistency.
137+ * So, the platform id settings will be..
138+ * .d0_tx_id = xx_TX,
139+ * .d1_rx_id = xx_RX,
140+ * or
141+ * .d1_tx_id = xx_TX,
142+ * .d0_rx_id = xx_RX,
135143 */
136144 int d0_tx_id;
137145 int d0_rx_id;
include/linux/usb/uas.h+40−0
@@ -20,6 +20,28 @@ enum { · 19 unmodified lines
2020 IU_ID_WRITE_READY = 0x07,
2121 };
2222
23+enum {
24+ TMF_ABORT_TASK = 0x01,
25+ TMF_ABORT_TASK_SET = 0x02,
26+ TMF_CLEAR_TASK_SET = 0x04,
27+ TMF_LOGICAL_UNIT_RESET = 0x08,
28+ TMF_I_T_NEXUS_RESET = 0x10,
29+ TMF_CLEAR_ACA = 0x40,
30+ TMF_QUERY_TASK = 0x80,
31+ TMF_QUERY_TASK_SET = 0x81,
32+ TMF_QUERY_ASYNC_EVENT = 0x82,
33+};
34+
35+enum {
36+ RC_TMF_COMPLETE = 0x00,
37+ RC_INVALID_INFO_UNIT = 0x02,
38+ RC_TMF_NOT_SUPPORTED = 0x04,
39+ RC_TMF_FAILED = 0x05,
40+ RC_TMF_SUCCEEDED = 0x08,
41+ RC_INCORRECT_LUN = 0x09,
42+ RC_OVERLAPPED_TAG = 0x0a,
43+};
44+
2345 struct command_iu {
2446 __u8 iu_id;
2547 __u8 rsvd1;
@@ -32,6 +54,16 @@ struct command_iu { · 6 unmodified lines
3254 __u8 cdb[16]; /* XXX: Overflow-checking tools may misunderstand */
3355 };
3456
57+struct task_mgmt_iu {
58+ __u8 iu_id;
59+ __u8 rsvd1;
60+ __be16 tag;
61+ __u8 function;
62+ __u8 rsvd2;
63+ __be16 task_tag;
64+ struct scsi_lun lun;
65+};
66+
3567 /*
3668 * Also used for the Read Ready and Write Ready IUs since they have the
3769 * same first four bytes
@@ -47,6 +79,14 @@ struct sense_iu { · 9 unmodified lines
4779 __u8 sense[SCSI_SENSE_BUFFERSIZE];
4880 };
4981
82+struct response_ui {
83+ __u8 iu_id;
84+ __u8 rsvd1;
85+ __be16 tag;
86+ __be16 add_response_info;
87+ __u8 response_code;
88+};
89+
5090 struct usb_pipe_usage_descriptor {
5191 __u8 bLength;
5292 __u8 bDescriptorType;