linux/drivers/net/wan/hd64572.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * hd64572.h	Description of the Hitachi HD64572 (SCA-II), valid for 
 * 		CPU modes 0 & 2.
 *
 * Author:	Ivan Passos <[email protected]>
 *
 * Copyright:   (c) 2000-2001 Cyclades Corp.
 *
 * $Log: hd64572.h,v $
 * Revision 3.1  2001/06/15 12:41:10  regina
 * upping major version number
 *
 * Revision 1.1.1.1  2001/06/13 20:24:49  daniela
 * PC300 initial CVS version (3.4.0-pre1)
 *
 * Revision 1.0 2000/01/25 ivan
 * Initial version.
 */

#ifndef __HD64572_H
#define __HD64572_H

/* Illegal Access Register */
#define ILAR

/* Wait Controller Registers */
#define PABR0L
#define PABR0H
#define PABR1L
#define PABR1H
#define WCRL
#define WCRM
#define WCRH

/* Interrupt Registers */
#define IVR
#define IMVR
#define ITCR
#define ISR0
#define ISR1
#define IER0
#define IER1

/* Register Access Macros (chan is 0 or 1 in _any_ case) */
#define M_REG(reg, chan)
#define DRX_REG(reg, chan)
#define DTX_REG(reg, chan)
#define TRX_REG(reg, chan)
#define TTX_REG(reg, chan)
#define ST_REG(reg, chan)
#define IR0_DRX(val, chan)
#define IR0_DTX(val, chan)
#define IR0_M(val, chan)

/* MSCI Channel Registers */
#define MSCI0_OFFSET
#define MSCI1_OFFSET

#define MD0
#define MD1
#define MD2
#define MD3
#define CTL
#define RXS
#define TXS
#define EXS
#define TMCT
#define TMCR
#define CMD
#define ST0
#define ST1
#define ST2
#define ST3
#define ST4
#define FST
#define IE0
#define IE1
#define IE2
#define IE4
#define FIE
#define SA0
#define SA1
#define IDL
#define TRBL 
#define TRBK 
#define TRBJ 
#define TRBH 
#define TRC0 
#define TRC1 
#define RRC 
#define CST0 
#define CST1 
#define CST2 
#define CST3 
#define GPO
#define TFS
#define TFN
#define TBN
#define RBN
#define TNR0
#define TNR1
#define TCR
#define RNR
#define RCR

/* Timer Registers */
#define TIMER0RX_OFFSET
#define TIMER0TX_OFFSET
#define TIMER1RX_OFFSET
#define TIMER1TX_OFFSET

#define TCNTL
#define TCNTH
#define TCONRL
#define TCONRH
#define TCSR
#define TEPR

/* DMA registers */
#define PCR
#define DRR
#define DMER
#define BTCR
#define BOLR
#define DSR_RX(chan)
#define DSR_TX(chan)
#define DIR_RX(chan)
#define DIR_TX(chan)
#define FCT_RX(chan)
#define FCT_TX(chan)
#define DMR_RX(chan)
#define DMR_TX(chan)
#define DCR_RX(chan)
#define DCR_TX(chan)

/* DMA Channel Registers */
#define DMAC0RX_OFFSET
#define DMAC0TX_OFFSET
#define DMAC1RX_OFFSET
#define DMAC1TX_OFFSET

#define DARL
#define DARH
#define DARB
#define DARBH
#define SARL
#define SARH
#define SARB
#define DARBH
#define BARL
#define BARH
#define BARB
#define BARBH
#define CDAL
#define CDAH
#define CDAB
#define CDABH
#define EDAL
#define EDAH
#define EDAB
#define EDABH
#define BFLL
#define BFLH
#define BCRL
#define BCRH

/* Block Descriptor Structure */
pcsca_bd_t;

/* Block Descriptor Structure */
pkt_desc;


