blob: 529c3c40f901df69250cc7d05502bb41177fa329 [file] [log] [blame]
Yoshihiro Shimoda4efb2f62015-11-24 13:09:49 +02001/*
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
11#ifndef _XHCI_PLAT_H
12#define _XHCI_PLAT_H
13
14#include "xhci.h" /* for hcd_to_xhci() */
15
16enum xhci_plat_type {
Peter Griffinf9a85f62016-04-13 19:58:44 +030017 XHCI_PLAT_TYPE_MARVELL_ARMADA = 1,
Yoshihiro Shimoda4efb2f62015-11-24 13:09:49 +020018 XHCI_PLAT_TYPE_RENESAS_RCAR_GEN2,
Yoshihiro Shimoda526a2402015-11-24 13:09:53 +020019 XHCI_PLAT_TYPE_RENESAS_RCAR_GEN3,
Yoshihiro Shimoda4efb2f62015-11-24 13:09:49 +020020};
21
22struct xhci_plat_priv {
23 enum xhci_plat_type type;
Yoshihiro Shimodae93272fe2015-11-24 13:09:50 +020024 const char *firmware_name;
Yoshihiro Shimoda4efb2f62015-11-24 13:09:49 +020025};
26
27#define hcd_to_xhci_priv(h) ((struct xhci_plat_priv *)hcd_to_xhci(h)->priv)
28
29static inline bool xhci_plat_type_is(struct usb_hcd *hcd,
30 enum xhci_plat_type type)
31{
32 struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd);
33
34 if (priv && priv->type == type)
35 return true;
36 else
37 return false;
38}
39#endif /* _XHCI_PLAT_H */