[PATCH 40/54] libcpu/arm/pxa255/clock/clock.c: Fix warnings

Joel Sherrill joel.sherrill at oarcorp.com
Mon Oct 13 15:37:24 UTC 2014


---
 c/src/lib/libcpu/arm/pxa255/clock/clock.c | 29 +++++++++++------------------
 1 file changed, 11 insertions(+), 18 deletions(-)

diff --git a/c/src/lib/libcpu/arm/pxa255/clock/clock.c b/c/src/lib/libcpu/arm/pxa255/clock/clock.c
index 6d61b67..92d9b21 100644
--- a/c/src/lib/libcpu/arm/pxa255/clock/clock.c
+++ b/c/src/lib/libcpu/arm/pxa255/clock/clock.c
@@ -1,8 +1,11 @@
 /*
- *  By Yang Xi <hiyangxi at gmail.com>
  *  PXA255 clock specific using the System Timer
  *
  *  RTEMS uses IRQ 26 as Clock Source
+ */
+
+/*
+ *  By Yang Xi <hiyangxi at gmail.com>
  *
  *  The license and distribution terms for this file may be
  *  found in the file LICENSE in this distribution or at
@@ -26,17 +29,6 @@
 static unsigned long period_num;
 
 /**
- *  Return the nanoseconds since last tick
- */
-uint32_t clock_driver_get_nanoseconds_since_last_tick(void)
-{
-  return 0;
-}
-
-#define Clock_driver_nanoseconds_since_last_tick \
-  clock_driver_get_nanoseconds_since_last_tick
-
-/**
  * Enables clock interrupt.
  *
  * If the interrupt is always on, this can be a NOP.
@@ -95,17 +87,18 @@ rtems_irq_connect_data clock_isr_data = {
 };
 
 #define Clock_driver_support_install_isr( _new, _old ) \
-  do {						       \
-    _old = NULL;				       \
+  do {                                                 \
+    _old = NULL;                                       \
     BSP_install_rtems_irq_handler(&clock_isr_data);    \
   } while (0)
 
-void Clock_driver_support_initialize_hardware(void)
+static void Clock_driver_support_initialize_hardware(void)
 {
+  period_num = TIMER_RATE* rtems_configuration_get_microseconds_per_tick();
 #if ON_SKYEYE==1
-  period_num = (TIMER_RATE* rtems_configuration_get_microseconds_per_tick())/100000;
+  period_num /= 100000;
 #else
-  period_num = (TIMER_RATE* rtems_configuration_get_microseconds_per_tick())/10000;
+  period_num /= 10000;
 #endif
 }
 
@@ -118,7 +111,7 @@ void Clock_driver_support_initialize_hardware(void)
     XSCALE_OS_TIMER_MR0 = XSCALE_OS_TIMER_TCR + period_num; \
   } while (0)
 
-void Clock_driver_support_shutdown_hardware( void )
+static void Clock_driver_support_shutdown_hardware( void )
 {
   BSP_remove_rtems_irq_handler(&clock_isr_data);
 }
-- 
1.9.3




More information about the devel mailing list