#include <linux/clk.h>
#include <linux/console.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/iopoll.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/tty.h>
#include <linux/tty_flip.h>
#define OWL_UART_PORT_NUM …
#define OWL_UART_DEV_NAME …
#define OWL_UART_CTL …
#define OWL_UART_RXDAT …
#define OWL_UART_TXDAT …
#define OWL_UART_STAT …
#define OWL_UART_CTL_DWLS_MASK …
#define OWL_UART_CTL_DWLS_5BITS …
#define OWL_UART_CTL_DWLS_6BITS …
#define OWL_UART_CTL_DWLS_7BITS …
#define OWL_UART_CTL_DWLS_8BITS …
#define OWL_UART_CTL_STPS_2BITS …
#define OWL_UART_CTL_PRS_MASK …
#define OWL_UART_CTL_PRS_NONE …
#define OWL_UART_CTL_PRS_ODD …
#define OWL_UART_CTL_PRS_MARK …
#define OWL_UART_CTL_PRS_EVEN …
#define OWL_UART_CTL_PRS_SPACE …
#define OWL_UART_CTL_AFE …
#define OWL_UART_CTL_TRFS_TX …
#define OWL_UART_CTL_EN …
#define OWL_UART_CTL_RXDE …
#define OWL_UART_CTL_TXDE …
#define OWL_UART_CTL_RXIE …
#define OWL_UART_CTL_TXIE …
#define OWL_UART_CTL_LBEN …
#define OWL_UART_STAT_RIP …
#define OWL_UART_STAT_TIP …
#define OWL_UART_STAT_RXER …
#define OWL_UART_STAT_TFER …
#define OWL_UART_STAT_RXST …
#define OWL_UART_STAT_RFEM …
#define OWL_UART_STAT_TFFU …
#define OWL_UART_STAT_CTSS …
#define OWL_UART_STAT_RTSS …
#define OWL_UART_STAT_TFES …
#define OWL_UART_STAT_TRFL_MASK …
#define OWL_UART_STAT_UTBB …
#define OWL_UART_POLL_USEC …
#define OWL_UART_TIMEOUT_USEC …
static struct uart_driver owl_uart_driver;
struct owl_uart_info { … };
struct owl_uart_port { … };
#define to_owl_uart_port(prt) …
static struct owl_uart_port *owl_uart_ports[OWL_UART_PORT_NUM];
static inline void owl_uart_write(struct uart_port *port, u32 val, unsigned int off)
{ … }
static inline u32 owl_uart_read(struct uart_port *port, unsigned int off)
{ … }
static void owl_uart_set_mctrl(struct uart_port *port, unsigned int mctrl)
{ … }
static unsigned int owl_uart_get_mctrl(struct uart_port *port)
{ … }
static unsigned int owl_uart_tx_empty(struct uart_port *port)
{ … }
static void owl_uart_stop_rx(struct uart_port *port)
{ … }
static void owl_uart_stop_tx(struct uart_port *port)
{ … }
static void owl_uart_start_tx(struct uart_port *port)
{ … }
static void owl_uart_send_chars(struct uart_port *port)
{ … }
static void owl_uart_receive_chars(struct uart_port *port)
{ … }
static irqreturn_t owl_uart_irq(int irq, void *dev_id)
{ … }
static void owl_uart_shutdown(struct uart_port *port)
{ … }
static int owl_uart_startup(struct uart_port *port)
{ … }
static void owl_uart_change_baudrate(struct owl_uart_port *owl_port,
unsigned long baud)
{ … }
static void owl_uart_set_termios(struct uart_port *port,
struct ktermios *termios,
const struct ktermios *old)
{ … }
static void owl_uart_release_port(struct uart_port *port)
{ … }
static int owl_uart_request_port(struct uart_port *port)
{ … }
static const char *owl_uart_type(struct uart_port *port)
{ … }
static int owl_uart_verify_port(struct uart_port *port,
struct serial_struct *ser)
{ … }
static void owl_uart_config_port(struct uart_port *port, int flags)
{ … }
#ifdef CONFIG_CONSOLE_POLL
static int owl_uart_poll_get_char(struct uart_port *port)
{ … }
static void owl_uart_poll_put_char(struct uart_port *port, unsigned char ch)
{ … }
#endif
static const struct uart_ops owl_uart_ops = …;
#ifdef CONFIG_SERIAL_OWL_CONSOLE
static void owl_console_putchar(struct uart_port *port, unsigned char ch)
{ … }
static void owl_uart_port_write(struct uart_port *port, const char *s,
u_int count)
{ … }
static void owl_uart_console_write(struct console *co, const char *s,
u_int count)
{ … }
static int owl_uart_console_setup(struct console *co, char *options)
{ … }
static struct console owl_uart_console = …;
static int __init owl_uart_console_init(void)
{ … }
console_initcall(owl_uart_console_init);
static void owl_uart_early_console_write(struct console *co,
const char *s,
u_int count)
{ … }
static int __init
owl_uart_early_console_setup(struct earlycon_device *device, const char *opt)
{ … }
OF_EARLYCON_DECLARE(…);
#define OWL_UART_CONSOLE …
#else
#define OWL_UART_CONSOLE …
#endif
static struct uart_driver owl_uart_driver = …;
static const struct owl_uart_info owl_s500_info = …;
static const struct owl_uart_info owl_s900_info = …;
static const struct of_device_id owl_uart_dt_matches[] = …;
MODULE_DEVICE_TABLE(of, owl_uart_dt_matches);
static int owl_uart_probe(struct platform_device *pdev)
{ … }
static void owl_uart_remove(struct platform_device *pdev)
{ … }
static struct platform_driver owl_uart_platform_driver = …;
static int __init owl_uart_init(void)
{ … }
static void __exit owl_uart_exit(void)
{ … }
module_init(…) …;
module_exit(owl_uart_exit);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;