diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-04 23:11:28 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-04 23:11:28 -0400 |
| commit | ae9b475ebed96afe51d6bcf10dc7aee9c8d89ed7 (patch) | |
| tree | 374bf5821a03d717b35f0b91dcbdeaa2428e649d /include/linux | |
| parent | 79eb238c76782a59d51adf8a3dd7f6444245b475 (diff) | |
| parent | d310d05f1225d1f6f2bf505255fdf593bfbb3051 (diff) | |
Merge tag 'usb-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB updates from Greg KH:
"Here is the big USB driver update for 3.17-rc1.
Loads of gadget driver changes in here, including some big file
movements to make things easier to manage over time. There's also the
usual xhci and uas driver updates, and a handful of other changes in
here. The changelog has the full details.
All of these have been in linux-next for a while"
* tag 'usb-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (211 commits)
USB: devio: fix issue with log flooding
uas: Log a warning when we cannot use uas because the hcd lacks streams
uas: Only complain about missing sg if all other checks succeed
xhci: Add missing checks for xhci_alloc_command failure
xhci: Rename Asrock P67 pci product-id to EJ168
xhci: Blacklist using streams on the Etron EJ168 controller
uas: Limit qdepth to 32 when connected over usb-2
uwb/whci: use correct structure type name in sizeof
usb-core bInterval quirk
USB: serial: ftdi_sio: Add support for new Xsens devices
USB: serial: ftdi_sio: Annotate the current Xsens PID assignments
usb: chipidea: debug: fix sparse non static symbol warnings
usb: ci_hdrc_imx doc: fsl,usbphy is required
usb: ci_hdrc_imx: Return -EINVAL for missing USB PHY
usb: core: allow zero packet flag for interrupt urbs
usb: lvstest: Fix sparse warnings generated by kbuild test bot
USB: core: hcd-pci: free IRQ before disabling PCI device when shutting down
phy: miphy365x: Represent each PHY channel as a DT subnode
phy: miphy365x: Provide support for the MiPHY356x Generic PHY
phy: miphy365x: Add Device Tree bindings for the MiPHY365x
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/phy/omap_control_phy.h | 10 | ||||
| -rw-r--r-- | include/linux/phy/phy.h | 17 | ||||
| -rw-r--r-- | include/linux/usb/composite.h | 15 | ||||
| -rw-r--r-- | include/linux/usb/quirks.h | 11 | ||||
| -rw-r--r-- | include/linux/usb/renesas_usbhs.h | 6 | ||||
| -rw-r--r-- | include/linux/usb/usb338x.h | 199 | ||||
| -rw-r--r-- | include/linux/usb/xhci_pdriver.h | 27 |
7 files changed, 280 insertions, 5 deletions
diff --git a/include/linux/phy/omap_control_phy.h b/include/linux/phy/omap_control_phy.h index 5450403c7546..e9e6cfbfbb58 100644 --- a/include/linux/phy/omap_control_phy.h +++ b/include/linux/phy/omap_control_phy.h | |||
| @@ -23,6 +23,7 @@ enum omap_control_phy_type { | |||
| 23 | OMAP_CTRL_TYPE_OTGHS = 1, /* Mailbox OTGHS_CONTROL */ | 23 | OMAP_CTRL_TYPE_OTGHS = 1, /* Mailbox OTGHS_CONTROL */ |
| 24 | OMAP_CTRL_TYPE_USB2, /* USB2_PHY, power down in CONTROL_DEV_CONF */ | 24 | OMAP_CTRL_TYPE_USB2, /* USB2_PHY, power down in CONTROL_DEV_CONF */ |
| 25 | OMAP_CTRL_TYPE_PIPE3, /* PIPE3 PHY, DPLL & seperate Rx/Tx power */ | 25 | OMAP_CTRL_TYPE_PIPE3, /* PIPE3 PHY, DPLL & seperate Rx/Tx power */ |
| 26 | OMAP_CTRL_TYPE_PCIE, /* RX TX control of ACSPCIE */ | ||
| 26 | OMAP_CTRL_TYPE_DRA7USB2, /* USB2 PHY, power and power_aux e.g. DRA7 */ | 27 | OMAP_CTRL_TYPE_DRA7USB2, /* USB2 PHY, power and power_aux e.g. DRA7 */ |
| 27 | OMAP_CTRL_TYPE_AM437USB2, /* USB2 PHY, power e.g. AM437x */ | 28 | OMAP_CTRL_TYPE_AM437USB2, /* USB2 PHY, power e.g. AM437x */ |
| 28 | }; | 29 | }; |
| @@ -33,6 +34,7 @@ struct omap_control_phy { | |||
| 33 | u32 __iomem *otghs_control; | 34 | u32 __iomem *otghs_control; |
| 34 | u32 __iomem *power; | 35 | u32 __iomem *power; |
| 35 | u32 __iomem *power_aux; | 36 | u32 __iomem *power_aux; |
| 37 | u32 __iomem *pcie_pcs; | ||
| 36 | 38 | ||
| 37 | struct clk *sys_clk; | 39 | struct clk *sys_clk; |
| 38 | 40 | ||
| @@ -63,6 +65,9 @@ enum omap_control_usb_mode { | |||
| 63 | #define OMAP_CTRL_PIPE3_PHY_TX_RX_POWERON 0x3 | 65 | #define OMAP_CTRL_PIPE3_PHY_TX_RX_POWERON 0x3 |
| 64 | #define OMAP_CTRL_PIPE3_PHY_TX_RX_POWEROFF 0x0 | 66 | #define OMAP_CTRL_PIPE3_PHY_TX_RX_POWEROFF 0x0 |
| 65 | 67 | ||
| 68 | #define OMAP_CTRL_PCIE_PCS_MASK 0xff | ||
| 69 | #define OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT 0x8 | ||
| 70 | |||
| 66 | #define OMAP_CTRL_USB2_PHY_PD BIT(28) | 71 | #define OMAP_CTRL_USB2_PHY_PD BIT(28) |
| 67 | 72 | ||
| 68 | #define AM437X_CTRL_USB2_PHY_PD BIT(0) | 73 | #define AM437X_CTRL_USB2_PHY_PD BIT(0) |
| @@ -74,6 +79,7 @@ enum omap_control_usb_mode { | |||
| 74 | void omap_control_phy_power(struct device *dev, int on); | 79 | void omap_control_phy_power(struct device *dev, int on); |
| 75 | void omap_control_usb_set_mode(struct device *dev, | 80 | void omap_control_usb_set_mode(struct device *dev, |
| 76 | enum omap_control_usb_mode mode); | 81 | enum omap_control_usb_mode mode); |
| 82 | void omap_control_pcie_pcs(struct device *dev, u8 id, u8 delay); | ||
| 77 | #else | 83 | #else |
| 78 | 84 | ||
| 79 | static inline void omap_control_phy_power(struct device *dev, int on) | 85 | static inline void omap_control_phy_power(struct device *dev, int on) |
| @@ -84,6 +90,10 @@ static inline void omap_control_usb_set_mode(struct device *dev, | |||
| 84 | enum omap_control_usb_mode mode) | 90 | enum omap_control_usb_mode mode) |
| 85 | { | 91 | { |
| 86 | } | 92 | } |
| 93 | |||
| 94 | static inline void omap_control_pcie_pcs(struct device *dev, u8 id, u8 delay) | ||
| 95 | { | ||
| 96 | } | ||
| 87 | #endif | 97 | #endif |
| 88 | 98 | ||
| 89 | #endif /* __OMAP_CONTROL_PHY_H__ */ | 99 | #endif /* __OMAP_CONTROL_PHY_H__ */ |
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index 2760744cb2a7..8cb6f815475b 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/of.h> | 18 | #include <linux/of.h> |
| 19 | #include <linux/device.h> | 19 | #include <linux/device.h> |
| 20 | #include <linux/pm_runtime.h> | 20 | #include <linux/pm_runtime.h> |
| 21 | #include <linux/regulator/consumer.h> | ||
| 21 | 22 | ||
| 22 | struct phy; | 23 | struct phy; |
| 23 | 24 | ||
| @@ -65,6 +66,7 @@ struct phy { | |||
| 65 | int init_count; | 66 | int init_count; |
| 66 | int power_count; | 67 | int power_count; |
| 67 | struct phy_attrs attrs; | 68 | struct phy_attrs attrs; |
| 69 | struct regulator *pwr; | ||
| 68 | }; | 70 | }; |
| 69 | 71 | ||
| 70 | /** | 72 | /** |
| @@ -156,9 +158,10 @@ void devm_phy_put(struct device *dev, struct phy *phy); | |||
| 156 | struct phy *of_phy_get(struct device_node *np, const char *con_id); | 158 | struct phy *of_phy_get(struct device_node *np, const char *con_id); |
| 157 | struct phy *of_phy_simple_xlate(struct device *dev, | 159 | struct phy *of_phy_simple_xlate(struct device *dev, |
| 158 | struct of_phandle_args *args); | 160 | struct of_phandle_args *args); |
| 159 | struct phy *phy_create(struct device *dev, const struct phy_ops *ops, | 161 | struct phy *phy_create(struct device *dev, struct device_node *node, |
| 160 | struct phy_init_data *init_data); | 162 | const struct phy_ops *ops, |
| 161 | struct phy *devm_phy_create(struct device *dev, | 163 | struct phy_init_data *init_data); |
| 164 | struct phy *devm_phy_create(struct device *dev, struct device_node *node, | ||
| 162 | const struct phy_ops *ops, struct phy_init_data *init_data); | 165 | const struct phy_ops *ops, struct phy_init_data *init_data); |
| 163 | void phy_destroy(struct phy *phy); | 166 | void phy_destroy(struct phy *phy); |
| 164 | void devm_phy_destroy(struct device *dev, struct phy *phy); | 167 | void devm_phy_destroy(struct device *dev, struct phy *phy); |
| @@ -297,13 +300,17 @@ static inline struct phy *of_phy_simple_xlate(struct device *dev, | |||
| 297 | } | 300 | } |
| 298 | 301 | ||
| 299 | static inline struct phy *phy_create(struct device *dev, | 302 | static inline struct phy *phy_create(struct device *dev, |
| 300 | const struct phy_ops *ops, struct phy_init_data *init_data) | 303 | struct device_node *node, |
| 304 | const struct phy_ops *ops, | ||
| 305 | struct phy_init_data *init_data) | ||
| 301 | { | 306 | { |
| 302 | return ERR_PTR(-ENOSYS); | 307 | return ERR_PTR(-ENOSYS); |
| 303 | } | 308 | } |
| 304 | 309 | ||
| 305 | static inline struct phy *devm_phy_create(struct device *dev, | 310 | static inline struct phy *devm_phy_create(struct device *dev, |
| 306 | const struct phy_ops *ops, struct phy_init_data *init_data) | 311 | struct device_node *node, |
| 312 | const struct phy_ops *ops, | ||
| 313 | struct phy_init_data *init_data) | ||
| 307 | { | 314 | { |
| 308 | return ERR_PTR(-ENOSYS); | 315 | return ERR_PTR(-ENOSYS); |
| 309 | } | 316 | } |
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 7373203140e7..c330f5ef42cf 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
| @@ -386,6 +386,21 @@ struct usb_composite_driver { | |||
| 386 | 386 | ||
| 387 | extern int usb_composite_probe(struct usb_composite_driver *driver); | 387 | extern int usb_composite_probe(struct usb_composite_driver *driver); |
| 388 | extern void usb_composite_unregister(struct usb_composite_driver *driver); | 388 | extern void usb_composite_unregister(struct usb_composite_driver *driver); |
| 389 | |||
| 390 | /** | ||
| 391 | * module_usb_composite_driver() - Helper macro for registering a USB gadget | ||
| 392 | * composite driver | ||
| 393 | * @__usb_composite_driver: usb_composite_driver struct | ||
| 394 | * | ||
| 395 | * Helper macro for USB gadget composite drivers which do not do anything | ||
| 396 | * special in module init/exit. This eliminates a lot of boilerplate. Each | ||
| 397 | * module may only use this macro once, and calling it replaces module_init() | ||
| 398 | * and module_exit() | ||
| 399 | */ | ||
| 400 | #define module_usb_composite_driver(__usb_composite_driver) \ | ||
| 401 | module_driver(__usb_composite_driver, usb_composite_probe, \ | ||
| 402 | usb_composite_unregister) | ||
| 403 | |||
| 389 | extern void usb_composite_setup_continue(struct usb_composite_dev *cdev); | 404 | extern void usb_composite_setup_continue(struct usb_composite_dev *cdev); |
| 390 | extern int composite_dev_prepare(struct usb_composite_driver *composite, | 405 | extern int composite_dev_prepare(struct usb_composite_driver *composite, |
| 391 | struct usb_composite_dev *cdev); | 406 | struct usb_composite_dev *cdev); |
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h index 52f944dfe2fd..55a17b188daa 100644 --- a/include/linux/usb/quirks.h +++ b/include/linux/usb/quirks.h | |||
| @@ -30,4 +30,15 @@ | |||
| 30 | descriptor */ | 30 | descriptor */ |
| 31 | #define USB_QUIRK_DELAY_INIT 0x00000040 | 31 | #define USB_QUIRK_DELAY_INIT 0x00000040 |
| 32 | 32 | ||
| 33 | /* | ||
| 34 | * For high speed and super speed interupt endpoints, the USB 2.0 and | ||
| 35 | * USB 3.0 spec require the interval in microframes | ||
| 36 | * (1 microframe = 125 microseconds) to be calculated as | ||
| 37 | * interval = 2 ^ (bInterval-1). | ||
| 38 | * | ||
| 39 | * Devices with this quirk report their bInterval as the result of this | ||
| 40 | * calculation instead of the exponent variable used in the calculation. | ||
| 41 | */ | ||
| 42 | #define USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL 0x00000080 | ||
| 43 | |||
| 33 | #endif /* __LINUX_USB_QUIRKS_H */ | 44 | #endif /* __LINUX_USB_QUIRKS_H */ |
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h index e452ba6ec6bd..d5952bb66752 100644 --- a/include/linux/usb/renesas_usbhs.h +++ b/include/linux/usb/renesas_usbhs.h | |||
| @@ -153,6 +153,9 @@ struct renesas_usbhs_driver_param { | |||
| 153 | */ | 153 | */ |
| 154 | int pio_dma_border; /* default is 64byte */ | 154 | int pio_dma_border; /* default is 64byte */ |
| 155 | 155 | ||
| 156 | u32 type; | ||
| 157 | u32 enable_gpio; | ||
| 158 | |||
| 156 | /* | 159 | /* |
| 157 | * option: | 160 | * option: |
| 158 | */ | 161 | */ |
| @@ -160,6 +163,9 @@ struct renesas_usbhs_driver_param { | |||
| 160 | u32 has_sudmac:1; /* for SUDMAC */ | 163 | u32 has_sudmac:1; /* for SUDMAC */ |
| 161 | }; | 164 | }; |
| 162 | 165 | ||
| 166 | #define USBHS_TYPE_R8A7790 1 | ||
| 167 | #define USBHS_TYPE_R8A7791 2 | ||
| 168 | |||
| 163 | /* | 169 | /* |
| 164 | * option: | 170 | * option: |
| 165 | * | 171 | * |
diff --git a/include/linux/usb/usb338x.h b/include/linux/usb/usb338x.h new file mode 100644 index 000000000000..f92eb635b9d3 --- /dev/null +++ b/include/linux/usb/usb338x.h | |||
| @@ -0,0 +1,199 @@ | |||
| 1 | /* | ||
| 2 | * USB 338x super/high/full speed USB device controller. | ||
| 3 | * Unlike many such controllers, this one talks PCI. | ||
| 4 | * | ||
| 5 | * Copyright (C) 2002 NetChip Technology, Inc. (http://www.netchip.com) | ||
| 6 | * Copyright (C) 2003 David Brownell | ||
| 7 | * Copyright (C) 2014 Ricardo Ribalda - Qtechnology/AS | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; either version 2 of the License, or | ||
| 12 | * (at your option) any later version. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | * GNU General Public License for more details. | ||
| 18 | * | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef __LINUX_USB_USB338X_H | ||
| 22 | #define __LINUX_USB_USB338X_H | ||
| 23 | |||
| 24 | #include <linux/usb/net2280.h> | ||
| 25 | |||
| 26 | /* | ||
| 27 | * Extra defined bits for net2280 registers | ||
| 28 | */ | ||
| 29 | #define SCRATCH 0x0b | ||
| 30 | |||
| 31 | #define DEFECT7374_FSM_FIELD 28 | ||
| 32 | #define SUPER_SPEED 8 | ||
| 33 | #define DMA_REQUEST_OUTSTANDING 5 | ||
| 34 | #define DMA_PAUSE_DONE_INTERRUPT 26 | ||
| 35 | #define SET_ISOCHRONOUS_DELAY 24 | ||
| 36 | #define SET_SEL 22 | ||
| 37 | #define SUPER_SPEED_MODE 8 | ||
| 38 | |||
| 39 | /*ep_cfg*/ | ||
| 40 | #define MAX_BURST_SIZE 24 | ||
| 41 | #define EP_FIFO_BYTE_COUNT 16 | ||
| 42 | #define IN_ENDPOINT_ENABLE 14 | ||
| 43 | #define IN_ENDPOINT_TYPE 12 | ||
| 44 | #define OUT_ENDPOINT_ENABLE 10 | ||
| 45 | #define OUT_ENDPOINT_TYPE 8 | ||
| 46 | |||
| 47 | struct usb338x_usb_ext_regs { | ||
| 48 | u32 usbclass; | ||
| 49 | #define DEVICE_PROTOCOL 16 | ||
| 50 | #define DEVICE_SUB_CLASS 8 | ||
| 51 | #define DEVICE_CLASS 0 | ||
| 52 | u32 ss_sel; | ||
| 53 | #define U2_SYSTEM_EXIT_LATENCY 8 | ||
| 54 | #define U1_SYSTEM_EXIT_LATENCY 0 | ||
| 55 | u32 ss_del; | ||
| 56 | #define U2_DEVICE_EXIT_LATENCY 8 | ||
| 57 | #define U1_DEVICE_EXIT_LATENCY 0 | ||
| 58 | u32 usb2lpm; | ||
| 59 | #define USB_L1_LPM_HIRD 2 | ||
| 60 | #define USB_L1_LPM_REMOTE_WAKE 1 | ||
| 61 | #define USB_L1_LPM_SUPPORT 0 | ||
| 62 | u32 usb3belt; | ||
| 63 | #define BELT_MULTIPLIER 10 | ||
| 64 | #define BEST_EFFORT_LATENCY_TOLERANCE 0 | ||
| 65 | u32 usbctl2; | ||
| 66 | #define LTM_ENABLE 7 | ||
| 67 | #define U2_ENABLE 6 | ||
| 68 | #define U1_ENABLE 5 | ||
| 69 | #define FUNCTION_SUSPEND 4 | ||
| 70 | #define USB3_CORE_ENABLE 3 | ||
| 71 | #define USB2_CORE_ENABLE 2 | ||
| 72 | #define SERIAL_NUMBER_STRING_ENABLE 0 | ||
| 73 | u32 in_timeout; | ||
| 74 | #define GPEP3_TIMEOUT 19 | ||
| 75 | #define GPEP2_TIMEOUT 18 | ||
| 76 | #define GPEP1_TIMEOUT 17 | ||
| 77 | #define GPEP0_TIMEOUT 16 | ||
| 78 | #define GPEP3_TIMEOUT_VALUE 13 | ||
| 79 | #define GPEP3_TIMEOUT_ENABLE 12 | ||
| 80 | #define GPEP2_TIMEOUT_VALUE 9 | ||
| 81 | #define GPEP2_TIMEOUT_ENABLE 8 | ||
| 82 | #define GPEP1_TIMEOUT_VALUE 5 | ||
| 83 | #define GPEP1_TIMEOUT_ENABLE 4 | ||
| 84 | #define GPEP0_TIMEOUT_VALUE 1 | ||
| 85 | #define GPEP0_TIMEOUT_ENABLE 0 | ||
| 86 | u32 isodelay; | ||
| 87 | #define ISOCHRONOUS_DELAY 0 | ||
| 88 | } __packed; | ||
| 89 | |||
| 90 | struct usb338x_fifo_regs { | ||
| 91 | /* offset 0x0500, 0x0520, 0x0540, 0x0560, 0x0580 */ | ||
| 92 | u32 ep_fifo_size_base; | ||
| 93 | #define IN_FIFO_BASE_ADDRESS 22 | ||
| 94 | #define IN_FIFO_SIZE 16 | ||
| 95 | #define OUT_FIFO_BASE_ADDRESS 6 | ||
| 96 | #define OUT_FIFO_SIZE 0 | ||
| 97 | u32 ep_fifo_out_wrptr; | ||
| 98 | u32 ep_fifo_out_rdptr; | ||
| 99 | u32 ep_fifo_in_wrptr; | ||
| 100 | u32 ep_fifo_in_rdptr; | ||
| 101 | u32 unused[3]; | ||
| 102 | } __packed; | ||
| 103 | |||
| 104 | |||
| 105 | /* Link layer */ | ||
| 106 | struct usb338x_ll_regs { | ||
| 107 | /* offset 0x700 */ | ||
| 108 | u32 ll_ltssm_ctrl1; | ||
| 109 | u32 ll_ltssm_ctrl2; | ||
| 110 | u32 ll_ltssm_ctrl3; | ||
| 111 | u32 unused[2]; | ||
| 112 | u32 ll_general_ctrl0; | ||
| 113 | u32 ll_general_ctrl1; | ||
| 114 | #define PM_U3_AUTO_EXIT 29 | ||
| 115 | #define PM_U2_AUTO_EXIT 28 | ||
| 116 | #define PM_U1_AUTO_EXIT 27 | ||
| 117 | #define PM_FORCE_U2_ENTRY 26 | ||
| 118 | #define PM_FORCE_U1_ENTRY 25 | ||
| 119 | #define PM_LGO_COLLISION_SEND_LAU 24 | ||
| 120 | #define PM_DIR_LINK_REJECT 23 | ||
| 121 | #define PM_FORCE_LINK_ACCEPT 22 | ||
| 122 | #define PM_DIR_ENTRY_U3 20 | ||
| 123 | #define PM_DIR_ENTRY_U2 19 | ||
| 124 | #define PM_DIR_ENTRY_U1 18 | ||
| 125 | #define PM_U2_ENABLE 17 | ||
| 126 | #define PM_U1_ENABLE 16 | ||
| 127 | #define SKP_THRESHOLD_ADJUST_FMW 8 | ||
| 128 | #define RESEND_DPP_ON_LRTY_FMW 7 | ||
| 129 | #define DL_BIT_VALUE_FMW 6 | ||
| 130 | #define FORCE_DL_BIT 5 | ||
| 131 | u32 ll_general_ctrl2; | ||
| 132 | #define SELECT_INVERT_LANE_POLARITY 7 | ||
| 133 | #define FORCE_INVERT_LANE_POLARITY 6 | ||
| 134 | u32 ll_general_ctrl3; | ||
| 135 | u32 ll_general_ctrl4; | ||
| 136 | u32 ll_error_gen; | ||
| 137 | } __packed; | ||
| 138 | |||
| 139 | struct usb338x_ll_lfps_regs { | ||
| 140 | /* offset 0x748 */ | ||
| 141 | u32 ll_lfps_5; | ||
| 142 | #define TIMER_LFPS_6US 16 | ||
| 143 | u32 ll_lfps_6; | ||
| 144 | #define TIMER_LFPS_80US 0 | ||
| 145 | } __packed; | ||
| 146 | |||
| 147 | struct usb338x_ll_tsn_regs { | ||
| 148 | /* offset 0x77C */ | ||
| 149 | u32 ll_tsn_counters_2; | ||
| 150 | #define HOT_TX_NORESET_TS2 24 | ||
| 151 | u32 ll_tsn_counters_3; | ||
| 152 | #define HOT_RX_RESET_TS2 0 | ||
| 153 | } __packed; | ||
| 154 | |||
| 155 | struct usb338x_ll_chi_regs { | ||
| 156 | /* offset 0x79C */ | ||
| 157 | u32 ll_tsn_chicken_bit; | ||
| 158 | #define RECOVERY_IDLE_TO_RECOVER_FMW 3 | ||
| 159 | } __packed; | ||
| 160 | |||
| 161 | /* protocol layer */ | ||
| 162 | struct usb338x_pl_regs { | ||
| 163 | /* offset 0x800 */ | ||
| 164 | u32 pl_reg_1; | ||
| 165 | u32 pl_reg_2; | ||
| 166 | u32 pl_reg_3; | ||
| 167 | u32 pl_reg_4; | ||
| 168 | u32 pl_ep_ctrl; | ||
| 169 | /* Protocol Layer Endpoint Control*/ | ||
| 170 | #define PL_EP_CTRL 0x810 | ||
| 171 | #define ENDPOINT_SELECT 0 | ||
| 172 | /* [4:0] */ | ||
| 173 | #define EP_INITIALIZED 16 | ||
| 174 | #define SEQUENCE_NUMBER_RESET 17 | ||
| 175 | #define CLEAR_ACK_ERROR_CODE 20 | ||
| 176 | u32 pl_reg_6; | ||
| 177 | u32 pl_reg_7; | ||
| 178 | u32 pl_reg_8; | ||
| 179 | u32 pl_ep_status_1; | ||
| 180 | /* Protocol Layer Endpoint Status 1*/ | ||
| 181 | #define PL_EP_STATUS_1 0x820 | ||
| 182 | #define STATE 16 | ||
| 183 | #define ACK_GOOD_NORMAL 0x11 | ||
| 184 | #define ACK_GOOD_MORE_ACKS_TO_COME 0x16 | ||
| 185 | u32 pl_ep_status_2; | ||
| 186 | u32 pl_ep_status_3; | ||
| 187 | /* Protocol Layer Endpoint Status 3*/ | ||
| 188 | #define PL_EP_STATUS_3 0x828 | ||
| 189 | #define SEQUENCE_NUMBER 0 | ||
| 190 | u32 pl_ep_status_4; | ||
| 191 | /* Protocol Layer Endpoint Status 4*/ | ||
| 192 | #define PL_EP_STATUS_4 0x82c | ||
| 193 | u32 pl_ep_cfg_4; | ||
| 194 | /* Protocol Layer Endpoint Configuration 4*/ | ||
| 195 | #define PL_EP_CFG_4 0x830 | ||
| 196 | #define NON_CTRL_IN_TOLERATE_BAD_DIR 6 | ||
| 197 | } __packed; | ||
| 198 | |||
| 199 | #endif /* __LINUX_USB_USB338X_H */ | ||
diff --git a/include/linux/usb/xhci_pdriver.h b/include/linux/usb/xhci_pdriver.h new file mode 100644 index 000000000000..376654b5b0f7 --- /dev/null +++ b/include/linux/usb/xhci_pdriver.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* | ||
| 2 | * This program is free software; you can redistribute it and/or modify | ||
| 3 | * it under the terms of the GNU General Public License version 2 as | ||
| 4 | * published by the Free Software Foundation. | ||
| 5 | * | ||
| 6 | * This program is distributed in the hope that it will be useful, but | ||
| 7 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
| 8 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| 9 | * for more details. | ||
| 10 | * | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __USB_CORE_XHCI_PDRIVER_H | ||
| 14 | #define __USB_CORE_XHCI_PDRIVER_H | ||
| 15 | |||
| 16 | /** | ||
| 17 | * struct usb_xhci_pdata - platform_data for generic xhci platform driver | ||
| 18 | * | ||
| 19 | * @usb3_lpm_capable: determines if this xhci platform supports USB3 | ||
| 20 | * LPM capability | ||
| 21 | * | ||
| 22 | */ | ||
| 23 | struct usb_xhci_pdata { | ||
| 24 | unsigned usb3_lpm_capable:1; | ||
| 25 | }; | ||
| 26 | |||
| 27 | #endif /* __USB_CORE_XHCI_PDRIVER_H */ | ||
