Linux Audio

Check our new training course

Loading...
v4.6
 
 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
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 = 1,
18	XHCI_PLAT_TYPE_RENESAS_RCAR_GEN2,
19	XHCI_PLAT_TYPE_RENESAS_RCAR_GEN3,
20};
21
22struct xhci_plat_priv {
23	enum xhci_plat_type type;
24	const char *firmware_name;
 
 
 
 
 
25};
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 */
v6.2
 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
 8#ifndef _XHCI_PLAT_H
 9#define _XHCI_PLAT_H
10
11#include "xhci.h"	/* for hcd_to_xhci() */
12
 
 
 
 
 
 
13struct xhci_plat_priv {
 
14	const char *firmware_name;
15	unsigned long long quirks;
16	void (*plat_start)(struct usb_hcd *);
17	int (*init_quirk)(struct usb_hcd *);
18	int (*suspend_quirk)(struct usb_hcd *);
19	int (*resume_quirk)(struct usb_hcd *);
20};
21
22#define hcd_to_xhci_priv(h) ((struct xhci_plat_priv *)hcd_to_xhci(h)->priv)
23#define xhci_to_priv(x) ((struct xhci_plat_priv *)(x)->priv)
 
 
 
 
 
 
 
 
 
 
24#endif	/* _XHCI_PLAT_H */