mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
ANDROID: usb: host: export additional xhci symbols for ring management
Export the following xhci symbols which will allow vendor modules
to perform their own ring management. These will be used to create
and manage additional secondary rings that are used to offload to a
separate coprocessor which interacts with the xHC controller.
xhci_ring_alloc
xhci_ring_free
- Allocate and free a struct xhci_ring.
xhci_alloc_erst
xhci_free_erst
- Allocate and free event ring segment tables.
xhci_trb_virt_to_dma
- Used to retrieve the DMA address of a TRB
xhci_ring_cmd_db
- Notify the controller when a new command is issued
xhci_alloc_command
xhci_free_command
- Allocate and free a struct xhci_command
xhci_queue_stop_endpoint
- Issue a stop endpoint command to the controller
Bug: 228259895
Change-Id: I9d4c5884108e656e890aca8137d4ef580bcd7a12
Signed-off-by: Jack Pham <quic_jackp@quicinc.com>
This commit is contained in:
@@ -292,6 +292,7 @@ void xhci_ring_free(struct xhci_hcd *xhci, struct xhci_ring *ring)
|
||||
|
||||
kfree(ring);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xhci_ring_free);
|
||||
|
||||
void xhci_initialize_ring_info(struct xhci_ring *ring,
|
||||
unsigned int cycle_state)
|
||||
@@ -407,6 +408,7 @@ fail:
|
||||
kfree(ring);
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xhci_ring_alloc);
|
||||
|
||||
void xhci_free_endpoint_ring(struct xhci_hcd *xhci,
|
||||
struct xhci_virt_device *virt_dev,
|
||||
@@ -1755,6 +1757,7 @@ struct xhci_command *xhci_alloc_command(struct xhci_hcd *xhci,
|
||||
INIT_LIST_HEAD(&command->cmd_list);
|
||||
return command;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xhci_alloc_command);
|
||||
|
||||
struct xhci_command *xhci_alloc_command_with_ctx(struct xhci_hcd *xhci,
|
||||
bool allocate_completion, gfp_t mem_flags)
|
||||
@@ -1788,6 +1791,7 @@ void xhci_free_command(struct xhci_hcd *xhci,
|
||||
kfree(command->completion);
|
||||
kfree(command);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xhci_free_command);
|
||||
|
||||
int xhci_alloc_erst(struct xhci_hcd *xhci,
|
||||
struct xhci_ring *evt_ring,
|
||||
@@ -1818,6 +1822,7 @@ int xhci_alloc_erst(struct xhci_hcd *xhci,
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xhci_alloc_erst);
|
||||
|
||||
void xhci_free_erst(struct xhci_hcd *xhci, struct xhci_erst *erst)
|
||||
{
|
||||
@@ -1831,6 +1836,7 @@ void xhci_free_erst(struct xhci_hcd *xhci, struct xhci_erst *erst)
|
||||
erst->erst_dma_addr);
|
||||
erst->entries = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xhci_free_erst);
|
||||
|
||||
void xhci_mem_cleanup(struct xhci_hcd *xhci)
|
||||
{
|
||||
|
||||
@@ -79,6 +79,7 @@ dma_addr_t xhci_trb_virt_to_dma(struct xhci_segment *seg,
|
||||
return 0;
|
||||
return seg->dma + (segment_offset * sizeof(*trb));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xhci_trb_virt_to_dma);
|
||||
|
||||
static bool trb_is_noop(union xhci_trb *trb)
|
||||
{
|
||||
@@ -311,6 +312,7 @@ void xhci_ring_cmd_db(struct xhci_hcd *xhci)
|
||||
/* Flush PCI posted writes */
|
||||
readl(&xhci->dba->doorbell[0]);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xhci_ring_cmd_db);
|
||||
|
||||
static bool xhci_mod_cmd_timer(struct xhci_hcd *xhci, unsigned long delay)
|
||||
{
|
||||
@@ -4420,6 +4422,7 @@ int xhci_queue_stop_endpoint(struct xhci_hcd *xhci, struct xhci_command *cmd,
|
||||
return queue_command(xhci, cmd, 0, 0, 0,
|
||||
trb_slot_id | trb_ep_index | type | trb_suspend, false);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xhci_queue_stop_endpoint);
|
||||
|
||||
int xhci_queue_reset_ep(struct xhci_hcd *xhci, struct xhci_command *cmd,
|
||||
int slot_id, unsigned int ep_index,
|
||||
|
||||
Reference in New Issue
Block a user