diff options
author | Vitaly Bordug <vbordug@ru.mvista.com> | 2006-04-29 14:32:44 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-05-03 09:06:43 -0400 |
commit | 61f5657c50341198ff05e375e6f1fc0476556562 (patch) | |
tree | 33c0fa26dc730885176f4be2a8853b1c0b65aa8a | |
parent | 0ccde0a290b44b8296b82a7683b4c299eb51ba6b (diff) |
[PATCH] ppc32 CPM_UART: Fixed break send on SCC
SCC uart sends a break sequence each time it is stopped with the
CPM_CR_STOP_TX command. That means that each time an application closes the
serial device, a break is transmitted. To fix this, graceful tx stop is
issued for SCC.
Signed-off-by: David Jander <david.jander@protonic.nl>
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | drivers/serial/cpm_uart/cpm_uart_core.c | 6 | ||||
-rw-r--r-- | include/asm-ppc/commproc.h | 1 | ||||
-rw-r--r-- | include/asm-ppc/cpm2.h | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c index ced193bf9e1e..b9d1185df20c 100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c | |||
@@ -457,7 +457,11 @@ static void cpm_uart_shutdown(struct uart_port *port) | |||
457 | } | 457 | } |
458 | 458 | ||
459 | /* Shut them really down and reinit buffer descriptors */ | 459 | /* Shut them really down and reinit buffer descriptors */ |
460 | cpm_line_cr_cmd(line, CPM_CR_STOP_TX); | 460 | if (IS_SMC(pinfo)) |
461 | cpm_line_cr_cmd(line, CPM_CR_STOP_TX); | ||
462 | else | ||
463 | cpm_line_cr_cmd(line, CPM_CR_GRA_STOP_TX); | ||
464 | |||
461 | cpm_uart_initbd(pinfo); | 465 | cpm_uart_initbd(pinfo); |
462 | } | 466 | } |
463 | } | 467 | } |
diff --git a/include/asm-ppc/commproc.h b/include/asm-ppc/commproc.h index 973e60908234..31f362966a58 100644 --- a/include/asm-ppc/commproc.h +++ b/include/asm-ppc/commproc.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #define CPM_CR_INIT_TX ((ushort)0x0002) | 35 | #define CPM_CR_INIT_TX ((ushort)0x0002) |
36 | #define CPM_CR_HUNT_MODE ((ushort)0x0003) | 36 | #define CPM_CR_HUNT_MODE ((ushort)0x0003) |
37 | #define CPM_CR_STOP_TX ((ushort)0x0004) | 37 | #define CPM_CR_STOP_TX ((ushort)0x0004) |
38 | #define CPM_CR_GRA_STOP_TX ((ushort)0x0005) | ||
38 | #define CPM_CR_RESTART_TX ((ushort)0x0006) | 39 | #define CPM_CR_RESTART_TX ((ushort)0x0006) |
39 | #define CPM_CR_CLOSE_RX_BD ((ushort)0x0007) | 40 | #define CPM_CR_CLOSE_RX_BD ((ushort)0x0007) |
40 | #define CPM_CR_SET_GADDR ((ushort)0x0008) | 41 | #define CPM_CR_SET_GADDR ((ushort)0x0008) |
diff --git a/include/asm-ppc/cpm2.h b/include/asm-ppc/cpm2.h index b638b87cebe3..c70344b91049 100644 --- a/include/asm-ppc/cpm2.h +++ b/include/asm-ppc/cpm2.h | |||
@@ -69,7 +69,7 @@ | |||
69 | #define CPM_CR_INIT_TX ((ushort)0x0002) | 69 | #define CPM_CR_INIT_TX ((ushort)0x0002) |
70 | #define CPM_CR_HUNT_MODE ((ushort)0x0003) | 70 | #define CPM_CR_HUNT_MODE ((ushort)0x0003) |
71 | #define CPM_CR_STOP_TX ((ushort)0x0004) | 71 | #define CPM_CR_STOP_TX ((ushort)0x0004) |
72 | #define CPM_CR_GRA_STOP_TX ((ushort)0x0005) | 72 | #define CPM_CR_GRA_STOP_TX ((ushort)0x0005) |
73 | #define CPM_CR_RESTART_TX ((ushort)0x0006) | 73 | #define CPM_CR_RESTART_TX ((ushort)0x0006) |
74 | #define CPM_CR_SET_GADDR ((ushort)0x0008) | 74 | #define CPM_CR_SET_GADDR ((ushort)0x0008) |
75 | #define CPM_CR_START_IDMA ((ushort)0x0009) | 75 | #define CPM_CR_START_IDMA ((ushort)0x0009) |