Changeset dad34779 in rtems


Ignore:
Timestamp:
Sep 5, 2008, 10:06:54 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
34c33ff
Parents:
34ef6c7
Message:

2008-09-05 Joel Sherrill <joel.sherrill@…>

  • mpc5xx/clock/clock.c, mpc6xx/clock/c_clock.c, mpc8260/clock/clock.c, mpc8xx/clock/clock.c, ppc403/clock/clock.c, ppc403/clock/clock_4xx.c: The Shared Memory Driver no longer requires the special IOCTL in Clock_control. This was a hack which has existed since before the Classic API Timer Manager was implemented. All implementations of and references to Clock_control were removed.
Location:
c/src/lib/libcpu/powerpc
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/powerpc/ChangeLog

    r34ef6c7 rdad34779  
     12008-09-05      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * mpc5xx/clock/clock.c, mpc6xx/clock/c_clock.c, mpc8260/clock/clock.c,
     4        mpc8xx/clock/clock.c, ppc403/clock/clock.c, ppc403/clock/clock_4xx.c:
     5        The Shared Memory Driver no longer requires the special IOCTL in
     6        Clock_control. This was a hack which has existed since before the
     7        Classic API Timer Manager was implemented. All implementations of and
     8        references to Clock_control were removed.
     9
    1102008-09-05      Joel Sherrill <joel.sherrill@oarcorp.com>
    211
  • c/src/lib/libcpu/powerpc/mpc5xx/clock/clock.c

    r34ef6c7 rdad34779  
    168168  return RTEMS_SUCCESSFUL;
    169169}
    170  
    171 rtems_device_driver Clock_control(
    172   rtems_device_major_number major,
    173   rtems_device_minor_number minor,
    174   void *pargp
    175 )
    176 {
    177   rtems_libio_ioctl_args_t *args = pargp;
    178  
    179   if (args == 0)
    180     goto done;
    181  
    182   /*
    183    * This is hokey, but until we get a defined interface
    184    * to do this, it will just be this simple...
    185    */
    186  
    187   if (args->command == rtems_build_name('I', 'S', 'R', ' ')) {
    188     Clock_isr(0);               /* vector number ignored */
    189   }
    190   else if (args->command == rtems_build_name('N', 'E', 'W', ' ')) {
    191     ReInstall_clock(args->buffer);
    192   }
    193  
    194  done:
    195   return RTEMS_SUCCESSFUL;
    196 }
  • c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c

    r34ef6c7 rdad34779  
    304304  return RTEMS_SUCCESSFUL;
    305305} /* Clock_initialize */
    306  
    307 /*
    308  *  Clock_control
    309  *
    310  *  This routine is the clock device driver control entry point.
    311  *
    312  *  Input parameters:
    313  *    major - clock device major number
    314  *    minor - clock device minor number
    315  *    parg  - pointer to optional device driver arguments
    316  *
    317  *  Output parameters:  NONE
    318  *
    319  *  Return values:
    320  *    rtems_device_driver status code
    321  */
    322 
    323 rtems_device_driver Clock_control(
    324   rtems_device_major_number major,
    325   rtems_device_minor_number minor,
    326   void *pargp
    327 )
    328 {
    329     rtems_libio_ioctl_args_t *args = pargp;
    330  
    331     if (args == 0)
    332         goto done;
    333  
    334     Clock_Decrementer_value = (BSP_bus_frequency/BSP_time_base_divisor)*
    335       (rtems_configuration_get_microseconds_per_tick()/1000);
    336 
    337     if      (args->command == rtems_build_name('I', 'S', 'R', ' '))
    338       clockHandler();
    339     else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
    340     {
    341         if (clock_handler == NULL)
    342             Clock_initialize(major, minor, 0);
    343         clock_handler = args->buffer;
    344     }
    345 done:
    346     return RTEMS_SUCCESSFUL;
    347 }
  • c/src/lib/libcpu/powerpc/mpc8260/clock/clock.c

    r34ef6c7 rdad34779  
    180180  return RTEMS_SUCCESSFUL;
    181181}
    182  
    183 rtems_device_driver Clock_control(
    184   rtems_device_major_number major,
    185   rtems_device_minor_number minor,
    186   void *pargp
    187 )
    188 {
    189   rtems_libio_ioctl_args_t *args = pargp;
    190  
    191   if (args == 0)
    192     goto done;
    193  
    194   /*
    195    * This is hokey, but until we get a defined interface
    196    * to do this, it will just be this simple...
    197    */
    198  
    199   if (args->command == rtems_build_name('I', 'S', 'R', ' ')) {
    200     Clock_isr(BSP_PERIODIC_TIMER);
    201   }
    202   else if (args->command == rtems_build_name('N', 'E', 'W', ' ')) {
    203     ReInstall_clock(args->buffer);
    204   }
    205  
    206  done:
    207   return RTEMS_SUCCESSFUL;
    208 }
  • c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c

    r34ef6c7 rdad34779  
    180180  return RTEMS_SUCCESSFUL;
    181181}
    182  
    183 rtems_device_driver Clock_control(
    184   rtems_device_major_number major,
    185   rtems_device_minor_number minor,
    186   void *pargp
    187 )
    188 {
    189   rtems_libio_ioctl_args_t *args = pargp;
    190  
    191   if (args == 0)
    192     goto done;
    193  
    194   /*
    195    * This is hokey, but until we get a defined interface
    196    * to do this, it will just be this simple...
    197    */
    198  
    199   if (args->command == rtems_build_name('I', 'S', 'R', ' ')) {
    200     Clock_isr(PPC_IRQ_LVL0);
    201   }
    202   else if (args->command == rtems_build_name('N', 'E', 'W', ' ')) {
    203     ReInstall_clock(args->buffer);
    204   }
    205  
    206  done:
    207   return RTEMS_SUCCESSFUL;
    208 }
  • c/src/lib/libcpu/powerpc/ppc403/clock/clock.c

    r34ef6c7 rdad34779  
    450450  return RTEMS_SUCCESSFUL;
    451451}
    452  
    453 rtems_device_driver Clock_control(
    454   rtems_device_major_number major,
    455   rtems_device_minor_number minor,
    456   void *pargp
    457 )
    458 {
    459     rtems_libio_ioctl_args_t *args = pargp;
    460  
    461     if (args == 0)
    462         goto done;
    463  
    464     /*
    465      * This is hokey, but until we get a defined interface
    466      * to do this, it will just be this simple...
    467      */
    468  
    469     if (args->command == rtems_build_name('I', 'S', 'R', ' '))
    470     {
    471 #if PPC_HAS_CLASSIC_EXCEPTIONS
    472         Clock_isr(PPC_IRQ_PIT);
    473 #elif defined(BSP_PPC403_CLOCK_HOOK_EXCEPTION)
    474         Clock_isr(NULL, BSP_PPC403_CLOCK_HOOK_EXCEPTION);
    475 #else
    476         Clock_isr(NULL);
    477 #endif
    478     }
    479     else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
    480     {
    481         ReInstall_clock(args->buffer);
    482     }
    483  
    484 done:
    485     return RTEMS_SUCCESSFUL;
    486 }
  • c/src/lib/libcpu/powerpc/ppc403/clock/clock_4xx.c

    r34ef6c7 rdad34779  
    227227  return RTEMS_SUCCESSFUL;
    228228}
    229  
    230 
    231 rtems_device_driver Clock_control(
    232   rtems_device_major_number major,
    233   rtems_device_minor_number minor,
    234   void *pargp
    235 )
    236 {
    237     rtems_libio_ioctl_args_t* args = pargp;
    238  
    239     if (args!=NULL) {
    240                 /*
    241                  * This is hokey, but until we get a defined interface
    242                  * to do this, it will just be this simple...
    243                  */
    244          
    245                 if (args->command == rtems_build_name('I', 'S', 'R', ' '))
    246                         Clock_isr(NULL);
    247                 else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
    248                         ReInstall_clock(args->buffer);
    249         }
    250     return RTEMS_SUCCESSFUL;
    251 }
Note: See TracChangeset for help on using the changeset viewer.