aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r--drivers/usb/host/xhci.h49
1 files changed, 26 insertions, 23 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 4746816aed3e..9ffecd56600d 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -937,9 +937,6 @@ struct xhci_virt_device {
937#define XHCI_MAX_RINGS_CACHED 31 937#define XHCI_MAX_RINGS_CACHED 31
938 struct xhci_virt_ep eps[31]; 938 struct xhci_virt_ep eps[31];
939 struct completion cmd_completion; 939 struct completion cmd_completion;
940 /* Status of the last command issued for this device */
941 u32 cmd_status;
942 struct list_head cmd_list;
943 u8 fake_port; 940 u8 fake_port;
944 u8 real_port; 941 u8 real_port;
945 struct xhci_interval_bw_table *bw_table; 942 struct xhci_interval_bw_table *bw_table;
@@ -1298,7 +1295,6 @@ struct xhci_td {
1298 1295
1299/* command descriptor */ 1296/* command descriptor */
1300struct xhci_cd { 1297struct xhci_cd {
1301 struct list_head cancel_cmd_list;
1302 struct xhci_command *command; 1298 struct xhci_command *command;
1303 union xhci_trb *cmd_trb; 1299 union xhci_trb *cmd_trb;
1304}; 1300};
@@ -1476,6 +1472,8 @@ struct xhci_hcd {
1476 /* msi-x vectors */ 1472 /* msi-x vectors */
1477 int msix_count; 1473 int msix_count;
1478 struct msix_entry *msix_entries; 1474 struct msix_entry *msix_entries;
1475 /* optional clock */
1476 struct clk *clk;
1479 /* data structures */ 1477 /* data structures */
1480 struct xhci_device_context_array *dcbaa; 1478 struct xhci_device_context_array *dcbaa;
1481 struct xhci_ring *cmd_ring; 1479 struct xhci_ring *cmd_ring;
@@ -1483,8 +1481,10 @@ struct xhci_hcd {
1483#define CMD_RING_STATE_RUNNING (1 << 0) 1481#define CMD_RING_STATE_RUNNING (1 << 0)
1484#define CMD_RING_STATE_ABORTED (1 << 1) 1482#define CMD_RING_STATE_ABORTED (1 << 1)
1485#define CMD_RING_STATE_STOPPED (1 << 2) 1483#define CMD_RING_STATE_STOPPED (1 << 2)
1486 struct list_head cancel_cmd_list; 1484 struct list_head cmd_list;
1487 unsigned int cmd_ring_reserved_trbs; 1485 unsigned int cmd_ring_reserved_trbs;
1486 struct timer_list cmd_timer;
1487 struct xhci_command *current_cmd;
1488 struct xhci_ring *event_ring; 1488 struct xhci_ring *event_ring;
1489 struct xhci_erst erst; 1489 struct xhci_erst erst;
1490 /* Scratchpad */ 1490 /* Scratchpad */
@@ -1738,8 +1738,7 @@ static inline int xhci_register_pci(void) { return 0; }
1738static inline void xhci_unregister_pci(void) {} 1738static inline void xhci_unregister_pci(void) {}
1739#endif 1739#endif
1740 1740
1741#if defined(CONFIG_USB_XHCI_PLATFORM) \ 1741#if IS_ENABLED(CONFIG_USB_XHCI_PLATFORM)
1742 || defined(CONFIG_USB_XHCI_PLATFORM_MODULE)
1743int xhci_register_plat(void); 1742int xhci_register_plat(void);
1744void xhci_unregister_plat(void); 1743void xhci_unregister_plat(void);
1745#else 1744#else
@@ -1808,13 +1807,14 @@ struct xhci_segment *trb_in_td(struct xhci_segment *start_seg,
1808 dma_addr_t suspect_dma); 1807 dma_addr_t suspect_dma);
1809int xhci_is_vendor_info_code(struct xhci_hcd *xhci, unsigned int trb_comp_code); 1808int xhci_is_vendor_info_code(struct xhci_hcd *xhci, unsigned int trb_comp_code);
1810void xhci_ring_cmd_db(struct xhci_hcd *xhci); 1809void xhci_ring_cmd_db(struct xhci_hcd *xhci);
1811int xhci_queue_slot_control(struct xhci_hcd *xhci, u32 trb_type, u32 slot_id); 1810int xhci_queue_slot_control(struct xhci_hcd *xhci, struct xhci_command *cmd,
1812int xhci_queue_address_device(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, 1811 u32 trb_type, u32 slot_id);
1813 u32 slot_id, enum xhci_setup_dev); 1812int xhci_queue_address_device(struct xhci_hcd *xhci, struct xhci_command *cmd,
1814int xhci_queue_vendor_command(struct xhci_hcd *xhci, 1813 dma_addr_t in_ctx_ptr, u32 slot_id, enum xhci_setup_dev);
1814int xhci_queue_vendor_command(struct xhci_hcd *xhci, struct xhci_command *cmd,
1815 u32 field1, u32 field2, u32 field3, u32 field4); 1815 u32 field1, u32 field2, u32 field3, u32 field4);
1816int xhci_queue_stop_endpoint(struct xhci_hcd *xhci, int slot_id, 1816int xhci_queue_stop_endpoint(struct xhci_hcd *xhci, struct xhci_command *cmd,
1817 unsigned int ep_index, int suspend); 1817 int slot_id, unsigned int ep_index, int suspend);
1818int xhci_queue_ctrl_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb, 1818int xhci_queue_ctrl_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb,
1819 int slot_id, unsigned int ep_index); 1819 int slot_id, unsigned int ep_index);
1820int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb, 1820int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb,
@@ -1823,18 +1823,21 @@ int xhci_queue_intr_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb,
1823 int slot_id, unsigned int ep_index); 1823 int slot_id, unsigned int ep_index);
1824int xhci_queue_isoc_tx_prepare(struct xhci_hcd *xhci, gfp_t mem_flags, 1824int xhci_queue_isoc_tx_prepare(struct xhci_hcd *xhci, gfp_t mem_flags,
1825 struct urb *urb, int slot_id, unsigned int ep_index); 1825 struct urb *urb, int slot_id, unsigned int ep_index);
1826int xhci_queue_configure_endpoint(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, 1826int xhci_queue_configure_endpoint(struct xhci_hcd *xhci,
1827 u32 slot_id, bool command_must_succeed); 1827 struct xhci_command *cmd, dma_addr_t in_ctx_ptr, u32 slot_id,
1828int xhci_queue_evaluate_context(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, 1828 bool command_must_succeed);
1829 u32 slot_id, bool command_must_succeed); 1829int xhci_queue_evaluate_context(struct xhci_hcd *xhci, struct xhci_command *cmd,
1830int xhci_queue_reset_ep(struct xhci_hcd *xhci, int slot_id, 1830 dma_addr_t in_ctx_ptr, u32 slot_id, bool command_must_succeed);
1831 unsigned int ep_index); 1831int xhci_queue_reset_ep(struct xhci_hcd *xhci, struct xhci_command *cmd,
1832int xhci_queue_reset_device(struct xhci_hcd *xhci, u32 slot_id); 1832 int slot_id, unsigned int ep_index);
1833int xhci_queue_reset_device(struct xhci_hcd *xhci, struct xhci_command *cmd,
1834 u32 slot_id);
1833void xhci_find_new_dequeue_state(struct xhci_hcd *xhci, 1835void xhci_find_new_dequeue_state(struct xhci_hcd *xhci,
1834 unsigned int slot_id, unsigned int ep_index, 1836 unsigned int slot_id, unsigned int ep_index,
1835 unsigned int stream_id, struct xhci_td *cur_td, 1837 unsigned int stream_id, struct xhci_td *cur_td,
1836 struct xhci_dequeue_state *state); 1838 struct xhci_dequeue_state *state);
1837void xhci_queue_new_dequeue_state(struct xhci_hcd *xhci, 1839void xhci_queue_new_dequeue_state(struct xhci_hcd *xhci,
1840 struct xhci_command *cmd,
1838 unsigned int slot_id, unsigned int ep_index, 1841 unsigned int slot_id, unsigned int ep_index,
1839 unsigned int stream_id, 1842 unsigned int stream_id,
1840 struct xhci_dequeue_state *deq_state); 1843 struct xhci_dequeue_state *deq_state);
@@ -1844,11 +1847,11 @@ void xhci_queue_config_ep_quirk(struct xhci_hcd *xhci,
1844 unsigned int slot_id, unsigned int ep_index, 1847 unsigned int slot_id, unsigned int ep_index,
1845 struct xhci_dequeue_state *deq_state); 1848 struct xhci_dequeue_state *deq_state);
1846void xhci_stop_endpoint_command_watchdog(unsigned long arg); 1849void xhci_stop_endpoint_command_watchdog(unsigned long arg);
1847int xhci_cancel_cmd(struct xhci_hcd *xhci, struct xhci_command *command, 1850void xhci_handle_command_timeout(unsigned long data);
1848 union xhci_trb *cmd_trb); 1851
1849void xhci_ring_ep_doorbell(struct xhci_hcd *xhci, unsigned int slot_id, 1852void xhci_ring_ep_doorbell(struct xhci_hcd *xhci, unsigned int slot_id,
1850 unsigned int ep_index, unsigned int stream_id); 1853 unsigned int ep_index, unsigned int stream_id);
1851union xhci_trb *xhci_find_next_enqueue(struct xhci_ring *ring); 1854void xhci_cleanup_command_queue(struct xhci_hcd *xhci);
1852 1855
1853/* xHCI roothub code */ 1856/* xHCI roothub code */
1854void xhci_set_link_state(struct xhci_hcd *xhci, __le32 __iomem **port_array, 1857void xhci_set_link_state(struct xhci_hcd *xhci, __le32 __iomem **port_array,