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

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * xhci-debugfs.h - xHCI debugfs interface
 *
 * Copyright (C) 2017 Intel Corporation
 *
 * Author: Lu Baolu <[email protected]>
 */

#ifndef __LINUX_XHCI_DEBUGFS_H
#define __LINUX_XHCI_DEBUGFS_H

#include <linux/debugfs.h>

#define DEBUGFS_NAMELEN

#define REG_CAPLENGTH
#define REG_HCSPARAMS1
#define REG_HCSPARAMS2
#define REG_HCSPARAMS3
#define REG_HCCPARAMS1
#define REG_DOORBELLOFF
#define REG_RUNTIMEOFF
#define REG_HCCPARAMS2

#define REG_USBCMD
#define REG_USBSTS
#define REG_PAGESIZE
#define REG_DNCTRL
#define REG_CRCR
#define REG_DCBAAP_LOW
#define REG_DCBAAP_HIGH
#define REG_CONFIG

#define REG_MFINDEX
#define REG_IR0_IMAN
#define REG_IR0_IMOD
#define REG_IR0_ERSTSZ
#define REG_IR0_ERSTBA_LOW
#define REG_IR0_ERSTBA_HIGH
#define REG_IR0_ERDP_LOW
#define REG_IR0_ERDP_HIGH

#define REG_EXTCAP_USBLEGSUP
#define REG_EXTCAP_USBLEGCTLSTS

#define REG_EXTCAP_REVISION
#define REG_EXTCAP_NAME
#define REG_EXTCAP_PORTINFO
#define REG_EXTCAP_PORTTYPE
#define REG_EXTCAP_MANTISSA1
#define REG_EXTCAP_MANTISSA2
#define REG_EXTCAP_MANTISSA3
#define REG_EXTCAP_MANTISSA4
#define REG_EXTCAP_MANTISSA5
#define REG_EXTCAP_MANTISSA6

#define REG_EXTCAP_DBC_CAPABILITY
#define REG_EXTCAP_DBC_DOORBELL
#define REG_EXTCAP_DBC_ERSTSIZE
#define REG_EXTCAP_DBC_ERST_LOW
#define REG_EXTCAP_DBC_ERST_HIGH
#define REG_EXTCAP_DBC_ERDP_LOW
#define REG_EXTCAP_DBC_ERDP_HIGH
#define REG_EXTCAP_DBC_CONTROL
#define REG_EXTCAP_DBC_STATUS
#define REG_EXTCAP_DBC_PORTSC
#define REG_EXTCAP_DBC_CONT_LOW
#define REG_EXTCAP_DBC_CONT_HIGH
#define REG_EXTCAP_DBC_DEVINFO1
#define REG_EXTCAP_DBC_DEVINFO2

#define dump_register(nm)

struct xhci_regset {};

struct xhci_file_map {};

struct xhci_ep_priv {};

struct xhci_slot_priv {};

#ifdef CONFIG_DEBUG_FS
void xhci_debugfs_init(struct xhci_hcd *xhci);
void xhci_debugfs_exit(struct xhci_hcd *xhci);
void __init xhci_debugfs_create_root(void);
void __exit xhci_debugfs_remove_root(void);
void xhci_debugfs_create_slot(struct xhci_hcd *xhci, int slot_id);
void xhci_debugfs_remove_slot(struct xhci_hcd *xhci, int slot_id);
void xhci_debugfs_create_endpoint(struct xhci_hcd *xhci,
				  struct xhci_virt_device *virt_dev,
				  int ep_index);
void xhci_debugfs_remove_endpoint(struct xhci_hcd *xhci,
				  struct xhci_virt_device *virt_dev,
				  int ep_index);
void xhci_debugfs_create_stream_files(struct xhci_hcd *xhci,
				      struct xhci_virt_device *virt_dev,
				      int ep_index);
#else
static inline void xhci_debugfs_init(struct xhci_hcd *xhci) { }
static inline void xhci_debugfs_exit(struct xhci_hcd *xhci) { }
static inline void __init xhci_debugfs_create_root(void) { }
static inline void __exit xhci_debugfs_remove_root(void) { }
static inline void xhci_debugfs_create_slot(struct xhci_hcd *x, int s) { }
static inline void xhci_debugfs_remove_slot(struct xhci_hcd *x, int s) { }
static inline void
xhci_debugfs_create_endpoint(struct xhci_hcd *xhci,
			     struct xhci_virt_device *virt_dev,
			     int ep_index) { }
static inline void
xhci_debugfs_remove_endpoint(struct xhci_hcd *xhci,
			     struct xhci_virt_device *virt_dev,
			     int ep_index) { }
static inline void
xhci_debugfs_create_stream_files(struct xhci_hcd *xhci,
				 struct xhci_virt_device *virt_dev,
				 int ep_index) { }
#endif /* CONFIG_DEBUG_FS */

#endif /* __LINUX_XHCI_DEBUGFS_H */