linux/drivers/tty/serial/8250/8250_mtk.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Mediatek 8250 driver.
 *
 * Copyright (c) 2014 MundoReader S.L.
 * Author: Matthias Brugger <[email protected]>
 */
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/serial_8250.h>
#include <linux/serial_reg.h>
#include <linux/console.h>
#include <linux/dma-mapping.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>

#include "8250.h"

#define MTK_UART_HIGHS
#define MTK_UART_SAMPLE_COUNT
#define MTK_UART_SAMPLE_POINT
#define MTK_UART_RATE_FIX
#define MTK_UART_ESCAPE_DAT
#define MTK_UART_ESCAPE_EN
#define MTK_UART_DMA_EN
#define MTK_UART_RXTRI_AD
#define MTK_UART_FRACDIV_L
#define MTK_UART_FRACDIV_M
#define MTK_UART_DEBUG0
#define MTK_UART_IER_XOFFI
#define MTK_UART_IER_RTSI
#define MTK_UART_IER_CTSI

#define MTK_UART_EFR
#define MTK_UART_EFR_EN
#define MTK_UART_EFR_RTS
#define MTK_UART_EFR_CTS
#define MTK_UART_EFR_NO_SW_FC
#define MTK_UART_EFR_XON1_XOFF1
#define MTK_UART_EFR_XON2_XOFF2
#define MTK_UART_EFR_SW_FC_MASK
#define MTK_UART_EFR_HW_FC
#define MTK_UART_DMA_EN_TX
#define MTK_UART_DMA_EN_RX

#define MTK_UART_ESCAPE_CHAR
#define MTK_UART_RX_SIZE
#define MTK_UART_TX_TRIGGER
#define MTK_UART_RX_TRIGGER

#define MTK_UART_XON1
#define MTK_UART_XOFF1

#ifdef CONFIG_SERIAL_8250_DMA
enum dma_rx_status {};
#endif

struct mtk8250_data {};

/* flow control mode */
enum {};

#ifdef CONFIG_SERIAL_8250_DMA
static void mtk8250_rx_dma(struct uart_8250_port *up);

static void mtk8250_dma_rx_complete(void *param)
{}

static void mtk8250_rx_dma(struct uart_8250_port *up)
{}

static void mtk8250_dma_enable(struct uart_8250_port *up)
{}
#endif

static int mtk8250_startup(struct uart_port *port)
{}

static void mtk8250_shutdown(struct uart_port *port)
{}

static void mtk8250_disable_intrs(struct uart_8250_port *up, int mask)
{}

static void mtk8250_enable_intrs(struct uart_8250_port *up, int mask)
{}

static void mtk8250_set_flow_ctrl(struct uart_8250_port *up, int mode)
{}

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

static int __maybe_unused mtk8250_runtime_suspend(struct device *dev)
{}

static int __maybe_unused mtk8250_runtime_resume(struct device *dev)
{}

static void
mtk8250_do_pm(struct uart_port *port, unsigned int state, unsigned int old)
{}

#ifdef CONFIG_SERIAL_8250_DMA
static bool mtk8250_dma_filter(struct dma_chan *chan, void *param)
{}
#endif

static int mtk8250_probe_of(struct platform_device *pdev, struct uart_port *p,
			   struct mtk8250_data *data)
{}

static int mtk8250_probe(struct platform_device *pdev)
{}

static void mtk8250_remove(struct platform_device *pdev)
{}

static int __maybe_unused mtk8250_suspend(struct device *dev)
{}

static int __maybe_unused mtk8250_resume(struct device *dev)
{}

static const struct dev_pm_ops mtk8250_pm_ops =;

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

static struct platform_driver mtk8250_platform_driver =;
module_platform_driver();

#ifdef CONFIG_SERIAL_8250_CONSOLE
static int __init early_mtk8250_setup(struct earlycon_device *device,
					const char *options)
{}

OF_EARLYCON_DECLARE();
#endif

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