linux/drivers/usb/gadget/udc/gr_udc.h

// SPDX-License-Identifier: GPL-2.0+
/*
 * USB Peripheral Controller driver for Aeroflex Gaisler GRUSBDC.
 *
 * 2013 (c) Aeroflex Gaisler AB
 *
 * This driver supports GRUSBDC USB Device Controller cores available in the
 * GRLIB VHDL IP core library.
 *
 * Full documentation of the GRUSBDC core can be found here:
 * https://www.gaisler.com/products/grlib/grip.pdf
 *
 * Contributors:
 * - Andreas Larsson <[email protected]>
 * - Marko Isomaki
 */

/* Control registers on the AMBA bus */

#define GR_MAXEP

struct gr_epregs {};

struct gr_regs {};

#define GR_EPCTRL_BUFSZ_SCALER
#define GR_EPCTRL_BUFSZ_MASK
#define GR_EPCTRL_BUFSZ_POS
#define GR_EPCTRL_PI
#define GR_EPCTRL_CB
#define GR_EPCTRL_CS
#define GR_EPCTRL_MAXPL_MASK
#define GR_EPCTRL_MAXPL_POS
#define GR_EPCTRL_NT_MASK
#define GR_EPCTRL_NT_POS
#define GR_EPCTRL_TT_MASK
#define GR_EPCTRL_TT_POS
#define GR_EPCTRL_EH
#define GR_EPCTRL_ED
#define GR_EPCTRL_EV

#define GR_DMACTRL_AE
#define GR_DMACTRL_AD
#define GR_DMACTRL_AI
#define GR_DMACTRL_IE
#define GR_DMACTRL_DA

#define GR_EPSTAT_PT
#define GR_EPSTAT_PR
#define GR_EPSTAT_B1CNT_MASK
#define GR_EPSTAT_B1CNT_POS
#define GR_EPSTAT_B0CNT_MASK
#define GR_EPSTAT_B0CNT_POS
#define GR_EPSTAT_B1
#define GR_EPSTAT_B0
#define GR_EPSTAT_BS

#define GR_CONTROL_SI
#define GR_CONTROL_UI
#define GR_CONTROL_VI
#define GR_CONTROL_SP
#define GR_CONTROL_FI
#define GR_CONTROL_EP
#define GR_CONTROL_DH
#define GR_CONTROL_RW
#define GR_CONTROL_TS_MASK
#define GR_CONTROL_TS_POS
#define GR_CONTROL_TM
#define GR_CONTROL_UA_MASK
#define GR_CONTROL_UA_POS
#define GR_CONTROL_SU

#define GR_STATUS_NEPI_MASK
#define GR_STATUS_NEPI_POS
#define GR_STATUS_NEPO_MASK
#define GR_STATUS_NEPO_POS
#define GR_STATUS_DM
#define GR_STATUS_SU
#define GR_STATUS_UR
#define GR_STATUS_VB
#define GR_STATUS_SP
#define GR_STATUS_AF_MASK
#define GR_STATUS_AF_POS
#define GR_STATUS_FN_MASK
#define GR_STATUS_FN_POS


#define MAX_CTRL_PL_SIZE

/*-------------------------------------------------------------------------*/

/* Driver data structures and utilities */

struct gr_dma_desc {};

#define GR_DESC_OUT_CTRL_SE
#define GR_DESC_OUT_CTRL_IE
#define GR_DESC_OUT_CTRL_NX
#define GR_DESC_OUT_CTRL_EN
#define GR_DESC_OUT_CTRL_LEN_MASK

#define GR_DESC_IN_CTRL_MO
#define GR_DESC_IN_CTRL_PI
#define GR_DESC_IN_CTRL_ML
#define GR_DESC_IN_CTRL_IE
#define GR_DESC_IN_CTRL_NX
#define GR_DESC_IN_CTRL_EN
#define GR_DESC_IN_CTRL_LEN_MASK

#define GR_DESC_DMAADDR_MASK

struct gr_ep {};

struct gr_request {};

enum gr_ep0state {};

struct gr_udc {};

#define to_gr_udc(gadget)