summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2010-10-11 00:36:48 +0000
committerChris Johns <chrisj@rtems.org>2010-10-11 00:36:48 +0000
commit0781705f8cfb3e5ff644c7d00bbb0b48ec8a1781 (patch)
tree05855f90cb402ea7da2d5692c604b7d5815a89fe /c/src/lib/libbsp/i386
parentRegenerate. (diff)
downloadrtems-0781705f8cfb3e5ff644c7d00bbb0b48ec8a1781.tar.bz2
2010-10-11 Chris Johns <chrisj@rtems.org>
* console/console.c: Fix the baudrate command line support.
Diffstat (limited to 'c/src/lib/libbsp/i386')
-rw-r--r--c/src/lib/libbsp/i386/pc386/ChangeLog4
-rw-r--r--c/src/lib/libbsp/i386/pc386/console/console.c26
2 files changed, 18 insertions, 12 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/ChangeLog b/c/src/lib/libbsp/i386/pc386/ChangeLog
index fa06348c3b..477168a5ea 100644
--- a/c/src/lib/libbsp/i386/pc386/ChangeLog
+++ b/c/src/lib/libbsp/i386/pc386/ChangeLog
@@ -1,3 +1,7 @@
+2010-10-11 Chris Johns <chrisj@rtems.org>
+
+ * console/console.c: Fix the baudrate command line support.
+
2010-08-27 Chris Johns <chrisj@rtems.org>
* console/console.c: Add baudrate support to the --console command
diff --git a/c/src/lib/libbsp/i386/pc386/console/console.c b/c/src/lib/libbsp/i386/pc386/console/console.c
index fc690884a4..12da50bd51 100644
--- a/c/src/lib/libbsp/i386/pc386/console/console.c
+++ b/c/src/lib/libbsp/i386/pc386/console/console.c
@@ -68,7 +68,8 @@ int BSPConsolePort = BSP_CONSOLE_PORT_CONSOLE;
int BSPPrintkPort = BSP_CONSOLE_PORT_CONSOLE;
#endif
-int BSPBaseBaud = 9600;
+int BSPBaseBaud = 115200;
+int BSPCmdBaud = 9600;
extern BSP_polling_getchar_function_type BSP_poll_char;
extern int getch( void );
@@ -185,17 +186,17 @@ BSP_console_select(void)
{
comma += 1;
if (strncmp (opt, "115200", sizeof ("115200") - 1) == 0)
- BSPBaseBaud = 115200;
+ BSPCmdBaud = 115200;
else if (strncmp (opt, "57600", sizeof ("57600") - 1) == 0)
- BSPBaseBaud = 57600;
+ BSPCmdBaud = 57600;
else if (strncmp (opt, "38400", sizeof ("38400") - 1) == 0)
- BSPBaseBaud = 38400;
+ BSPCmdBaud = 38400;
else if (strncmp (opt, "19200", sizeof ("19200") - 1) == 0)
- BSPBaseBaud = 19200;
+ BSPCmdBaud = 19200;
else if (strncmp (opt, "9600", sizeof ("9600") - 1) == 0)
- BSPBaseBaud = 9600;
+ BSPCmdBaud = 9600;
else if (strncmp (opt, "4800", sizeof ("4800") - 1) == 0)
- BSPBaseBaud = 9600;
+ BSPCmdBaud = 9600;
}
}
@@ -217,6 +218,7 @@ BSP_console_select(void)
if(BSPPrintkPort == BSP_UART_COM1)
{
+ printk("Initializing console on port COM1 %d-8-N-1\n\n", BSPCmdBaud);
printk("Warning : This will be the last message on console\n");
/*
@@ -287,8 +289,8 @@ console_initialize(rtems_device_major_number major,
/*
* Do device-specific initialization
*/
- /* BSPBaseBaud-8-N-1 */
- BSP_uart_init(BSPConsolePort, BSPBaseBaud, CHR_8_BITS, 0, 0, 0);
+ /* BSPCmdBaud-8-N-1 */
+ BSP_uart_init(BSPConsolePort, BSPCmdBaud, CHR_8_BITS, 0, 0, 0);
/* Set interrupt handler */
if(BSPConsolePort == BSP_UART_COM1)
@@ -321,11 +323,11 @@ console_initialize(rtems_device_major_number major,
if(BSPConsolePort == BSP_UART_COM1)
{
- printk("Initialized console on port COM1 %d-8-N-1\n\n", BSPBaseBaud);
+ printk("Initialized console on port COM1 %d-8-N-1\n\n", BSPCmdBaud);
}
else
{
- printk("Initialized console on port COM2 %d-8-N-1\n\n", BSPBaseBaud);
+ printk("Initialized console on port COM2 %d-8-N-1\n\n", BSPCmdBaud);
}
}
@@ -545,7 +547,7 @@ conSetAttr(int minor, const struct termios *t)
}
BSP_uart_set_attributes(BSPConsolePort, baud, databits, parity, stopbits);
-
+
return 0;
}