linux/drivers/usb/gadget/udc/m66592-udc.h

// SPDX-License-Identifier: GPL-2.0
/*
 * M66592 UDC (USB gadget)
 *
 * Copyright (C) 2006-2007 Renesas Solutions Corp.
 *
 * Author : Yoshihiro Shimoda <[email protected]>
 */

#ifndef __M66592_UDC_H__
#define __M66592_UDC_H__

#include <linux/clk.h>
#include <linux/usb/m66592.h>

#define M66592_SYSCFG
#define M66592_XTAL
#define M66592_XTAL48
#define M66592_XTAL24
#define M66592_XTAL12
#define M66592_XCKE
#define M66592_RCKE
#define M66592_PLLC
#define M66592_SCKE
#define M66592_ATCKM
#define M66592_HSE
#define M66592_DCFM
#define M66592_DMRPD
#define M66592_DPRPU
#define M66592_FSRPC
#define M66592_PCUT
#define M66592_USBE

#define M66592_SYSSTS
#define M66592_LNST
#define M66592_SE1
#define M66592_KSTS
#define M66592_JSTS
#define M66592_SE0

#define M66592_DVSTCTR
#define M66592_WKUP
#define M66592_RWUPE
#define M66592_USBRST
#define M66592_RESUME
#define M66592_UACT
#define M66592_RHST
#define M66592_HSMODE
#define M66592_FSMODE
#define M66592_HSPROC

#define M66592_TESTMODE
#define M66592_UTST
#define M66592_H_TST_PACKET
#define M66592_H_TST_SE0_NAK
#define M66592_H_TST_K
#define M66592_H_TST_J
#define M66592_H_TST_NORMAL
#define M66592_P_TST_PACKET
#define M66592_P_TST_SE0_NAK
#define M66592_P_TST_K
#define M66592_P_TST_J
#define M66592_P_TST_NORMAL

/* built-in registers */
#define M66592_CFBCFG
#define M66592_D0FBCFG
#define M66592_LITTLE
/* external chip case */
#define M66592_PINCFG
#define M66592_LDRV
#define M66592_BIGEND

#define M66592_DMA0CFG
#define M66592_DMA1CFG
#define M66592_DREQA
#define M66592_BURST
#define M66592_DACKA
#define M66592_DFORM
#define M66592_CPU_ADR_RD_WR
#define M66592_CPU_DACK_RD_WR
#define M66592_CPU_DACK_ONLY
#define M66592_SPLIT_DACK_ONLY
#define M66592_SPLIT_DACK_DSTB
#define M66592_DENDA
#define M66592_PKTM
#define M66592_DENDE
#define M66592_OBUS

/* common case */
#define M66592_CFIFO
#define M66592_D0FIFO
#define M66592_D1FIFO

#define M66592_CFIFOSEL
#define M66592_D0FIFOSEL
#define M66592_D1FIFOSEL
#define M66592_RCNT
#define M66592_REW
#define M66592_DCLRM
#define M66592_DREQE
#define M66592_MBW_8
#define M66592_MBW_16
#define M66592_MBW_32
#define M66592_TRENB
#define M66592_TRCLR
#define M66592_DEZPM
#define M66592_ISEL
#define M66592_CURPIPE

#define M66592_CFIFOCTR
#define M66592_D0FIFOCTR
#define M66592_D1FIFOCTR
#define M66592_BVAL
#define M66592_BCLR
#define M66592_FRDY
#define M66592_DTLN

#define M66592_CFIFOSIE
#define M66592_TGL
#define M66592_SCLR
#define M66592_SBUSY

#define M66592_D0FIFOTRN
#define M66592_D1FIFOTRN
#define M66592_TRNCNT

#define M66592_INTENB0
#define M66592_VBSE
#define M66592_RSME
#define M66592_SOFE
#define M66592_DVSE
#define M66592_CTRE
#define M66592_BEMPE
#define M66592_NRDYE
#define M66592_BRDYE
#define M66592_URST
#define M66592_SADR
#define M66592_SCFG
#define M66592_SUSP
#define M66592_WDST
#define M66592_RDST
#define M66592_CMPL
#define M66592_SERR

#define M66592_INTENB1
#define M66592_BCHGE
#define M66592_DTCHE
#define M66592_SIGNE
#define M66592_SACKE
#define M66592_BRDYM
#define M66592_INTL
#define M66592_PCSE

#define M66592_BRDYENB
#define M66592_BRDYSTS
#define M66592_BRDY7
#define M66592_BRDY6
#define M66592_BRDY5
#define M66592_BRDY4
#define M66592_BRDY3
#define M66592_BRDY2
#define M66592_BRDY1
#define M66592_BRDY0

