blob: 9990f7cd03c5f9655c41c264b107d89fd51b6321 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
/*
* Driver for OMAP-UART controller.
* Based on drivers/serial/8250.c
*
* Copyright (C) 2010 Texas Instruments.
*
* Authors:
* Govindraj R <govindraj.raja@ti.com>
* Thara Gopinath <thara@ti.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#ifndef __OMAP_SERIAL_H__
#define __OMAP_SERIAL_H__
#include <linux/serial_core.h>
#include <linux/device.h>
#include <linux/pm_qos.h>
#define DRIVER_NAME "omap_uart"
/*
* Use tty device name as ttyO, [O -> OMAP]
* in bootargs we specify as console=ttyO0 if uart1
* is used as console uart.
*/
#define OMAP_SERIAL_NAME "ttyO"
struct omap_uart_port_info {
bool dma_enabled; /* To specify DMA Mode */
unsigned int uartclk; /* UART clock rate */
upf_t flags; /* UPF_* flags */
unsigned int dma_rx_buf_size;
unsigned int dma_rx_timeout;
unsigned int autosuspend_timeout;
unsigned int wakelock_timeout;
unsigned int dma_rx_poll_rate;
int DTR_gpio;
int DTR_inverted;
int DTR_present;
bool wakeup_capable;
bool open_close_pm;
unsigned int rx_trig;
int (*get_context_loss_count)(struct device *);
void (*enable_wakeup)(struct device *, bool);
void (*wake_peer)(struct uart_port *);
};
extern void omap_uart_remove_wakeup(struct device *dev);
extern void omap_uart_enable_wakeup(struct device *dev, bool enable);
extern int omap_pm_get_dev_context_loss_count(struct device *dev);
extern int omap_serial_ext_uart_enable(u8 port_id);
extern int omap_serial_ext_uart_disable(u8 port_id);
#endif /* __OMAP_SERIAL_H__ */
|