aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/cpm_uart
diff options
context:
space:
mode:
authorJochen Friedrich <jochen@scram.de>2007-11-26 12:03:40 -0500
committerKumar Gala <galak@kernel.crashing.org>2007-12-13 23:47:16 -0500
commit362f9b6fa8c9670cc5496390845021c2865d049b (patch)
treeea6a97b113aa8382aeddbcfa4faf2524bd2d96dc /drivers/serial/cpm_uart
parent721c0c8af1a27941a34af5046aae4a8369c8404c (diff)
[POWERPC] Move CPM command handling into the cpm drivers
This patch moves the CPM command handling into commproc.c for CPM1 and cpm2_common.c. This is yet another preparation to get rid of drivers accessing the CPM via the global cpmp. Signed-off-by: Jochen Friedrich <jochen@scram.de> Acked-by: Scott Wood <scottwood@freescale.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Diffstat (limited to 'drivers/serial/cpm_uart')
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_cpm1.c6
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_cpm2.c8
2 files changed, 2 insertions, 12 deletions
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.c b/drivers/serial/cpm_uart/cpm_uart_cpm1.c
index 52fb044bb79a..6ea0366e26ae 100644
--- a/drivers/serial/cpm_uart/cpm_uart_cpm1.c
+++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.c
@@ -52,11 +52,7 @@
52#ifdef CONFIG_PPC_CPM_NEW_BINDING 52#ifdef CONFIG_PPC_CPM_NEW_BINDING
53void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd) 53void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
54{ 54{
55 u16 __iomem *cpcr = &cpmp->cp_cpcr; 55 cpm_command(port->command, cmd);
56
57 out_be16(cpcr, port->command | (cmd << 8) | CPM_CR_FLG);
58 while (in_be16(cpcr) & CPM_CR_FLG)
59 ;
60} 56}
61#else 57#else
62void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd) 58void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.c b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
index 882dbc17d590..def01582de5c 100644
--- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c
+++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
@@ -52,13 +52,7 @@
52#ifdef CONFIG_PPC_CPM_NEW_BINDING 52#ifdef CONFIG_PPC_CPM_NEW_BINDING
53void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd) 53void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
54{ 54{
55 cpm_cpm2_t __iomem *cp = cpm2_map(im_cpm); 55 cpm_command(port->command, cmd);
56
57 out_be32(&cp->cp_cpcr, port->command | cmd | CPM_CR_FLG);
58 while (in_be32(&cp->cp_cpcr) & CPM_CR_FLG)
59 ;
60
61 cpm2_unmap(cp);
62} 56}
63#else 57#else
64void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd) 58void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)