linux/drivers/tty/serial/mps2-uart.c

// SPDX-License-Identifier: GPL-2.0
/*
 * MPS2 UART driver
 *
 * Copyright (C) 2015 ARM Limited
 *
 * Author: Vladimir Murzin <[email protected]>
 *
 * TODO: support for SysRq
 */

#define pr_fmt(fmt)

#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/console.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/serial_core.h>
#include <linux/tty_flip.h>
#include <linux/types.h>
#include <linux/idr.h>

#define SERIAL_NAME
#define DRIVER_NAME
#define MAKE_NAME(x)

#define UARTn_DATA

#define UARTn_STATE
#define UARTn_STATE_TX_FULL
#define UARTn_STATE_RX_FULL
#define UARTn_STATE_TX_OVERRUN
#define UARTn_STATE_RX_OVERRUN

#define UARTn_CTRL
#define UARTn_CTRL_TX_ENABLE
#define UARTn_CTRL_RX_ENABLE
#define UARTn_CTRL_TX_INT_ENABLE
#define UARTn_CTRL_RX_INT_ENABLE
#define UARTn_CTRL_TX_OVERRUN_INT_ENABLE
#define UARTn_CTRL_RX_OVERRUN_INT_ENABLE

#define UARTn_INT
#define UARTn_INT_TX
#define UARTn_INT_RX
#define UARTn_INT_TX_OVERRUN
#define UARTn_INT_RX_OVERRUN

#define UARTn_BAUDDIV
#define UARTn_BAUDDIV_MASK

/*
 * Helpers to make typical enable/disable operations more readable.
 */
#define UARTn_CTRL_TX_GRP

#define UARTn_CTRL_RX_GRP

#define MPS2_MAX_PORTS

#define UART_PORT_COMBINED_IRQ

struct mps2_uart_port {};

static inline struct mps2_uart_port *to_mps2_port(struct uart_port *port)
{}

static void mps2_uart_write8(struct uart_port *port, u8 val, unsigned int off)
{}

static u8 mps2_uart_read8(struct uart_port *port, unsigned int off)
{}

static void mps2_uart_write32(struct uart_port *port, u32 val, unsigned int off)
{}

static unsigned int mps2_uart_tx_empty(struct uart_port *port)
{}

static void mps2_uart_set_mctrl(struct uart_port *port, unsigned int mctrl)
{}

static unsigned int mps2_uart_get_mctrl(struct uart_port *port)
{}

static void mps2_uart_stop_tx(struct uart_port *port)
{}

static void mps2_uart_tx_chars(struct uart_port *port)
{}

static void mps2_uart_start_tx(struct uart_port *port)
{}

static void mps2_uart_stop_rx(struct uart_port *port)
{}

static void mps2_uart_break_ctl(struct uart_port *port, int ctl)
{}

static void mps2_uart_rx_chars(struct uart_port *port)
{}

static irqreturn_t mps2_uart_rxirq(int irq, void *data)
{}

static irqreturn_t mps2_uart_txirq(int irq, void *data)
{}

static irqreturn_t mps2_uart_oerrirq(int irq, void *data)
{}

static irqreturn_t mps2_uart_combinedirq(int irq, void *data)
{}

static int mps2_uart_startup(struct uart_port *port)
{}

static void mps2_uart_shutdown(struct uart_port *port)
{}

static void
mps2_uart_set_termios(struct uart_port *port, struct ktermios *termios,
		      const struct ktermios *old)
{}

static const char *mps2_uart_type(struct uart_port *port)
{}

static void mps2_uart_release_port(struct uart_port *port)
{}

static int mps2_uart_request_port(struct uart_port *port)
{}

static void mps2_uart_config_port(struct uart_port *port, int type)
{}

static int mps2_uart_verify_port(struct uart_port *port, struct serial_struct *serinfo)
{}

static const struct uart_ops mps2_uart_pops =;

static DEFINE_IDR(ports_idr);

#ifdef CONFIG_SERIAL_MPS2_UART_CONSOLE
static void mps2_uart_console_putchar(struct uart_port *port, unsigned char ch)
{}

static void mps2_uart_console_write(struct console *co, const char *s, unsigned int cnt)
{}

static int mps2_uart_console_setup(struct console *co, char *options)
{}

static struct uart_driver mps2_uart_driver;

static struct console mps2_uart_console =;

#define MPS2_SERIAL_CONSOLE

static void mps2_early_putchar(struct uart_port *port, unsigned char ch)
{}

static void mps2_early_write(struct console *con, const char *s, unsigned int n)
{}

static int __init mps2_early_console_setup(struct earlycon_device *device,
					   const char *opt)
{}

OF_EARLYCON_DECLARE();

#else
#define MPS2_SERIAL_CONSOLE
#endif

static struct uart_driver mps2_uart_driver =;

static int mps2_of_get_port(struct platform_device *pdev,
			    struct mps2_uart_port *mps_port)
{}

static int mps2_init_port(struct platform_device *pdev,
			  struct mps2_uart_port *mps_port)
{}

static int mps2_serial_probe(struct platform_device *pdev)
{}

#ifdef CONFIG_OF
static const struct of_device_id mps2_match[] =;
#endif

static struct platform_driver mps2_serial_driver =;

static int __init mps2_uart_init(void)
{}
arch_initcall(mps2_uart_init);