blob: 4479869bd00690ecaf60c3580c9a758190c0d0eb [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 {
17 XHCI_PLAT_TYPE_MARVELL_ARMADA,
18 XHCI_PLAT_TYPE_RENESAS_RCAR_GEN2,
19};
20
21struct xhci_plat_priv {
22 enum xhci_plat_type type;
23};
24
25#define hcd_to_xhci_priv(h) ((struct xhci_plat_priv *)hcd_to_xhci(h)->priv)
26
27static inline bool xhci_plat_type_is(struct usb_hcd *hcd,
28 enum xhci_plat_type type)
29{
30 struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd);
31
32 if (priv && priv->type == type)
33 return true;
34 else
35 return false;
36}
37#endif /* _XHCI_PLAT_H */