#define M66592_NRDYENB
#define M66592_NRDYSTS
#define M66592_NRDY7
#define M66592_NRDY6
#define M66592_NRDY5
#define M66592_NRDY4
#define M66592_NRDY3
#define M66592_NRDY2
#define M66592_NRDY1
#define M66592_NRDY0

#define M66592_BEMPENB
#define M66592_BEMPSTS
#define M66592_BEMP7
#define M66592_BEMP6
#define M66592_BEMP5
#define M66592_BEMP4
#define M66592_BEMP3
#define M66592_BEMP2
#define M66592_BEMP1
#define M66592_BEMP0

#define M66592_SOFCFG
#define M66592_SOFM
#define M66592_SOF_125US
#define M66592_SOF_1MS
#define M66592_SOF_DISABLE

#define M66592_INTSTS0
#define M66592_VBINT
#define M66592_RESM
#define M66592_SOFR
#define M66592_DVST
#define M66592_CTRT
#define M66592_BEMP
#define M66592_NRDY
#define M66592_BRDY
#define M66592_VBSTS
#define M66592_DVSQ
#define M66592_DS_SPD_CNFG
#define M66592_DS_SPD_ADDR
#define M66592_DS_SPD_DFLT
#define M66592_DS_SPD_POWR
#define M66592_DS_SUSP
#define M66592_DS_CNFG
#define M66592_DS_ADDS
#define M66592_DS_DFLT
#define M66592_DS_POWR
#define M66592_DVSQS
#define M66592_VALID
#define M66592_CTSQ
#define M66592_CS_SQER
#define M66592_CS_WRND
#define M66592_CS_WRSS
#define M66592_CS_WRDS
#define M66592_CS_RDSS
#define M66592_CS_RDDS
#define M66592_CS_IDST

#define M66592_INTSTS1
#define M66592_BCHG
#define M66592_DTCH
#define M66592_SIGN
#define M66592_SACK

#define M66592_FRMNUM
#define M66592_OVRN
#define M66592_CRCE
#define M66592_SOFRM
#define M66592_FRNM

#define M66592_UFRMNUM
#define M66592_UFRNM

#define M66592_RECOVER
#define M66592_STSRECOV
#define M66592_STSR_HI
#define M66592_STSR_DEFAULT
#define M66592_STSR_ADDRESS
#define M66592_STSR_CONFIG
#define M66592_USBADDR

#define M66592_USBREQ
#define M66592_bRequest
#define M66592_GET_STATUS
#define M66592_CLEAR_FEATURE
#define M66592_ReqRESERVED
#define M66592_SET_FEATURE
#define M66592_ReqRESERVED1
#define M66592_SET_ADDRESS
#define M66592_GET_DESCRIPTOR
#define M66592_SET_DESCRIPTOR
#define M66592_GET_CONFIGURATION
#define M66592_SET_CONFIGURATION
#define M66592_GET_INTERFACE
#define M66592_SET_INTERFACE
#define M66592_SYNCH_FRAME
#define M66592_bmRequestType
#define M66592_bmRequestTypeDir
#define M66592_HOST_TO_DEVICE
#define M66592_DEVICE_TO_HOST
#define M66592_bmRequestTypeType
#define M66592_STANDARD
#define M66592_CLASS
#define M66592_VENDOR
#define M66592_bmRequestTypeRecip
#define M66592_DEVICE
#define M66592_INTERFACE
#define M66592_ENDPOINT

#define M66592_USBVAL
#define M66592_wValue
/* Standard Feature Selector */
#define M66592_ENDPOINT_HALT
#define M66592_DEVICE_REMOTE_WAKEUP
#define M66592_TEST_MODE
/* Descriptor Types */
#define M66592_DT_TYPE
#define M66592_GET_DT_TYPE(v)
#define M66592_DT_DEVICE
#define M66592_DT_CONFIGURATION
#define M66592_DT_STRING
#define M66592_DT_INTERFACE
#define M66592_DT_ENDPOINT
#define M66592_DT_DEVICE_QUALIFIER
#define M66592_DT_OTHER_SPEED_CONFIGURATION
#define M66592_DT_INTERFACE_POWER
#define M66592_DT_INDEX
#define M66592_CONF_NUM
#define M66592_ALT_SET

#define M66592_USBINDEX
#define M66592_wIndex
#define M66592_TEST_SELECT
#define M66592_TEST_J
#define M66592_TEST_K
#define M66592_TEST_SE0_NAK
#define M66592_TEST_PACKET
#define M66592_TEST_FORCE_ENABLE
#define M66592_TEST_STSelectors
#define M66592_TEST_Reserved
#define M66592_TEST_VSTModes
#define M66592_EP_DIR
#define M66592_EP_DIR_IN
#define M66592_EP_DIR_OUT

