[rtems commit] bsp/beagle: Fix some warnings

Ben Gras beng at rtems.org
Mon Dec 15 18:32:51 UTC 2014


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

Author:    Ben Gras <beng at rtems.org>
Date:      Mon Dec 15 13:35:26 2014 +0100

bsp/beagle: Fix some warnings

The extra includes in console_*.c are to solve a 'no previous prototype'
warning.

Solves #2212 in trac.

---

 c/src/lib/libbsp/arm/beagle/clock.c       | 4 ++--
 c/src/lib/libbsp/arm/beagle/irq.c         | 2 +-
 c/src/lib/libbsp/shared/console_control.c | 1 +
 c/src/lib/libbsp/shared/console_read.c    | 1 +
 c/src/lib/libbsp/shared/console_write.c   | 1 +
 5 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/c/src/lib/libbsp/arm/beagle/clock.c b/c/src/lib/libbsp/arm/beagle/clock.c
index b2582d1..7e32c78 100644
--- a/c/src/lib/libbsp/arm/beagle/clock.c
+++ b/c/src/lib/libbsp/arm/beagle/clock.c
@@ -44,6 +44,7 @@ static omap_timer_registers_t regs_v1 = {
   .TOWR = OMAP3_TIMER_TOWR,
 };
 
+#if IS_AM335X
 /* AM335X has a different ip block for the non 1ms timers */
 static omap_timer_registers_t regs_v2 = {
   .TIDR = AM335X_TIMER_TIDR,
@@ -67,6 +68,7 @@ static omap_timer_registers_t regs_v2 = {
   .TOCR = -1,		/* UNDEF */
   .TOWR = -1		/* UNDEF */
 };
+#endif
 
 /* which timers are in use? target-dependent.
  * initialize at compile time.
@@ -264,8 +266,6 @@ beagle_clock_initialize(void)
 
 static void beagle_clock_at_tick(void)
 {
-  uint32_t tisr;
-
   last_tick_nanoseconds = read_frc();
 
   mmio_write(timer->base + timer->regs->TISR,
diff --git a/c/src/lib/libbsp/arm/beagle/irq.c b/c/src/lib/libbsp/arm/beagle/irq.c
index 0630344..81a511a 100644
--- a/c/src/lib/libbsp/arm/beagle/irq.c
+++ b/c/src/lib/libbsp/arm/beagle/irq.c
@@ -136,7 +136,7 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
 
   /* Install generic interrupt handler */
   arm_cp15_set_exception_handler(ARM_EXCEPTION_IRQ, _ARMV4_Exception_interrupt);
-  arm_cp15_set_vector_base_address((uint32_t) bsp_vector_table_begin);
+  arm_cp15_set_vector_base_address(bsp_vector_table_begin);
 
   return RTEMS_SUCCESSFUL;
 }
diff --git a/c/src/lib/libbsp/shared/console_control.c b/c/src/lib/libbsp/shared/console_control.c
index 6994682..9bf0291 100644
--- a/c/src/lib/libbsp/shared/console_control.c
+++ b/c/src/lib/libbsp/shared/console_control.c
@@ -26,6 +26,7 @@
 #include <termios.h>
 
 #include <rtems/termiostypes.h>
+#include <rtems/console.h>
 #include <libchip/serial.h>
 #include "console_private.h"
 
diff --git a/c/src/lib/libbsp/shared/console_read.c b/c/src/lib/libbsp/shared/console_read.c
index 3c349f9..407d5e6 100644
--- a/c/src/lib/libbsp/shared/console_read.c
+++ b/c/src/lib/libbsp/shared/console_read.c
@@ -25,6 +25,7 @@
 #include <termios.h>
 
 #include <rtems/termiostypes.h>
+#include <rtems/console.h>
 #include <libchip/serial.h>
 #include "console_private.h"
 
diff --git a/c/src/lib/libbsp/shared/console_write.c b/c/src/lib/libbsp/shared/console_write.c
index 8b942e6..cc69b83 100644
--- a/c/src/lib/libbsp/shared/console_write.c
+++ b/c/src/lib/libbsp/shared/console_write.c
@@ -25,6 +25,7 @@
 #include <termios.h>
 
 #include <rtems/termiostypes.h>
+#include <rtems/console.h>
 #include <libchip/serial.h>
 #include "console_private.h"
 



More information about the vc mailing list