#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/device.h>
#include <linux/console.h>
#include <linux/serial_core.h>
#include <linux/serial.h>
#include <linux/io.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/spinlock.h>
#include <linux/platform_device.h>
#include <linux/platform_data/serial-sccnxp.h>
#include <linux/regulator/consumer.h>
#define SCCNXP_NAME …
#define SCCNXP_MAJOR …
#define SCCNXP_MINOR …
#define SCCNXP_MR_REG …
#define MR0_BAUD_NORMAL …
#define MR0_BAUD_EXT1 …
#define MR0_BAUD_EXT2 …
#define MR0_FIFO …
#define MR0_TXLVL …
#define MR1_BITS_5 …
#define MR1_BITS_6 …
#define MR1_BITS_7 …
#define MR1_BITS_8 …
#define MR1_PAR_EVN …
#define MR1_PAR_ODD …
#define MR1_PAR_NO …
#define MR2_STOP1 …
#define MR2_STOP2 …
#define SCCNXP_SR_REG …
#define SR_RXRDY …
#define SR_FULL …
#define SR_TXRDY …
#define SR_TXEMT …
#define SR_OVR …
#define SR_PE …
#define SR_FE …
#define SR_BRK …
#define SCCNXP_CSR_REG …
#define CSR_TIMER_MODE …
#define SCCNXP_CR_REG …
#define CR_RX_ENABLE …
#define CR_RX_DISABLE …
#define CR_TX_ENABLE …
#define CR_TX_DISABLE …
#define CR_CMD_MRPTR1 …
#define CR_CMD_RX_RESET …
#define CR_CMD_TX_RESET …
#define CR_CMD_STATUS_RESET …
#define CR_CMD_BREAK_RESET …
#define CR_CMD_START_BREAK …
#define CR_CMD_STOP_BREAK …
#define CR_CMD_MRPTR0 …
#define SCCNXP_RHR_REG …
#define SCCNXP_THR_REG …
#define SCCNXP_IPCR_REG …
#define SCCNXP_ACR_REG …
#define ACR_BAUD0 …
#define ACR_BAUD1 …
#define ACR_TIMER_MODE …
#define SCCNXP_ISR_REG …
#define SCCNXP_IMR_REG …
#define IMR_TXRDY …
#define IMR_RXRDY …
#define ISR_TXRDY(x) …
#define ISR_RXRDY(x) …
#define SCCNXP_CTPU_REG …
#define SCCNXP_CTPL_REG …
#define SCCNXP_IPR_REG …
#define SCCNXP_OPCR_REG …
#define SCCNXP_SOP_REG …
#define SCCNXP_START_COUNTER_REG …
#define SCCNXP_ROP_REG …
#define MCTRL_MASK(sig) …
#define MCTRL_IBIT(cfg, sig) …
#define MCTRL_OBIT(cfg, sig) …
#define SCCNXP_HAVE_IO …
#define SCCNXP_HAVE_MR0 …
struct sccnxp_chip { … };
struct sccnxp_port { … };
static const struct sccnxp_chip sc2681 = …;
static const struct sccnxp_chip sc2691 = …;
static const struct sccnxp_chip sc2692 = …;
static const struct sccnxp_chip sc2891 = …;
static const struct sccnxp_chip sc2892 = …;
static const struct sccnxp_chip sc28202 = …;
static const struct sccnxp_chip sc68681 = …;
static const struct sccnxp_chip sc68692 = …;
static u8 sccnxp_read(struct uart_port *port, u8 reg)
{ … }
static void sccnxp_write(struct uart_port *port, u8 reg, u8 v)
{ … }
static u8 sccnxp_port_read(struct uart_port *port, u8 reg)
{ … }
static void sccnxp_port_write(struct uart_port *port, u8 reg, u8 v)
{ … }
static int sccnxp_update_best_err(int a, int b, int *besterr)
{ … }
static const struct { … } baud_std[] = …;
static int sccnxp_set_baud(struct uart_port *port, int baud)
{ … }
static void sccnxp_enable_irq(struct uart_port *port, int mask)
{ … }
static void sccnxp_disable_irq(struct uart_port *port, int mask)
{ … }
static void sccnxp_set_bit(struct uart_port *port, int sig, int state)
{ … }
static void sccnxp_handle_rx(struct uart_port *port)
{ … }
static void sccnxp_handle_tx(struct uart_port *port)
{ … }
static void sccnxp_handle_events(struct sccnxp_port *s)
{ … }
static void sccnxp_timer(struct timer_list *t)
{ … }
static irqreturn_t sccnxp_ist(int irq, void *dev_id)
{ … }
static void sccnxp_start_tx(struct uart_port *port)
{ … }
static void sccnxp_stop_tx(struct uart_port *port)
{ … }
static void sccnxp_stop_rx(struct uart_port *port)
{ … }
static unsigned int sccnxp_tx_empty(struct uart_port *port)
{ … }
static void sccnxp_set_mctrl(struct uart_port *port, unsigned int mctrl)
{ … }
static unsigned int sccnxp_get_mctrl(struct uart_port *port)
{ … }
static void sccnxp_break_ctl(struct uart_port *port, int break_state)
{ … }
static void sccnxp_set_termios(struct uart_port *port,
struct ktermios *termios,
const struct ktermios *old)
{ … }
static int sccnxp_startup(struct uart_port *port)
{ … }
static void sccnxp_shutdown(struct uart_port *port)
{ … }
static const char *sccnxp_type(struct uart_port *port)
{ … }
static void sccnxp_release_port(struct uart_port *port)
{ … }
static int sccnxp_request_port(struct uart_port *port)
{ … }
static void sccnxp_config_port(struct uart_port *port, int flags)
{ … }
static int sccnxp_verify_port(struct uart_port *port, struct serial_struct *s)
{ … }
static const struct uart_ops sccnxp_ops = …;
#ifdef CONFIG_SERIAL_SCCNXP_CONSOLE
static void sccnxp_console_putchar(struct uart_port *port, unsigned char c)
{ … }
static void sccnxp_console_write(struct console *co, const char *c, unsigned n)
{ … }
static int sccnxp_console_setup(struct console *co, char *options)
{ … }
#endif
static const struct platform_device_id sccnxp_id_table[] = …;
MODULE_DEVICE_TABLE(platform, sccnxp_id_table);
static int sccnxp_probe(struct platform_device *pdev)
{ … }
static void sccnxp_remove(struct platform_device *pdev)
{ … }
static struct platform_driver sccnxp_uart_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;