aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2009-04-03 16:15:49 -0500
committerKumar Gala <galak@kernel.crashing.org>2009-04-06 09:09:33 -0500
commit4d8107f474029167ae69862bf6b2c7273be757c7 (patch)
treece312eaf2287e848315fce699899c604fb6f4a5a
parentbd86ef378412fc30282daf722a833f734e4e2236 (diff)
cpm_uart: Disable CPM udbg when re-initing CPM uart, even if not the console.
Previously, if udbg was using the CPM uart, and the normal CPM uart driver was enabled, but the console was directed elsewhere, udbg would not be stopped prior to initialization. This resulted in udbg hanging forever waiting for the CPM to process a descriptor. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c
index 4dd00bea191..f8df0681e16 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -1106,6 +1106,10 @@ static int cpm_uart_init_port(struct device_node *np,
for (i = 0; i < NUM_GPIOS; i++)
pinfo->gpios[i] = of_get_gpio(np, i);
+#ifdef CONFIG_PPC_EARLY_DEBUG_CPM
+ udbg_putc = NULL;
+#endif
+
return cpm_uart_request_port(&pinfo->port);
out_pram:
@@ -1255,10 +1259,6 @@ static int __init cpm_uart_console_setup(struct console *co, char *options)
baud = 9600;
}
-#ifdef CONFIG_PPC_EARLY_DEBUG_CPM
- udbg_putc = NULL;
-#endif
-
if (IS_SMC(pinfo)) {
out_be16(&pinfo->smcup->smc_brkcr, 0);
cpm_line_cr_cmd(pinfo, CPM_CR_STOP_TX);