Ignore:
Timestamp:
Nov 26, 2007, 11:02:17 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
edcb982
Parents:
26d47f8
Message:

2007-11-26 Joel Sherrill <joel.sherrill@…>

  • clock/ckinit.c, startup/bspstart.c: Eliminate the clicks_per_microsecond field in the SuperH CPU Table and define another mechanism for drivers to obtain this information.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sh/simsh4/clock/ckinit.c

    r26d47f8 rfa920f1  
    1919#include <bsp.h>
    2020#include <rtems/libio.h>
     21
     22extern uint32_t bsp_clicks_per_second;
    2123
    2224/*
     
    9698Install_clock(rtems_isr_entry clock_isr)
    9799{
    98     uint32_t         period;
    99     Clock_driver_ticks = 0;
    100     if (BSP_Configuration.ticks_per_timeslice)
    101     {
    102         rtems_isr_entry  old_isr;
    103         period = Cpu_table.clicks_per_second /
    104                  BSP_Configuration.ticks_per_timeslice;
     100  uint32_t         period;
    105101
    106         /* Configure timer interrupts */
    107         set_clock_period(period);
     102  Clock_driver_ticks = 0;
     103  if (BSP_Configuration.ticks_per_timeslice) {
     104      rtems_isr_entry  old_isr;
     105      period = bsp_clicks_per_second / BSP_Configuration.ticks_per_timeslice;
    108106
    109         /* Register the interrupt handler */
    110         rtems_interrupt_catch(clock_isr, CLOCK_VECTOR, &old_isr);
     107      /* Configure timer interrupts */
     108      set_clock_period(period);
    111109
    112         /* Register the driver exit procedure so we can shutdown */
    113         atexit(Clock_exit);
    114     }
     110      /* Register the interrupt handler */
     111      rtems_interrupt_catch(clock_isr, CLOCK_VECTOR, &old_isr);
     112
     113      /* Register the driver exit procedure so we can shutdown */
     114      atexit(Clock_exit);
     115  }
    115116}
    116117
Note: See TracChangeset for help on using the changeset viewer.