diff options
| author | Eric Paris <eparis@redhat.com> | 2013-11-22 18:57:08 -0500 |
|---|---|---|
| committer | Eric Paris <eparis@redhat.com> | 2013-11-22 18:57:54 -0500 |
| commit | fc582aef7dcc27a7120cf232c1e76c569c7b6eab (patch) | |
| tree | 7d275dd4ceab6067b91e9a25a5f6338b425fbccd /include/linux/usb | |
| parent | 9175c9d2aed528800175ef81c90569d00d23f9be (diff) | |
| parent | 5e01dc7b26d9f24f39abace5da98ccbd6a5ceb52 (diff) | |
Merge tag 'v3.12'
Linux 3.12
Conflicts:
fs/exec.c
Diffstat (limited to 'include/linux/usb')
| -rw-r--r-- | include/linux/usb/chipidea.h | 7 | ||||
| -rw-r--r-- | include/linux/usb/dwc3-omap.h | 30 | ||||
| -rw-r--r-- | include/linux/usb/gadget.h | 4 | ||||
| -rw-r--r-- | include/linux/usb/hcd.h | 19 | ||||
| -rw-r--r-- | include/linux/usb/of.h | 10 | ||||
| -rw-r--r-- | include/linux/usb/phy.h | 18 | ||||
| -rw-r--r-- | include/linux/usb/tegra_usb_phy.h | 40 | ||||
| -rw-r--r-- | include/linux/usb/usb_phy_gen_xceiv.h (renamed from include/linux/usb/nop-usb-xceiv.h) | 2 | ||||
| -rw-r--r-- | include/linux/usb/usbnet.h | 5 | ||||
| -rw-r--r-- | include/linux/usb/wusb-wa.h | 1 |
10 files changed, 78 insertions, 58 deletions
diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h index 25629948c842..7d399671a566 100644 --- a/include/linux/usb/chipidea.h +++ b/include/linux/usb/chipidea.h | |||
| @@ -18,12 +18,17 @@ struct ci_hdrc_platform_data { | |||
| 18 | unsigned long flags; | 18 | unsigned long flags; |
| 19 | #define CI_HDRC_REGS_SHARED BIT(0) | 19 | #define CI_HDRC_REGS_SHARED BIT(0) |
| 20 | #define CI_HDRC_REQUIRE_TRANSCEIVER BIT(1) | 20 | #define CI_HDRC_REQUIRE_TRANSCEIVER BIT(1) |
| 21 | #define CI_HDRC_PULLUP_ON_VBUS BIT(2) | ||
| 22 | #define CI_HDRC_DISABLE_STREAMING BIT(3) | 21 | #define CI_HDRC_DISABLE_STREAMING BIT(3) |
| 22 | /* | ||
| 23 | * Only set it when DCCPARAMS.DC==1 and DCCPARAMS.HC==1, | ||
| 24 | * but otg is not supported (no register otgsc). | ||
| 25 | */ | ||
| 26 | #define CI_HDRC_DUAL_ROLE_NOT_OTG BIT(4) | ||
| 23 | enum usb_dr_mode dr_mode; | 27 | enum usb_dr_mode dr_mode; |
| 24 | #define CI_HDRC_CONTROLLER_RESET_EVENT 0 | 28 | #define CI_HDRC_CONTROLLER_RESET_EVENT 0 |
| 25 | #define CI_HDRC_CONTROLLER_STOPPED_EVENT 1 | 29 | #define CI_HDRC_CONTROLLER_STOPPED_EVENT 1 |
| 26 | void (*notify_event) (struct ci_hdrc *ci, unsigned event); | 30 | void (*notify_event) (struct ci_hdrc *ci, unsigned event); |
| 31 | struct regulator *reg_vbus; | ||
| 27 | }; | 32 | }; |
| 28 | 33 | ||
| 29 | /* Default offset of capability registers */ | 34 | /* Default offset of capability registers */ |
diff --git a/include/linux/usb/dwc3-omap.h b/include/linux/usb/dwc3-omap.h deleted file mode 100644 index 5615f4d82724..000000000000 --- a/include/linux/usb/dwc3-omap.h +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2013 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 __DWC3_OMAP_H__ | ||
| 11 | #define __DWC3_OMAP_H__ | ||
| 12 | |||
| 13 | enum omap_dwc3_vbus_id_status { | ||
| 14 | OMAP_DWC3_UNKNOWN = 0, | ||
| 15 | OMAP_DWC3_ID_GROUND, | ||
| 16 | OMAP_DWC3_ID_FLOAT, | ||
| 17 | OMAP_DWC3_VBUS_VALID, | ||
| 18 | OMAP_DWC3_VBUS_OFF, | ||
| 19 | }; | ||
| 20 | |||
| 21 | #if (defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_DWC3_MODULE)) | ||
| 22 | extern int dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status); | ||
| 23 | #else | ||
| 24 | static inline int dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status) | ||
| 25 | { | ||
| 26 | return -ENODEV; | ||
| 27 | } | ||
| 28 | #endif | ||
| 29 | |||
| 30 | #endif /* __DWC3_OMAP_H__ */ | ||
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index f1b0dca60f12..942ef5e053bf 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
| 23 | #include <linux/scatterlist.h> | 23 | #include <linux/scatterlist.h> |
| 24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
| 25 | #include <linux/workqueue.h> | ||
| 25 | #include <linux/usb/ch9.h> | 26 | #include <linux/usb/ch9.h> |
| 26 | 27 | ||
| 27 | struct usb_ep; | 28 | struct usb_ep; |
| @@ -475,6 +476,7 @@ struct usb_gadget_ops { | |||
| 475 | 476 | ||
| 476 | /** | 477 | /** |
| 477 | * struct usb_gadget - represents a usb slave device | 478 | * struct usb_gadget - represents a usb slave device |
| 479 | * @work: (internal use) Workqueue to be used for sysfs_notify() | ||
| 478 | * @ops: Function pointers used to access hardware-specific operations. | 480 | * @ops: Function pointers used to access hardware-specific operations. |
| 479 | * @ep0: Endpoint zero, used when reading or writing responses to | 481 | * @ep0: Endpoint zero, used when reading or writing responses to |
| 480 | * driver setup() requests | 482 | * driver setup() requests |
| @@ -520,6 +522,7 @@ struct usb_gadget_ops { | |||
| 520 | * device is acting as a B-Peripheral (so is_a_peripheral is false). | 522 | * device is acting as a B-Peripheral (so is_a_peripheral is false). |
| 521 | */ | 523 | */ |
| 522 | struct usb_gadget { | 524 | struct usb_gadget { |
| 525 | struct work_struct work; | ||
| 523 | /* readonly to gadget driver */ | 526 | /* readonly to gadget driver */ |
| 524 | const struct usb_gadget_ops *ops; | 527 | const struct usb_gadget_ops *ops; |
| 525 | struct usb_ep *ep0; | 528 | struct usb_ep *ep0; |
| @@ -538,6 +541,7 @@ struct usb_gadget { | |||
| 538 | unsigned out_epnum; | 541 | unsigned out_epnum; |
| 539 | unsigned in_epnum; | 542 | unsigned in_epnum; |
| 540 | }; | 543 | }; |
| 544 | #define work_to_gadget(w) (container_of((w), struct usb_gadget, work)) | ||
| 541 | 545 | ||
| 542 | static inline void set_gadget_data(struct usb_gadget *gadget, void *data) | 546 | static inline void set_gadget_data(struct usb_gadget *gadget, void *data) |
| 543 | { dev_set_drvdata(&gadget->dev, data); } | 547 | { dev_set_drvdata(&gadget->dev, data); } |
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 1e88377e22f4..75efc45eaa2f 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
| 23 | 23 | ||
| 24 | #include <linux/rwsem.h> | 24 | #include <linux/rwsem.h> |
| 25 | #include <linux/interrupt.h> | ||
| 25 | 26 | ||
| 26 | #define MAX_TOPO_LEVEL 6 | 27 | #define MAX_TOPO_LEVEL 6 |
| 27 | 28 | ||
| @@ -67,6 +68,13 @@ | |||
| 67 | 68 | ||
| 68 | /*-------------------------------------------------------------------------*/ | 69 | /*-------------------------------------------------------------------------*/ |
| 69 | 70 | ||
| 71 | struct giveback_urb_bh { | ||
| 72 | bool running; | ||
| 73 | spinlock_t lock; | ||
| 74 | struct list_head head; | ||
| 75 | struct tasklet_struct bh; | ||
| 76 | }; | ||
| 77 | |||
| 70 | struct usb_hcd { | 78 | struct usb_hcd { |
| 71 | 79 | ||
| 72 | /* | 80 | /* |
| @@ -139,6 +147,9 @@ struct usb_hcd { | |||
| 139 | resource_size_t rsrc_len; /* memory/io resource length */ | 147 | resource_size_t rsrc_len; /* memory/io resource length */ |
| 140 | unsigned power_budget; /* in mA, 0 = no limit */ | 148 | unsigned power_budget; /* in mA, 0 = no limit */ |
| 141 | 149 | ||
| 150 | struct giveback_urb_bh high_prio_bh; | ||
| 151 | struct giveback_urb_bh low_prio_bh; | ||
| 152 | |||
| 142 | /* bandwidth_mutex should be taken before adding or removing | 153 | /* bandwidth_mutex should be taken before adding or removing |
| 143 | * any new bus bandwidth constraints: | 154 | * any new bus bandwidth constraints: |
| 144 | * 1. Before adding a configuration for a new device. | 155 | * 1. Before adding a configuration for a new device. |
| @@ -221,6 +232,7 @@ struct hc_driver { | |||
| 221 | #define HCD_USB25 0x0030 /* Wireless USB 1.0 (USB 2.5)*/ | 232 | #define HCD_USB25 0x0030 /* Wireless USB 1.0 (USB 2.5)*/ |
| 222 | #define HCD_USB3 0x0040 /* USB 3.0 */ | 233 | #define HCD_USB3 0x0040 /* USB 3.0 */ |
| 223 | #define HCD_MASK 0x0070 | 234 | #define HCD_MASK 0x0070 |
| 235 | #define HCD_BH 0x0100 /* URB complete in BH context */ | ||
| 224 | 236 | ||
| 225 | /* called to init HCD and root hub */ | 237 | /* called to init HCD and root hub */ |
| 226 | int (*reset) (struct usb_hcd *hcd); | 238 | int (*reset) (struct usb_hcd *hcd); |
| @@ -361,6 +373,11 @@ struct hc_driver { | |||
| 361 | int (*find_raw_port_number)(struct usb_hcd *, int); | 373 | int (*find_raw_port_number)(struct usb_hcd *, int); |
| 362 | }; | 374 | }; |
| 363 | 375 | ||
| 376 | static inline int hcd_giveback_urb_in_bh(struct usb_hcd *hcd) | ||
| 377 | { | ||
| 378 | return hcd->driver->flags & HCD_BH; | ||
| 379 | } | ||
| 380 | |||
| 364 | extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); | 381 | extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); |
| 365 | extern int usb_hcd_check_unlink_urb(struct usb_hcd *hcd, struct urb *urb, | 382 | extern int usb_hcd_check_unlink_urb(struct usb_hcd *hcd, struct urb *urb, |
| 366 | int status); | 383 | int status); |
| @@ -411,7 +428,7 @@ extern int usb_hcd_pci_probe(struct pci_dev *dev, | |||
| 411 | extern void usb_hcd_pci_remove(struct pci_dev *dev); | 428 | extern void usb_hcd_pci_remove(struct pci_dev *dev); |
| 412 | extern void usb_hcd_pci_shutdown(struct pci_dev *dev); | 429 | extern void usb_hcd_pci_shutdown(struct pci_dev *dev); |
| 413 | 430 | ||
| 414 | #ifdef CONFIG_PM_SLEEP | 431 | #ifdef CONFIG_PM |
| 415 | extern const struct dev_pm_ops usb_hcd_pci_pm_ops; | 432 | extern const struct dev_pm_ops usb_hcd_pci_pm_ops; |
| 416 | #endif | 433 | #endif |
| 417 | #endif /* CONFIG_PCI */ | 434 | #endif /* CONFIG_PCI */ |
diff --git a/include/linux/usb/of.h b/include/linux/usb/of.h index a0ef405368b8..8c38aa26b3bb 100644 --- a/include/linux/usb/of.h +++ b/include/linux/usb/of.h | |||
| @@ -7,19 +7,27 @@ | |||
| 7 | #ifndef __LINUX_USB_OF_H | 7 | #ifndef __LINUX_USB_OF_H |
| 8 | #define __LINUX_USB_OF_H | 8 | #define __LINUX_USB_OF_H |
| 9 | 9 | ||
| 10 | #include <linux/usb/ch9.h> | ||
| 10 | #include <linux/usb/otg.h> | 11 | #include <linux/usb/otg.h> |
| 11 | #include <linux/usb/phy.h> | 12 | #include <linux/usb/phy.h> |
| 12 | 13 | ||
| 13 | #if IS_ENABLED(CONFIG_OF) | 14 | #if IS_ENABLED(CONFIG_OF) |
| 14 | enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np); | 15 | enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np); |
| 16 | enum usb_device_speed of_usb_get_maximum_speed(struct device_node *np); | ||
| 15 | #else | 17 | #else |
| 16 | static inline enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np) | 18 | static inline enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np) |
| 17 | { | 19 | { |
| 18 | return USB_DR_MODE_UNKNOWN; | 20 | return USB_DR_MODE_UNKNOWN; |
| 19 | } | 21 | } |
| 22 | |||
| 23 | static inline enum usb_device_speed | ||
| 24 | of_usb_get_maximum_speed(struct device_node *np) | ||
| 25 | { | ||
| 26 | return USB_SPEED_UNKNOWN; | ||
| 27 | } | ||
| 20 | #endif | 28 | #endif |
| 21 | 29 | ||
| 22 | #if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_USB_PHY) | 30 | #if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_USB_SUPPORT) |
| 23 | enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np); | 31 | enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np); |
| 24 | #else | 32 | #else |
| 25 | static inline enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np) | 33 | static inline enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np) |
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h index 44036808bf0f..6c0b1c513db7 100644 --- a/include/linux/usb/phy.h +++ b/include/linux/usb/phy.h | |||
| @@ -142,7 +142,7 @@ extern void usb_remove_phy(struct usb_phy *); | |||
| 142 | /* helpers for direct access thru low-level io interface */ | 142 | /* helpers for direct access thru low-level io interface */ |
| 143 | static inline int usb_phy_io_read(struct usb_phy *x, u32 reg) | 143 | static inline int usb_phy_io_read(struct usb_phy *x, u32 reg) |
| 144 | { | 144 | { |
| 145 | if (x->io_ops && x->io_ops->read) | 145 | if (x && x->io_ops && x->io_ops->read) |
| 146 | return x->io_ops->read(x, reg); | 146 | return x->io_ops->read(x, reg); |
| 147 | 147 | ||
| 148 | return -EINVAL; | 148 | return -EINVAL; |
| @@ -150,7 +150,7 @@ static inline int usb_phy_io_read(struct usb_phy *x, u32 reg) | |||
| 150 | 150 | ||
| 151 | static inline int usb_phy_io_write(struct usb_phy *x, u32 val, u32 reg) | 151 | static inline int usb_phy_io_write(struct usb_phy *x, u32 val, u32 reg) |
| 152 | { | 152 | { |
| 153 | if (x->io_ops && x->io_ops->write) | 153 | if (x && x->io_ops && x->io_ops->write) |
| 154 | return x->io_ops->write(x, val, reg); | 154 | return x->io_ops->write(x, val, reg); |
| 155 | 155 | ||
| 156 | return -EINVAL; | 156 | return -EINVAL; |
| @@ -159,7 +159,7 @@ static inline int usb_phy_io_write(struct usb_phy *x, u32 val, u32 reg) | |||
| 159 | static inline int | 159 | static inline int |
| 160 | usb_phy_init(struct usb_phy *x) | 160 | usb_phy_init(struct usb_phy *x) |
| 161 | { | 161 | { |
| 162 | if (x->init) | 162 | if (x && x->init) |
| 163 | return x->init(x); | 163 | return x->init(x); |
| 164 | 164 | ||
| 165 | return 0; | 165 | return 0; |
| @@ -168,14 +168,14 @@ usb_phy_init(struct usb_phy *x) | |||
| 168 | static inline void | 168 | static inline void |
| 169 | usb_phy_shutdown(struct usb_phy *x) | 169 | usb_phy_shutdown(struct usb_phy *x) |
| 170 | { | 170 | { |
| 171 | if (x->shutdown) | 171 | if (x && x->shutdown) |
| 172 | x->shutdown(x); | 172 | x->shutdown(x); |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | static inline int | 175 | static inline int |
| 176 | usb_phy_vbus_on(struct usb_phy *x) | 176 | usb_phy_vbus_on(struct usb_phy *x) |
| 177 | { | 177 | { |
| 178 | if (!x->set_vbus) | 178 | if (!x || !x->set_vbus) |
| 179 | return 0; | 179 | return 0; |
| 180 | 180 | ||
| 181 | return x->set_vbus(x, true); | 181 | return x->set_vbus(x, true); |
| @@ -184,7 +184,7 @@ usb_phy_vbus_on(struct usb_phy *x) | |||
| 184 | static inline int | 184 | static inline int |
| 185 | usb_phy_vbus_off(struct usb_phy *x) | 185 | usb_phy_vbus_off(struct usb_phy *x) |
| 186 | { | 186 | { |
| 187 | if (!x->set_vbus) | 187 | if (!x || !x->set_vbus) |
| 188 | return 0; | 188 | return 0; |
| 189 | 189 | ||
| 190 | return x->set_vbus(x, false); | 190 | return x->set_vbus(x, false); |
| @@ -258,7 +258,7 @@ usb_phy_set_power(struct usb_phy *x, unsigned mA) | |||
| 258 | static inline int | 258 | static inline int |
| 259 | usb_phy_set_suspend(struct usb_phy *x, int suspend) | 259 | usb_phy_set_suspend(struct usb_phy *x, int suspend) |
| 260 | { | 260 | { |
| 261 | if (x->set_suspend != NULL) | 261 | if (x && x->set_suspend != NULL) |
| 262 | return x->set_suspend(x, suspend); | 262 | return x->set_suspend(x, suspend); |
| 263 | else | 263 | else |
| 264 | return 0; | 264 | return 0; |
| @@ -267,7 +267,7 @@ usb_phy_set_suspend(struct usb_phy *x, int suspend) | |||
| 267 | static inline int | 267 | static inline int |
| 268 | usb_phy_notify_connect(struct usb_phy *x, enum usb_device_speed speed) | 268 | usb_phy_notify_connect(struct usb_phy *x, enum usb_device_speed speed) |
| 269 | { | 269 | { |
| 270 | if (x->notify_connect) | 270 | if (x && x->notify_connect) |
| 271 | return x->notify_connect(x, speed); | 271 | return x->notify_connect(x, speed); |
| 272 | else | 272 | else |
| 273 | return 0; | 273 | return 0; |
| @@ -276,7 +276,7 @@ usb_phy_notify_connect(struct usb_phy *x, enum usb_device_speed speed) | |||
| 276 | static inline int | 276 | static inline int |
| 277 | usb_phy_notify_disconnect(struct usb_phy *x, enum usb_device_speed speed) | 277 | usb_phy_notify_disconnect(struct usb_phy *x, enum usb_device_speed speed) |
| 278 | { | 278 | { |
| 279 | if (x->notify_disconnect) | 279 | if (x && x->notify_disconnect) |
| 280 | return x->notify_disconnect(x, speed); | 280 | return x->notify_disconnect(x, speed); |
| 281 | else | 281 | else |
| 282 | return 0; | 282 | return 0; |
diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h index d2ca919a5b73..1de16c324ec8 100644 --- a/include/linux/usb/tegra_usb_phy.h +++ b/include/linux/usb/tegra_usb_phy.h | |||
| @@ -18,19 +18,36 @@ | |||
| 18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
| 19 | #include <linux/usb/otg.h> | 19 | #include <linux/usb/otg.h> |
| 20 | 20 | ||
| 21 | /* | ||
| 22 | * utmi_pll_config_in_car_module: true if the UTMI PLL configuration registers | ||
| 23 | * should be set up by clk-tegra, false if by the PHY code | ||
| 24 | * has_hostpc: true if the USB controller has the HOSTPC extension, which | ||
| 25 | * changes the location of the PHCD and PTS fields | ||
| 26 | * requires_usbmode_setup: true if the USBMODE register needs to be set to | ||
| 27 | * enter host mode | ||
| 28 | * requires_extra_tuning_parameters: true if xcvr_hsslew, hssquelch_level | ||
| 29 | * and hsdiscon_level should be set for adequate signal quality | ||
| 30 | */ | ||
| 31 | |||
| 32 | struct tegra_phy_soc_config { | ||
| 33 | bool utmi_pll_config_in_car_module; | ||
| 34 | bool has_hostpc; | ||
| 35 | bool requires_usbmode_setup; | ||
| 36 | bool requires_extra_tuning_parameters; | ||
| 37 | }; | ||
| 38 | |||
| 21 | struct tegra_utmip_config { | 39 | struct tegra_utmip_config { |
| 22 | u8 hssync_start_delay; | 40 | u8 hssync_start_delay; |
| 23 | u8 elastic_limit; | 41 | u8 elastic_limit; |
| 24 | u8 idle_wait_delay; | 42 | u8 idle_wait_delay; |
| 25 | u8 term_range_adj; | 43 | u8 term_range_adj; |
| 44 | bool xcvr_setup_use_fuses; | ||
| 26 | u8 xcvr_setup; | 45 | u8 xcvr_setup; |
| 27 | u8 xcvr_lsfslew; | 46 | u8 xcvr_lsfslew; |
| 28 | u8 xcvr_lsrslew; | 47 | u8 xcvr_lsrslew; |
| 29 | }; | 48 | u8 xcvr_hsslew; |
| 30 | 49 | u8 hssquelch_level; | |
| 31 | struct tegra_ulpi_config { | 50 | u8 hsdiscon_level; |
| 32 | int reset_gpio; | ||
| 33 | const char *clk; | ||
| 34 | }; | 51 | }; |
| 35 | 52 | ||
| 36 | enum tegra_usb_phy_port_speed { | 53 | enum tegra_usb_phy_port_speed { |
| @@ -39,12 +56,6 @@ enum tegra_usb_phy_port_speed { | |||
| 39 | TEGRA_USB_PHY_PORT_SPEED_HIGH, | 56 | TEGRA_USB_PHY_PORT_SPEED_HIGH, |
| 40 | }; | 57 | }; |
| 41 | 58 | ||
| 42 | enum tegra_usb_phy_mode { | ||
| 43 | TEGRA_USB_PHY_MODE_DEVICE, | ||
| 44 | TEGRA_USB_PHY_MODE_HOST, | ||
| 45 | TEGRA_USB_PHY_MODE_OTG, | ||
| 46 | }; | ||
| 47 | |||
| 48 | struct tegra_xtal_freq; | 59 | struct tegra_xtal_freq; |
| 49 | 60 | ||
| 50 | struct tegra_usb_phy { | 61 | struct tegra_usb_phy { |
| @@ -55,18 +66,17 @@ struct tegra_usb_phy { | |||
| 55 | struct clk *clk; | 66 | struct clk *clk; |
| 56 | struct clk *pll_u; | 67 | struct clk *pll_u; |
| 57 | struct clk *pad_clk; | 68 | struct clk *pad_clk; |
| 58 | enum tegra_usb_phy_mode mode; | 69 | struct regulator *vbus; |
| 70 | enum usb_dr_mode mode; | ||
| 59 | void *config; | 71 | void *config; |
| 72 | const struct tegra_phy_soc_config *soc_config; | ||
| 60 | struct usb_phy *ulpi; | 73 | struct usb_phy *ulpi; |
| 61 | struct usb_phy u_phy; | 74 | struct usb_phy u_phy; |
| 62 | struct device *dev; | ||
| 63 | bool is_legacy_phy; | 75 | bool is_legacy_phy; |
| 64 | bool is_ulpi_phy; | 76 | bool is_ulpi_phy; |
| 65 | int reset_gpio; | 77 | int reset_gpio; |
| 66 | }; | 78 | }; |
| 67 | 79 | ||
| 68 | struct usb_phy *tegra_usb_get_phy(struct device_node *dn); | ||
| 69 | |||
| 70 | void tegra_usb_phy_preresume(struct usb_phy *phy); | 80 | void tegra_usb_phy_preresume(struct usb_phy *phy); |
| 71 | 81 | ||
| 72 | void tegra_usb_phy_postresume(struct usb_phy *phy); | 82 | void tegra_usb_phy_postresume(struct usb_phy *phy); |
diff --git a/include/linux/usb/nop-usb-xceiv.h b/include/linux/usb/usb_phy_gen_xceiv.h index 148d35171aac..11d85b9c1b08 100644 --- a/include/linux/usb/nop-usb-xceiv.h +++ b/include/linux/usb/usb_phy_gen_xceiv.h | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/usb/otg.h> | 4 | #include <linux/usb/otg.h> |
| 5 | 5 | ||
| 6 | struct nop_usb_xceiv_platform_data { | 6 | struct usb_phy_gen_xceiv_platform_data { |
| 7 | enum usb_phy_type type; | 7 | enum usb_phy_type type; |
| 8 | unsigned long clk_rate; | 8 | unsigned long clk_rate; |
| 9 | 9 | ||
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index f18d64129f99..e303eef94dd5 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
| @@ -34,12 +34,15 @@ struct usbnet { | |||
| 34 | struct mutex phy_mutex; | 34 | struct mutex phy_mutex; |
| 35 | unsigned char suspend_count; | 35 | unsigned char suspend_count; |
| 36 | unsigned char pkt_cnt, pkt_err; | 36 | unsigned char pkt_cnt, pkt_err; |
| 37 | unsigned short rx_qlen, tx_qlen; | ||
| 38 | unsigned can_dma_sg:1; | ||
| 37 | 39 | ||
| 38 | /* i/o info: pipes etc */ | 40 | /* i/o info: pipes etc */ |
| 39 | unsigned in, out; | 41 | unsigned in, out; |
| 40 | struct usb_host_endpoint *status; | 42 | struct usb_host_endpoint *status; |
| 41 | unsigned maxpacket; | 43 | unsigned maxpacket; |
| 42 | struct timer_list delay; | 44 | struct timer_list delay; |
| 45 | const char *padding_pkt; | ||
| 43 | 46 | ||
| 44 | /* protocol/interface state */ | 47 | /* protocol/interface state */ |
| 45 | struct net_device *net; | 48 | struct net_device *net; |
| @@ -253,4 +256,6 @@ extern void usbnet_link_change(struct usbnet *, bool, bool); | |||
| 253 | extern int usbnet_status_start(struct usbnet *dev, gfp_t mem_flags); | 256 | extern int usbnet_status_start(struct usbnet *dev, gfp_t mem_flags); |
| 254 | extern void usbnet_status_stop(struct usbnet *dev); | 257 | extern void usbnet_status_stop(struct usbnet *dev); |
| 255 | 258 | ||
| 259 | extern void usbnet_update_max_qlen(struct usbnet *dev); | ||
| 260 | |||
| 256 | #endif /* __LINUX_USB_USBNET_H */ | 261 | #endif /* __LINUX_USB_USBNET_H */ |
diff --git a/include/linux/usb/wusb-wa.h b/include/linux/usb/wusb-wa.h index 6be985b2a434..4ff744e2b678 100644 --- a/include/linux/usb/wusb-wa.h +++ b/include/linux/usb/wusb-wa.h | |||
| @@ -66,6 +66,7 @@ enum { | |||
| 66 | WA_ENABLE = 0x01, | 66 | WA_ENABLE = 0x01, |
| 67 | WA_RESET = 0x02, | 67 | WA_RESET = 0x02, |
| 68 | RPIPE_PAUSE = 0x1, | 68 | RPIPE_PAUSE = 0x1, |
| 69 | RPIPE_STALL = 0x2, | ||
| 69 | }; | 70 | }; |
| 70 | 71 | ||
| 71 | /* Responses from Get Status request ([WUSB] section 8.3.1.6) */ | 72 | /* Responses from Get Status request ([WUSB] section 8.3.1.6) */ |
