blob: ff9b0aab5281c2251e93f5a6f56ea09cf2e31289 [file] [log] [blame]
Govindraj.Rb6126332010-09-27 20:20:49 +05301/*
2 * Driver for OMAP-UART controller.
3 * Based on drivers/serial/8250.c
4 *
5 * Copyright (C) 2010 Texas Instruments.
6 *
7 * Authors:
8 * Govindraj R <govindraj.raja@ti.com>
9 * Thara Gopinath <thara@ti.com>
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 */
16
17#ifndef __OMAP_SERIAL_H__
18#define __OMAP_SERIAL_H__
19
20#include <linux/serial_core.h>
Felipe Balbid8ee4ea2012-09-06 15:45:20 +030021#include <linux/device.h>
Govindraj.R2fd14962011-11-09 17:41:21 +053022#include <linux/pm_qos.h>
Govindraj.Rb6126332010-09-27 20:20:49 +053023
Benoit Cousson374b8cf2010-12-09 14:24:17 +000024#define DRIVER_NAME "omap_uart"
Govindraj.Rb6126332010-09-27 20:20:49 +053025
26/*
27 * Use tty device name as ttyO, [O -> OMAP]
28 * in bootargs we specify as console=ttyO0 if uart1
29 * is used as console uart.
30 */
31#define OMAP_SERIAL_NAME "ttyO"
32
Govindraj.Rb6126332010-09-27 20:20:49 +053033struct omap_uart_port_info {
34 bool dma_enabled; /* To specify DMA Mode */
35 unsigned int uartclk; /* UART clock rate */
Govindraj.Rb6126332010-09-27 20:20:49 +053036 upf_t flags; /* UPF_* flags */
Deepak Kc86845db2011-11-09 17:33:38 +053037 unsigned int dma_rx_buf_size;
38 unsigned int dma_rx_timeout;
39 unsigned int autosuspend_timeout;
Jon Huntera9e210e2011-11-09 17:34:49 +053040 unsigned int dma_rx_poll_rate;
NeilBrown9574f362012-07-30 10:30:26 +100041 int DTR_gpio;
42 int DTR_inverted;
43 int DTR_present;
Govindraj.Rec3bebc2011-10-11 19:11:27 +053044
45 int (*get_context_loss_count)(struct device *);
Felipe Balbid8ee4ea2012-09-06 15:45:20 +030046 void (*set_forceidle)(struct device *);
47 void (*set_noidle)(struct device *);
48 void (*enable_wakeup)(struct device *, bool);
Govindraj.Rb6126332010-09-27 20:20:49 +053049};
50
Govindraj.Rb6126332010-09-27 20:20:49 +053051#endif /* __OMAP_SERIAL_H__ */