linux/drivers/tty/serial/stm32-usart.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (C) Maxime Coquelin 2015
 * Copyright (C) STMicroelectronics SA 2017
 * Authors:  Maxime Coquelin <[email protected]>
 *	     Gerald Baeza <[email protected]>
 */

#define DRIVER_NAME

struct stm32_usart_offsets {};

struct stm32_usart_config {};

struct stm32_usart_info {};

#define UNDEF_REG

/* USART_SR (F4) / USART_ISR (F7) */
#define USART_SR_PE
#define USART_SR_FE
#define USART_SR_NE
#define USART_SR_ORE
#define USART_SR_IDLE
#define USART_SR_RXNE
#define USART_SR_TC
#define USART_SR_TXE
#define USART_SR_CTSIF
#define USART_SR_CTS
#define USART_SR_RTOF
#define USART_SR_EOBF
#define USART_SR_ABRE
#define USART_SR_ABRF
#define USART_SR_BUSY
#define USART_SR_CMF
#define USART_SR_SBKF
#define USART_SR_WUF
#define USART_SR_TEACK
#define USART_SR_ERR_MASK
/* Dummy bits */
#define USART_SR_DUMMY_RX

/* USART_DR */
#define USART_DR_MASK

/* USART_BRR */
#define USART_BRR_DIV_F_MASK
#define USART_BRR_DIV_M_MASK
#define USART_BRR_DIV_M_SHIFT
#define USART_BRR_04_R_SHIFT
#define USART_BRR_MASK

/* USART_CR1 */
#define USART_CR1_SBK
#define USART_CR1_RWU
#define USART_CR1_UESM
#define USART_CR1_RE
#define USART_CR1_TE
#define USART_CR1_IDLEIE
#define USART_CR1_RXNEIE
#define USART_CR1_TCIE
#define USART_CR1_TXEIE
#define USART_CR1_PEIE
#define USART_CR1_PS
#define USART_CR1_PCE
#define USART_CR1_WAKE
#define USART_CR1_M0
#define USART_CR1_MME
#define USART_CR1_CMIE
#define USART_CR1_OVER8
#define USART_CR1_DEDT_MASK
#define USART_CR1_DEAT_MASK
#define USART_CR1_RTOIE
#define USART_CR1_EOBIE
#define USART_CR1_M1
#define USART_CR1_IE_MASK
#define USART_CR1_FIFOEN
#define USART_CR1_DEAT_SHIFT
#define USART_CR1_DEDT_SHIFT

/* USART_CR2 */
#define USART_CR2_ADD_MASK
#define USART_CR2_ADDM7
#define USART_CR2_LBCL
#define USART_CR2_CPHA
#define USART_CR2_CPOL
#define USART_CR2_CLKEN
#define USART_CR2_STOP_2B
#define USART_CR2_STOP_MASK
#define USART_CR2_LINEN
#define USART_CR2_SWAP
#define USART_CR2_RXINV
#define USART_CR2_TXINV
#define USART_CR2_DATAINV
#define USART_CR2_MSBFIRST
#define USART_CR2_ABREN
#define USART_CR2_ABRMOD_MASK
#define USART_CR2_RTOEN
#define USART_CR2_ADD_F7_MASK

/* USART_CR3 */
#define USART_CR3_EIE
#define USART_CR3_IREN
#define USART_CR3_IRLP
#define USART_CR3_HDSEL
#define USART_CR3_NACK
#define USART_CR3_SCEN
#define USART_CR3_DMAR
#define USART_CR3_DMAT
#define USART_CR3_RTSE
#define USART_CR3_CTSE
#define USART_CR3_CTSIE
#define USART_CR3_ONEBIT
#define USART_CR3_OVRDIS
#define USART_CR3_DDRE
#define USART_CR3_DEM
#define USART_CR3_DEP
#define USART_CR3_SCARCNT_MASK
#define USART_CR3_WUS_MASK
#define USART_CR3_WUS_START_BIT
#define USART_CR3_WUFIE
#define USART_CR3_TXFTIE
#define USART_CR3_TCBGTIE
#define USART_CR3_RXFTCFG_MASK
#define USART_CR3_RXFTCFG_SHIFT
#define USART_CR3_RXFTIE
#define USART_CR3_TXFTCFG_MASK
#define USART_CR3_TXFTCFG_SHIFT

/* USART_GTPR */
#define USART_GTPR_PSC_MASK
#define USART_GTPR_GT_MASK

/* USART_RTOR */
#define USART_RTOR_RTO_MASK
#define USART_RTOR_BLEN_MASK

/* USART_RQR */
#define USART_RQR_ABRRQ
#define USART_RQR_SBKRQ
#define USART_RQR_MMRQ
#define USART_RQR_RXFRQ
#define USART_RQR_TXFRQ

/* USART_ICR */
#define USART_ICR_PECF
#define USART_ICR_FECF
#define USART_ICR_ORECF
#define USART_ICR_IDLECF
#define USART_ICR_TCCF
#define USART_ICR_CTSCF
#define USART_ICR_RTOCF
#define USART_ICR_EOBCF
#define USART_ICR_CMCF
#define USART_ICR_WUCF

/* USART_PRESC */
#define USART_PRESC
#define USART_PRESC_MAX

/* USART_HWCFCR1 */
#define USART_HWCFGR1_CFG8

#define STM32_SERIAL_NAME
#define STM32_MAX_PORTS
#define STM32H7_USART_FIFO_SIZE

#define RX_BUF_L
#define RX_BUF_P
#define TX_BUF_L

#define STM32_USART_TIMEOUT_USEC

struct stm32_port {};

static struct stm32_port stm32_ports[STM32_MAX_PORTS];
static struct uart_driver stm32_usart_driver;