summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-08-31 17:19:10 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-08-31 17:19:10 +0000
commit18bfc42d67fb7cb7b5ba4deebc9448d1c5c36b76 (patch)
tree39e47a19dff3c464cc3f1ad6715a29c9fa90d82a
parent2008-08-31 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-18bfc42d67fb7cb7b5ba4deebc9448d1c5c36b76.tar.bz2
2008-08-31 Joel Sherrill <joel.sherrill@oarcorp.com>
* arm/at91rm9200/timer/timer.c, arm/lpc22xx/timer/timer.c, arm/mc9328mxl/timer/timer.c, arm/s3c2400/timer/timer.c, arm/s3c24xx/timer/timer.c, bfin/timer/timer.c, m68k/mcf5206/timer/timer.c, m68k/mcf5272/timer/timer.c: Rename timer driver methods to follow RTEMS programming conventions.
-rw-r--r--c/src/lib/libcpu/ChangeLog8
-rw-r--r--c/src/lib/libcpu/arm/at91rm9200/timer/timer.c28
-rw-r--r--c/src/lib/libcpu/arm/lpc22xx/timer/timer.c26
-rw-r--r--c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c28
-rw-r--r--c/src/lib/libcpu/arm/s3c2400/timer/timer.c28
-rw-r--r--c/src/lib/libcpu/arm/s3c24xx/timer/timer.c28
-rw-r--r--c/src/lib/libcpu/bfin/timer/timer.c10
-rw-r--r--c/src/lib/libcpu/m68k/mcf5206/timer/timer.c17
-rw-r--r--c/src/lib/libcpu/m68k/mcf5272/timer/timer.c17
9 files changed, 52 insertions, 138 deletions
diff --git a/c/src/lib/libcpu/ChangeLog b/c/src/lib/libcpu/ChangeLog
index 670c276a8b..9df48f80b1 100644
--- a/c/src/lib/libcpu/ChangeLog
+++ b/c/src/lib/libcpu/ChangeLog
@@ -1,3 +1,11 @@
+2008-08-31 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * arm/at91rm9200/timer/timer.c, arm/lpc22xx/timer/timer.c,
+ arm/mc9328mxl/timer/timer.c, arm/s3c2400/timer/timer.c,
+ arm/s3c24xx/timer/timer.c, bfin/timer/timer.c,
+ m68k/mcf5206/timer/timer.c, m68k/mcf5272/timer/timer.c: Rename timer
+ driver methods to follow RTEMS programming conventions.
+
2006-08-09 Kolja Waschk <waschk@telos.de>
* nios2/Makefile.am, nios2/configure.ac, nios2/preinstall.am,
diff --git a/c/src/lib/libcpu/arm/at91rm9200/timer/timer.c b/c/src/lib/libcpu/arm/at91rm9200/timer/timer.c
index db15a98f9a..35cf5cb6a8 100644
--- a/c/src/lib/libcpu/arm/at91rm9200/timer/timer.c
+++ b/c/src/lib/libcpu/arm/at91rm9200/timer/timer.c
@@ -13,8 +13,8 @@
* Notes:
* This file manages the benchmark timer used by the RTEMS Timing Test
* Suite. Each measured time period is demarcated by calls to
- * benchmark_timerinitialize() and benchmark_timerread(). benchmark_timerread() usually returns
- * the number of microseconds since benchmark_timerinitialize() exitted.
+ * benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns
+ * the number of microseconds since benchmark_timer_initialize() exitted.
*
* It is important that the timer start/stop overhead be determined
* when porting or modifying this code.
@@ -28,14 +28,14 @@
#include <at91rm9200_pmc.h>
uint16_t tstart;
-rtems_boolean benchmark_timerfind_average_overhead;
+rtems_boolean benchmark_timer_find_average_overhead;
uint32_t tick_time;
/*
* Set up TC0 -
* timer_clock2 (MCK/8)
* capture mode - this shouldn't matter
*/
-void benchmark_timerinitialize( void )
+void benchmark_timer_initialize( void )
{
uint32_t tmr_freq;
@@ -52,7 +52,7 @@ void benchmark_timerinitialize( void )
}
/*
- * The following controls the behavior of benchmark_timerread().
+ * The following controls the behavior of benchmark_timer_read().
*
* AVG_OVEREHAD is the overhead for starting and stopping the timer. It
* is usually deducted from the number returned.
@@ -66,7 +66,7 @@ void benchmark_timerinitialize( void )
/* This value is in microseconds. */
#define LEAST_VALID 1 /* Don't trust a clicks value lower than this */
-int benchmark_timerread( void )
+int benchmark_timer_read( void )
{
uint16_t t;
uint32_t total;
@@ -80,7 +80,7 @@ int benchmark_timerread( void )
total = t * tick_time;
- if ( benchmark_timerfind_average_overhead == 1 )
+ if ( benchmark_timer_find_average_overhead == 1 )
return total; /* in nanosecond units */
else {
if ( total < LEAST_VALID )
@@ -92,20 +92,10 @@ int benchmark_timerread( void )
}
}
-/*
- * Empty function call used in loops to measure basic cost of looping
- * in Timing Test Suite.
- */
-
-rtems_status_code benchmark_timerempty_function( void )
-{
- return RTEMS_SUCCESSFUL;
-}
-
-void benchmark_timerdisable_subtracting_average_overhead(
+void benchmark_timer_disable_subtracting_average_overhead(
rtems_boolean find_flag
)
{
- benchmark_timerfind_average_overhead = find_flag;
+ benchmark_timer_find_average_overhead = find_flag;
}
diff --git a/c/src/lib/libcpu/arm/lpc22xx/timer/timer.c b/c/src/lib/libcpu/arm/lpc22xx/timer/timer.c
index 8bc3547763..ae63fb0d84 100644
--- a/c/src/lib/libcpu/arm/lpc22xx/timer/timer.c
+++ b/c/src/lib/libcpu/arm/lpc22xx/timer/timer.c
@@ -13,8 +13,8 @@
* Notes:
* This file manages the benchmark timer used by the RTEMS Timing Test
* Suite. Each measured time period is demarcated by calls to
- * benchmark_timerinitialize() and benchmark_timerread(). benchmark_timerread() usually returns
- * the number of microseconds since benchmark_timerinitialize() exitted.
+ * benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns
+ * the number of microseconds since benchmark_timer_initialize() exitted.
*
* It is important that the timer start/stop overhead be determined
* when porting or modifying this code.
@@ -29,19 +29,19 @@
uint32_t g_start;
uint32_t g_freq;
-rtems_boolean benchmark_timerfind_average_overhead;
+rtems_boolean benchmark_timer_find_average_overhead;
/*
* Set up Timer 1
*/
-void benchmark_timerinitialize( void )
+void benchmark_timer_initialize( void )
{
g_freq = LPC22xx_Fpclk / 1000;
}
/*
- * The following controls the behavior of benchmark_timerread().
+ * The following controls the behavior of benchmark_timer_read().
*
* AVG_OVEREHAD is the overhead for starting and stopping the timer. It
* is usually deducted from the number returned.
@@ -55,7 +55,7 @@ void benchmark_timerinitialize( void )
/* This value is in microseconds. */
#define LEAST_VALID 1 /* Don't trust a clicks value lower than this */
-int benchmark_timerread( void )
+int benchmark_timer_read( void )
{
return (T0TC/(LPC22xx_Fpclk/1000000));
/*
@@ -65,20 +65,10 @@ int benchmark_timerread( void )
*/
}
-/*
- * Empty function call used in loops to measure basic cost of looping
- * in Timing Test Suite.
- */
-
-rtems_status_code benchmark_timerempty_function( void )
-{
- return RTEMS_SUCCESSFUL;
-}
-
-void benchmark_timerdisable_subtracting_average_overhead(
+void benchmark_timer_disable_subtracting_average_overhead(
rtems_boolean find_flag
)
{
- benchmark_timerfind_average_overhead = find_flag;
+ benchmark_timer_find_average_overhead = find_flag;
}
diff --git a/c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c b/c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c
index 02c38d2ca6..6403e43a6e 100644
--- a/c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c
+++ b/c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c
@@ -14,8 +14,8 @@
* Notes:
* This file manages the benchmark timer used by the RTEMS Timing Test
* Suite. Each measured time period is demarcated by calls to
- * benchmark_timerinitialize() and benchmark_timerread(). benchmark_timerread() usually returns
- * the number of microseconds since benchmark_timerinitialize() exitted.
+ * benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns
+ * the number of microseconds since benchmark_timer_initialize() exitted.
*
* It is important that the timer start/stop overhead be determined
* when porting or modifying this code.
@@ -30,13 +30,13 @@
uint32_t g_start;
uint32_t g_freq;
-rtems_boolean benchmark_timerfind_average_overhead;
+rtems_boolean benchmark_timer_find_average_overhead;
/*
* Set up Timer 1
*/
-void benchmark_timerinitialize( void )
+void benchmark_timer_initialize( void )
{
MC9328MXL_TMR2_TCTL = (MC9328MXL_TMR_TCTL_CLKSRC_PCLK1 |
MC9328MXL_TMR_TCTL_FRR |
@@ -51,7 +51,7 @@ void benchmark_timerinitialize( void )
}
/*
- * The following controls the behavior of benchmark_timerread().
+ * The following controls the behavior of benchmark_timer_read().
*
* AVG_OVEREHAD is the overhead for starting and stopping the timer. It
* is usually deducted from the number returned.
@@ -65,7 +65,7 @@ void benchmark_timerinitialize( void )
/* This value is in microseconds. */
#define LEAST_VALID 1 /* Don't trust a clicks value lower than this */
-int benchmark_timerread( void )
+int benchmark_timer_read( void )
{
uint32_t t;
unsigned long long total;
@@ -82,7 +82,7 @@ int benchmark_timerread( void )
/* convert to nanoseconds */
total = (total * 1000)/ g_freq;
- if ( benchmark_timerfind_average_overhead == 1 ) {
+ if ( benchmark_timer_find_average_overhead == 1 ) {
return (int) total;
} else if ( total < LEAST_VALID ) {
return 0;
@@ -94,20 +94,10 @@ int benchmark_timerread( void )
return (total - AVG_OVERHEAD);
}
-/*
- * Empty function call used in loops to measure basic cost of looping
- * in Timing Test Suite.
- */
-
-rtems_status_code benchmark_timerempty_function( void )
-{
- return RTEMS_SUCCESSFUL;
-}
-
-void benchmark_timerdisable_subtracting_average_overhead(
+void benchmark_timer_disable_subtracting_average_overhead(
rtems_boolean find_flag
)
{
- benchmark_timerfind_average_overhead = find_flag;
+ benchmark_timer_find_average_overhead = find_flag;
}
diff --git a/c/src/lib/libcpu/arm/s3c2400/timer/timer.c b/c/src/lib/libcpu/arm/s3c2400/timer/timer.c
index 68d99fe931..99b908f9ff 100644
--- a/c/src/lib/libcpu/arm/s3c2400/timer/timer.c
+++ b/c/src/lib/libcpu/arm/s3c2400/timer/timer.c
@@ -11,8 +11,8 @@
* Notes:
* This file manages the benchmark timer used by the RTEMS Timing Test
* Suite. Each measured time period is demarcated by calls to
- * benchmark_timerinitialize() and benchmark_timerread(). benchmark_timerread() usually returns
- * the number of microseconds since benchmark_timerinitialize() exitted.
+ * benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns
+ * the number of microseconds since benchmark_timer_initialize() exitted.
*
* It is important that the timer start/stop overhead be determined
* when porting or modifying this code.
@@ -27,13 +27,13 @@
uint32_t g_start;
uint32_t g_freq;
-rtems_boolean benchmark_timerfind_average_overhead;
+rtems_boolean benchmark_timer_find_average_overhead;
/*
* Set up Timer 1
*/
-void benchmark_timerinitialize( void )
+void benchmark_timer_initialize( void )
{
uint32_t cr;
@@ -58,7 +58,7 @@ void benchmark_timerinitialize( void )
}
/*
- * The following controls the behavior of benchmark_timerread().
+ * The following controls the behavior of benchmark_timer_read().
*
* AVG_OVEREHAD is the overhead for starting and stopping the timer. It
* is usually deducted from the number returned.
@@ -72,7 +72,7 @@ void benchmark_timerinitialize( void )
/* This value is in microseconds. */
#define LEAST_VALID 1 /* Don't trust a clicks value lower than this */
-int benchmark_timerread( void )
+int benchmark_timer_read( void )
{
uint32_t t;
unsigned long long total;
@@ -89,7 +89,7 @@ int benchmark_timerread( void )
/* convert to microseconds */
total = (total*1000) / g_freq;
- if ( benchmark_timerfind_average_overhead == 1 ) {
+ if ( benchmark_timer_find_average_overhead == 1 ) {
return (int) total;
} else if ( total < LEAST_VALID ) {
return 0;
@@ -101,20 +101,10 @@ int benchmark_timerread( void )
return (total - AVG_OVERHEAD);
}
-/*
- * Empty function call used in loops to measure basic cost of looping
- * in Timing Test Suite.
- */
-
-rtems_status_code benchmark_timerempty_function( void )
-{
- return RTEMS_SUCCESSFUL;
-}
-
-void benchmark_timerdisable_subtracting_average_overhead(
+void benchmark_timer_disable_subtracting_average_overhead(
rtems_boolean find_flag
)
{
- benchmark_timerfind_average_overhead = find_flag;
+ benchmark_timer_find_average_overhead = find_flag;
}
diff --git a/c/src/lib/libcpu/arm/s3c24xx/timer/timer.c b/c/src/lib/libcpu/arm/s3c24xx/timer/timer.c
index 10ccdcea76..8839d98d6c 100644
--- a/c/src/lib/libcpu/arm/s3c24xx/timer/timer.c
+++ b/c/src/lib/libcpu/arm/s3c24xx/timer/timer.c
@@ -11,8 +11,8 @@
* Notes:
* This file manages the benchmark timer used by the RTEMS Timing Test
* Suite. Each measured time period is demarcated by calls to
- * benchmark_timerinitialize() and benchmark_timerread(). benchmark_timerread() usually returns
- * the number of microseconds since benchmark_timerinitialize() exitted.
+ * benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns
+ * the number of microseconds since benchmark_timer_initialize() exitted.
*
* It is important that the timer start/stop overhead be determined
* when porting or modifying this code.
@@ -27,13 +27,13 @@
uint32_t g_start;
uint32_t g_freq;
-rtems_boolean benchmark_timerfind_average_overhead;
+rtems_boolean benchmark_timer_find_average_overhead;
/*
* Set up Timer 1
*/
-void benchmark_timerinitialize( void )
+void benchmark_timer_initialize( void )
{
uint32_t cr;
@@ -58,7 +58,7 @@ void benchmark_timerinitialize( void )
}
/*
- * The following controls the behavior of benchmark_timerread().
+ * The following controls the behavior of benchmark_timer_read().
*
* AVG_OVEREHAD is the overhead for starting and stopping the timer. It
* is usually deducted from the number returned.
@@ -72,7 +72,7 @@ void benchmark_timerinitialize( void )
/* This value is in microseconds. */
#define LEAST_VALID 1 /* Don't trust a clicks value lower than this */
-int benchmark_timerread( void )
+int benchmark_timer_read( void )
{
uint32_t t;
unsigned long long total;
@@ -89,7 +89,7 @@ int benchmark_timerread( void )
/* convert to microseconds */
total = (total*1000) / g_freq;
- if ( benchmark_timerfind_average_overhead == 1 ) {
+ if ( benchmark_timer_find_average_overhead == 1 ) {
return (int) total;
} else if ( total < LEAST_VALID ) {
return 0;
@@ -101,20 +101,10 @@ int benchmark_timerread( void )
return (total - AVG_OVERHEAD);
}
-/*
- * Empty function call used in loops to measure basic cost of looping
- * in Timing Test Suite.
- */
-
-rtems_status_code benchmark_timerempty_function( void )
-{
- return RTEMS_SUCCESSFUL;
-}
-
-void benchmark_timerdisable_subtracting_average_overhead(
+void benchmark_timer_disable_subtracting_average_overhead(
rtems_boolean find_flag
)
{
- benchmark_timerfind_average_overhead = find_flag;
+ benchmark_timer_find_average_overhead = find_flag;
}
diff --git a/c/src/lib/libcpu/bfin/timer/timer.c b/c/src/lib/libcpu/bfin/timer/timer.c
index dc6d85e81d..8c288f37b0 100644
--- a/c/src/lib/libcpu/bfin/timer/timer.c
+++ b/c/src/lib/libcpu/bfin/timer/timer.c
@@ -88,16 +88,6 @@ int benchmark_timer_read( void )
}
}
-/*
- * Empty function call used in loops to measure basic cost of looping
- * in Timing Test Suite.
- */
-
-rtems_status_code benchmark_timer_empty_function( void )
-{
- return RTEMS_SUCCESSFUL;
-}
-
void benchmark_timer_disable_subtracting_average_overhead(
rtems_boolean find_flag
)
diff --git a/c/src/lib/libcpu/m68k/mcf5206/timer/timer.c b/c/src/lib/libcpu/m68k/mcf5206/timer/timer.c
index 320a5a3091..b0bd0272bf 100644
--- a/c/src/lib/libcpu/m68k/mcf5206/timer/timer.c
+++ b/c/src/lib/libcpu/m68k/mcf5206/timer/timer.c
@@ -138,23 +138,6 @@ benchmark_timer_read( void )
return (total - AVG_OVERHEAD);
}
-
-/* benchmark_timer_empty_function --
- * Empty function call used in loops to measure basic cost of looping
- * in Timing Test Suite.
- *
- * PARAMETERS:
- * none
- *
- * RETURNS:
- * RTEMS_SUCCESSFUL
- */
-rtems_status_code
-benchmark_timer_empty_function(void)
-{
- return RTEMS_SUCCESSFUL;
-}
-
/* benchmark_timer_disable_subtracting_average_overhead --
* This routine is invoked by the "Check Timer" (tmck) test in the
* RTEMS Timing Test Suite. It makes the benchmark_timer_read routine not
diff --git a/c/src/lib/libcpu/m68k/mcf5272/timer/timer.c b/c/src/lib/libcpu/m68k/mcf5272/timer/timer.c
index cac0216825..ca4e006eac 100644
--- a/c/src/lib/libcpu/m68k/mcf5272/timer/timer.c
+++ b/c/src/lib/libcpu/m68k/mcf5272/timer/timer.c
@@ -140,23 +140,6 @@ benchmark_timer_read( void )
return (total - AVG_OVERHEAD);
}
-
-/* benchmark_timer_empty_function --
- * Empty function call used in loops to measure basic cost of looping
- * in Timing Test Suite.
- *
- * PARAMETERS:
- * none
- *
- * RETURNS:
- * RTEMS_SUCCESSFUL
- */
-rtems_status_code
-benchmark_timer_empty_function(void)
-{
- return RTEMS_SUCCESSFUL;
-}
-
/* benchmark_timer_disable_subtracting_average_overhead --
* This routine is invoked by the "Check Timer" (tmck) test in the
* RTEMS Timing Test Suite. It makes the benchmark_timer_read routine not