#define M66592_USBLENG
#define M66592_wLength

#define M66592_DCPCFG
#define M66592_CNTMD
#define M66592_DIR

#define M66592_DCPMAXP
#define M66592_DEVSEL
#define M66592_DEVICE_0
#define M66592_DEVICE_1
#define M66592_DEVICE_2
#define M66592_DEVICE_3
#define M66592_MAXP

#define M66592_DCPCTR
#define M66592_BSTS
#define M66592_SUREQ
#define M66592_SQCLR
#define M66592_SQSET
#define M66592_SQMON
#define M66592_CCPL
#define M66592_PID
#define M66592_PID_STALL
#define M66592_PID_BUF
#define M66592_PID_NAK

#define M66592_PIPESEL
#define M66592_PIPENM
#define M66592_PIPE0
#define M66592_PIPE1
#define M66592_PIPE2
#define M66592_PIPE3
#define M66592_PIPE4
#define M66592_PIPE5
#define M66592_PIPE6
#define M66592_PIPE7

#define M66592_PIPECFG
#define M66592_TYP
#define M66592_ISO
#define M66592_INT
#define M66592_BULK
#define M66592_BFRE
#define M66592_DBLB
#define M66592_CNTMD
#define M66592_SHTNAK
#define M66592_DIR
#define M66592_DIR_H_OUT
#define M66592_DIR_P_IN
#define M66592_DIR_H_IN
#define M66592_DIR_P_OUT
#define M66592_EPNUM
#define M66592_EP1
#define M66592_EP2
#define M66592_EP3
#define M66592_EP4
#define M66592_EP5
#define M66592_EP6
#define M66592_EP7
#define M66592_EP8
#define M66592_EP9
#define M66592_EP10
#define M66592_EP11
#define M66592_EP12
#define M66592_EP13
#define M66592_EP14
#define M66592_EP15

#define M66592_PIPEBUF
#define M66592_BUFSIZE
#define M66592_BUF_SIZE(x)
#define M66592_BUFNMB

#define M66592_PIPEMAXP
#define M66592_MXPS

#define M66592_PIPEPERI
#define M66592_IFIS
#define M66592_IITV

#define M66592_PIPE1CTR
#define M66592_PIPE2CTR
#define M66592_PIPE3CTR
#define M66592_PIPE4CTR
#define M66592_PIPE5CTR
#define M66592_PIPE6CTR
#define M66592_PIPE7CTR
#define M66592_BSTS
#define M66592_INBUFM
#define M66592_ACLRM
#define M66592_SQCLR
#define M66592_SQSET
#define M66592_SQMON
#define M66592_PID

#define M66592_INVALID_REG


#define get_pipectr_addr(pipenum)

#define M66592_MAX_SAMPLING

#define M66592_MAX_NUM_PIPE
#define M66592_MAX_NUM_BULK
#define M66592_MAX_NUM_ISOC
#define M66592_MAX_NUM_INT

#define M66592_BASE_PIPENUM_BULK
#define M66592_BASE_PIPENUM_ISOC
#define M66592_BASE_PIPENUM_INT

#define M66592_BASE_BUFNUM
#define M66592_MAX_BUFNUM

struct m66592_pipe_info {};

struct m66592_request {};

struct m66592_ep {};

struct m66592 {};
#define to_m66592(g)

#define gadget_to_m66592(_gadget)
#define m66592_to_gadget(m66592)

#define is_bulk_pipe(pipenum)
#define is_interrupt_pipe(pipenum)
#define is_isoc_pipe(pipenum)

#define enable_irq_ready(m66592, pipenum)
#define disable_irq_ready(m66592, pipenum)
#define enable_irq_empty(m66592, pipenum)
#define disable_irq_empty(m66592, pipenum)
#define enable_irq_nrdy(m66592, pipenum)
#define disable_irq_nrdy(m66592, pipenum)

/*-------------------------------------------------------------------------*/
static inline u16 m66592_read(struct m66592 *m66592, unsigned long offset)
{}

static inline void m66592_read_fifo(struct m66592 *m66592,
		unsigned long offset,
		void *buf, unsigned long len)
{}

static inline void m66592_write(struct m66592 *m66592, u16 val,
				unsigned long offset)
{}

static inline void m66592_mdfy(struct m66592 *m66592, u16 val, u16 pat,
		unsigned long offset)
{}

#define m66592_bclr(m66592, val, offset)
#define m66592_bset(m66592, val, offset)

static inline void m66592_write_fifo(struct m66592 *m66592,
		struct m66592_ep *ep,
		void *buf, unsigned long len)
{}

#endif	/* ifndef __M66592_UDC_H__ */