xhci-plat.h 884 B

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