diff options
Diffstat (limited to 'drivers/serial/cpm_uart/cpm_uart.h')
-rw-r--r-- | drivers/serial/cpm_uart/cpm_uart.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/serial/cpm_uart/cpm_uart.h b/drivers/serial/cpm_uart/cpm_uart.h index 0cc39f82d7c5..7274b527a3c1 100644 --- a/drivers/serial/cpm_uart/cpm_uart.h +++ b/drivers/serial/cpm_uart/cpm_uart.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * Copyright (C) 2004 Freescale Semiconductor, Inc. | 6 | * Copyright (C) 2004 Freescale Semiconductor, Inc. |
7 | * | 7 | * |
8 | * 2006 (c) MontaVista Software, Inc. | 8 | * 2006 (c) MontaVista Software, Inc. |
9 | * Vitaly Bordug <vbordug@ru.mvista.com> | 9 | * Vitaly Bordug <vbordug@ru.mvista.com> |
10 | * | 10 | * |
11 | * This file is licensed under the terms of the GNU General Public License | 11 | * This file is licensed under the terms of the GNU General Public License |
12 | * version 2. This program is licensed "as is" without any warranty of any | 12 | * version 2. This program is licensed "as is" without any warranty of any |
@@ -28,7 +28,7 @@ | |||
28 | #define SERIAL_CPM_MAJOR 204 | 28 | #define SERIAL_CPM_MAJOR 204 |
29 | #define SERIAL_CPM_MINOR 46 | 29 | #define SERIAL_CPM_MINOR 46 |
30 | 30 | ||
31 | #define IS_SMC(pinfo) (pinfo->flags & FLAG_SMC) | 31 | #define IS_SMC(pinfo) (pinfo->flags & FLAG_SMC) |
32 | #define IS_DISCARDING(pinfo) (pinfo->flags & FLAG_DISCARDING) | 32 | #define IS_DISCARDING(pinfo) (pinfo->flags & FLAG_DISCARDING) |
33 | #define FLAG_DISCARDING 0x00000004 /* when set, don't discard */ | 33 | #define FLAG_DISCARDING 0x00000004 /* when set, don't discard */ |
34 | #define FLAG_SMC 0x00000002 | 34 | #define FLAG_SMC 0x00000002 |
@@ -50,6 +50,15 @@ | |||
50 | 50 | ||
51 | #define SCC_WAIT_CLOSING 100 | 51 | #define SCC_WAIT_CLOSING 100 |
52 | 52 | ||
53 | #define GPIO_CTS 0 | ||
54 | #define GPIO_RTS 1 | ||
55 | #define GPIO_DCD 2 | ||
56 | #define GPIO_DSR 3 | ||
57 | #define GPIO_DTR 4 | ||
58 | #define GPIO_RI 5 | ||
59 | |||
60 | #define NUM_GPIOS (GPIO_RI+1) | ||
61 | |||
53 | struct uart_cpm_port { | 62 | struct uart_cpm_port { |
54 | struct uart_port port; | 63 | struct uart_port port; |
55 | u16 rx_nrfifos; | 64 | u16 rx_nrfifos; |
@@ -68,9 +77,10 @@ struct uart_cpm_port { | |||
68 | unsigned char *rx_buf; | 77 | unsigned char *rx_buf; |
69 | u32 flags; | 78 | u32 flags; |
70 | void (*set_lineif)(struct uart_cpm_port *); | 79 | void (*set_lineif)(struct uart_cpm_port *); |
80 | struct clk *clk; | ||
71 | u8 brg; | 81 | u8 brg; |
72 | uint dp_addr; | 82 | uint dp_addr; |
73 | void *mem_addr; | 83 | void *mem_addr; |
74 | dma_addr_t dma_addr; | 84 | dma_addr_t dma_addr; |
75 | u32 mem_size; | 85 | u32 mem_size; |
76 | /* helpers */ | 86 | /* helpers */ |
@@ -79,14 +89,12 @@ struct uart_cpm_port { | |||
79 | /* Keep track of 'odd' SMC2 wirings */ | 89 | /* Keep track of 'odd' SMC2 wirings */ |
80 | int is_portb; | 90 | int is_portb; |
81 | /* wait on close if needed */ | 91 | /* wait on close if needed */ |
82 | int wait_closing; | 92 | int wait_closing; |
83 | /* value to combine with opcode to form cpm command */ | 93 | /* value to combine with opcode to form cpm command */ |
84 | u32 command; | 94 | u32 command; |
95 | int gpios[NUM_GPIOS]; | ||
85 | }; | 96 | }; |
86 | 97 | ||
87 | #ifndef CONFIG_PPC_CPM_NEW_BINDING | ||
88 | extern int cpm_uart_port_map[UART_NR]; | ||
89 | #endif | ||
90 | extern int cpm_uart_nr; | 98 | extern int cpm_uart_nr; |
91 | extern struct uart_cpm_port cpm_uart_ports[UART_NR]; | 99 | extern struct uart_cpm_port cpm_uart_ports[UART_NR]; |
92 | 100 | ||