Changeset b06e68ef in rtems for c/src/lib/libcpu/hppa1.1/clock


Ignore:
Timestamp:
Aug 17, 1995, 7:51:51 PM (26 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
95fbca1
Parents:
3b438fa
Message:

Numerous miscellaneous features incorporated from Tony Bennett
(tbennett@…) including the following major additions:

+ variable length messages
+ named devices
+ debug monitor
+ association tables/variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/hppa1.1/clock/clock.c

    r3b438fa rb06e68ef  
    1515 */
    1616
     17#include <rtems.h>
    1718#include <bsp.h>
    18 #include <clockdrv.h>
     19#include <rtems/libio.h>
    1920
    2021#include <stdlib.h>                     /* for atexit() */
     
    2324
    2425typedef unsigned long long hppa_click_count_t;
     26
     27/*
     28 * These are set by clock driver during its init
     29 */
     30
     31rtems_device_major_number rtems_clock_major = ~0;
     32rtems_device_minor_number rtems_clock_minor;
    2533
    2634/*
     
    4250rtems_unsigned32   Clock_clicks_interrupt;
    4351
    44 rtems_device_driver Clock_initialize(
    45   rtems_device_major_number major,
    46   rtems_device_minor_number minor,
    47   void *pargp,
    48   rtems_id tid,
    49   rtems_unsigned32 *rval
    50 )
    51 {
    52     Install_clock(Clock_isr);
    53 }
     52void  Clock_exit(void);
    5453
    5554void
     
    219218}
    220219
     220rtems_device_driver Clock_initialize(
     221  rtems_device_major_number major,
     222  rtems_device_minor_number minor,
     223  void *pargp
     224)
     225{
     226    Install_clock(Clock_isr);
     227
     228    /*
     229     * make major/minor avail to others such as shared memory driver
     230     */
     231    rtems_clock_major = major;
     232    rtems_clock_minor = minor;
     233
     234    return RTEMS_SUCCESSFUL;
     235}
     236
     237rtems_device_driver Clock_control(
     238  rtems_device_major_number major,
     239  rtems_device_minor_number minor,
     240  void *pargp
     241)
     242{
     243    rtems_libio_ioctl_args_t *args = pargp;
     244
     245    if (args == 0)
     246        goto done;
     247
     248    /*
     249     * This is hokey, but until we get a defined interface
     250     * to do this, it will just be this simple...
     251     */
     252
     253    if (args->command == rtems_build_name('I', 'S', 'R', ' '))
     254    {
     255        Clock_isr(HPPA_INTERRUPT_EXTERNAL_INTERVAL_TIMER);
     256    }
     257    else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
     258    {
     259        ReInstall_clock(args->buffer);
     260    }
     261   
     262done:
     263    return RTEMS_SUCCESSFUL;
     264}
Note: See TracChangeset for help on using the changeset viewer.