Ignore:
Timestamp:
Sep 11, 1995, 7:35:39 PM (26 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
ced11f99
Parents:
5072b07
Message:

The word "RTEMS" almost completely removed from the core.

Configuration Table Template file added and all tests
modified to use this. All gvar.h and conftbl.h files
removed from test directories.

Configuration parameter maximum_devices added.

Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.

Initialization sequence changed to invoke API specific initialization
routines. Initialization tasks table now owned by RTEMS Tasks Manager.

Added user extension for post-switch.

Utilized user extensions to implement API specific functionality
like signal dispatching.

Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized. These are largely equivalent to the
pre-driver and post-driver hooks.

Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.

All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver. Also merged clock isr into
main file and removed ckisr.c where possible.

Updated spsize to reflect new and moved variables.

Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.

Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/mvme162/clock/ckinit.c

    r5072b07 r3a4ae6c  
    2828#include <stdlib.h>
    2929
    30 #include <rtems.h>
    3130#include <bsp.h>
    32 #include <clockdrv.h>
     31#include <rtems/libio.h>
    3332
    3433#define MS_COUNT          1000            /* T2's countdown constant (1 ms) */
     
    3938rtems_isr_entry  Old_ticker;
    4039
    41 rtems_device_driver Clock_initialize(
    42   rtems_device_major_number major,
    43   rtems_device_minor_number minor,
    44   void *pargp,
    45   rtems_id tid,
    46   rtems_unsigned32 *rval
    47 )
     40void Clock_exit( void );
     41 
     42#define CLOCK_VECTOR (VBR0 * 0x10 + 0x9)
     43/*
     44 * These are set by clock driver during its init
     45 */
     46 
     47rtems_device_major_number rtems_clock_major = ~0;
     48rtems_device_minor_number rtems_clock_minor;
     49 
     50
     51/*
     52 *  ISR Handler
     53 */
     54
     55rtems_isr Clock_isr(rtems_vector_number vector)
    4856{
    49   Install_clock( Clock_isr );
    50 }
     57  Clock_driver_ticks += 1;
     58  lcsr->timer_cnt_2 = 0;            /* clear counter */
     59  lcsr->intr_clear |= 0x02000000;
    5160
    52 void ReInstall_clock(rtems_isr_entry clock_isr)
    53 {
    54   rtems_unsigned32 isrlevel;
    55 
    56   rtems_interrupt_disable( isrlevel );
    57   (void) set_vector( clock_isr, VBR0 * 0x10 + 0x9, 1 );
    58   rtems_interrupt_enable( isrlevel );
     61  if ( Clock_isrs == 1 ) {
     62    rtems_clock_tick();
     63    Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
     64  }
     65  else
     66    Clock_isrs -= 1;
    5967}
    6068
     
    6775  if ( BSP_Configuration.ticks_per_timeslice ) {
    6876    Old_ticker =
    69       (rtems_isr_entry) set_vector( clock_isr, VBR0 * 0x10 + 0x9, 1 );
     77      (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );
    7078    lcsr->vector_base |= MASK_INT;   /* unmask VMEchip2 interrupts */
    7179    lcsr->to_ctl = 0xE7;             /* prescaler to 1 MHz (see Appendix A1) */
     
    8088    atexit( Clock_exit );
    8189  }
     90}
    8291
     92void ReInstall_clock(rtems_isr_entry clock_isr)
     93{
     94  rtems_unsigned32 isrlevel;
     95
     96  rtems_interrupt_disable( isrlevel );
     97  (void) set_vector( clock_isr, CLOCK_VECTOR, 1 );
     98  rtems_interrupt_enable( isrlevel );
    8399}
    84100
     
    87103/* Dummy for now. See other m68k BSP's for code examples */
    88104}
     105
     106rtems_device_driver Clock_initialize(
     107  rtems_device_major_number major,
     108  rtems_device_minor_number minor,
     109  void *pargp
     110)
     111{
     112  Install_clock( Clock_isr );
     113 
     114  /*
     115   * make major/minor avail to others such as shared memory driver
     116   */
     117 
     118  rtems_clock_major = major;
     119  rtems_clock_minor = minor;
     120 
     121  return RTEMS_SUCCESSFUL;
     122}
     123 
     124rtems_device_driver Clock_control(
     125  rtems_device_major_number major,
     126  rtems_device_minor_number minor,
     127  void *pargp
     128)
     129{
     130    rtems_libio_ioctl_args_t *args = pargp;
     131 
     132    if (args == 0)
     133        goto done;
     134 
     135    /*
     136     * This is hokey, but until we get a defined interface
     137     * to do this, it will just be this simple...
     138     */
     139 
     140    if (args->command == rtems_build_name('I', 'S', 'R', ' '))
     141    {
     142        Clock_isr(CLOCK_VECTOR);
     143    }
     144    else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
     145    {
     146        ReInstall_clock(args->buffer);
     147    }
     148 
     149done:
     150    return RTEMS_SUCCESSFUL;
     151}
     152
Note: See TracChangeset for help on using the changeset viewer.