Commit 90ab8e7f authored by Howard Yen's avatar Howard Yen Committed by Greg Kroah-Hartman
Browse files

ANDROID: usb: host: add xhci hooks for USB offload



To enable supporting for USB offload, define "offload" in usb controller
node of device tree. "offload" value can be used to determine which type
of offload was been enabled in the SoC.

For example:

&usbdrd_dwc3 {
	...
		/* support usb offloading, 0: disabled, 1: audio */
		offload = <1>;
	...
};

There are several vendor_ops introduced by this patch:

c - function callbacks for vendor specific operations
{
	@vendor_init:
		- called for vendor init process during xhci-plat-hcd
		probe.
		@vendor_cleanup:
		- called for vendor cleanup process during xhci-plat-hcd
		remove.
		@is_usb_offload_enabled:
		- called to check if usb offload enabled.
		@queue_irq_work:
		- called to queue vendor specific irq work.
		@alloc_dcbaa:
		- called when allocating vendor specific dcbaa during
		memory initializtion.
		@free_dcbaa:
		- called to free vendor specific dcbaa when cleanup the
		memory.
		@alloc_transfer_ring:
		- called when vendor specific transfer ring allocation is required
		@free_transfer_ring:
		- called to free vendor specific transfer ring
		@sync_dev_ctx:
		- called when synchronization for device context is required
		@usb_offload_skip_urb:
		- skip urb control for offloading
		@alloc_container_ctx:
		@free_container_ctx:
		- called to alloc and free vendor specific container context
}

The xhci hooks with prefix "xhci_vendor_" on the ops in xhci_vendor_ops.
For example, vendor_init ops will be invoked by xhci_vendor_init() hook,
is_usb_offload_enabled ops will be invoked by
xhci_vendor_is_usb_offload_enabled(), and so on.

Change-Id: Ib7f6952e6d44a2fcfe9d19a78f1d9f5093417613
Signed-off-by: default avatarHoward Yen <howardyen@google.com>
Bug: 175358363
Signed-off-by: default avatarGreg Kroah-Harktman <gregkh@google.com>
Signed-off-by: default avatarPuma Hsu <pumahsu@google.com>
Signed-off-by: default avatarJ. Avila <elavila@google.com>
Signed-off-by: default avatarDaehwan Jung <dh10.jung@samsung.com>
Signed-off-by: default avatarJaeHun Jung <jh0801.jung@samsung.com>
parent 88959a53
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment