linux/drivers/tty/serial/lantiq.c

// SPDX-License-Identifier: GPL-2.0
/*
 *  Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
 *
 * Copyright (C) 2004 Infineon IFAP DC COM CPE
 * Copyright (C) 2007 Felix Fietkau <[email protected]>
 * Copyright (C) 2007 John Crispin <[email protected]>
 * Copyright (C) 2010 Thomas Langer, <[email protected]>
 */

#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/console.h>
#include <linux/device.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/lantiq.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/serial.h>
#include <linux/serial_core.h>
#include <linux/slab.h>
#include <linux/sysrq.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>

#define PORT_LTQ_ASC
#define MAXPORTS
#define UART_DUMMY_UER_RX
#define DRVNAME
#ifdef __BIG_ENDIAN
#define LTQ_ASC_TBUF
#define LTQ_ASC_RBUF
#else
#define LTQ_ASC_TBUF
#define LTQ_ASC_RBUF
#endif
#define LTQ_ASC_FSTAT
#define LTQ_ASC_WHBSTATE
#define LTQ_ASC_STATE
#define LTQ_ASC_IRNCR
#define LTQ_ASC_CLC
#define LTQ_ASC_ID
#define LTQ_ASC_PISEL
#define LTQ_ASC_TXFCON
#define LTQ_ASC_RXFCON
#define LTQ_ASC_CON
#define LTQ_ASC_BG
#define LTQ_ASC_IRNREN

#define ASC_IRNREN_TX
#define ASC_IRNREN_RX
#define ASC_IRNREN_ERR
#define ASC_IRNREN_TX_BUF
#define ASC_IRNCR_TIR
#define ASC_IRNCR_RIR
#define ASC_IRNCR_EIR
#define ASC_IRNCR_MASK

#define ASCOPT_CSIZE
#define TXFIFO_FL
#define RXFIFO_FL
#define ASCCLC_DISS
#define ASCCLC_RMCMASK
#define ASCCLC_RMCOFFSET
#define ASCCON_M_8ASYNC
#define ASCCON_M_7ASYNC
#define ASCCON_ODD
#define ASCCON_STP
#define ASCCON_BRS
#define ASCCON_FDE
#define ASCCON_R
#define ASCCON_FEN
#define ASCCON_ROEN
#define ASCCON_TOEN
#define ASCSTATE_PE
#define ASCSTATE_FE
#define ASCSTATE_ROE
#define ASCSTATE_ANY
#define ASCWHBSTATE_CLRREN
#define ASCWHBSTATE_SETREN
#define ASCWHBSTATE_CLRPE
#define ASCWHBSTATE_CLRFE
#define ASCWHBSTATE_CLRROE
#define ASCTXFCON_TXFEN
#define ASCTXFCON_TXFFLU
#define ASCTXFCON_TXFITLMASK
#define ASCTXFCON_TXFITLOFF
#define ASCRXFCON_RXFEN
#define ASCRXFCON_RXFFLU
#define ASCRXFCON_RXFITLMASK
#define ASCRXFCON_RXFITLOFF
#define ASCFSTAT_RXFFLMASK
#define ASCFSTAT_TXFFLMASK
#define ASCFSTAT_TXFREEMASK

static struct ltq_uart_port *lqasc_port[MAXPORTS];
static struct uart_driver lqasc_reg;

struct ltq_soc_data {};

struct ltq_uart_port {};

static inline void asc_update_bits(u32 clear, u32 set, void __iomem *reg)
{}

static inline struct
ltq_uart_port *to_ltq_uart_port(struct uart_port *port)
{}

static void
lqasc_stop_tx(struct uart_port *port)
{}

static bool lqasc_tx_ready(struct uart_port *port)
{}

static void
lqasc_start_tx(struct uart_port *port)
{}

static void
lqasc_stop_rx(struct uart_port *port)
{}

static int
lqasc_rx_chars(struct uart_port *port)
{}

static irqreturn_t
lqasc_tx_int(int irq, void *_port)
{}

static irqreturn_t
lqasc_err_int(int irq, void *_port)
{}

static irqreturn_t
lqasc_rx_int(int irq, void *_port)
{}

static irqreturn_t lqasc_irq(int irq, void *p)
{}

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

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

static void
lqasc_set_mctrl(struct uart_port *port, u_int mctrl)
{}

static void
lqasc_break_ctl(struct uart_port *port, int break_state)
{}

static int
lqasc_startup(struct uart_port *port)
{}

static void
lqasc_shutdown(struct uart_port *port)
{}

static void
lqasc_set_termios(struct uart_port *port, struct ktermios *new,
		  const struct ktermios *old)
{}

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

static void
lqasc_release_port(struct uart_port *port)
{}

static int
lqasc_request_port(struct uart_port *port)
{}

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

static int
lqasc_verify_port(struct uart_port *port,
	struct serial_struct *ser)
{}

static const struct uart_ops lqasc_pops =;

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

static void lqasc_serial_port_write(struct uart_port *port, const char *s,
				    u_int count)
{}

static void
lqasc_console_write(struct console *co, const char *s, u_int count)
{}

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

static struct console lqasc_console =;

static int __init
lqasc_console_init(void)
{}
console_initcall(lqasc_console_init);

static void lqasc_serial_early_console_write(struct console *co,
					     const char *s,
					     u_int count)
{}

static int __init
lqasc_serial_early_console_setup(struct earlycon_device *device,
				 const char *opt)
{}
OF_EARLYCON_DECLARE();
OF_EARLYCON_DECLARE();

#define LANTIQ_SERIAL_CONSOLE

#else

#define LANTIQ_SERIAL_CONSOLE

#endif /* CONFIG_SERIAL_LANTIQ_CONSOLE */

static struct uart_driver lqasc_reg =;

static int fetch_irq_lantiq(struct device *dev, struct ltq_uart_port *ltq_port)
{}

static int request_irq_lantiq(struct uart_port *port)
{}

static void free_irq_lantiq(struct uart_port *port)
{}

static int fetch_irq_intel(struct device *dev, struct ltq_uart_port *ltq_port)
{}

static int request_irq_intel(struct uart_port *port)
{}

static void free_irq_intel(struct uart_port *port)
{}

static int lqasc_probe(struct platform_device *pdev)
{}

static void lqasc_remove(struct platform_device *pdev)
{}

static const struct ltq_soc_data soc_data_lantiq =;

static const struct ltq_soc_data soc_data_intel =;

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

static struct platform_driver lqasc_driver =;

static int __init
init_lqasc(void)
{}

static void __exit exit_lqasc(void)
{}

module_init();
module_exit(exit_lqasc);

MODULE_DESCRIPTION();
MODULE_LICENSE();