Index: c/src/lib/libcpu/ChangeLog
===================================================================
--- c/src/lib/libcpu/ChangeLog	(revision be58eb2f2d1bf65248794e2d295a36522ee73cf8)
+++ c/src/lib/libcpu/ChangeLog	(revision 2f81b26ce8b1087209903ad023117933d6edd6fb)
@@ -1,2 +1,12 @@
+2004-01-07	Joel Sherrill <joel@OARcorp.com>
+
+	* mips64orion/.cvsignore, mips64orion/ChangeLog,
+	mips64orion/Makefile.am, mips64orion/configure.ac,
+	mips64orion/clock/.cvsignore, mips64orion/clock/Makefile.am,
+	mips64orion/clock/ckinit.c, mips64orion/clock/clock.S,
+	mips64orion/clock/clock.h, mips64orion/timer/.cvsignore,
+	mips64orion/timer/Makefile.am, mips64orion/timer/gettime.S,
+	mips64orion/timer/timer.c: Removed.
+
 2003-12-01	Ralf Corsepius <corsepius@faw.uni-ulm.de>
 
Index: src/lib/libcpu/mips64orion/.cvsignore
===================================================================
--- c/src/lib/libcpu/mips64orion/.cvsignore	(revision be58eb2f2d1bf65248794e2d295a36522ee73cf8)
+++ 	(revision )
@@ -1,14 +1,0 @@
-aclocal.m4
-autom4te*.cache
-config.cache
-config.guess
-config.log
-config.status
-config.sub
-configure
-depcomp
-install-sh
-Makefile
-Makefile.in
-missing
-mkinstalldirs
Index: src/lib/libcpu/mips64orion/ChangeLog
===================================================================
--- c/src/lib/libcpu/mips64orion/ChangeLog	(revision be58eb2f2d1bf65248794e2d295a36522ee73cf8)
+++ 	(revision )
@@ -1,115 +1,0 @@
-2003-12-12	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* configure.ac: Require automake >= 1.8, autoconf >= 2.59.
-
-2003-12-02	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* clock/Makefile.am: Remove all-local: $(ARCH).
-	* timer/Makefile.am: Remove all-local: $(ARCH).
-
-2003-12-01	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* clock/Makefile.am: Reformat.
-	* timer/Makefile.am: Reformat.
-
-2003-10-22	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* configure.ac: Remove RTEMS_CANONICAL_HOST.
-
-2003-10-21	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* configure.ac: Remove RTEMS_CHECK_CPU.
-
-2003-09-04	Joel Sherrill <joel@OARcorp.com>
-
-	* clock/ckinit.c, timer/timer.c: URL for license changed.
-
-2003-08-18	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* Makefile.am: Reflect having moved aclocal/.
-
-2003-08-16	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* Makefile.am: Reflect having moved automake/.
-	* clock/Makefile.am: Reflect having moved automake/.
-	* timer/Makefile.am: Reflect having moved automake/.
-
-2003-08-11	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* configure.ac: Use rtems-bugs@rtems.com as bug report email address.
-
-2003-03-06	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* configure.ac: Remove AC_CONFIG_AUX_DIR.
-
-2003-02-11	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* configure.ac: AM_INIT_AUTOMAKE([1.7.2]).
-
-2003-02-11	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* configure.ac: AC_PREREQ(2.57).
-
-2003-01-15	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* clock/Makefile.am: Don't include @RTEMS_BSP@.cfg.
-	* timer/Makefile.am: Ditto.
-
-2002-12-06	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* configure.ac: Remove RTEMS_CHECK_BSP_CACHE.
-
-2002-12-01	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* configure.ac: Add RTEMS_PROG_CCAS.
-
-2002-10-21	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* .cvsignore: Reformat.
-	Add autom4te*cache.
-	Remove autom4te.cache.
-
-2002-08-11	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* clock/Makefile.am: Use .$(OBJEXT) instead of .o.
- 	* timer/Makefile.am: Use .$(OBJEXT) instead of .o.
-
-2002-03-27	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* configure.ac:
-	AC_INIT(package,_RTEMS_VERSION,_RTEMS_BUGS).
-	AM_INIT_AUTOMAKE([no-define foreign 1.6]).
-	* clock/Makefile.am: Remove AUTOMAKE_OPTIONS.
-	* Makefile.am: Remove AUTOMAKE_OPTIONS.
-	* timer/Makefile.am: Remove AUTOMAKE_OPTIONS.
-
-2001-10-11	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* .cvsignore: Add autom4te.cache for autoconf > 2.52.
-	* configure.in: Remove.
-	* configure.ac: New file, generated from configure.in by autoupdate.
-
-2001-03-03	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* clock/Makefile.am: Apply *_HEADERS instead of *H_FILES.
-
-2000-11-09	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* Makefile.am: Use ... instead of RTEMS_TOPdir in ACLOCAL_AMFLAGS.
-
-2000-11-02	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* Makefile.am: Switch to ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal.
-
-2000-10-26	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* Makefile.am: ACLOCAL_AMFLAGS= -I $(RTEMS_TOPdir)/macros.
-        Switch to GNU canonicalization.
-
-2000-09-04	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
-	* clock/Makefile.am, timer/Makefile.am: Include compile.am
-
-2000-08-10	Joel Sherrill <joel@OARcorp.com>
-
-	* ChangeLog: New file.
Index: src/lib/libcpu/mips64orion/Makefile.am
===================================================================
--- c/src/lib/libcpu/mips64orion/Makefile.am	(revision be58eb2f2d1bf65248794e2d295a36522ee73cf8)
+++ 	(revision )
@@ -1,10 +1,0 @@
-##
-## $Id$
-##
-
-ACLOCAL_AMFLAGS = -I ../../../aclocal
-
-SUBDIRS = clock timer
-
-include $(top_srcdir)/../../../automake/subdirs.am
-include $(top_srcdir)/../../../automake/local.am
Index: src/lib/libcpu/mips64orion/clock/.cvsignore
===================================================================
--- c/src/lib/libcpu/mips64orion/clock/.cvsignore	(revision be58eb2f2d1bf65248794e2d295a36522ee73cf8)
+++ 	(revision )
@@ -1,2 +1,0 @@
-Makefile
-Makefile.in
Index: src/lib/libcpu/mips64orion/clock/Makefile.am
===================================================================
--- c/src/lib/libcpu/mips64orion/clock/Makefile.am	(revision be58eb2f2d1bf65248794e2d295a36522ee73cf8)
+++ 	(revision )
@@ -1,32 +1,0 @@
-##
-## $Id$
-##
-
-PGM = $(ARCH)/clock.rel
-
-C_FILES = ckinit.c
-
-S_FILES = clock.S
-
-noinst_HEADERS = clock.h
-
-clock_rel_OBJECTS = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) \
-    $(S_FILES:%.S=$(ARCH)/%.$(OBJEXT))
-
-include $(top_srcdir)/../../../automake/compile.am
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(PGM): $(clock_rel_OBJECTS)
-	$(make-rel)
-
-all-local: $(clock_rel_OBJECTS) $(PGM)
-
-.PRECIOUS: $(PGM)
-
-EXTRA_DIST = ckinit.c clock.S clock.h
-
-include $(top_srcdir)/../../../automake/local.am
Index: src/lib/libcpu/mips64orion/clock/ckinit.c
===================================================================
--- c/src/lib/libcpu/mips64orion/clock/ckinit.c	(revision be58eb2f2d1bf65248794e2d295a36522ee73cf8)
+++ 	(revision )
@@ -1,245 +1,0 @@
-
-/*  ckinit.c
- *
- *  This file contains the clock driver initialization for the IDT 4650.
- *
- *  Author:     Craig Lebakken <craigl@transition.com>
- *
- *  COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- *  To anyone who acknowledges that this file is provided "AS IS"
- *  without any express or implied warranty:
- *      permission to use, copy, modify, and distribute this file
- *      for any purpose is hereby granted without fee, provided that
- *      the above copyright notice and this notice appears in all
- *      copies, and that the name of Transition Networks not be used in
- *      advertising or publicity pertaining to distribution of the
- *      software without specific, written prior permission.
- *      Transition Networks makes no representations about the suitability
- *      of this software for any purpose.
- *
- *  Derived from c/src/lib/libbsp/no_cpu/no_bsp/clock/ckinit.c:
- *
- *  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.com/license/LICENSE.
- *
- *  $Id$
- */
-
-/*
- *  Rather than deleting this, it is commented out to (hopefully) help
- *  the submitter send updates.
- *
- *  static char _sccsid[] = "@(#)ckinit.c 08/20/96     1.3\n";
- */
-
-
-#include <stdlib.h>
-
-#include <rtems.h>
-#include <rtems/libio.h>
-
-#define EXT_INT5    0x8000  /* external interrupt 5 */
-
-#include "clock.h"
-
-/* formerly in the BSP */
-#if 0
-#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) /* equivalent to CPU clock speed in MHz */
-#endif
-
-#define CLOCKS_PER_MICROSECOND \
-  rtems_cpu_configuration_get_clicks_per_microsecond()
-/* to avoid including the bsp */
-mips_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int );
-
-void Clock_exit( void );
-rtems_isr Clock_isr( rtems_vector_number vector );
-
-
-/*
- *  The interrupt vector number associated with the clock tick device
- *  driver.
- */
-
-#define CLOCK_VECTOR_MASK    EXT_INT5
-#define CLOCK_VECTOR         0x7
-
-/*
- *  Clock_driver_ticks is a monotonically increasing counter of the
- *  number of clock ticks since the driver was initialized.
- */
-
-volatile rtems_unsigned32 Clock_driver_ticks;
-
-/*
- *  Clock_isrs is the number of clock ISRs until the next invocation of
- *  the RTEMS clock tick routine.  The clock tick device driver
- *  gets an interrupt once a millisecond and counts down until the
- *  length of time between the user configured microseconds per tick
- *  has passed.
- */
-
-rtems_unsigned32 Clock_isrs;              /* ISRs until next tick */
-
-/*
- * These are set by clock driver during its init
- */
- 
-rtems_device_major_number rtems_clock_major = ~0;
-rtems_device_minor_number rtems_clock_minor;
-
-/*
- *  The previous ISR on this clock tick interrupt vector.
- */
-
-rtems_isr_entry  Old_ticker;
-
-void Clock_exit( void );
-
-static unsigned32 mips_timer_rate = 0;
-
-/*
- *  Isr Handler
- */
-
-rtems_isr Clock_isr(
-  rtems_vector_number vector
-)
-{
-/*
- * bump the number of clock driver ticks since initialization
- *
- * determine if it is time to announce the passing of tick as configured
- * to RTEMS through the rtems_clock_tick directive
- *
- * perform any timer dependent tasks
- */
-
-  /* refresh the internal CPU timer */
-  mips_set_timer( mips_timer_rate );
-
-  Clock_driver_ticks += 1;
-
-  rtems_clock_tick();
-}
-
-/* User callback shell (set from Clock_Control) */
-static void (*user_callback)(void);
-
-rtems_isr User_Clock_isr(
-  rtems_vector_number vector
-)
-{
-   /* refresh the internal CPU timer */
-   mips_set_timer( mips_timer_rate );
-
-   if (user_callback)
-      user_callback();
-}
-
-/*
- *  Install_clock
- *
- *  Install a clock tick handleR and reprograms the chip.  This
- *  is used to initially establish the clock tick.
- */
-
-void Install_clock(
-  rtems_isr_entry clock_isr
-)
-{
-  /*
-   *  Initialize the clock tick device driver variables
-   */
-
-  Clock_driver_ticks = 0;
-  Clock_isrs = rtems_configuration_get_milliseconds_per_tick();
-
-  Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );
-  /*
-   *  Hardware specific initialize goes here
-   */
-
-  mips_timer_rate =
-     rtems_configuration_get_microseconds_per_tick() * CLOCKS_PER_MICROSECOND;
-  mips_set_timer( mips_timer_rate );
-  enable_int(CLOCK_VECTOR_MASK);
-
-  /*
-   *  Schedule the clock cleanup routine to execute if the application exits.
-   */
-
-  atexit( Clock_exit );
-}
-
-/*
- *  Clean up before the application exits
- */
-
-void Clock_exit( void )
-{
-  /* mips: turn off the timer interrupts */
-  disable_int(~CLOCK_VECTOR_MASK);
-}
-
-/*
- *  Clock_initialize
- *
- *  Device driver entry point for clock tick driver initialization.
- */
-
-rtems_device_driver Clock_initialize(
-  rtems_device_major_number major,
-  rtems_device_minor_number minor,
-  void *pargp
-)
-{
-  Install_clock( Clock_isr );
- 
-  /*
-   * make major/minor avail to others such as shared memory driver
-   */
- 
-  rtems_clock_major = major;
-  rtems_clock_minor = minor;
- 
-  return RTEMS_SUCCESSFUL;
-}
-
-rtems_device_driver Clock_control(
-  rtems_device_major_number major,
-  rtems_device_minor_number minor,
-  void *pargp
-)
-{
-    rtems_unsigned32 isrlevel;
-    rtems_libio_ioctl_args_t *args = pargp;
- 
-    if (args == 0)
-        goto done;
- 
-    /*
-     * This is hokey, but until we get a defined interface
-     * to do this, it will just be this simple...
-     */
- 
-    if (args->command == rtems_build_name('I', 'S', 'R', ' '))
-    {
-        Clock_isr(CLOCK_VECTOR);
-    }
-    else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
-    {
-      rtems_interrupt_disable( isrlevel );
-      user_callback = (void (*)(void))args->buffer;
-      (void) set_vector( User_Clock_isr, CLOCK_VECTOR, 1 );
-      rtems_interrupt_enable( isrlevel );
-    }
- 
-done:
-    return RTEMS_SUCCESSFUL;
-}
Index: src/lib/libcpu/mips64orion/clock/clock.S
===================================================================
--- c/src/lib/libcpu/mips64orion/clock/clock.S	(revision be58eb2f2d1bf65248794e2d295a36522ee73cf8)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/*  clock.s 
- *
- *  This file contains the assembly code for the IDT 4650 clock driver.
- *
- *  Author:     Craig Lebakken <craigl@transition.com>
- *
- *  COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- *  To anyone who acknowledges that this file is provided "AS IS"
- *  without any express or implied warranty:
- *      permission to use, copy, modify, and distribute this file
- *      for any purpose is hereby granted without fee, provided that
- *      the above copyright notice and this notice appears in all
- *      copies, and that the name of Transition Networks not be used in
- *      advertising or publicity pertaining to distribution of the
- *      software without specific, written prior permission.
- *      Transition Networks makes no representations about the suitability
- *      of this software for any purpose.
- *
- *  $Id$
- */
-/* @(#)clock.S       08/20/96     1.2 */
-
-#include <iregdef.h>
-#include <idtcpu.h>
-#include <idtmon.h>
-
-FRAME(mips_set_timer,sp,0,ra)
-	.set noreorder
-        mfc0 t0,C0_COUNT
-        nop
-        addu t0,a0,t0
-        mtc0 t0,C0_COMPARE
-        nop
-        j ra
-	.set reorder
-ENDFRAME(mips_set_timer)
-
-FRAME(mips_get_timer,sp,0,ra)
-	.set noreorder
-        mfc0 v0,C0_COUNT
-        nop
-        j ra
-	.set reorder
-ENDFRAME(mips_get_timer)
Index: src/lib/libcpu/mips64orion/clock/clock.h
===================================================================
--- c/src/lib/libcpu/mips64orion/clock/clock.h	(revision be58eb2f2d1bf65248794e2d295a36522ee73cf8)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/*  clock.s
- *
- *  This file contains the assembly code for the IDT 4650 clock driver.
- *
- *  Author:     Craig Lebakken <craigl@transition.com>
- *
- *  COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- *  To anyone who acknowledges that this file is provided "AS IS"
- *  without any express or implied warranty:
- *      permission to use, copy, modify, and distribute this file
- *      for any purpose is hereby granted without fee, provided that
- *      the above copyright notice and this notice appears in all
- *      copies, and that the name of Transition Networks not be used in
- *      advertising or publicity pertaining to distribution of the
- *      software without specific, written prior permission.
- *      Transition Networks makes no representations about the suitability
- *      of this software for any purpose.
- *
- *  $Id$
- */
-
-/* @(#)clock.h       08/20/96     1.2 */
-
-extern void mips_set_timer( unsigned32 timer_clock_interval );
Index: src/lib/libcpu/mips64orion/configure.ac
===================================================================
--- c/src/lib/libcpu/mips64orion/configure.ac	(revision be58eb2f2d1bf65248794e2d295a36522ee73cf8)
+++ 	(revision )
@@ -1,31 +1,0 @@
-## Process this file with autoconf to produce a configure script.
-## 
-## $Id$
-
-AC_PREREQ(2.59)
-AC_INIT([rtems-c-src-lib-libcpu-mips64orion],[_RTEMS_VERSION],[rtems-bugs@rtems.com])
-AC_CONFIG_SRCDIR([clock])
-RTEMS_TOP(../../../../..)
-
-RTEMS_CANONICAL_TARGET_CPU
-
-AM_INIT_AUTOMAKE([no-define foreign 1.8])
-AM_MAINTAINER_MODE
-
-RTEMS_ENABLE_BARE
-RTEMS_ENV_RTEMSBSP
-
-
-RTEMS_PROJECT_ROOT
-
-RTEMS_PROG_CC_FOR_TARGET
-RTEMS_CANONICALIZE_TOOLS
-RTEMS_PROG_CCAS
-
-RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
-
-# Explicitly list all Makefiles here
-AC_CONFIG_FILES([Makefile
-clock/Makefile
-timer/Makefile])
-AC_OUTPUT
Index: src/lib/libcpu/mips64orion/timer/.cvsignore
===================================================================
--- c/src/lib/libcpu/mips64orion/timer/.cvsignore	(revision be58eb2f2d1bf65248794e2d295a36522ee73cf8)
+++ 	(revision )
@@ -1,2 +1,0 @@
-Makefile
-Makefile.in
Index: src/lib/libcpu/mips64orion/timer/Makefile.am
===================================================================
--- c/src/lib/libcpu/mips64orion/timer/Makefile.am	(revision be58eb2f2d1bf65248794e2d295a36522ee73cf8)
+++ 	(revision )
@@ -1,30 +1,0 @@
-##
-## $Id$
-##
-
-PGM = $(ARCH)/timer.rel
-
-C_FILES = timer.c
-
-S_FILES = gettime.S
-
-timer_rel_OBJECTS = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) \
-    $(S_FILES:%.S=$(ARCH)/%.$(OBJEXT))
-
-include $(top_srcdir)/../../../automake/compile.am
-include $(top_srcdir)/../../../automake/lib.am
-
-#
-# (OPTIONAL) Add local stuff here using +=
-#
-
-$(PGM): $(timer_rel_OBJECTS)
-	$(make-rel)
-
-all-local: $(timer_rel_OBJECTS) $(PGM)
-
-.PRECIOUS: $(PGM)
-
-EXTRA_DIST = gettime.S timer.c
-
-include $(top_srcdir)/../../../automake/local.am
Index: src/lib/libcpu/mips64orion/timer/gettime.S
===================================================================
--- c/src/lib/libcpu/mips64orion/timer/gettime.S	(revision be58eb2f2d1bf65248794e2d295a36522ee73cf8)
+++ 	(revision )
@@ -1,35 +1,0 @@
-/*  gettime.s
- *
- *  This file contains the assembly code for the IDT 4650 timer driver.
- *
- *  Author:     Craig Lebakken <craigl@transition.com>
- *
- *  COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- *  To anyone who acknowledges that this file is provided "AS IS"
- *  without any express or implied warranty:
- *      permission to use, copy, modify, and distribute this file
- *      for any purpose is hereby granted without fee, provided that
- *      the above copyright notice and this notice appears in all
- *      copies, and that the name of Transition Networks not be used in
- *      advertising or publicity pertaining to distribution of the
- *      software without specific, written prior permission.
- *      Transition Networks makes no representations about the suitability
- *      of this software for any purpose.
- *
- *  $Id$
- */
-
-/* @(#)gettime.S       08/20/96     1.2 */
-
-#include <iregdef.h>
-#include <idtcpu.h>
-#include <idtmon.h>
-
-FRAME(mips_read_timer,sp,0,ra)
-	.set noreorder
-        mfc0 v0,C0_COUNT
-        nop
-        j ra
-	.set reorder
-ENDFRAME(mips_read_timer)
Index: src/lib/libcpu/mips64orion/timer/timer.c
===================================================================
--- c/src/lib/libcpu/mips64orion/timer/timer.c	(revision be58eb2f2d1bf65248794e2d295a36522ee73cf8)
+++ 	(revision )
@@ -1,138 +1,0 @@
-/*  timer.c
- *
- *  This file contains the initialization code for the IDT 4650 timer driver.
- *
- *  Author:     Craig Lebakken <craigl@transition.com>
- *
- *  COPYRIGHT (c) 1996 by Transition Networks Inc.
- *
- *  To anyone who acknowledges that this file is provided "AS IS"
- *  without any express or implied warranty:
- *      permission to use, copy, modify, and distribute this file
- *      for any purpose is hereby granted without fee, provided that
- *      the above copyright notice and this notice appears in all
- *      copies, and that the name of Transition Networks not be used in
- *      advertising or publicity pertaining to distribution of the
- *      software without specific, written prior permission.
- *      Transition Networks makes no representations about the suitability
- *      of this software for any purpose.
- *
- *  derived from src/lib/libbsp/no_cpu/no_bsp/timer/timer.c
- *
- *  This file manages the benchmark timer used by the RTEMS Timing Test
- *  Suite.  Each measured time period is demarcated by calls to
- *  Timer_initialize() and Read_timer().  Read_timer() usually returns
- *  the number of microseconds since Timer_initialize() exitted.
- *
- *  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.com/license/LICENSE.
- *
- *  $Id$
- */
-
-/*
- *  Rather than deleting this, it is commented out to (hopefully) help
- *  the submitter send updates.
- *
- *  static char _sccsid[] = "@(#)timer.c 08/20/96     1.5\n";
- */
-
-
-#include <rtems.h>
-
-#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ )
-#define TIMER_MAX_VALUE 0xffffffff
-
-extern unsigned32 mips_read_timer( void );
-
-static rtems_boolean Timer_driver_Find_average_overhead;
-static unsigned32 Timer_initial_value = 0;
-
-void Timer_initialize( void )
-{
-   Timer_initial_value = mips_read_timer();
-  /*
-   *  Somehow start the timer
-   */
-
-  /* Timer on 4650 is always running */
-}
-
-/*
- *  The following controls the behavior of Read_timer().
- *
- *  AVG_OVEREHAD is the overhead for starting and stopping the timer.  It
- *  is usually deducted from the number returned.
- *
- *  LEAST_VALID is the lowest number this routine should trust.  Numbers
- *  below this are "noise" and zero is returned.
- */
-
-#define AVG_OVERHEAD      8  /* It typically takes X.X microseconds */
-                             /* (Y countdowns) to start/stop the timer. */
-                             /* This value is in cycles. */
-#define LEAST_VALID       1  /* Don't trust a clicks value lower than this */
-
-int Read_timer( void )
-{
-  unsigned64 clicks;
-  unsigned32 total;
-
-  /*
-   *  Read the timer and see how many clicks it has been since we started.
-   */
-
-  clicks = mips_read_timer();   /* XXX: read some HW here */
-  if (clicks < Timer_initial_value)
-  {
-      clicks += TIMER_MAX_VALUE;
-  }
-  clicks -= Timer_initial_value;
-
-  /*
-   *  Total is calculated by taking into account the number of timer overflow
-   *  interrupts since the timer was initialized and clicks since the last
-   *  interrupts.
-   */
-#if 0 /* leave total in number of cycles */
-   total = clicks / CLOCKS_PER_MICROSECOND;
-#else
-   total = clicks;
-#endif
-
-  if ( Timer_driver_Find_average_overhead == 1 )
-    return total;          /* in # cycles units */
-  else {
-    if ( total < LEAST_VALID )
-      return 0;            /* below timer resolution */
-  /*
-   *  leave total in cycles
-   */
-      return (total - AVG_OVERHEAD);
-    }
-}
-
-/*
- *  Empty function call used in loops to measure basic cost of looping
- *  in Timing Test Suite.
- */
-
-rtems_status_code Empty_function( void )
-{
-  return RTEMS_SUCCESSFUL;
-}
-
-void Set_find_average_overhead(
-  rtems_boolean find_flag
-)
-{
-  Timer_driver_Find_average_overhead = find_flag;
-}
-
