blob: 0061d2451900f0ece552117eca88c730cb40d095 [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Govindraj.Rb6126332010-09-27 20:20:49 +05302/*
3 * Driver for OMAP-UART controller.
4 * Based on drivers/serial/8250.c
5 *
6 * Copyright (C) 2010 Texas Instruments.
7 *
8 * Authors:
9 * Govindraj R <govindraj.raja@ti.com>
10 * Thara Gopinath <thara@ti.com>
Govindraj.Rb6126332010-09-27 20:20:49 +053011 */
12
13#ifndef __OMAP_SERIAL_H__
14#define __OMAP_SERIAL_H__
15
16#include <linux/serial_core.h>
Felipe Balbid8ee4ea2012-09-06 15:45:20 +030017#include <linux/device.h>
Govindraj.R2fd14962011-11-09 17:41:21 +053018#include <linux/pm_qos.h>
Govindraj.Rb6126332010-09-27 20:20:49 +053019
Jean Delvare1349ba02016-01-21 09:46:12 +010020#define OMAP_SERIAL_DRIVER_NAME "omap_uart"
Govindraj.Rb6126332010-09-27 20:20:49 +053021
22/*
23 * Use tty device name as ttyO, [O -> OMAP]
24 * in bootargs we specify as console=ttyO0 if uart1
25 * is used as console uart.
26 */
27#define OMAP_SERIAL_NAME "ttyO"
28
Govindraj.Rb6126332010-09-27 20:20:49 +053029struct omap_uart_port_info {
30 bool dma_enabled; /* To specify DMA Mode */
31 unsigned int uartclk; /* UART clock rate */
Govindraj.Rb6126332010-09-27 20:20:49 +053032 upf_t flags; /* UPF_* flags */
Deepak Kc86845db2011-11-09 17:33:38 +053033 unsigned int dma_rx_buf_size;
34 unsigned int dma_rx_timeout;
35 unsigned int autosuspend_timeout;
Jon Huntera9e210e2011-11-09 17:34:49 +053036 unsigned int dma_rx_poll_rate;
Govindraj.Rec3bebc2011-10-11 19:11:27 +053037
38 int (*get_context_loss_count)(struct device *);
Felipe Balbid8ee4ea2012-09-06 15:45:20 +030039 void (*enable_wakeup)(struct device *, bool);
Govindraj.Rb6126332010-09-27 20:20:49 +053040};
41
Govindraj.Rb6126332010-09-27 20:20:49 +053042#endif /* __OMAP_SERIAL_H__ */