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. ...
Showing the changes to include/linux/usb (7 of 159 files). Show all
Unified · Split
| @@ -5,12 +5,15 @@ · 4 unmodified lines | ||
| 5 | 5 | #ifndef __LINUX_USB_CHIPIDEA_H |
| 6 | 6 | #define __LINUX_USB_CHIPIDEA_H |
| 7 | 7 | |
| 8 | +#include <linux/usb/otg.h> | |
| 9 | + | |
| 8 | 10 | struct ci13xxx; |
| 9 | −struct ci13xxx_udc_driver { | |
| 11 | +struct ci13xxx_platform_data { | |
| 10 | 12 | const char *name; |
| 11 | 13 | /* offset of the capability registers */ |
| 12 | 14 | uintptr_t capoffset; |
| 13 | 15 | unsigned power_budget; |
| 16 | + struct usb_phy *phy; | |
| 14 | 17 | unsigned long flags; |
| 15 | 18 | #define CI13XXX_REGS_SHARED BIT(0) |
| 16 | 19 | #define CI13XXX_REQUIRE_TRANSCEIVER BIT(1) |
| @@ -19,10 +22,17 @@ struct ci13xxx_udc_driver { · 2 unmodified lines | ||
| 19 | 22 | |
| 20 | 23 | #define CI13XXX_CONTROLLER_RESET_EVENT 0 |
| 21 | 24 | #define CI13XXX_CONTROLLER_STOPPED_EVENT 1 |
| 22 | − void (*notify_event) (struct ci13xxx *udc, unsigned event); | |
| 25 | + void (*notify_event) (struct ci13xxx *ci, unsigned event); | |
| 23 | 26 | }; |
| 24 | 27 | |
| 25 | 28 | /* Default offset of capability registers */ |
| 26 | 29 | #define DEF_CAPOFFSET 0x100 |
| 27 | 30 | |
| 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 | + | |
| 28 | 38 | #endif |
| @@ -111,7 +111,13 @@ struct ehci_regs { · 110 unmodified lines | ||
| 111 | 111 | /* ASYNCLISTADDR: offset 0x18 */ |
| 112 | 112 | u32 async_next; /* address of next async queue head */ |
| 113 | 113 | |
| 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]; | |
| 115 | 121 | |
| 116 | 122 | /* CONFIGFLAG: offset 0x40 */ |
| 117 | 123 | u32 configured_flag; |
| @@ -155,26 +161,34 @@ struct ehci_regs { · 37 unmodified lines | ||
| 155 | 161 | #define PORT_CSC (1<<1) /* connect status change */ |
| 156 | 162 | #define PORT_CONNECT (1<<0) /* device connected */ |
| 157 | 163 | #define PORT_RWC_BITS (PORT_CSC | PORT_PEC | PORT_OCC) |
| 158 | −}; | |
| 159 | 164 | |
| 160 | −#define USBMODE 0x68 /* USB Device mode */ | |
| 165 | + u32 reserved3[9]; | |
| 166 | + | |
| 167 | + /* USBMODE: offset 0x68 */ | |
| 168 | + u32 usbmode; /* USB Device mode */ | |
| 161 | 169 | #define USBMODE_SDIS (1<<3) /* Stream disable */ |
| 162 | 170 | #define USBMODE_BE (1<<2) /* BE/LE endianness select */ |
| 163 | 171 | #define USBMODE_CM_HC (3<<0) /* host controller mode */ |
| 164 | 172 | #define USBMODE_CM_IDLE (0<<0) /* idle state */ |
| 165 | 173 | |
| 174 | + u32 reserved4[7]; | |
| 175 | + | |
| 166 | 176 | /* Moorestown has some non-standard registers, partially due to the fact that |
| 167 | 177 | * its EHCI controller has both TT and LPM support. HOSTPCx are extensions to |
| 168 | 178 | * PORTSCx |
| 169 | 179 | */ |
| 170 | −#define HOSTPC0 0x84 /* HOSTPC extension */ | |
| 180 | + /* HOSTPC: offset 0x84 */ | |
| 181 | + u32 hostpc[0]; /* HOSTPC extension */ | |
| 171 | 182 | #define HOSTPC_PHCD (1<<22) /* Phy clock disable */ |
| 172 | 183 | #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 */ | |
| 174 | 189 | #define USBMODE_EX_VBPS (1<<5) /* VBus Power Select On */ |
| 175 | 190 | #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 | +}; | |
| 178 | 192 | |
| 179 | 193 | /* Appendix C, Debug port ... intended for use with special "debug devices" |
| 180 | 194 | * that can help if there's no serial console. (nonstandard enumeration.) |
| @@ -93,6 +93,12 @@ struct usb_hcd { · 92 unmodified lines | ||
| 93 | 93 | */ |
| 94 | 94 | const struct hc_driver *driver; /* hw-specific hooks */ |
| 95 | 95 | |
| 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 | + | |
| 96 | 102 | /* Flags that need to be manipulated atomically because they can |
| 97 | 103 | * change while the host controller is running. Always use |
| 98 | 104 | * set_bit() or clear_bit() to change their values. |
| @@ -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__ */ | |
| @@ -43,6 +43,13 @@ enum usb_phy_events { · 42 unmodified lines | ||
| 43 | 43 | USB_EVENT_ENUMERATED, /* gadget driver enumerated */ |
| 44 | 44 | }; |
| 45 | 45 | |
| 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 | + | |
| 46 | 53 | struct usb_phy; |
| 47 | 54 | |
| 48 | 55 | /* for transceivers connected thru an ULPI interface, the user must |
| @@ -89,6 +96,7 @@ struct usb_phy { · 40 unmodified lines | ||
| 89 | 96 | const char *label; |
| 90 | 97 | unsigned int flags; |
| 91 | 98 | |
| 99 | + enum usb_phy_type type; | |
| 92 | 100 | enum usb_otg_state state; |
| 93 | 101 | enum usb_phy_events last_event; |
| 94 | 102 | |
| @@ -105,6 +113,9 @@ struct usb_phy { · 10 unmodified lines | ||
| 105 | 113 | u16 port_status; |
| 106 | 114 | u16 port_change; |
| 107 | 115 | |
| 116 | + /* to support controllers that have multiple transceivers */ | |
| 117 | + struct list_head head; | |
| 118 | + | |
| 108 | 119 | /* initialize/shutdown the OTG controller */ |
| 109 | 120 | int (*init)(struct usb_phy *x); |
| 110 | 121 | void (*shutdown)(struct usb_phy *x); |
| @@ -117,11 +128,15 @@ struct usb_phy { · 6 unmodified lines | ||
| 117 | 128 | int (*set_suspend)(struct usb_phy *x, |
| 118 | 129 | int suspend); |
| 119 | 130 | |
| 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); | |
| 120 | 134 | }; |
| 121 | 135 | |
| 122 | 136 | |
| 123 | 137 | /* 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 *); | |
| 125 | 140 | |
| 126 | 141 | #if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE)) |
| 127 | 142 | /* sometimes transceivers are accessed only through e.g. ULPI */ |
| @@ -172,16 +187,29 @@ usb_phy_shutdown(struct usb_phy *x) · 44 unmodified lines | ||
| 172 | 187 | |
| 173 | 188 | /* for usb host and peripheral controller drivers */ |
| 174 | 189 | #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); | |
| 177 | 195 | extern const char *otg_state_string(enum usb_otg_state state); |
| 178 | 196 | #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) | |
| 180 | 204 | { |
| 181 | 205 | return NULL; |
| 182 | 206 | } |
| 183 | 207 | |
| 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) | |
| 185 | 213 | { |
| 186 | 214 | } |
| 187 | 215 | |
| @@ -251,6 +279,24 @@ usb_phy_set_suspend(struct usb_phy *x, int suspend) · 63 unmodified lines | ||
| 251 | 279 | return 0; |
| 252 | 280 | } |
| 253 | 281 | |
| 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 | + | |
| 254 | 300 | static inline int |
| 255 | 301 | otg_start_srp(struct usb_otg *otg) |
| 256 | 302 | { |
| @@ -276,4 +322,15 @@ usb_unregister_notifier(struct usb_phy *x, struct notifier_block *nb) · 19 unmodified lines | ||
| 276 | 322 | /* for OTG controller drivers (and maybe other stuff) */ |
| 277 | 323 | extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num); |
| 278 | 324 | |
| 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 | +} | |
| 279 | 336 | #endif /* __LINUX_USB_OTG_H */ |
| @@ -132,6 +132,14 @@ struct renesas_usbhs_driver_param { · 131 unmodified lines | ||
| 132 | 132 | * option: |
| 133 | 133 | * |
| 134 | 134 | * 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, | |
| 135 | 143 | */ |
| 136 | 144 | int d0_tx_id; |
| 137 | 145 | int d0_rx_id; |
| @@ -20,6 +20,28 @@ enum { · 19 unmodified lines | ||
| 20 | 20 | IU_ID_WRITE_READY = 0x07, |
| 21 | 21 | }; |
| 22 | 22 | |
| 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 | + | |
| 23 | 45 | struct command_iu { |
| 24 | 46 | __u8 iu_id; |
| 25 | 47 | __u8 rsvd1; |
| @@ -32,6 +54,16 @@ struct command_iu { · 6 unmodified lines | ||
| 32 | 54 | __u8 cdb[16]; /* XXX: Overflow-checking tools may misunderstand */ |
| 33 | 55 | }; |
| 34 | 56 | |
| 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 | + | |
| 35 | 67 | /* |
| 36 | 68 | * Also used for the Read Ready and Write Ready IUs since they have the |
| 37 | 69 | * same first four bytes |
| @@ -47,6 +79,14 @@ struct sense_iu { · 9 unmodified lines | ||
| 47 | 79 | __u8 sense[SCSI_SENSE_BUFFERSIZE]; |
| 48 | 80 | }; |
| 49 | 81 | |
| 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 | + | |
| 50 | 90 | struct usb_pipe_usage_descriptor { |
| 51 | 91 | __u8 bLength; |
| 52 | 92 | __u8 bDescriptorType; |