/*
	Descriptor Status definitions:

	Bit	Transmission	Reception

	7	EOM		EOM
	6	-		Short Frame
	5	-		Abort
	4	-		Residual bit
	3	Underrun	Overrun	
	2	-		CRC
	1	Ownership	Ownership
	0	EOT		-
*/
#define DST_EOT
#define DST_OSB
#define DST_CRC
#define DST_OVR
#define DST_UDR
#define DST_RBIT
#define DST_ABT
#define DST_SHRT
#define DST_EOM

/* Packet Descriptor Status bits */

#define ST_TX_EOM
#define ST_TX_UNDRRUN
#define ST_TX_OWNRSHP
#define ST_TX_EOT

#define ST_RX_EOM
#define ST_RX_SHORT
#define ST_RX_ABORT
#define ST_RX_RESBIT
#define ST_RX_OVERRUN
#define ST_RX_CRC
#define ST_RX_OWNRSHP

#define ST_ERROR_MASK

/* Status Counter Registers */
#define CMCR
#define TECNTL
#define TECNTM
#define TECNTH
#define TECCR
#define URCNTL
#define URCNTH
#define URCCR
#define RECNTL
#define RECNTM
#define RECNTH
#define RECCR
#define ORCNTL
#define ORCNTH
#define ORCCR
#define CECNTL
#define CECNTH
#define CECCR
#define ABCNTL
#define ABCNTH
#define ABCCR
#define SHCNTL
#define SHCNTH
#define SHCCR
#define RSCNTL
#define RSCNTH
#define RSCCR

/* Register Programming Constants */

#define IR0_DMIC
#define IR0_DMIB
#define IR0_DMIA
#define IR0_EFT
#define IR0_DMAREQ
#define IR0_TXINT
#define IR0_RXINTB
#define IR0_RXINTA
#define IR0_TXRDY
#define IR0_RXRDY

#define MD0_CRC16_0
#define MD0_CRC16_1
#define MD0_CRC32
#define MD0_CRC_CCITT
#define MD0_CRCC0
#define MD0_CRCC1
#define MD0_AUTO_ENA
#define MD0_ASYNC
#define MD0_BY_MSYNC
#define MD0_BY_BISYNC
#define MD0_BY_EXT
#define MD0_BIT_SYNC
#define MD0_TRANSP

#define MD0_HDLC

#define MD0_CRC_NONE
#define MD0_CRC_16_0
#define MD0_CRC_16
#define MD0_CRC_ITU32
#define MD0_CRC_ITU

#define MD1_NOADDR
#define MD1_SADDR1
#define MD1_SADDR2
#define MD1_DADDR

#define MD2_NRZI_IEEE
#define MD2_MANCHESTER
#define MD2_FM_MARK
#define MD2_FM_SPACE
#define MD2_LOOPBACK

#define MD2_F_DUPLEX
#define MD2_AUTO_ECHO
#define MD2_LOOP_HI_Z
#define MD2_LOOP_MIR
#define MD2_ADPLL_X8
#define MD2_ADPLL_X16
#define MD2_ADPLL_X32
#define MD2_NRZ
#define MD2_NRZI
#define MD2_NRZ_IEEE
#define MD2_MANCH
#define MD2_FM1
#define MD2_FM0
#define MD2_FM

#define CTL_RTS
#define CTL_DTR
#define CTL_SYN
#define CTL_IDLC
#define CTL_UDRNC
#define CTL_URSKP
#define CTL_URCT

#define CTL_NORTS
#define CTL_NODTR
#define CTL_IDLE

#define RXS_BR0
#define RXS_BR1
#define RXS_BR2
#define RXS_BR3
#define RXS_ECLK
#define RXS_ECLK_NS
#define RXS_IBRG
#define RXS_PLL1
#define RXS_PLL2
#define RXS_PLL3
#define RXS_DRTXC

#define TXS_BR0
#define TXS_BR1
#define TXS_BR2
#define TXS_BR3
#define TXS_ECLK
#define TXS_IBRG
#define TXS_RCLK
#define TXS_DTRXC

#define EXS_RES0
#define EXS_RES1
#define EXS_RES2
#define EXS_TES0
#define EXS_TES1
#define EXS_TES2

#define CLK_BRG_MASK
#define CLK_PIN_OUT
#define CLK_LINE
#define CLK_BRG
#define CLK_TX_RXCLK

