diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2005-04-28 16:17:39 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2005-04-28 16:17:39 +0000 |
commit | 27d619b86bd3ea6a36c8d3258ac6cba06b22a6e6 (patch) | |
tree | 676f2c9228a668ad9e8cdebc4fc10866204459da /c/src/lib/libbsp/powerpc/ppcn_60x/clock/clock.c | |
parent | 2005-04-28 Jennifer Averett <jennifer.averett@oarcorp.com> (diff) | |
download | rtems-27d619b86bd3ea6a36c8d3258ac6cba06b22a6e6.tar.bz2 |
2005-04-28 Joel Sherrill <joel@OARcorp.com>
* acinclude.m4: Remove dmv177 and ppcn_60x.
* dmv177/.cvsignore, dmv177/ChangeLog, dmv177/Makefile.am,
dmv177/QUIRKS, dmv177/README, dmv177/README.net, dmv177/STATUS,
dmv177/bsp_specs, dmv177/cable.doc, dmv177/configure.ac,
dmv177/times, dmv177/clock/clock.c, dmv177/console/conscfg.c,
dmv177/console/debugio.c, dmv177/include/.cvsignore,
dmv177/include/bsp.h, dmv177/include/dmv170.h, dmv177/include/tm27.h,
dmv177/scv64/scv64.c, dmv177/sonic/dmvsonic.c, dmv177/start/start.S,
dmv177/startup/bspclean.c, dmv177/startup/bspstart.c,
dmv177/startup/genpvec.c, dmv177/startup/linkcmds,
dmv177/startup/setvec.c, dmv177/startup/vmeintr.c,
dmv177/timer/timer.c, dmv177/tod/todcfg.c, ppcn_60x/.cvsignore,
ppcn_60x/ChangeLog, ppcn_60x/Makefile.am, ppcn_60x/README,
ppcn_60x/STATUS, ppcn_60x/bsp_specs, ppcn_60x/configure.ac,
ppcn_60x/clock/clock.c, ppcn_60x/console/config.c,
ppcn_60x/console/console.c, ppcn_60x/console/console.h,
ppcn_60x/console/debugio.c, ppcn_60x/console/i8042.c,
ppcn_60x/console/i8042_p.h, ppcn_60x/console/i8042vga.c,
ppcn_60x/console/i8042vga.h, ppcn_60x/console/ns16550cfg.c,
ppcn_60x/console/ns16550cfg.h, ppcn_60x/console/vga.c,
ppcn_60x/console/vga_p.h, ppcn_60x/console/z85c30cfg.c,
ppcn_60x/console/z85c30cfg.h, ppcn_60x/include/.cvsignore,
ppcn_60x/include/bsp.h, ppcn_60x/include/extisrdrv.h,
ppcn_60x/include/nvram.h, ppcn_60x/include/pci.h,
ppcn_60x/include/tm27.h, ppcn_60x/network/amd79c970.c,
ppcn_60x/network/amd79c970.h, ppcn_60x/nvram/ds1385.h,
ppcn_60x/nvram/mk48t18.h, ppcn_60x/nvram/nvram.c,
ppcn_60x/nvram/prepnvr.h, ppcn_60x/nvram/stk11c68.h,
ppcn_60x/pci/pci.c, ppcn_60x/start/start.S,
ppcn_60x/startup/bspclean.c, ppcn_60x/startup/bspstart.c,
ppcn_60x/startup/bsptrap.S, ppcn_60x/startup/genpvec.c,
ppcn_60x/startup/linkcmds, ppcn_60x/startup/rtems-ctor.cc,
ppcn_60x/startup/setvec.c, ppcn_60x/startup/spurious.c,
ppcn_60x/startup/swap.c, ppcn_60x/timer/timer.c, ppcn_60x/tod/cmos.h,
ppcn_60x/tod/tod.c, ppcn_60x/universe/universe.c,
ppcn_60x/vectors/README, ppcn_60x/vectors/align_h.S,
ppcn_60x/vectors/vectors.S: Removed.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/ppcn_60x/clock/clock.c')
-rw-r--r-- | c/src/lib/libbsp/powerpc/ppcn_60x/clock/clock.c | 224 |
1 files changed, 0 insertions, 224 deletions
diff --git a/c/src/lib/libbsp/powerpc/ppcn_60x/clock/clock.c b/c/src/lib/libbsp/powerpc/ppcn_60x/clock/clock.c deleted file mode 100644 index c40b1d30ca..0000000000 --- a/c/src/lib/libbsp/powerpc/ppcn_60x/clock/clock.c +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Clock Tick Device Driver - * - * This routine utilizes the Decrementer Register common to the PPC family. - * - * The tick frequency is directly programmed to the configured number of - * microseconds per tick. - * - * COPYRIGHT (c) 1989-1997. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may in - * the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id$ - */ - -#include <stdlib.h> - -#include <bsp.h> -#include <rtems/libio.h> -#include <assert.h> - -/* - * The Real Time Clock Counter Timer uses this trap type. - */ - -#define CLOCK_VECTOR PPC_IRQ_DECREMENTER - -/* - * Clock ticks since initialization - */ - -volatile uint32_t Clock_driver_ticks; - -/* - * This is the value programmed into the count down timer. - */ - -uint32_t Clock_Decrementer_value; - -rtems_isr_entry Old_ticker; - -void Clock_exit( void ); - -/* - * These are set by clock driver during its init - */ - -rtems_device_major_number rtems_clock_major = ~0; -rtems_device_minor_number rtems_clock_minor; - -/* - * Clock_isr - * - * This is the clock tick interrupt handler. - * - * Input parameters: - * vector - vector number - * - * Output parameters: NONE - * - * Return values: NONE - * - */ -rtems_isr Clock_isr( - rtems_vector_number vector, - CPU_Interrupt_frame *frame -) -{ - /* - * Set the decrementer. - */ - - PPC_Set_decrementer( Clock_Decrementer_value ); - - /* - * The driver has seen another tick. - */ - - Clock_driver_ticks += 1; - - /* - * Real Time Clock counter/timer is set to automatically reload. - */ - - rtems_clock_tick(); -} - -/* - * Install_clock - * - * This routine actually performs the hardware initialization for the clock. - * - * Input parameters: - * clock_isr - clock interrupt service routine entry point - * - * Output parameters: NONE - * - * Return values: NONE - * - */ - -extern int CLOCK_SPEED; - -void Install_clock( - rtems_isr_entry clock_isr -) -{ - Clock_driver_ticks = 0; - - Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 ); - - PPC_Set_decrementer( Clock_Decrementer_value ); - - atexit( Clock_exit ); -} - -/* - * Clock_exit - * - * This routine allows the clock driver to exit by masking the interrupt and - * disabling the clock's counter. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * Return values: NONE - * - */ - -void Clock_exit( void ) -{ - /* nothing to do */; - - /* do not restore old vector */ -} - -/* - * Clock_initialize - * - * This routine initializes the clock driver. - * - * Input parameters: - * major - clock device major number - * minor - clock device minor number - * parg - pointer to optional device driver arguments - * - * Output parameters: NONE - * - * Return values: - * rtems_device_driver status code - */ - -rtems_device_driver Clock_initialize( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - Clock_Decrementer_value = (ulCpuBusClock/4000)* - (BSP_Configuration.microseconds_per_tick/1000); - - Install_clock((rtems_isr_entry)Clock_isr); - - /* - * make major/minor avail to others such as shared memory driver - */ - - rtems_clock_major = major; - rtems_clock_minor = minor; - - return RTEMS_SUCCESSFUL; -} - -/* - * Clock_control - * - * This routine is the clock device driver control entry point. - * - * Input parameters: - * major - clock device major number - * minor - clock device minor number - * parg - pointer to optional device driver arguments - * - * Output parameters: NONE - * - * Return values: - * rtems_device_driver status code - */ - -rtems_device_driver Clock_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - uint32_t 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, pargp ); - } - else if (args->command == rtems_build_name('N', 'E', 'W', ' ')) - { - rtems_interrupt_disable( isrlevel ); - (void) set_vector( args->buffer, CLOCK_VECTOR, 1 ); - rtems_interrupt_enable( isrlevel ); - } - -done: - return RTEMS_SUCCESSFUL; -} |