#include <linux/module.h>
#include <linux/device.h>
#include <linux/console.h>
#include <linux/serial_core.h>
#include <linux/serial.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/ioport.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/mfd/syscon.h>
#include <linux/mfd/syscon/clps711x.h>
#include "serial_mctrl_gpio.h"
#define UART_CLPS711X_DEVNAME …
#define UART_CLPS711X_NR …
#define UART_CLPS711X_MAJOR …
#define UART_CLPS711X_MINOR …
#define UARTDR_OFFSET …
#define UBRLCR_OFFSET …
#define UARTDR_FRMERR …
#define UARTDR_PARERR …
#define UARTDR_OVERR …
#define UBRLCR_BAUD_MASK …
#define UBRLCR_BREAK …
#define UBRLCR_PRTEN …
#define UBRLCR_EVENPRT …
#define UBRLCR_XSTOP …
#define UBRLCR_FIFOEN …
#define UBRLCR_WRDLEN5 …
#define UBRLCR_WRDLEN6 …
#define UBRLCR_WRDLEN7 …
#define UBRLCR_WRDLEN8 …
#define UBRLCR_WRDLEN_MASK …
struct clps711x_port { … };
static struct uart_driver clps711x_uart = …;
static void uart_clps711x_stop_tx(struct uart_port *port)
{ … }
static void uart_clps711x_start_tx(struct uart_port *port)
{ … }
static irqreturn_t uart_clps711x_int_rx(int irq, void *dev_id)
{ … }
static irqreturn_t uart_clps711x_int_tx(int irq, void *dev_id)
{ … }
static unsigned int uart_clps711x_tx_empty(struct uart_port *port)
{ … }
static unsigned int uart_clps711x_get_mctrl(struct uart_port *port)
{ … }
static void uart_clps711x_set_mctrl(struct uart_port *port, unsigned int mctrl)
{ … }
static void uart_clps711x_break_ctl(struct uart_port *port, int break_state)
{ … }
static void uart_clps711x_set_ldisc(struct uart_port *port,
struct ktermios *termios)
{ … }
static int uart_clps711x_startup(struct uart_port *port)
{ … }
static void uart_clps711x_shutdown(struct uart_port *port)
{ … }
static void uart_clps711x_set_termios(struct uart_port *port,
struct ktermios *termios,
const struct ktermios *old)
{ … }
static const char *uart_clps711x_type(struct uart_port *port)
{ … }
static void uart_clps711x_config_port(struct uart_port *port, int flags)
{ … }
static void uart_clps711x_nop_void(struct uart_port *port)
{ … }
static int uart_clps711x_nop_int(struct uart_port *port)
{ … }
static const struct uart_ops uart_clps711x_ops = …;
#ifdef CONFIG_SERIAL_CLPS711X_CONSOLE
static void uart_clps711x_console_putchar(struct uart_port *port, unsigned char ch)
{ … }
static void uart_clps711x_console_write(struct console *co, const char *c,
unsigned n)
{ … }
static int uart_clps711x_console_setup(struct console *co, char *options)
{ … }
static struct console clps711x_console = …;
#endif
static int uart_clps711x_probe(struct platform_device *pdev)
{ … }
static void uart_clps711x_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id __maybe_unused clps711x_uart_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, clps711x_uart_dt_ids);
static struct platform_driver clps711x_uart_platform = …;
static int __init uart_clps711x_init(void)
{ … }
module_init(…) …;
static void __exit uart_clps711x_exit(void)
{ … }
module_exit(uart_clps711x_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;