xref: /OK3568_Linux_fs/kernel/drivers/usb/host/xhci-plat.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * xhci-plat.h - xHCI host controller driver platform Bus Glue.
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Copyright (C) 2015 Renesas Electronics Corporation
6*4882a593Smuzhiyun  */
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun #ifndef _XHCI_PLAT_H
9*4882a593Smuzhiyun #define _XHCI_PLAT_H
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun #include "xhci.h"	/* for hcd_to_xhci() */
12*4882a593Smuzhiyun 
13*4882a593Smuzhiyun struct xhci_plat_priv {
14*4882a593Smuzhiyun 	const char *firmware_name;
15*4882a593Smuzhiyun 	unsigned long long quirks;
16*4882a593Smuzhiyun 	struct xhci_vendor_data *vendor_data;
17*4882a593Smuzhiyun 	int (*plat_setup)(struct usb_hcd *);
18*4882a593Smuzhiyun 	void (*plat_start)(struct usb_hcd *);
19*4882a593Smuzhiyun 	int (*init_quirk)(struct usb_hcd *);
20*4882a593Smuzhiyun 	int (*suspend_quirk)(struct usb_hcd *);
21*4882a593Smuzhiyun 	int (*resume_quirk)(struct usb_hcd *);
22*4882a593Smuzhiyun };
23*4882a593Smuzhiyun 
24*4882a593Smuzhiyun #define hcd_to_xhci_priv(h) ((struct xhci_plat_priv *)hcd_to_xhci(h)->priv)
25*4882a593Smuzhiyun #define xhci_to_priv(x) ((struct xhci_plat_priv *)(x)->priv)
26*4882a593Smuzhiyun 
27*4882a593Smuzhiyun struct xhci_plat_priv_overwrite {
28*4882a593Smuzhiyun 	struct xhci_vendor_ops *vendor_ops;
29*4882a593Smuzhiyun };
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun int xhci_plat_register_vendor_ops(struct xhci_vendor_ops *vendor_ops);
32*4882a593Smuzhiyun 
33*4882a593Smuzhiyun #endif	/* _XHCI_PLAT_H */
34