linux/drivers/tty/serial/digicolor-usart.c

// SPDX-License-Identifier: GPL-2.0+
/*
 *  Driver for Conexant Digicolor serial ports (USART)
 *
 * Author: Baruch Siach <[email protected]>
 *
 * Copyright (C) 2014 Paradox Innovation Ltd.
 */

#include <linux/module.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/of.h>
#include <linux/platform_device.h>
#include <linux/workqueue.h>

#define UA_ENABLE
#define UA_ENABLE_ENABLE

#define UA_CONTROL
#define UA_CONTROL_RX_ENABLE
#define UA_CONTROL_TX_ENABLE
#define UA_CONTROL_SOFT_RESET

#define UA_STATUS
#define UA_STATUS_PARITY_ERR
#define UA_STATUS_FRAME_ERR
#define UA_STATUS_OVERRUN_ERR
#define UA_STATUS_TX_READY

#define UA_CONFIG
#define UA_CONFIG_CHAR_LEN
#define UA_CONFIG_STOP_BITS
#define UA_CONFIG_PARITY
#define UA_CONFIG_ODD_PARITY

#define UA_EMI_REC

#define UA_HBAUD_LO
#define UA_HBAUD_HI

#define UA_STATUS_FIFO
#define UA_STATUS_FIFO_RX_EMPTY
#define UA_STATUS_FIFO_RX_INT_ALMOST
#define UA_STATUS_FIFO_TX_FULL
#define UA_STATUS_FIFO_TX_INT_ALMOST

#define UA_CONFIG_FIFO
#define UA_CONFIG_FIFO_RX_THRESH
#define UA_CONFIG_FIFO_RX_FIFO_MODE
#define UA_CONFIG_FIFO_TX_FIFO_MODE

#define UA_INTFLAG_CLEAR
#define UA_INTFLAG_SET
#define UA_INT_ENABLE
#define UA_INT_STATUS

#define UA_INT_TX
#define UA_INT_RX

#define DIGICOLOR_USART_NR

/*
 * We use the 16 bytes hardware FIFO to buffer Rx traffic. Rx interrupt is
 * only produced when the FIFO is filled more than a certain configurable
 * threshold. Unfortunately, there is no way to set this threshold below half
 * FIFO. This means that we must periodically poll the FIFO status register to
 * see whether there are waiting Rx bytes.
 */

struct digicolor_port {};

static struct uart_port *digicolor_ports[DIGICOLOR_USART_NR];

static bool digicolor_uart_tx_full(struct uart_port *port)
{}

static bool digicolor_uart_rx_empty(struct uart_port *port)
{}

static void digicolor_uart_stop_tx(struct uart_port *port)
{}

static void digicolor_uart_start_tx(struct uart_port *port)
{}

static void digicolor_uart_stop_rx(struct uart_port *port)
{}

static void digicolor_rx_poll(struct work_struct *work)
{}

static void digicolor_uart_rx(struct uart_port *port)
{}

static void digicolor_uart_tx(struct uart_port *port)
{}

static irqreturn_t digicolor_uart_int(int irq, void *dev_id)
{}

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

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

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

static void digicolor_uart_break_ctl(struct uart_port *port, int state)
{}

static int digicolor_uart_startup(struct uart_port *port)
{}

static void digicolor_uart_shutdown(struct uart_port *port)
{}

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

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

static void digicolor_uart_config_port(struct uart_port *port, int flags)
{}

static void digicolor_uart_release_port(struct uart_port *port)
{}

static int digicolor_uart_request_port(struct uart_port *port)
{}

static const struct uart_ops digicolor_uart_ops =;

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

static void digicolor_uart_console_write(struct console *co, const char *c,
					 unsigned n)
{}

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

static struct console digicolor_console =;

static struct uart_driver digicolor_uart =;

static int digicolor_uart_probe(struct platform_device *pdev)
{}

static void digicolor_uart_remove(struct platform_device *pdev)
{}

static const struct of_device_id digicolor_uart_dt_ids[] =;
MODULE_DEVICE_TABLE(of, digicolor_uart_dt_ids);

static struct platform_driver digicolor_uart_platform =;

static int __init digicolor_uart_init(void)
{}
module_init();

static void __exit digicolor_uart_exit(void)
{}
module_exit(digicolor_uart_exit);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();