linux/drivers/usb/host/xhci-dbgcap.h

/* SPDX-License-Identifier: GPL-2.0 */
/**
 * xhci-dbgcap.h - xHCI debug capability support
 *
 * Copyright (C) 2017 Intel Corporation
 *
 * Author: Lu Baolu <[email protected]>
 */
#ifndef __LINUX_XHCI_DBGCAP_H
#define __LINUX_XHCI_DBGCAP_H

#include <linux/tty.h>
#include <linux/kfifo.h>

struct dbc_regs {};

struct dbc_info_context {};

#define DBC_CTRL_DBC_RUN
#define DBC_CTRL_PORT_ENABLE
#define DBC_CTRL_HALT_OUT_TR
#define DBC_CTRL_HALT_IN_TR
#define DBC_CTRL_DBC_RUN_CHANGE
#define DBC_CTRL_DBC_ENABLE
#define DBC_CTRL_MAXBURST(p)
#define DBC_DOOR_BELL_TARGET(p)

#define DBC_MAX_PACKET
#define DBC_MAX_STRING_LENGTH
#define DBC_STRING_MANUFACTURER
#define DBC_STRING_PRODUCT
#define DBC_STRING_SERIAL
#define DBC_CONTEXT_SIZE

/*
 * Port status:
 */
#define DBC_PORTSC_CONN_STATUS
#define DBC_PORTSC_PORT_ENABLED
#define DBC_PORTSC_CONN_CHANGE
#define DBC_PORTSC_RESET_CHANGE
#define DBC_PORTSC_LINK_CHANGE
#define DBC_PORTSC_CONFIG_CHANGE

struct dbc_str_descs {};

#define DBC_PROTOCOL
#define DBC_VENDOR_ID
#define DBC_PRODUCT_ID
#define DBC_DEVICE_REV

enum dbc_state {};

struct dbc_ep {};

#define DBC_QUEUE_SIZE
#define DBC_WRITE_BUF_SIZE
#define DBC_POLL_INTERVAL_DEFAULT
#define DBC_POLL_INTERVAL_MAX
/*
 * Private structure for DbC hardware state:
 */
struct dbc_port {};

struct dbc_driver {};

struct xhci_dbc {};

struct dbc_request {};

#define dbc_bulkout_ctx(d)
#define dbc_bulkin_ctx(d)
#define dbc_bulkout_enq(d)
#define dbc_bulkin_enq(d)
#define dbc_epctx_info2(t, p, b)
#define dbc_ep_dma_direction(d)

#define BULK_OUT
#define BULK_IN
#define EPID_OUT
#define EPID_IN

enum evtreturn {};

static inline struct dbc_ep *get_in_ep(struct xhci_dbc *dbc)
{}

static inline struct dbc_ep *get_out_ep(struct xhci_dbc *dbc)
{}

#ifdef CONFIG_USB_XHCI_DBGCAP
int xhci_create_dbc_dev(struct xhci_hcd *xhci);
void xhci_remove_dbc_dev(struct xhci_hcd *xhci);
int xhci_dbc_init(void);
void xhci_dbc_exit(void);
int dbc_tty_init(void);
void dbc_tty_exit(void);
int xhci_dbc_tty_probe(struct device *dev, void __iomem *res, struct xhci_hcd *xhci);
void xhci_dbc_tty_remove(struct xhci_dbc *dbc);
struct xhci_dbc *xhci_alloc_dbc(struct device *dev, void __iomem *res,
				 const struct dbc_driver *driver);
void xhci_dbc_remove(struct xhci_dbc *dbc);
struct dbc_request *dbc_alloc_request(struct xhci_dbc *dbc,
				      unsigned int direction,
				      gfp_t flags);
void dbc_free_request(struct dbc_request *req);
int dbc_ep_queue(struct dbc_request *req);
#ifdef CONFIG_PM
int xhci_dbc_suspend(struct xhci_hcd *xhci);
int xhci_dbc_resume(struct xhci_hcd *xhci);
#endif /* CONFIG_PM */
#else
static inline int xhci_create_dbc_dev(struct xhci_hcd *xhci)
{
	return 0;
}

static inline void xhci_remove_dbc_dev(struct xhci_hcd *xhci)
{
}
static inline int xhci_dbc_init(void)
{
	return 0;
}
static inline void xhci_dbc_exit(void)
{
}
static inline int xhci_dbc_suspend(struct xhci_hcd *xhci)
{
	return 0;
}

static inline int xhci_dbc_resume(struct xhci_hcd *xhci)
{
	return 0;
}
#endif /* CONFIG_USB_XHCI_DBGCAP */
#endif /* __LINUX_XHCI_DBGCAP_H */