xhci-plat.h 941 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * xhci-plat.h - xHCI host controller driver platform Bus Glue.
  3. *
  4. * Copyright (C) 2015 Renesas Electronics Corporation
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * version 2 as published by the Free Software Foundation.
  9. */
  10. #ifndef _XHCI_PLAT_H
  11. #define _XHCI_PLAT_H
  12. #include "xhci.h" /* for hcd_to_xhci() */
  13. enum xhci_plat_type {
  14. XHCI_PLAT_TYPE_MARVELL_ARMADA,
  15. XHCI_PLAT_TYPE_RENESAS_RCAR_GEN2,
  16. XHCI_PLAT_TYPE_RENESAS_RCAR_GEN3,
  17. };
  18. struct xhci_plat_priv {
  19. enum xhci_plat_type type;
  20. const char *firmware_name;
  21. };
  22. #define hcd_to_xhci_priv(h) ((struct xhci_plat_priv *)hcd_to_xhci(h)->priv)
  23. static inline bool xhci_plat_type_is(struct usb_hcd *hcd,
  24. enum xhci_plat_type type)
  25. {
  26. struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd);
  27. if (priv && priv->type == type)
  28. return true;
  29. else
  30. return false;
  31. }
  32. #endif /* _XHCI_PLAT_H */