diff options
Diffstat (limited to 'drivers/serial/cpm_uart/cpm_uart_cpm1.c')
-rw-r--r-- | drivers/serial/cpm_uart/cpm_uart_cpm1.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.c b/drivers/serial/cpm_uart/cpm_uart_cpm1.c index 8c6324ed0202..4647f55e19f1 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm1.c +++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.c | |||
@@ -49,9 +49,20 @@ | |||
49 | 49 | ||
50 | /**************************************************************/ | 50 | /**************************************************************/ |
51 | 51 | ||
52 | void cpm_line_cr_cmd(int line, int cmd) | 52 | #ifdef CONFIG_PPC_CPM_NEW_BINDING |
53 | void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd) | ||
54 | { | ||
55 | u16 __iomem *cpcr = &cpmp->cp_cpcr; | ||
56 | |||
57 | out_be16(cpcr, port->command | (cmd << 8) | CPM_CR_FLG); | ||
58 | while (in_be16(cpcr) & CPM_CR_FLG) | ||
59 | ; | ||
60 | } | ||
61 | #else | ||
62 | void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd) | ||
53 | { | 63 | { |
54 | ushort val; | 64 | ushort val; |
65 | int line = port - cpm_uart_ports; | ||
55 | volatile cpm8xx_t *cp = cpmp; | 66 | volatile cpm8xx_t *cp = cpmp; |
56 | 67 | ||
57 | switch (line) { | 68 | switch (line) { |
@@ -114,6 +125,7 @@ void scc4_lineif(struct uart_cpm_port *pinfo) | |||
114 | /* XXX SCC4: insert port configuration here */ | 125 | /* XXX SCC4: insert port configuration here */ |
115 | pinfo->brg = 4; | 126 | pinfo->brg = 4; |
116 | } | 127 | } |
128 | #endif | ||
117 | 129 | ||
118 | /* | 130 | /* |
119 | * Allocate DP-Ram and memory buffers. We need to allocate a transmit and | 131 | * Allocate DP-Ram and memory buffers. We need to allocate a transmit and |
@@ -184,6 +196,7 @@ void cpm_uart_freebuf(struct uart_cpm_port *pinfo) | |||
184 | cpm_dpfree(pinfo->dp_addr); | 196 | cpm_dpfree(pinfo->dp_addr); |
185 | } | 197 | } |
186 | 198 | ||
199 | #ifndef CONFIG_PPC_CPM_NEW_BINDING | ||
187 | /* Setup any dynamic params in the uart desc */ | 200 | /* Setup any dynamic params in the uart desc */ |
188 | int cpm_uart_init_portdesc(void) | 201 | int cpm_uart_init_portdesc(void) |
189 | { | 202 | { |
@@ -279,3 +292,4 @@ int cpm_uart_init_portdesc(void) | |||
279 | #endif | 292 | #endif |
280 | return 0; | 293 | return 0; |
281 | } | 294 | } |
295 | #endif | ||