diff options
Diffstat (limited to 'arch/arm/plat-omap/include/plat/omap-serial.h')
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap-serial.h | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h index 2682043f5a5..9ff444469f3 100644 --- a/arch/arm/plat-omap/include/plat/omap-serial.h +++ b/arch/arm/plat-omap/include/plat/omap-serial.h | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/pm_qos.h> | ||
22 | 23 | ||
23 | #include <plat/mux.h> | 24 | #include <plat/mux.h> |
24 | 25 | ||
@@ -33,6 +34,8 @@ | |||
33 | 34 | ||
34 | #define OMAP_MODE13X_SPEED 230400 | 35 | #define OMAP_MODE13X_SPEED 230400 |
35 | 36 | ||
37 | #define OMAP_UART_SCR_TX_EMPTY 0x08 | ||
38 | |||
36 | /* WER = 0x7F | 39 | /* WER = 0x7F |
37 | * Enable module level wakeup in WER reg | 40 | * Enable module level wakeup in WER reg |
38 | */ | 41 | */ |
@@ -51,18 +54,27 @@ | |||
51 | 54 | ||
52 | #define OMAP_UART_DMA_CH_FREE -1 | 55 | #define OMAP_UART_DMA_CH_FREE -1 |
53 | 56 | ||
54 | #define RX_TIMEOUT (3 * HZ) | ||
55 | #define OMAP_MAX_HSUART_PORTS 4 | 57 | #define OMAP_MAX_HSUART_PORTS 4 |
56 | 58 | ||
57 | #define MSR_SAVE_FLAGS UART_MSR_ANY_DELTA | 59 | #define MSR_SAVE_FLAGS UART_MSR_ANY_DELTA |
58 | 60 | ||
61 | #define UART_ERRATA_i202_MDR1_ACCESS BIT(0) | ||
62 | #define UART_ERRATA_i291_DMA_FORCEIDLE BIT(1) | ||
63 | |||
59 | struct omap_uart_port_info { | 64 | struct omap_uart_port_info { |
60 | bool dma_enabled; /* To specify DMA Mode */ | 65 | bool dma_enabled; /* To specify DMA Mode */ |
61 | unsigned int uartclk; /* UART clock rate */ | 66 | unsigned int uartclk; /* UART clock rate */ |
62 | void __iomem *membase; /* ioremap cookie or NULL */ | ||
63 | resource_size_t mapbase; /* resource base */ | ||
64 | unsigned long irqflags; /* request_irq flags */ | ||
65 | upf_t flags; /* UPF_* flags */ | 67 | upf_t flags; /* UPF_* flags */ |
68 | u32 errata; | ||
69 | unsigned int dma_rx_buf_size; | ||
70 | unsigned int dma_rx_timeout; | ||
71 | unsigned int autosuspend_timeout; | ||
72 | unsigned int dma_rx_poll_rate; | ||
73 | |||
74 | int (*get_context_loss_count)(struct device *); | ||
75 | void (*set_forceidle)(struct platform_device *); | ||
76 | void (*set_noidle)(struct platform_device *); | ||
77 | void (*enable_wakeup)(struct platform_device *, bool); | ||
66 | }; | 78 | }; |
67 | 79 | ||
68 | struct uart_omap_dma { | 80 | struct uart_omap_dma { |
@@ -86,8 +98,9 @@ struct uart_omap_dma { | |||
86 | spinlock_t rx_lock; | 98 | spinlock_t rx_lock; |
87 | /* timer to poll activity on rx dma */ | 99 | /* timer to poll activity on rx dma */ |
88 | struct timer_list rx_timer; | 100 | struct timer_list rx_timer; |
89 | int rx_buf_size; | 101 | unsigned int rx_buf_size; |
90 | int rx_timeout; | 102 | unsigned int rx_poll_rate; |
103 | unsigned int rx_timeout; | ||
91 | }; | 104 | }; |
92 | 105 | ||
93 | struct uart_omap_port { | 106 | struct uart_omap_port { |
@@ -100,6 +113,10 @@ struct uart_omap_port { | |||
100 | unsigned char mcr; | 113 | unsigned char mcr; |
101 | unsigned char fcr; | 114 | unsigned char fcr; |
102 | unsigned char efr; | 115 | unsigned char efr; |
116 | unsigned char dll; | ||
117 | unsigned char dlh; | ||
118 | unsigned char mdr1; | ||
119 | unsigned char scr; | ||
103 | 120 | ||
104 | int use_dma; | 121 | int use_dma; |
105 | /* | 122 | /* |
@@ -111,6 +128,14 @@ struct uart_omap_port { | |||
111 | unsigned char msr_saved_flags; | 128 | unsigned char msr_saved_flags; |
112 | char name[20]; | 129 | char name[20]; |
113 | unsigned long port_activity; | 130 | unsigned long port_activity; |
131 | u32 context_loss_cnt; | ||
132 | u32 errata; | ||
133 | u8 wakeups_enabled; | ||
134 | |||
135 | struct pm_qos_request pm_qos_request; | ||
136 | u32 latency; | ||
137 | u32 calc_latency; | ||
138 | struct work_struct qos_work; | ||
114 | }; | 139 | }; |
115 | 140 | ||
116 | #endif /* __OMAP_SERIAL_H__ */ | 141 | #endif /* __OMAP_SERIAL_H__ */ |