diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-04-20 12:08:42 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-04-20 13:52:19 +0200 |
commit | e0dd8a5ad830798bc8082b03b8c42c32fb9660e0 (patch) | |
tree | d147bfc4d670fcdfbd2e2d2e75eb209f92e07df1 /c/src/lib/libbsp/m68k/gen68360 | |
parent | bsps: Move startup files to bsps (diff) | |
download | rtems-e0dd8a5ad830798bc8082b03b8c42c32fb9660e0.tar.bz2 |
bsps: Move benchmark timer to bsps
This patch is a part of the BSP source reorganization.
Update #3285.
Diffstat (limited to 'c/src/lib/libbsp/m68k/gen68360')
-rw-r--r-- | c/src/lib/libbsp/m68k/gen68360/Makefile.am | 2 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/gen68360/timer/timer.c | 83 |
2 files changed, 1 insertions, 84 deletions
diff --git a/c/src/lib/libbsp/m68k/gen68360/Makefile.am b/c/src/lib/libbsp/m68k/gen68360/Makefile.am index 7b27745ac6..d78babc776 100644 --- a/c/src/lib/libbsp/m68k/gen68360/Makefile.am +++ b/c/src/lib/libbsp/m68k/gen68360/Makefile.am @@ -35,7 +35,7 @@ librtemsbsp_a_SOURCES +=../../../../../../bsps/m68k/gen68360/clock/clock.c librtemsbsp_a_SOURCES += ../../../../../../bsps/m68k/gen68360/console/console.c librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/serial/printk-dummy.c # timer -librtemsbsp_a_SOURCES += timer/timer.c +librtemsbsp_a_SOURCES += ../../../../../../bsps/m68k/gen68360/btimer/btimer.c if HAS_NETWORKING librtemsbsp_a_SOURCES += network/network.c diff --git a/c/src/lib/libbsp/m68k/gen68360/timer/timer.c b/c/src/lib/libbsp/m68k/gen68360/timer/timer.c deleted file mode 100644 index 40a3e0a4c1..0000000000 --- a/c/src/lib/libbsp/m68k/gen68360/timer/timer.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Use TIMER 1 and TIMER 2 for Timing Test Suite - * The hardware on the MC68360 makes these routines very simple. - * - * Based on the `gen68302' board support package, and covered by the - * original distribution terms. - * - * W. Eric Norum - * Saskatchewan Accelerator Laboratory - * University of Saskatchewan - * Saskatoon, Saskatchewan, CANADA - * eric@skatter.usask.ca - */ - -/* - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * NOTE: It is important that the timer start/stop overhead be - * determined when porting or modifying this code. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#include <rtems.h> -#include <rtems/btimer.h> -#include <bsp.h> -#include <rtems/m68k/m68360.h> - -void -benchmark_timer_initialize (void) -{ - /* - * Reset timers 1 and 2 - */ - m360.tgcr &= ~0x00FF; - m360.tcn1 = 0; - m360.tcn2 = 0; - m360.ter1 = 0xFFFF; - m360.ter2 = 0xFFFF; - - /* - * Cascade timers 1 and 2 - */ - m360.tgcr |= 0x0080; - - /* - * Configure timers 1 and 2 to a single 32-bit, 1 MHz timer. - * HARDWARE: - * Change the `25' to match your processor clock - */ - m360.tmr2 = ((25-1) << 8) | 0x2; - m360.tmr1 = 0; - - /* - * Start the timers - */ - m360.tgcr |= 0x0011; -} - -/* - * Return timer value in microsecond units - */ -uint32_t -benchmark_timer_read (void) -{ - unsigned short val; - - val = m360.tcn1; - return val; -} - -void -benchmark_timer_disable_subtracting_average_overhead(bool find_flag) -{ -} |