[rtems commit] bsp/altera-caclone-v: Early printk support
Sebastian Huber
sebh at rtems.org
Mon May 12 13:50:42 UTC 2014
Module: rtems
Branch: master
Commit: c8b7b32329bdb47240f671b43b4138a42f087953
Changeset: http://git.rtems.org/rtems/commit/?id=c8b7b32329bdb47240f671b43b4138a42f087953
Author: Ralf Kirchner <ralf.kirchner at embedded-brains.de>
Date: Mon May 12 15:21:52 2014 +0200
bsp/altera-caclone-v: Early printk support
Make sure printk can work early during BSP startup.
---
.../arm/altera-cyclone-v/console/console-config.c | 28 +++-----------------
1 files changed, 4 insertions(+), 24 deletions(-)
diff --git a/c/src/lib/libbsp/arm/altera-cyclone-v/console/console-config.c b/c/src/lib/libbsp/arm/altera-cyclone-v/console/console-config.c
index 32c551a..d8d99c4 100644
--- a/c/src/lib/libbsp/arm/altera-cyclone-v/console/console-config.c
+++ b/c/src/lib/libbsp/arm/altera-cyclone-v/console/console-config.c
@@ -87,7 +87,6 @@ console_tbl Console_Configuration_Ports[] = {
#endif
};
-
unsigned long Console_Configuration_Count =
RTEMS_ARRAY_SIZE(Console_Configuration_Ports);
@@ -161,35 +160,16 @@ bool altera_cyclone_v_uart_probe(int minor)
static void output_char(char c)
{
int minor = (int) Console_Port_Minor;
- const console_tbl *ct = Console_Port_Tbl != NULL ?
+ console_tbl *ct = Console_Port_Tbl != NULL ?
Console_Port_Tbl[minor] : &Console_Configuration_Ports[minor];
- const console_fns *cf = ct->pDeviceFns;
if (c == '\n') {
- (*cf->deviceWritePolled)(minor, '\r');
- }
-
- (*cf->deviceWritePolled)(minor, c);
-}
-
-static void output_char_init(char c)
-{
- if (Console_Port_Tbl == NULL) {
- int minor;
- const console_fns *cf;
-
- bsp_console_select();
-
- minor = (int) Console_Port_Minor;
- cf = Console_Configuration_Ports[minor].pDeviceFns;
-
- (*cf->deviceInitialize)(minor);
+ ns16550_outch_polled( ct, '\r' );
}
- BSP_output_char = output_char;
- output_char(c);
+ ns16550_outch_polled( ct, c );
}
-BSP_output_char_function_type BSP_output_char = output_char_init;
+BSP_output_char_function_type BSP_output_char = output_char;
BSP_polling_getchar_function_type BSP_poll_char = NULL;
More information about the vc
mailing list