Title: [5325] trunk: Task[#2424] Clean serial console and early prink code.
Revision
5325
Author
sonicz
Date
2008-09-22 03:54:57 -0500 (Mon, 22 Sep 2008)

Log Message

Task[#2424] Clean serial console and early prink code.

Modified Paths

Diff

Modified: trunk/arch/blackfin/Kconfig.debug (5324 => 5325)


--- trunk/arch/blackfin/Kconfig.debug	2008-09-22 08:22:46 UTC (rev 5324)
+++ trunk/arch/blackfin/Kconfig.debug	2008-09-22 08:54:57 UTC (rev 5325)
@@ -184,6 +184,7 @@
 config EARLY_PRINTK
 	bool "Early printk" 
 	default n
+	select SERIAL_CORE_CONSOLE
 	help
 	  This option enables special console drivers which allow the kernel
 	  to print messages very early in the bootup process.

Modified: trunk/drivers/serial/bfin_5xx.c (5324 => 5325)


--- trunk/drivers/serial/bfin_5xx.c	2008-09-22 08:22:46 UTC (rev 5324)
+++ trunk/drivers/serial/bfin_5xx.c	2008-09-22 08:54:57 UTC (rev 5325)
@@ -986,7 +986,7 @@
 
 }
 
-#ifdef CONFIG_SERIAL_BFIN_CONSOLE
+#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
 /*
  * If the port was already initialised (eg, by a boot loader),
  * try to determine the current setup.
@@ -1030,24 +1030,20 @@
 	}
 	pr_debug("%s:baud = %d, parity = %c, bits= %d\n", __func__, *baud, *parity, *bits);
 }
-#endif
 
-#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
 static struct uart_driver bfin_serial_reg;
 
 static int __init
 bfin_serial_console_setup(struct console *co, char *options)
 {
 	struct bfin_serial_port *uart;
-# ifdef CONFIG_SERIAL_BFIN_CONSOLE
 	int baud = 57600;
 	int bits = 8;
 	int parity = 'n';
-#  ifdef CONFIG_SERIAL_BFIN_CTSRTS
+# ifdef CONFIG_SERIAL_BFIN_CTSRTS
 	int flow = 'r';
-#  else
+# else
 	int flow = 'n';
-#  endif
 # endif
 
 	/*
@@ -1059,16 +1055,12 @@
 		co->index = 0;
 	uart = &bfin_serial_ports[co->index];
 
-# ifdef CONFIG_SERIAL_BFIN_CONSOLE
 	if (options)
 		uart_parse_options(options, &baud, &parity, &bits, &flow);
 	else
 		bfin_serial_console_get_options(uart, &baud, &parity, &bits);
 
 	return uart_set_options(&uart->port, co, baud, parity, bits, flow);
-# else
-	return 0;
-# endif
 }
 #endif /* defined (CONFIG_SERIAL_BFIN_CONSOLE) ||
 				 defined (CONFIG_EARLY_PRINTK) */
@@ -1178,7 +1170,7 @@
 	return &bfin_early_serial_console;
 }
 
-#endif /* CONFIG_SERIAL_BFIN_CONSOLE */
+#endif /* CONFIG_EARLY_PRINTK */
 
 #ifdef CONFIG_DEBUG_KERNEL
 void bfin_serial_debug(const char *fmt, ...)
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to