linux/drivers/ipack/devices/scc2698.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * scc2698.h
 *
 * driver for the IPOCTAL boards
 *
 * Copyright (C) 2009-2012 CERN (www.cern.ch)
 * Author: Nicolas Serafini, EIC2 SA
 * Author: Samuel Iglesias Gonsalvez <[email protected]>
 */

#ifndef SCC2698_H_
#define SCC2698_H_

/*
 * union scc2698_channel - Channel access to scc2698 IO
 *
 * dn value are only spacer.
 *
 */
scc2698_channel;

/*
 * union scc2698_block - Block access to scc2698 IO
 *
 * The scc2698 contain 4 block.
 * Each block containt two channel a and b.
 * dn value are only spacer.
 *
 */
scc2698_block;

#define MR1_CHRL_5_BITS
#define MR1_CHRL_6_BITS
#define MR1_CHRL_7_BITS
#define MR1_CHRL_8_BITS
#define MR1_PARITY_EVEN
#define MR1_PARITY_ODD
#define MR1_PARITY_ON
#define MR1_PARITY_FORCE
#define MR1_PARITY_OFF
#define MR1_PARITY_SPECIAL
#define MR1_ERROR_CHAR
#define MR1_ERROR_BLOCK
#define MR1_RxINT_RxRDY
#define MR1_RxINT_FFULL
#define MR1_RxRTS_CONTROL_ON
#define MR1_RxRTS_CONTROL_OFF

#define MR2_STOP_BITS_LENGTH_1
#define MR2_STOP_BITS_LENGTH_2
#define MR2_CTS_ENABLE_TX_ON
#define MR2_CTS_ENABLE_TX_OFF
#define MR2_TxRTS_CONTROL_ON
#define MR2_TxRTS_CONTROL_OFF
#define MR2_CH_MODE_NORMAL
#define MR2_CH_MODE_ECHO
#define MR2_CH_MODE_LOCAL
#define MR2_CH_MODE_REMOTE

#define CR_ENABLE_RX
#define CR_DISABLE_RX
#define CR_ENABLE_TX
#define CR_DISABLE_TX
#define CR_CMD_RESET_MR
#define CR_CMD_RESET_RX
#define CR_CMD_RESET_TX
#define CR_CMD_RESET_ERR_STATUS
#define CR_CMD_RESET_BREAK_CHANGE
#define CR_CMD_START_BREAK
#define CR_CMD_STOP_BREAK
#define CR_CMD_ASSERT_RTSN
#define CR_CMD_NEGATE_RTSN
#define CR_CMD_SET_TIMEOUT_MODE
#define CR_CMD_DISABLE_TIMEOUT_MODE

#define SR_RX_READY
#define SR_FIFO_FULL
#define SR_TX_READY
#define SR_TX_EMPTY
#define SR_OVERRUN_ERROR
#define SR_PARITY_ERROR
#define SR_FRAMING_ERROR
#define SR_RECEIVED_BREAK

#define SR_ERROR

#define ACR_DELTA_IP0_IRQ_EN
#define ACR_DELTA_IP1_IRQ_EN
#define ACR_DELTA_IP2_IRQ_EN
#define ACR_DELTA_IP3_IRQ_EN
#define ACR_CT_Mask
#define ACR_CExt
#define ACR_CTxCA
#define ACR_CTxCB
#define ACR_CClk16
#define ACR_TExt
#define ACR_TExt16
#define ACR_TClk
#define ACR_TClk16
#define ACR_BRG_SET1
#define ACR_BRG_SET2

#define TX_CLK_75
#define TX_CLK_110
#define TX_CLK_38400
#define TX_CLK_150
#define TX_CLK_300
#define TX_CLK_600
#define TX_CLK_1200
#define TX_CLK_2000
#define TX_CLK_2400
#define TX_CLK_4800
#define TX_CLK_1800
#define TX_CLK_9600
#define TX_CLK_19200
#define RX_CLK_75
#define RX_CLK_110
#define RX_CLK_38400
#define RX_CLK_150
#define RX_CLK_300
#define RX_CLK_600
#define RX_CLK_1200
#define RX_CLK_2000
#define RX_CLK_2400
#define RX_CLK_4800
#define RX_CLK_1800
#define RX_CLK_9600
#define RX_CLK_19200

#define OPCR_MPOa_RTSN
#define OPCR_MPOa_C_TO
#define OPCR_MPOa_TxC1X
#define OPCR_MPOa_TxC16X
#define OPCR_MPOa_RxC1X
#define OPCR_MPOa_RxC16X
#define OPCR_MPOa_TxRDY
#define OPCR_MPOa_RxRDY_FF

#define OPCR_MPOb_RTSN
#define OPCR_MPOb_C_TO
#define OPCR_MPOb_TxC1X
#define OPCR_MPOb_TxC16X
#define OPCR_MPOb_RxC1X
#define OPCR_MPOb_RxC16X
#define OPCR_MPOb_TxRDY
#define OPCR_MPOb_RxRDY_FF

#define OPCR_MPP_INPUT
#define OPCR_MPP_OUTPUT

#define IMR_TxRDY_A
#define IMR_RxRDY_FFULL_A
#define IMR_DELTA_BREAK_A
#define IMR_COUNTER_READY
#define IMR_TxRDY_B
#define IMR_RxRDY_FFULL_B
#define IMR_DELTA_BREAK_B
#define IMR_INPUT_PORT_CHANGE

#define ISR_TxRDY_A
#define ISR_RxRDY_FFULL_A
#define ISR_DELTA_BREAK_A
#define ISR_COUNTER_READY
#define ISR_TxRDY_B
#define ISR_RxRDY_FFULL_B
#define ISR_DELTA_BREAK_B
#define ISR_INPUT_PORT_CHANGE

#define ACK_INT_REQ0
#define ACK_INT_REQ1

#endif /* SCC2698_H_ */