[rtems commit] bsp/leon3: Declare bsp_debug_uart_init() in header

Sebastian Huber sebh at rtems.org
Thu Feb 6 07:40:28 UTC 2014


Module:    rtems
Branch:    master
Commit:    224b88805e78d4b255692963244f38627b0ac3fb
Changeset: http://git.rtems.org/rtems/commit/?id=224b88805e78d4b255692963244f38627b0ac3fb

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Feb  6 08:39:51 2014 +0100

bsp/leon3: Declare bsp_debug_uart_init() in header

Do not return a status.

---

 .../libbsp/sparc/leon3/console/printk_support.c    |    6 ++----
 c/src/lib/libbsp/sparc/leon3/include/leon.h        |    2 ++
 c/src/lib/libbsp/sparc/leon3/startup/bspstart.c    |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/c/src/lib/libbsp/sparc/leon3/console/printk_support.c b/c/src/lib/libbsp/sparc/leon3/console/printk_support.c
index ecc44b6..286e37d 100644
--- a/c/src/lib/libbsp/sparc/leon3/console/printk_support.c
+++ b/c/src/lib/libbsp/sparc/leon3/console/printk_support.c
@@ -36,7 +36,7 @@ static int pre_printk_pos = 0;
 /* Initialize the BSP system debug console layer. It will scan AMBA Plu&Play
  * for a debug APBUART and enable RX/TX for that UART.
  */
-int bsp_debug_uart_init(void)
+void bsp_debug_uart_init(void)
 {
   int i;
   struct ambapp_dev *adev;
@@ -71,9 +71,7 @@ int bsp_debug_uart_init(void)
     dbg_uart = (struct apbuart_regs *)apb->start;
     dbg_uart->ctrl |= LEON_REG_UART_CTRL_RE | LEON_REG_UART_CTRL_TE;
     dbg_uart->status = 0;
-    return 1;
-  } else
-    return 0;
+  }
 }
 
 /*
diff --git a/c/src/lib/libbsp/sparc/leon3/include/leon.h b/c/src/lib/libbsp/sparc/leon3/include/leon.h
index 82e2c6d..deff75d 100644
--- a/c/src/lib/libbsp/sparc/leon3/include/leon.h
+++ b/c/src/lib/libbsp/sparc/leon3/include/leon.h
@@ -317,6 +317,8 @@ int apbuart_inbyte_nonblocking(struct apbuart_regs *regs);
  */
 void leon3_secondary_cpu_initialize(uint32_t cpu);
 
+void bsp_debug_uart_init(void);
+
 #endif /* !ASM */
 
 #ifdef __cplusplus
diff --git a/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c b/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c
index 6ab2ce4..1e8d12c 100644
--- a/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c
+++ b/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c
@@ -17,6 +17,7 @@
  */
 
 #include <bsp.h>
+#include <leon.h>
 #include <rtems/bspIo.h>
 #include <bsp/bootcard.h>
 
@@ -29,7 +30,6 @@ int CPU_SPARC_HAS_SNOOPING;
 int LEON3_Cpu_Index = 0;
 
 extern void amba_initialize(void);
-extern void bsp_debug_uart_init(void);
 
 /*
  * set_snooping




More information about the vc mailing list