#define CMD_RX_RST
#define CMD_RX_ENA
#define CMD_RX_DIS
#define CMD_RX_CRC_INIT
#define CMD_RX_MSG_REJ
#define CMD_RX_MP_SRCH
#define CMD_RX_CRC_EXC
#define CMD_RX_CRC_FRC
#define CMD_TX_RST
#define CMD_TX_ENA
#define CMD_TX_DISA
#define CMD_TX_CRC_INIT
#define CMD_TX_CRC_EXC
#define CMD_TX_EOM
#define CMD_TX_ABORT
#define CMD_TX_MP_ON
#define CMD_TX_BUF_CLR
#define CMD_TX_DISB
#define CMD_CH_RST
#define CMD_SRCH_MODE
#define CMD_NOP

#define CMD_RESET
#define CMD_TX_ENABLE
#define CMD_RX_ENABLE

#define ST0_RXRDY
#define ST0_TXRDY
#define ST0_RXINTB
#define ST0_RXINTA
#define ST0_TXINT

#define ST1_IDLE
#define ST1_ABORT
#define ST1_CDCD
#define ST1_CCTS
#define ST1_SYN_FLAG
#define ST1_CLMD
#define ST1_TXIDLE
#define ST1_UDRN

#define ST2_CRCE
#define ST2_ONRN
#define ST2_RBIT
#define ST2_ABORT
#define ST2_SHORT
#define ST2_EOM

#define ST3_RX_ENA
#define ST3_TX_ENA
#define ST3_DCD
#define ST3_CTS
#define ST3_SRCH_MODE
#define ST3_SLOOP
#define ST3_GPI

#define ST4_RDNR
#define ST4_RDCR
#define ST4_TDNR
#define ST4_TDCR
#define ST4_OCLM
#define ST4_CFT
#define ST4_CGPI

#define FST_CRCEF
#define FST_OVRNF
#define FST_RBIF
#define FST_ABTF
#define FST_SHRTF
#define FST_EOMF

#define IE0_RXRDY
#define IE0_TXRDY
#define IE0_RXINTB
#define IE0_RXINTA
#define IE0_TXINT
#define IE0_UDRN
#define IE0_CDCD

#define IE1_IDLD
#define IE1_ABTD
#define IE1_CDCD
#define IE1_CCTS
#define IE1_SYNCD
#define IE1_CLMD
#define IE1_IDL
#define IE1_UDRN

#define IE2_CRCE
#define IE2_OVRN
#define IE2_RBIT
#define IE2_ABT
#define IE2_SHRT
#define IE2_EOM

#define IE4_RDNR
#define IE4_RDCR
#define IE4_TDNR
#define IE4_TDCR
#define IE4_OCLM
#define IE4_CFT
#define IE4_CGPI

#define FIE_CRCEF
#define FIE_OVRNF
#define FIE_RBIF
#define FIE_ABTF
#define FIE_SHRTF
#define FIE_EOMF

#define DSR_DWE
#define DSR_DE
#define DSR_REF
#define DSR_UDRF
#define DSR_COA
#define DSR_COF
#define DSR_BOF
#define DSR_EOM
#define DSR_EOT

#define DIR_REF
#define DIR_UDRF
#define DIR_COA
#define DIR_COF
#define DIR_BOF
#define DIR_EOM
#define DIR_EOT

#define DIR_REFE
#define DIR_UDRFE
#define DIR_COAE
#define DIR_COFE
#define DIR_BOFE
#define DIR_EOME
#define DIR_EOTE

#define DMR_CNTE
#define DMR_NF
#define DMR_SEOME
#define DMR_TMOD

#define DMER_DME

#define DCR_SW_ABT
#define DCR_FCT_CLR

#define DCR_ABORT
#define DCR_CLEAR_EOF

#define PCR_COTE
#define PCR_PR0
#define PCR_PR1
#define PCR_PR2
#define PCR_CCC
#define PCR_BRC
#define PCR_OSB
#define PCR_BURST

#endif /* (__HD64572_H) */